1
0
Fork 0
forked from fte/fteqw

Less warnings (none at the gcc-default warning level)

git-svn-id: https://svn.code.sf.net/p/fteqw/code/trunk@2046 fc73d0e0-1445-4013-8a0c-d673dee63da5
This commit is contained in:
Spoike 2006-03-04 20:43:48 +00:00
parent 338d6a53ed
commit d27d3c5b6d
26 changed files with 241 additions and 235 deletions

View file

@ -3070,7 +3070,7 @@ void CL_SetSolidEntities (void)
{ {
state = &pak->entities[i]; state = &pak->entities[i];
if (state->modelindex<0) if (state->modelindex <= 0)
continue; continue;
if (!cl.model_precache[state->modelindex]) if (!cl.model_precache[state->modelindex])
continue; continue;

View file

@ -67,10 +67,10 @@ int VARGS Plug_Media_ShowFrameRGBA_32(void *offset, unsigned int mask, const lon
void *src = VM_POINTER(arg[0]); void *src = VM_POINTER(arg[0]);
int srcwidth = VM_LONG(arg[1]); int srcwidth = VM_LONG(arg[1]);
int srcheight = VM_LONG(arg[2]); int srcheight = VM_LONG(arg[2]);
int x = VM_LONG(arg[3]); // int x = VM_LONG(arg[3]);
int y = VM_LONG(arg[4]); // int y = VM_LONG(arg[4]);
int width = VM_LONG(arg[5]); // int width = VM_LONG(arg[5]);
int height = VM_LONG(arg[6]); // int height = VM_LONG(arg[6]);
if (qrenderer <= 0) if (qrenderer <= 0)
return 0; return 0;

View file

@ -126,6 +126,7 @@ void MenuDrawItems(int xpos, int ypos, menuoption_t *option, menu_t *menu)
{ {
if (menu->selecteditem != option) if (menu->selecteditem != option)
{ {
if (!option->common.noselectionsound)
S_LocalSound ("misc/menu1.wav"); S_LocalSound ("misc/menu1.wav");
menu->selecteditem = option; menu->selecteditem = option;
} }

View file

@ -124,7 +124,8 @@ typedef struct { //must be first of each structure type.
int posy; int posy;
int width; int width;
int height; int height;
qboolean iszone; qboolean noselectionsound:1;
qboolean iszone:1;
qboolean ishidden; qboolean ishidden;
union menuoption_s *next; union menuoption_s *next;
} menucommon_t; } menucommon_t;

View file

@ -1076,7 +1076,7 @@ static void PF_R_SetViewFlag(progfuncs_t *prinst, struct globalvars_s *pr_global
break; break;
case VF_DRAWWORLD: case VF_DRAWWORLD:
r_refdef.flags = r_refdef.flags&~Q2RDF_NOWORLDMODEL | (*p?0:Q2RDF_NOWORLDMODEL); r_refdef.flags = (r_refdef.flags&~Q2RDF_NOWORLDMODEL) | (*p?0:Q2RDF_NOWORLDMODEL);
break; break;
case VF_ENGINESBAR: case VF_ENGINESBAR:
csqc_drawsbar = *p; csqc_drawsbar = *p;
@ -1299,7 +1299,7 @@ static trace_t CS_Trace_Toss (csqcedict_t *tossent, csqcedict_t *ignore)
float gravity; float gravity;
vec3_t move, end; vec3_t move, end;
trace_t trace; trace_t trace;
float maxvel = Cvar_Get("sv_maxvelocity", "2000", 0, "CSQC physics")->value; // float maxvel = Cvar_Get("sv_maxvelocity", "2000", 0, "CSQC physics")->value;
vec3_t origin, velocity; vec3_t origin, velocity;
@ -1898,7 +1898,7 @@ static void PF_cs_getplayerkey (progfuncs_t *prinst, struct globalvars_s *pr_glo
else if (!strcmp(keyname, "entertime")) //packet loss else if (!strcmp(keyname, "entertime")) //packet loss
{ {
ret = PF_TempStr(prinst); ret = PF_TempStr(prinst);
sprintf(ret, "%i", cl.players[pnum].entertime); sprintf(ret, "%i", (int)cl.players[pnum].entertime);
} }
else else
{ {

View file

@ -12,11 +12,11 @@
static int tryrates[] = { 11025, 22051, 44100, 8000 }; static int tryrates[] = { 11025, 22051, 44100, 8000 };
static void OSS_SetUnderWater(qboolean underwater) //simply a stub. Any ideas how to actually implement this properly? static void OSS_SetUnderWater(soundcardinfo_t *sc, qboolean underwater) //simply a stub. Any ideas how to actually implement this properly?
{ {
} }
static int OSS_GetDMAPos(soundcardinfo_t *sc) static unsigned int OSS_GetDMAPos(soundcardinfo_t *sc)
{ {
struct count_info count; struct count_info count;
@ -69,8 +69,6 @@ static int OSS_InitCard(soundcardinfo_t *sc, int cardnum)
char *snddev = NULL; char *snddev = NULL;
cvar_t *devname; cvar_t *devname;
soundcardinfo_t *ec;
devname = Cvar_Get(va("snd_devicename%i", cardnum+1), cardnum?"":"/dev/dsp", 0, "Sound controls"); devname = Cvar_Get(va("snd_devicename%i", cardnum+1), cardnum?"":"/dev/dsp", 0, "Sound controls");
snddev = devname->string; snddev = devname->string;

View file

@ -1988,7 +1988,7 @@ int TP_CategorizeMessage (char *s, int *offset, player_info_t **plr)
if (!flags) // search for fake player if (!flags) // search for fake player
{ {
if (name = strstr(s, ": ")) // use name as temp if ((name = strstr(s, ": "))) // use name as temp
{ {
*offset = (name - s) + 2; *offset = (name - s) + 2;
flags = TPM_FAKED; flags = TPM_FAKED;
@ -2775,7 +2775,7 @@ static void TP_FindPoint (void) {
continue; continue;
if ( if (
state->modelindex == cl_playerindex && ISDEAD(state->frame) || (state->modelindex == cl_playerindex && ISDEAD(state->frame)) ||
state->modelindex == cl_h_playerindex state->modelindex == cl_h_playerindex
) )
continue; continue;

View file

@ -1145,7 +1145,7 @@ char *MSG_ReadStringLine (void)
float MSG_ReadCoord (void) float MSG_ReadCoord (void)
{ {
coorddata c = {0}; coorddata c = {{0}};
MSG_ReadData(&c, sizeofcoord); MSG_ReadData(&c, sizeofcoord);
return MSG_FromCoord(c, sizeofcoord); return MSG_FromCoord(c, sizeofcoord);
} }

View file

@ -269,7 +269,7 @@ vfsfile_t *VFSOS_Open(char *osname, char *mode)
vfsfile_t *FSOS_OpenVFS(void *handle, flocation_t *loc, char *mode) vfsfile_t *FSOS_OpenVFS(void *handle, flocation_t *loc, char *mode)
{ {
char diskname[MAX_OSPATH]; char diskname[MAX_OSPATH];
_snprintf(diskname, sizeof(diskname), "%s/%s", handle, loc->rawname); _snprintf(diskname, sizeof(diskname), "%s/%s", (char*)handle, loc->rawname);
return VFSOS_Open(diskname, mode); return VFSOS_Open(diskname, mode);
} }
@ -359,13 +359,18 @@ void FSOS_ReadFile(void *handle, flocation_t *loc, char *buffer)
fread(buffer, 1, loc->len, f); fread(buffer, 1, loc->len, f);
fclose(f); fclose(f);
} }
int FSOS_EnumerateFiles (void *handle, char *match, int (*func)(char *, int, void *), void *parm)
{
return Sys_EnumerateFiles(handle, match, func, parm);
}
searchpathfuncs_t osfilefuncs = { searchpathfuncs_t osfilefuncs = {
FSOS_PrintPath, FSOS_PrintPath,
FSOS_ClosePath, FSOS_ClosePath,
FSOS_BuildHash, FSOS_BuildHash,
FSOS_FLocate, FSOS_FLocate,
FSOS_ReadFile, FSOS_ReadFile,
Sys_EnumerateFiles, FSOS_EnumerateFiles,
NULL, NULL,
NULL, NULL,
FSOS_OpenVFS FSOS_OpenVFS
@ -623,7 +628,7 @@ vfsfile_t *FSPAK_OpenVFS(void *handle, flocation_t *loc, char *mode)
vfs = Z_Malloc(sizeof(vfspack_t)); vfs = Z_Malloc(sizeof(vfspack_t));
vfs->parentpak = ((pack_t*)handle); vfs->parentpak = pack;
vfs->parentpak->references++; vfs->parentpak->references++;
vfs->startpos = loc->offset; vfs->startpos = loc->offset;
@ -657,7 +662,9 @@ searchpathfuncs_t packfilefuncs = {
void *com_pathforfile; //fread and stuff is preferable if null void *com_pathforfile; //fread and stuff is preferable if null
#ifndef ZEXPORT
#define ZEXPORT VARGS #define ZEXPORT VARGS
#endif
#ifdef AVAIL_ZLIB #ifdef AVAIL_ZLIB
#ifdef _WIN32 #ifdef _WIN32
@ -1599,7 +1606,7 @@ qboolean Sys_PathProtection(char *pattern)
if (strchr(pattern, '\\')) if (strchr(pattern, '\\'))
{ {
char *s; char *s;
while(s = strchr(pattern, '\\')) while((s = strchr(pattern, '\\')))
*s = '/'; *s = '/';
Con_Printf("Warning: \\ charactures in filename %s\n", pattern); Con_Printf("Warning: \\ charactures in filename %s\n", pattern);
} }

View file

@ -45,7 +45,7 @@ void SWMod_LoadLighting (lump_t *l);
void Q2BSP_SetHullFuncs(hull_t *hull); void Q2BSP_SetHullFuncs(hull_t *hull);
qboolean CM_Trace(model_t *model, int forcehullnum, int frame, vec3_t start, vec3_t end, vec3_t mins, vec3_t maxs, trace_t *trace); qboolean CM_Trace(model_t *model, int forcehullnum, int frame, vec3_t start, vec3_t end, vec3_t mins, vec3_t maxs, trace_t *trace);
int Q2BSP_PointContents(model_t *mod, vec3_t p); unsigned int Q2BSP_PointContents(model_t *mod, vec3_t p);
qbyte areabits[MAX_Q2MAP_AREAS/8]; qbyte areabits[MAX_Q2MAP_AREAS/8];
@ -762,7 +762,8 @@ void CM_CreatePatch ( q3cpatch_t *patch, int numverts, const vec3_t *verts, int
for (i = 0; i < numverts; i++) for (i = 0; i < numverts; i++)
VectorCopy(verts[i], pointss[i]); VectorCopy(verts[i], pointss[i]);
// fill in // fill in
Patch_Evaluate ( pointss, patch_cp, step, points ); //gcc warns without this cast
Patch_Evaluate ( (const vec4_t *)pointss, patch_cp, step, points );
/* /*
for (i = 0; i < numverts; i++) for (i = 0; i < numverts; i++)
{ {
@ -879,7 +880,8 @@ void CM_CreatePatchesForLeafs (void)
map_leafpatches[numleafpatches] = numpatches; map_leafpatches[numleafpatches] = numpatches;
checkout[k] = numpatches++; checkout[k] = numpatches++;
CM_CreatePatch ( patch, face->numverts, map_verts + face->firstvert, face->patch_cp ); //gcc warns without this cast
CM_CreatePatch ( patch, face->numverts, (const vec3_t *)map_verts + face->firstvert, face->patch_cp );
} }
leaf->contents |= patch->surface->c.value; leaf->contents |= patch->surface->c.value;
@ -2314,7 +2316,7 @@ mesh_t *GL_CreateMeshForPatch (model_t *mod, int patchwidth, int patchheight, in
} }
// find the degree of subdivision in the u and v directions // find the degree of subdivision in the u and v directions
Patch_GetFlatness ( subdivlevel, map_verts+firstvert, patch_cp, flat ); Patch_GetFlatness ( subdivlevel, (const vec3_t *)map_verts+firstvert, patch_cp, flat );
// allocate space for mesh // allocate space for mesh
step[0] = (1 << flat[0]); step[0] = (1 << flat[0]);
@ -2340,11 +2342,11 @@ mesh_t *GL_CreateMeshForPatch (model_t *mod, int patchwidth, int patchheight, in
mesh->patchHeight = size[1]; mesh->patchHeight = size[1];
// fill in // fill in
Patch_Evaluate ( points, patch_cp, step, points2 ); Patch_Evaluate ( (const vec4_t *)points, patch_cp, step, points2 );
Patch_Evaluate ( colors, patch_cp, step, colors2 ); Patch_Evaluate ( (const vec4_t *)colors, patch_cp, step, colors2 );
Patch_Evaluate ( normals, patch_cp, step, normals2 ); Patch_Evaluate ( (const vec4_t *)normals, patch_cp, step, normals2 );
Patch_Evaluate ( lm_st, patch_cp, step, lm_st2 ); Patch_Evaluate ( (const vec4_t *)lm_st, patch_cp, step, lm_st2 );
Patch_Evaluate ( tex_st, patch_cp, step, tex_st2 ); Patch_Evaluate ( (const vec4_t *)tex_st, patch_cp, step, tex_st2 );
for (i = 0; i < numverts; i++) for (i = 0; i < numverts; i++)
{ {
@ -5514,7 +5516,7 @@ qboolean Q2BSP_RecursiveHullCheck (hull_t *hull, int num, float p1f, float p2f,
return true; return true;
return false; return false;
}*/ }*/
int Q2BSP_PointContents(model_t *mod, vec3_t p) unsigned int Q2BSP_PointContents(model_t *mod, vec3_t p)
{ {
int pc, ret = FTECONTENTS_EMPTY; int pc, ret = FTECONTENTS_EMPTY;
pc = CM_PointContents (mod, p); pc = CM_PointContents (mod, p);

View file

@ -641,7 +641,7 @@ fixed16_t Invert24To16(fixed16_t val)
void VectorTransform (const vec3_t in1, const float in2[3][4], vec3_t out) void VectorTransform (const vec3_t in1, matrix3x4 in2, vec3_t out)
{ {
out[0] = DotProduct(in1, in2[0]) + in2[0][3]; out[0] = DotProduct(in1, in2[0]) + in2[0][3];
out[1] = DotProduct(in1, in2[1]) + in2[1][3]; out[1] = DotProduct(in1, in2[1]) + in2[1][3];

View file

@ -71,9 +71,13 @@ int Q_log2(int val);
float ColorNormalize (vec3_t in, vec3_t out); float ColorNormalize (vec3_t in, vec3_t out);
void MakeNormalVectors (vec3_t forward, vec3_t right, vec3_t up); void MakeNormalVectors (vec3_t forward, vec3_t right, vec3_t up);
typedef float matrix3x4[3][4];
typedef float matrix3x3[3][3];
void R_ConcatRotations (float in1[3][3], float in2[3][3], float out[3][3]); void R_ConcatRotations (float in1[3][3], float in2[3][3], float out[3][3]);
void R_ConcatRotationsPad (float in1[3][4], float in2[3][4], float out[3][4]); void R_ConcatRotationsPad (float in1[3][4], float in2[3][4], float out[3][4]);
void R_ConcatTransforms (float in1[3][4], float in2[3][4], float out[3][4]); void R_ConcatTransforms (matrix3x4 in1, matrix3x4 in2, matrix3x4 out);
void VectorTransform(const vec3_t in1, matrix3x4 in2, vec3_t out);
void FloorDivMod (double numer, double denom, int *quotient, void FloorDivMod (double numer, double denom, int *quotient,
int *rem); int *rem);

View file

@ -479,7 +479,7 @@ void Netchan_Transmit (netchan_t *chan, int length, qbyte *data, int rate)
#ifdef HUFFNETWORK #ifdef HUFFNETWORK
if (chan->compress) if (chan->compress)
{ {
int oldsize = send.cursize; //int oldsize = send.cursize;
Huff_CompressPacket(&send, (chan->sock == NS_CLIENT)?10:8); Huff_CompressPacket(&send, (chan->sock == NS_CLIENT)?10:8);
// Con_Printf("%i becomes %i\n", oldsize, send.cursize); // Con_Printf("%i becomes %i\n", oldsize, send.cursize);
// Huff_DecompressPacket(&send, (chan->sock == NS_CLIENT)?10:8); // Huff_DecompressPacket(&send, (chan->sock == NS_CLIENT)?10:8);

View file

@ -208,7 +208,7 @@ void Q1BSP_SetHullFuncs(hull_t *hull)
// hull->funcs.HullPointContents = Q1BSP_HullPointContents; // hull->funcs.HullPointContents = Q1BSP_HullPointContents;
} }
int Q1BSP_PointContents(model_t *model, vec3_t point) unsigned int Q1BSP_PointContents(model_t *model, vec3_t point)
{ {
return Q1BSP_HullPointContents(&model->hulls[0], point); return Q1BSP_HullPointContents(&model->hulls[0], point);
} }

View file

@ -3119,7 +3119,6 @@ static void *Q1_LoadSkins (daliasskintype_t *pskintype, qboolean alpha)
static void *Q1_LoadSkins (daliasskintype_t *pskintype, qboolean alpha) static void *Q1_LoadSkins (daliasskintype_t *pskintype, qboolean alpha)
{ {
extern cvar_t gl_bump; extern cvar_t gl_bump;
extern int gl_bumpmappingpossible;
galiastexnum_t *texnums; galiastexnum_t *texnums;
char skinname[MAX_QPATH]; char skinname[MAX_QPATH];
int i; int i;
@ -4264,8 +4263,8 @@ void GL_LoadQ3Model(model_t *mod, void *buffer)
{ {
#ifndef Q3SHADERS #ifndef Q3SHADERS
char name[1024]; char name[1024];
#endif
extern int gl_bumpmappingpossible; extern int gl_bumpmappingpossible;
#endif
char shadname[1024]; char shadname[1024];
skin = Hunk_Alloc((LittleLong(surf->numShaders)+externalskins)*((sizeof(galiasskin_t)+sizeof(galiastexnum_t)))); skin = Hunk_Alloc((LittleLong(surf->numShaders)+externalskins)*((sizeof(galiasskin_t)+sizeof(galiastexnum_t))));
@ -5161,7 +5160,6 @@ galiasinfo_t *GLMod_ParseMD5MeshModel(char *buffer)
int numjoints = 0; int numjoints = 0;
int nummeshes = 0; int nummeshes = 0;
qboolean foundjoints = false; qboolean foundjoints = false;
int meshnum = 0;
int i; int i;
galiasbone_t *bones = NULL; galiasbone_t *bones = NULL;
@ -5499,11 +5497,6 @@ galiasinfo_t *GLMod_ParseMD5MeshModel(char *buffer)
void GLMod_LoadMD5MeshModel(model_t *mod, void *buffer) void GLMod_LoadMD5MeshModel(model_t *mod, void *buffer)
{ {
int numjoints = 0;
int nummeshes = 0;
qboolean foundjoints = false;
int meshnum = 0;
galiasinfo_t *root; galiasinfo_t *root;
int hunkstart, hunkend, hunktotal; int hunkstart, hunkend, hunktotal;
@ -5757,10 +5750,6 @@ frames test/idle1.md5anim
void GLMod_LoadCompositeAnim(model_t *mod, void *buffer) void GLMod_LoadCompositeAnim(model_t *mod, void *buffer)
{ {
#define EXPECT(x) buffer = COM_Parse(buffer); if (strcmp(com_token, x)) Sys_Error("MD5MESH: expected %s", x); #define EXPECT(x) buffer = COM_Parse(buffer); if (strcmp(com_token, x)) Sys_Error("MD5MESH: expected %s", x);
int numjoints = 0;
int nummeshes = 0;
qboolean foundjoints = false;
int meshnum = 0;
int i; int i;
char *file; char *file;

View file

@ -590,3 +590,4 @@ void R_BloomBlend (void)//refdef_t *fd, meshlist_t *meshlist )
qglBlendFunc (GL_SRC_ALPHA, GL_ONE_MINUS_SRC_ALPHA); qglBlendFunc (GL_SRC_ALPHA, GL_ONE_MINUS_SRC_ALPHA);
} }

View file

@ -172,7 +172,7 @@ void GL_DrawHeightmapModel (entity_t *e)
} }
} }
} }
int Heightmap_PointContentsHM(heightmap_t *hm, float clipmipsz, vec3_t org) unsigned int Heightmap_PointContentsHM(heightmap_t *hm, float clipmipsz, vec3_t org)
{ {
float x, y; float x, y;
float z, tz; float z, tz;
@ -268,7 +268,7 @@ int Heightmap_PointContentsHM(heightmap_t *hm, float clipmipsz, vec3_t org)
return FTECONTENTS_EMPTY; return FTECONTENTS_EMPTY;
} }
int Heightmap_PointContents(model_t *model, vec3_t org) unsigned int Heightmap_PointContents(model_t *model, vec3_t org)
{ {
heightmap_t *hm = model->terrain; heightmap_t *hm = model->terrain;
return Heightmap_PointContentsHM(hm, 0, org); return Heightmap_PointContentsHM(hm, 0, org);

View file

@ -24,8 +24,6 @@
*/ */
#include "model_hl.h" #include "model_hl.h"
void VectorTransform (const vec3_t in1, const float in2[3][4], vec3_t out);
void QuaternionGLMatrix(float x, float y, float z, float w, vec4_t *GLM) void QuaternionGLMatrix(float x, float y, float z, float w, vec4_t *GLM)
{ {
GLM[0][0] = 1 - 2 * y * y - 2 * z * z; GLM[0][0] = 1 - 2 * y * y - 2 * z * z;
@ -68,7 +66,7 @@ void QuaternionGLAngle(const vec3_t angles, vec4_t quaternion)
float transform_matrix[128][3][4]; /* Vertex transformation matrix */ matrix3x4 transform_matrix[128]; /* Vertex transformation matrix */
void GL_Draw_HL_AliasFrame(short *order, vec3_t *transformed, float tex_w, float tex_h); void GL_Draw_HL_AliasFrame(short *order, vec3_t *transformed, float tex_w, float tex_h);

View file

@ -140,8 +140,8 @@ typedef struct {
#define MAXARRAYVERTS 2048 #define MAXARRAYVERTS 2048
static surfvertexarray_t varray_v[MAXARRAYVERTS]; static surfvertexarray_t varray_v[MAXARRAYVERTS];
static unsigned int varray_i[MAXARRAYVERTS]; static unsigned int varray_i[MAXARRAYVERTS];
static unsigned int varray_i_forward[MAXARRAYVERTS]; //static unsigned int varray_i_forward[MAXARRAYVERTS];
static unsigned int varray_i_polytotri[MAXARRAYVERTS]; //012 023 034 045... //static unsigned int varray_i_polytotri[MAXARRAYVERTS]; //012 023 034 045...
int varray_ic; int varray_ic;
int varray_vc; int varray_vc;
@ -2076,7 +2076,6 @@ void PPL_DrawEnt(entity_t *e, void *parm)
void PPL_BaseEntTextures(void) void PPL_BaseEntTextures(void)
{ {
extern qboolean r_inmirror;
extern model_t *currentmodel; extern model_t *currentmodel;
int i; int i;

View file

@ -838,7 +838,7 @@ void GLR_AddDecals(vec3_t org)
//================================================================================== //==================================================================================
void GLR_DrawSprite(entity_t *e, void *parm) void GLR_DrawSprite(void *e, void *parm)
{ {
qglEnd(); qglEnd();
currententity = e; currententity = e;
@ -887,6 +887,13 @@ void GLR_DrawEntitiesOnList (void)
R_DrawRailCore(currententity); R_DrawRailCore(currententity);
continue; continue;
#endif #endif
case RT_MODEL: //regular model
break;
case RT_PORTALSURFACE:
continue; //this doesn't do anything anyway, does it?
default:
case RT_POLY: //these are a little painful, we need to do them some time... just not yet.
continue;
} }
if (currententity->flags & Q2RF_BEAM) if (currententity->flags & Q2RF_BEAM)
{ {

View file

@ -331,7 +331,7 @@ typedef struct {
int pos; int pos;
} vfsgen_t; } vfsgen_t;
int VFSGen_ReadBytes(vfsfile_t *f, char *buffer, int bytes) int VFSGen_ReadBytes(vfsfile_t *f, void *buffer, int bytes)
{ {
vfsgen_t *g = (vfsgen_t*)f; vfsgen_t *g = (vfsgen_t*)f;
if (bytes + g->pos >= g->buffer->len) if (bytes + g->pos >= g->buffer->len)
@ -347,7 +347,7 @@ int VFSGen_ReadBytes(vfsfile_t *f, char *buffer, int bytes)
return bytes; return bytes;
} }
int VFSGen_WriteBytes(vfsfile_t *f, char *buffer, int bytes) int VFSGen_WriteBytes(vfsfile_t *f, void *buffer, int bytes)
{ {
Sys_Error("VFSGen_WriteBytes: Readonly\n"); Sys_Error("VFSGen_WriteBytes: Readonly\n");
return 0; return 0;
@ -364,13 +364,13 @@ qboolean VFSGen_Seek(vfsfile_t *f, unsigned long newpos)
return true; return true;
} }
int VFSGen_Tell(vfsfile_t *f) unsigned long VFSGen_Tell(vfsfile_t *f)
{ {
vfsgen_t *g = (vfsgen_t*)f; vfsgen_t *g = (vfsgen_t*)f;
return g->pos; return g->pos;
} }
int VFSGen_GetLen(vfsfile_t *f) unsigned long VFSGen_GetLen(vfsfile_t *f)
{ {
vfsgen_t *g = (vfsgen_t*)f; vfsgen_t *g = (vfsgen_t*)f;
return g->buffer->len; return g->buffer->len;

View file

@ -2623,7 +2623,7 @@ retry:
pr_types[i].num_parms = PRLittleLong(current_progstate->types[i].num_parms); pr_types[i].num_parms = PRLittleLong(current_progstate->types[i].num_parms);
pr_types[i].ofs = PRLittleLong(current_progstate->types[i].ofs); pr_types[i].ofs = PRLittleLong(current_progstate->types[i].ofs);
pr_types[i].size = PRLittleLong(current_progstate->types[i].size); pr_types[i].size = PRLittleLong(current_progstate->types[i].size);
pr_types[i].name = (string_t)PRLittleLong((long)current_progstate->types[i].name); pr_types[i].name = (char *)PRLittleLong((long)current_progstate->types[i].name);
#endif #endif
pr_types[i].name += stringadjust; pr_types[i].name += stringadjust;
} }

View file

@ -64,7 +64,7 @@ struct progfuncs_s {
void (*EntFree) (progfuncs_t *prinst, struct edict_s *ed); void (*EntFree) (progfuncs_t *prinst, struct edict_s *ed);
struct edict_s *(*EDICT_NUM) (progfuncs_t *prinst, unsigned int n); //get the nth edict struct edict_s *(*EDICT_NUM) (progfuncs_t *prinst, unsigned int n); //get the nth edict
int (*NUM_FOR_EDICT) (progfuncs_t *prinst, struct edict_s *e); //so you can find out what that 'n' will be unsigned int (*NUM_FOR_EDICT) (progfuncs_t *prinst, struct edict_s *e); //so you can find out what that 'n' will be
void (*SetGlobalEdict) (progfuncs_t *prinst, struct edict_s *ed, int ofs); //set a global to an edict (partially obsolete) void (*SetGlobalEdict) (progfuncs_t *prinst, struct edict_s *ed, int ofs); //set a global to an edict (partially obsolete)

View file

@ -568,7 +568,7 @@ it to the host command processor
*/ */
char *Sys_ConsoleInput (void) char *Sys_ConsoleInput (void)
{ {
char text[256]; static char text[256];
int len; int len;
if (sys_linebuffer.modified) if (sys_linebuffer.modified)

View file

@ -1674,10 +1674,9 @@ int BL_FRead( void *buffer, int len, fileHandle_t f )
//{ //{
// return VMUI_FWrite(buffer, len, f, Z_TAG_BOTLIB); // return VMUI_FWrite(buffer, len, f, Z_TAG_BOTLIB);
//} //}
int BL_FCloseFile( fileHandle_t f ) void BL_FCloseFile( fileHandle_t f )
{ {
VMUI_fclose((int)f, Z_TAG_BOTLIB); VMUI_fclose((int)f, Z_TAG_BOTLIB);
return 0;
} }
//int BL_Seek( fileHandle_t f ) //int BL_Seek( fileHandle_t f )
//{ //{