Stuff should compile a little better with GCC now.
git-svn-id: https://svn.code.sf.net/p/fteqw/code/trunk@3150 fc73d0e0-1445-4013-8a0c-d673dee63da5
This commit is contained in:
parent
a2a6c74ab4
commit
0eb7e83965
17 changed files with 43 additions and 50 deletions
|
@ -434,6 +434,9 @@ COMMON_OBJS = $(COMMON_ASM_OBJS) \
|
|||
cmd.o \
|
||||
crc.o \
|
||||
fs.o \
|
||||
fs_stdio.o \
|
||||
fs_pak.o \
|
||||
fs_zip.o \
|
||||
mathlib.o \
|
||||
huff.o \
|
||||
md4.o \
|
||||
|
|
|
@ -1595,7 +1595,9 @@ void CL_LinkPacketEntities (void)
|
|||
|
||||
autorotate = anglemod(100*servertime);
|
||||
|
||||
#ifdef CSQC_DAT
|
||||
CLCSQC_DeltaStart();
|
||||
#endif
|
||||
|
||||
for (newpnum=0 ; newpnum<pack->num_entities ; newpnum++)
|
||||
{
|
||||
|
@ -1609,8 +1611,10 @@ void CL_LinkPacketEntities (void)
|
|||
break;
|
||||
}
|
||||
|
||||
#ifdef CSQC_DAT
|
||||
if (CLCSQC_DeltaUpdate(state))
|
||||
continue;
|
||||
#endif
|
||||
|
||||
ent = &cl_visedicts[cl_numvisedicts];
|
||||
#ifdef Q3SHADERS
|
||||
|
@ -1874,7 +1878,9 @@ void CL_LinkPacketEntities (void)
|
|||
|
||||
}
|
||||
}
|
||||
#ifdef CSQC_DAT
|
||||
CLCSQC_DeltaEnd();
|
||||
#endif
|
||||
}
|
||||
#else
|
||||
|
||||
|
@ -2773,12 +2779,16 @@ void CL_LinkPlayers (void)
|
|||
{
|
||||
if (state->messagenum != cl.validsequence)
|
||||
{
|
||||
#ifdef CSQC_DAT
|
||||
CLCSQC_DeltaPlayer(j, NULL);
|
||||
#endif
|
||||
continue; // not present this frame
|
||||
}
|
||||
|
||||
#ifdef CSQC_DAT
|
||||
if (CLCSQC_DeltaPlayer(j, state))
|
||||
continue;
|
||||
#endif
|
||||
|
||||
// spawn light flashes, even ones coming from invisible objects
|
||||
if (r_powerupglow.value && !(r_powerupglow.value == 2 && j == cl.playernum[0]))
|
||||
|
|
|
@ -3731,8 +3731,10 @@ void Host_Shutdown(void)
|
|||
Cmd_Shutdown();
|
||||
Memory_DeInit();
|
||||
|
||||
#ifndef CLIENTONLY
|
||||
memset(&sv, 0, sizeof(sv));
|
||||
memset(&svs, 0, sizeof(svs));
|
||||
#endif
|
||||
}
|
||||
|
||||
#ifdef CLIENTONLY
|
||||
|
|
|
@ -1389,7 +1389,7 @@ void IN_MouseEvent (int mstate)
|
|||
if ( !(mstate & (1<<i)) &&
|
||||
(sysmouse.oldbuttons & (1<<i)) )
|
||||
{
|
||||
Key_Event (K_MOUSE1 + i, false);
|
||||
Key_Event (K_MOUSE1 + i, false);
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -1420,10 +1420,11 @@ static void ProcessMouse(mouse_t *mouse, usercmd_t *cmd, int pnum)
|
|||
if ( !(mouse->buttons & (1<<i)) &&
|
||||
(mouse->oldbuttons & (1<<i)) )
|
||||
{
|
||||
Key_Event (K_MOUSE1 + i, false);
|
||||
Key_Event (K_MOUSE1 + i, false);
|
||||
}
|
||||
}
|
||||
mouse->oldbuttons = mouse->buttons;
|
||||
|
||||
if (m_forcewheel.value)
|
||||
{
|
||||
mfwt = (int)m_forcewheel_threshold.value;
|
||||
|
|
|
@ -5157,6 +5157,7 @@ void CSQC_Shutdown(void)
|
|||
}
|
||||
csqcprogs = NULL;
|
||||
|
||||
memset(&deltafunction, 0, sizeof(deltafunction));
|
||||
in_sensitivityscale = 1;
|
||||
|
||||
csqc_usinglistener = false;
|
||||
|
|
|
@ -1172,7 +1172,7 @@ void S_Music_Seek(float time)
|
|||
S_UpdateAmbientSounds
|
||||
===================
|
||||
*/
|
||||
char *Media_NextTrack(void);
|
||||
char *Media_NextTrack(int musicchannelnum);
|
||||
mleaf_t *Q1BSP_LeafForPoint (model_t *model, vec3_t p);
|
||||
void S_UpdateAmbientSounds (soundcardinfo_t *sc)
|
||||
{
|
||||
|
|
|
@ -242,7 +242,7 @@ int Sys_DebugLog(char *file, char *fmt, ...)
|
|||
return 1;
|
||||
}
|
||||
|
||||
int Sys_EnumerateFiles (char *gpath, char *match, int (*func)(char *, int, void *), void *parm)
|
||||
int Sys_EnumerateFiles (const char *gpath, const char *match, int (*func)(const char *, int, void *), void *parm)
|
||||
{
|
||||
#include <dirent.h>
|
||||
DIR *dir, *dir2;
|
||||
|
|
|
@ -281,7 +281,7 @@ extern char com_homedir[MAX_OSPATH];
|
|||
extern char com_configdir[MAX_OSPATH]; //dir to put cfg_save configs in
|
||||
//extern char *com_basedir;
|
||||
|
||||
void COM_WriteFile (char *filename, void *data, int len);
|
||||
void COM_WriteFile (const char *filename, const void *data, int len);
|
||||
FILE *COM_WriteFileOpen (char *filename);
|
||||
|
||||
typedef struct {
|
||||
|
@ -350,7 +350,7 @@ void FS_FlushFSHash(void);
|
|||
void FS_CreatePath(const char *pname, enum fs_relative relativeto);
|
||||
int FS_Rename(const char *oldf, const char *newf, enum fs_relative relativeto); //0 on success, non-0 on error
|
||||
int FS_Rename2(const char *oldf, const char *newf, enum fs_relative oldrelativeto, enum fs_relative newrelativeto);
|
||||
int FS_Remove(const char *fname, int relativeto); //0 on success, non-0 on error
|
||||
int FS_Remove(const char *fname, enum fs_relative relativeto); //0 on success, non-0 on error
|
||||
qboolean FS_NativePath(const char *fname, enum fs_relative relativeto, char *out, int outlen); //if you really need to fopen yourself
|
||||
qboolean FS_WriteFile (const char *filename, const void *data, int len, enum fs_relative relativeto);
|
||||
vfsfile_t *FS_OpenVFS(const char *filename, const char *mode, enum fs_relative relativeto);
|
||||
|
|
|
@ -303,7 +303,7 @@ COM_WriteFile
|
|||
The filename will be prefixed by the current game directory
|
||||
============
|
||||
*/
|
||||
void COM_WriteFile (char *filename, void *data, int len)
|
||||
void COM_WriteFile (const char *filename, const void *data, int len)
|
||||
{
|
||||
vfsfile_t *vfs;
|
||||
|
||||
|
@ -721,7 +721,7 @@ static const char *FS_GetCleanPath(const char *pattern, char *outbuf, int outlen
|
|||
pattern = outbuf;
|
||||
|
||||
Con_Printf("Warning: // characters in filename %s\n", pattern);
|
||||
while (s=strstr(pattern, "//"))
|
||||
while ((s=strstr(pattern, "//")))
|
||||
{
|
||||
s++;
|
||||
while (*s)
|
||||
|
@ -1096,7 +1096,7 @@ void FS_CreatePath(const char *pname, enum fs_relative relativeto)
|
|||
COM_CreatePath(fullname);
|
||||
}
|
||||
|
||||
qboolean FS_WriteFile (const char *filename, void *data, int len, enum fs_relative relativeto)
|
||||
qboolean FS_WriteFile (const char *filename, const void *data, int len, enum fs_relative relativeto)
|
||||
{
|
||||
vfsfile_t *f;
|
||||
FS_CreatePath(filename, relativeto);
|
||||
|
@ -2110,7 +2110,7 @@ qboolean Sys_FindGameData(const char *gamename, char *basepath, int basepathlen)
|
|||
return false;
|
||||
}
|
||||
#else
|
||||
qboolean Sys_FindGameData(char *gamename, char *basepath, int basepathlen)
|
||||
qboolean Sys_FindGameData(const char *gamename, char *basepath, int basepathlen)
|
||||
{
|
||||
return false;
|
||||
}
|
||||
|
@ -2428,4 +2428,4 @@ void FS_RegisterDefaultFileSystems(void)
|
|||
#ifdef DOOMWADS
|
||||
FS_RegisterFileSystemType("wad", &doomwadfilefuncs);
|
||||
#endif
|
||||
}
|
||||
}
|
||||
|
|
|
@ -27,4 +27,4 @@ extern searchpathfuncs_t osfilefuncs;
|
|||
vfsfile_t *VFSOS_Open(const char *osname, const char *mode);
|
||||
|
||||
int FS_RegisterFileSystemType(const char *extension, searchpathfuncs_t *funcs);
|
||||
void FS_UnRegisterFileSystemType(int idx);
|
||||
void FS_UnRegisterFileSystemType(int idx);
|
||||
|
|
|
@ -541,4 +541,4 @@ searchpathfuncs_t doomwadfilefuncs = {
|
|||
NULL,
|
||||
FSPAK_OpenVFS
|
||||
};
|
||||
#endif
|
||||
#endif
|
||||
|
|
|
@ -458,4 +458,4 @@ searchpathfuncs_t zipfilefuncs = {
|
|||
FSZIP_OpenVFS
|
||||
};
|
||||
|
||||
#endif
|
||||
#endif
|
||||
|
|
|
@ -81,6 +81,7 @@ zone_t *zone_head;
|
|||
void *zonelock;
|
||||
#endif
|
||||
|
||||
#if 0
|
||||
static void Z_DumpTree(void)
|
||||
{
|
||||
zone_t *zone;
|
||||
|
@ -116,6 +117,7 @@ static void Z_DumpTree(void)
|
|||
zone = nextlist;
|
||||
}
|
||||
}
|
||||
#endif
|
||||
|
||||
void *VARGS Z_TagMalloc(int size, int tag)
|
||||
{
|
||||
|
@ -2166,7 +2168,9 @@ void Memory_Init (void *buf, int size)
|
|||
|
||||
void Memory_DeInit(void)
|
||||
{
|
||||
#ifdef NOHIGH
|
||||
Hunk_TempFree();
|
||||
#endif
|
||||
Cache_Flush();
|
||||
|
||||
#ifdef MULTITHREAD
|
||||
|
|
|
@ -922,7 +922,6 @@ void VID_Wait_Override_Callback(struct cvar_s *var, char *oldvalue)
|
|||
qboolean screenflush;
|
||||
void GL_DoSwap (void)
|
||||
{
|
||||
extern int mouseusedforgui;
|
||||
if (!screenflush)
|
||||
return;
|
||||
screenflush = 0;
|
||||
|
|
|
@ -98,36 +98,6 @@ qboolean Sys_remove (char *path)
|
|||
return system(va("rm \"%s\"", path));
|
||||
}
|
||||
|
||||
#ifdef SHADERS
|
||||
int Sys_EnumerateFiles (char *gpath, char *match, int (*func)(char *, int, void *), void *parm)
|
||||
{
|
||||
#include <dirent.h>
|
||||
DIR *dir;
|
||||
struct dirent *ent;
|
||||
dir = opendir(gpath);
|
||||
if (!dir)
|
||||
{
|
||||
Con_Printf("Failed to open dir %s\n", gpath);
|
||||
return true;
|
||||
}
|
||||
do
|
||||
{
|
||||
ent = readdir(dir); //FIXME: no wild card comparisons.
|
||||
if (!ent)
|
||||
break;
|
||||
if (*ent->d_name != '.')
|
||||
if (!func(ent->d_name, -2, parm))
|
||||
{
|
||||
closedir(dir);
|
||||
return false;
|
||||
}
|
||||
} while(1);
|
||||
closedir(dir);
|
||||
|
||||
return true;
|
||||
}
|
||||
#endif
|
||||
|
||||
int Sys_DebugLog(char *file, char *fmt, ...)
|
||||
{
|
||||
va_list argptr;
|
||||
|
@ -725,7 +695,7 @@ int main(int argc, char *argv[])
|
|||
|
||||
|
||||
|
||||
int Sys_EnumerateFiles (char *gpath, char *match, int (*func)(char *, int, void *), void *parm)
|
||||
int Sys_EnumerateFiles (const char *gpath, const char *match, int (*func)(const char *, int, void *), void *parm)
|
||||
{
|
||||
#include <dirent.h>
|
||||
DIR *dir, *dir2;
|
||||
|
|
|
@ -1551,7 +1551,6 @@ void *suplementryclipnodes;
|
|||
void *suplementryplanes;
|
||||
void *crouchhullfile;
|
||||
|
||||
qbyte *COM_LoadMallocFile (char *path);
|
||||
void SWMod_LoadCrouchHull(void)
|
||||
{
|
||||
int i;
|
||||
|
|
|
@ -880,9 +880,13 @@ void SWVID_SetPalette(unsigned char *palette)
|
|||
void SWVID_Shutdown (void)
|
||||
{
|
||||
Con_Printf("VID_Shutdown\n");
|
||||
XUngrabPointer(vid_dpy,CurrentTime);
|
||||
XAutoRepeatOn(vid_dpy);
|
||||
XDestroyWindow(vid_dpy, x_win);
|
||||
if (vid_dpy)
|
||||
{
|
||||
XUngrabPointer(vid_dpy,CurrentTime);
|
||||
XAutoRepeatOn(vid_dpy);
|
||||
if (x_win)
|
||||
XDestroyWindow(vid_dpy, x_win);
|
||||
}
|
||||
// XCloseDisplay(vid_dpy);
|
||||
// vid_dpy = NULL;
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue