1
0
Fork 0
forked from fte/fteqw

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:
Spoike 2009-04-02 22:25:54 +00:00
parent a2a6c74ab4
commit 0eb7e83965
17 changed files with 43 additions and 50 deletions

View file

@ -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 \

View file

@ -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]))

View file

@ -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

View file

@ -1424,6 +1424,7 @@ static void ProcessMouse(mouse_t *mouse, usercmd_t *cmd, int pnum)
}
}
mouse->oldbuttons = mouse->buttons;
if (m_forcewheel.value)
{
mfwt = (int)m_forcewheel_threshold.value;

View file

@ -5157,6 +5157,7 @@ void CSQC_Shutdown(void)
}
csqcprogs = NULL;
memset(&deltafunction, 0, sizeof(deltafunction));
in_sensitivityscale = 1;
csqc_usinglistener = false;

View file

@ -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)
{

View file

@ -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;

View file

@ -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);

View file

@ -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;
}

View file

@ -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

View file

@ -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;

View file

@ -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;

View file

@ -1551,7 +1551,6 @@ void *suplementryclipnodes;
void *suplementryplanes;
void *crouchhullfile;
qbyte *COM_LoadMallocFile (char *path);
void SWMod_LoadCrouchHull(void)
{
int i;

View file

@ -880,9 +880,13 @@ void SWVID_SetPalette(unsigned char *palette)
void SWVID_Shutdown (void)
{
Con_Printf("VID_Shutdown\n");
if (vid_dpy)
{
XUngrabPointer(vid_dpy,CurrentTime);
XAutoRepeatOn(vid_dpy);
if (x_win)
XDestroyWindow(vid_dpy, x_win);
}
// XCloseDisplay(vid_dpy);
// vid_dpy = NULL;
}