typedef enum OSGK_ScriptResult
{
srSuccess = 0,
- srFailed = 0x80004005L /* actually NS_ERROR_FAILURE */
+ srFailed = (int)0x80004005L /* actually NS_ERROR_FAILURE */
} OSGK_ScriptResult;
typedef struct OSGK_ScriptObjectCreateParams_s
return;
}
}
- Con_Printf("CL_Locs_FreeNode: no such node! (%p)\n", node);
+ Con_Printf("CL_Locs_FreeNode: no such node! (%p)\n", (void *)node);
}
void CL_Locs_AddNode(vec3_t mins, vec3_t maxs, const char *name)
CL_Particles_ParseEffectInfo((const char *)filedata, (const char *)filedata + filesize);
Mem_Free(filedata);
}
-};
+}
/*
===============
return Mod_Alias_GetTagIndexForName(model, (int)e->fields.client->skin, tagname);
else
return -1;
-};
+}
int CL_GetExtendedTagInfo (prvm_edict_t *e, int tagindex, int *parentindex, const char **tagname, matrix4x4_t *tag_localmatrix)
{
if (numvertices < 3 || numtriangles < 1)
{
if (numvertices < 0 || numtriangles < 0 || developer.integer >= 100)
- Con_Printf("R_Mesh_Draw(%d, %d, %d, %d, %8p, %8p, %i, %i);\n", firstvertex, numvertices, firsttriangle, numtriangles, element3i, element3s, bufferobject3i, bufferobject3s);
+ Con_Printf("R_Mesh_Draw(%d, %d, %d, %d, %8p, %8p, %i, %i);\n", firstvertex, numvertices, firsttriangle, numtriangles, (void *)element3i, (void *)element3s, bufferobject3i, bufferobject3s);
return;
}
if (!gl_mesh_prefer_short_elements.integer)
Con_Printf("%c%4i%c%c%4i%c %s %s %s %s\n", isloaded ? '[' : ' ', (glsize + 1023) / 1024, isloaded ? ']' : ' ', glt->inputtexels ? '[' : ' ', (glt->inputdatasize + 1023) / 1024, glt->inputtexels ? ']' : ' ', isloaded ? "loaded" : " ", (glt->flags & TEXF_MIPMAP) ? "mip" : " ", (glt->flags & TEXF_ALPHA) ? "alpha" : " ", glt->identifier);
}
if (printpool)
- Con_Printf("texturepool %10p total: %i (%.3fMB, %.3fMB original), uploaded %i (%.3fMB, %.3fMB original), upload on demand %i (%.3fMB, %.3fMB original)\n", pool, pooltotal, pooltotalt / 1048576.0, pooltotalp / 1048576.0, poolloaded, poolloadedt / 1048576.0, poolloadedp / 1048576.0, pooltotal - poolloaded, (pooltotalt - poolloadedt) / 1048576.0, (pooltotalp - poolloadedp) / 1048576.0);
+ Con_Printf("texturepool %10p total: %i (%.3fMB, %.3fMB original), uploaded %i (%.3fMB, %.3fMB original), upload on demand %i (%.3fMB, %.3fMB original)\n", (void *)pool, pooltotal, pooltotalt / 1048576.0, pooltotalp / 1048576.0, poolloaded, poolloadedt / 1048576.0, poolloadedp / 1048576.0, pooltotal - poolloaded, (pooltotalt - poolloadedt) / 1048576.0, (pooltotalp - poolloadedp) / 1048576.0);
sumtotal += pooltotal;
sumtotalt += pooltotalt;
sumtotalp += pooltotalp;
in = Cmd_Argv(2);
out = send+4;
- send[0] = send[1] = send[2] = send[3] = 0xff;
+ send[0] = send[1] = send[2] = send[3] = -1;
l = (int)strlen (in);
for (i=0 ; i<l ; i++)
static void (*qpng_set_sig_bytes) (void*, int);
static int (*qpng_sig_cmp) (const unsigned char*, size_t, size_t);
-static void* (*qpng_create_read_struct) (const char*, void*, void*, void*);
+static void* (*qpng_create_read_struct) (const char*, void*, void(*)(void *png, const char *message), void(*)(void *png, const char *message));
static void* (*qpng_create_info_struct) (void*);
static void (*qpng_read_info) (void*, void*);
static void (*qpng_set_expand) (void*);
static void (*qpng_read_image) (void*, unsigned char**);
static void (*qpng_read_end) (void*, void*);
static void (*qpng_destroy_read_struct) (void**, void**, void**);
-static void (*qpng_set_read_fn) (void*, void*, void*);
+static void (*qpng_set_read_fn) (void*, void*, void(*)(void *png, unsigned char *data, size_t length));
static unsigned int (*qpng_get_valid) (void*, void*, unsigned int);
static unsigned int (*qpng_get_rowbytes) (void*, void*);
static unsigned char (*qpng_get_channels) (void*, void*);
if(qpng_sig_cmp(raw, 0, filesize))
return NULL;
- png = (void *)qpng_create_read_struct(PNG_LIBPNG_VER_STRING, 0, (void *)PNG_error_fn, (void *)PNG_warning_fn);
+ png = (void *)qpng_create_read_struct(PNG_LIBPNG_VER_STRING, 0, PNG_error_fn, PNG_warning_fn);
if(!png)
return NULL;
//my_png.Interlace = 0;
//my_png.Compression = 0;
//my_png.Filter = 0;
- qpng_set_read_fn(png, ioBuffer, (void *)PNG_fReadData);
+ qpng_set_read_fn(png, ioBuffer, PNG_fReadData);
qpng_read_info(png, pnginfo);
qpng_get_IHDR(png, pnginfo, &my_png.Width, &my_png.Height,&my_png.BitDepth, &my_png.ColorType, &my_png.Interlace, &my_png.Compression, &my_png.Filter);
break;
}
return 0;
-};
+}
void M_Menu_Quit_f (void)
{
out->firstleafsurface = loadmodel->brush.data_leafsurfaces + (unsigned short)LittleShort(in->firstmarksurface);
out->numleafsurfaces = (unsigned short)LittleShort(in->nummarksurfaces);
- if (out->firstleafsurface < 0 || (unsigned short)LittleShort(in->firstmarksurface) + out->numleafsurfaces > loadmodel->brush.num_leafsurfaces)
+ if ((unsigned short)LittleShort(in->firstmarksurface) + out->numleafsurfaces > loadmodel->brush.num_leafsurfaces)
{
Con_Printf("Mod_Q1BSP_LoadLeafs: invalid leafsurface range %i:%i outside range %i:%i\n", (int)(out->firstleafsurface - loadmodel->brush.data_leafsurfaces), (int)(out->firstleafsurface + out->numleafsurfaces - loadmodel->brush.data_leafsurfaces), 0, loadmodel->brush.num_leafsurfaces);
out->firstleafsurface = NULL;
if (length > 0)
{
LHNETADDRESS_ToString(peeraddress, addressstring2, sizeof(addressstring2), true);
- Con_Printf("LHNET_Read(%p (%s), %p, %i, %p) = %i from %s:\n", mysocket, addressstring, data, maxlength, peeraddress, length, addressstring2);
+ Con_Printf("LHNET_Read(%p (%s), %p, %i, %p) = %i from %s:\n", (void *)mysocket, addressstring, (void *)data, maxlength, (void *)peeraddress, length, addressstring2);
Com_HexDumpToConsole((unsigned char *)data, length);
}
else
- Con_Printf("LHNET_Read(%p (%s), %p, %i, %p) = %i\n", mysocket, addressstring, data, maxlength, peeraddress, length);
+ Con_Printf("LHNET_Read(%p (%s), %p, %i, %p) = %i\n", (void *)mysocket, addressstring, (void *)data, maxlength, (void *)peeraddress, length);
}
return length;
}
char addressstring[128], addressstring2[128];
LHNETADDRESS_ToString(LHNET_AddressFromSocket(mysocket), addressstring, sizeof(addressstring), true);
LHNETADDRESS_ToString(peeraddress, addressstring2, sizeof(addressstring2), true);
- Con_Printf("LHNET_Write(%p (%s), %p, %i, %p (%s)) = %i%s\n", mysocket, addressstring, data, length, peeraddress, addressstring2, length, ret == length ? "" : " (ERROR)");
+ Con_Printf("LHNET_Write(%p (%s), %p, %i, %p (%s)) = %i%s\n", (void *)mysocket, addressstring, (void *)data, length, (void *)peeraddress, addressstring2, length, ret == length ? "" : " (ERROR)");
Com_HexDumpToConsole((unsigned char *)data, length);
}
return ret;
Con_Printf("gettagindex(entity #%i): tag \"%s\" not found\n", PRVM_NUM_FOR_EDICT(ent), tag_name);
}
PRVM_G_FLOAT(OFS_RETURN) = tag_index;
-};
+}
//vector(entity ent, float tagindex) gettaginfo;
static void VM_SV_gettaginfo (void)
for(i = 0; i < colors; ++i)
{
- int r, g, b;
+ unsigned int r, g, b;
char idx;
if(sscanf(idata[i+1], "%c c #%02x%02x%02x", &idx, &r, &g, &b) != 4)
if (entitynumber <= 0 || entitynumber >= prog->max_edicts || PRVM_EDICT_NUM(entitynumber) != ent)
{
- Con_Printf ("SV_LinkEdict_AreaGrid: invalid edict %p (edicts is %p, edict compared to prog->edicts is %i)\n", ent, prog->edicts, entitynumber);
+ Con_Printf ("SV_LinkEdict_AreaGrid: invalid edict %p (edicts is %p, edict compared to prog->edicts is %i)\n", (void *)ent, (void *)prog->edicts, entitynumber);
return;
}
{
if ((pool->flags & POOLFLAG_TEMP) && pool->chain)
{
- Con_Printf("Memory pool %p has sprung a leak totalling %lu bytes (%.3fMB)! Listing contents...\n", pool, (unsigned long)pool->totalsize, pool->totalsize / 1048576.0);
+ Con_Printf("Memory pool %p has sprung a leak totalling %lu bytes (%.3fMB)! Listing contents...\n", (void *)pool, (unsigned long)pool->totalsize, pool->totalsize / 1048576.0);
for (mem = pool->chain;mem;mem = mem->next)
Con_Printf("%10lu bytes allocated at %s:%i\n", (unsigned long)mem->size, mem->filename, mem->fileline);
}