mirror of
https://github.com/nzp-team/fteqw.git
synced 2024-11-26 05:41:52 +00:00
Some GCC compiler warnings fixed.
git-svn-id: https://svn.code.sf.net/p/fteqw/code/trunk@204 fc73d0e0-1445-4013-8a0c-d673dee63da5
This commit is contained in:
parent
c0c2130978
commit
9c94742305
27 changed files with 72 additions and 65 deletions
|
@ -492,7 +492,6 @@ CL_FinishMove
|
||||||
*/
|
*/
|
||||||
void CL_FinishMove (usercmd_t *cmd, int msecs, int pnum)
|
void CL_FinishMove (usercmd_t *cmd, int msecs, int pnum)
|
||||||
{
|
{
|
||||||
extern int mouseusedforgui;
|
|
||||||
int ms, i;
|
int ms, i;
|
||||||
int bits;
|
int bits;
|
||||||
|
|
||||||
|
|
|
@ -728,8 +728,6 @@ void CL_Disconnect (void)
|
||||||
{
|
{
|
||||||
qbyte final[10];
|
qbyte final[10];
|
||||||
|
|
||||||
int killserver = connect_time != -1;
|
|
||||||
|
|
||||||
connect_time = -1;
|
connect_time = -1;
|
||||||
|
|
||||||
Cvar_ApplyLatches(CVAR_SERVEROVERRIDE);
|
Cvar_ApplyLatches(CVAR_SERVEROVERRIDE);
|
||||||
|
|
|
@ -519,8 +519,6 @@ to start a download from the server.
|
||||||
*/
|
*/
|
||||||
qboolean CL_CheckOrDownloadFile (char *filename, int nodelay)
|
qboolean CL_CheckOrDownloadFile (char *filename, int nodelay)
|
||||||
{
|
{
|
||||||
FILE *f=NULL;
|
|
||||||
|
|
||||||
if (strstr (filename, ".."))
|
if (strstr (filename, ".."))
|
||||||
{
|
{
|
||||||
Con_TPrintf (TL_NORELATIVEPATHS);
|
Con_TPrintf (TL_NORELATIVEPATHS);
|
||||||
|
@ -3139,7 +3137,7 @@ char printtext[1024];
|
||||||
void CL_ParsePrint(char *msg)
|
void CL_ParsePrint(char *msg)
|
||||||
{
|
{
|
||||||
strncat(printtext, msg, sizeof(printtext)-1);
|
strncat(printtext, msg, sizeof(printtext)-1);
|
||||||
while(msg = strchr(printtext, '\n'))
|
while((msg = strchr(printtext, '\n')))
|
||||||
{
|
{
|
||||||
*msg = '\0';
|
*msg = '\0';
|
||||||
Stats_ParsePrintLine(printtext);
|
Stats_ParsePrintLine(printtext);
|
||||||
|
@ -3153,7 +3151,7 @@ char stufftext[4096];
|
||||||
void CL_ParseStuffCmd(char *msg, int destsplit) //this protects stuffcmds from network segregation.
|
void CL_ParseStuffCmd(char *msg, int destsplit) //this protects stuffcmds from network segregation.
|
||||||
{
|
{
|
||||||
strncat(stufftext, msg, sizeof(stufftext)-1);
|
strncat(stufftext, msg, sizeof(stufftext)-1);
|
||||||
while(msg = strchr(stufftext, '\n'))
|
while((msg = strchr(stufftext, '\n')))
|
||||||
{
|
{
|
||||||
*msg = '\0';
|
*msg = '\0';
|
||||||
Con_DPrintf("stufftext: %s\n", stufftext);
|
Con_DPrintf("stufftext: %s\n", stufftext);
|
||||||
|
|
|
@ -405,7 +405,7 @@ void SCR_ShowPics_Draw(void)
|
||||||
void SCR_ShowPic_Clear(void)
|
void SCR_ShowPic_Clear(void)
|
||||||
{
|
{
|
||||||
showpic_t *sp;
|
showpic_t *sp;
|
||||||
while(sp = showpics)
|
while((sp = showpics))
|
||||||
{
|
{
|
||||||
showpics = sp->next;
|
showpics = sp->next;
|
||||||
|
|
||||||
|
@ -506,7 +506,6 @@ void SCR_ShowPic_Move(void)
|
||||||
|
|
||||||
void SCR_ShowPic_Update(void)
|
void SCR_ShowPic_Update(void)
|
||||||
{
|
{
|
||||||
int zone = MSG_ReadByte();
|
|
||||||
showpic_t *sp;
|
showpic_t *sp;
|
||||||
char *s;
|
char *s;
|
||||||
|
|
||||||
|
|
|
@ -1467,7 +1467,7 @@ void CLQ2_ParseTEnt (void)
|
||||||
ex->ent.model = cl_mod_explode;
|
ex->ent.model = cl_mod_explode;
|
||||||
ex->frames = 4;
|
ex->frames = 4;
|
||||||
S_StartSound (pos, 0, 0, cl_sfx_lashit, 1, ATTN_NORM, 0);
|
S_StartSound (pos, 0, 0, cl_sfx_lashit, 1, ATTN_NORM, 0);
|
||||||
/* break;
|
*//* break;
|
||||||
|
|
||||||
|
|
||||||
case Q2TE_LIGHTNING:
|
case Q2TE_LIGHTNING:
|
||||||
|
|
|
@ -533,4 +533,4 @@ qboolean CIN_PlayCinematic (char *arg)
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
#endif
|
#endif
|
||||||
|
|
|
@ -96,7 +96,7 @@ void Con_PrintCon (char *txt, console_t *con);
|
||||||
void QT_Update(void)
|
void QT_Update(void)
|
||||||
{
|
{
|
||||||
char buffer[2048];
|
char buffer[2048];
|
||||||
int ret;
|
DWORD ret;
|
||||||
qterm_t *qt;
|
qterm_t *qt;
|
||||||
qterm_t *prev = NULL;
|
qterm_t *prev = NULL;
|
||||||
for (qt = qterms; qt; qt = (prev=qt)->next)
|
for (qt = qterms; qt; qt = (prev=qt)->next)
|
||||||
|
@ -122,7 +122,7 @@ void QT_Update(void)
|
||||||
}
|
}
|
||||||
if (WaitForSingleObject(qt->process, 0) == WAIT_TIMEOUT)
|
if (WaitForSingleObject(qt->process, 0) == WAIT_TIMEOUT)
|
||||||
{
|
{
|
||||||
if (ret=GetFileSize(qt->pipeout, NULL))
|
if ((ret=GetFileSize(qt->pipeout, NULL)))
|
||||||
{
|
{
|
||||||
if (ret!=INVALID_FILE_SIZE)
|
if (ret!=INVALID_FILE_SIZE)
|
||||||
{
|
{
|
||||||
|
@ -144,6 +144,7 @@ void QT_KeyPress(int key)
|
||||||
{
|
{
|
||||||
qbyte k[2];
|
qbyte k[2];
|
||||||
qterm_t *qt;
|
qterm_t *qt;
|
||||||
|
DWORD send = key; //get around a gcc warning
|
||||||
for (qt = qterms; qt; qt = qt->next)
|
for (qt = qterms; qt; qt = qt->next)
|
||||||
{
|
{
|
||||||
if (&qt->console == con)
|
if (&qt->console == con)
|
||||||
|
@ -162,7 +163,7 @@ void QT_KeyPress(int key)
|
||||||
}
|
}
|
||||||
if (GetFileSize(qt->pipein, NULL)<512)
|
if (GetFileSize(qt->pipein, NULL)<512)
|
||||||
{
|
{
|
||||||
WriteFile(qt->pipein, k, 1, &key, NULL);
|
WriteFile(qt->pipein, k, 1, &send, NULL);
|
||||||
Con_PrintCon(k, &qt->console);
|
Con_PrintCon(k, &qt->console);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -1512,7 +1512,7 @@ int Mod_LoadHiResTexture(char *name, qboolean mipmap, qboolean alpha, qboolean c
|
||||||
|
|
||||||
COM_StripExtension(name, nicename);
|
COM_StripExtension(name, nicename);
|
||||||
|
|
||||||
while(data = strchr(nicename, '*'))
|
while((data = strchr(nicename, '*')))
|
||||||
{
|
{
|
||||||
*data = '#';
|
*data = '#';
|
||||||
}
|
}
|
||||||
|
|
|
@ -27,11 +27,13 @@ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
|
||||||
#ifndef NODIRECTX
|
#ifndef NODIRECTX
|
||||||
#include <dinput.h>
|
#include <dinput.h>
|
||||||
|
|
||||||
|
#ifdef _MSC_VER
|
||||||
#ifdef AVAIL_DX7
|
#ifdef AVAIL_DX7
|
||||||
#pragma comment (lib, "../libs/dxsdk7/lib/dxguid.lib")
|
#pragma comment (lib, "../libs/dxsdk7/lib/dxguid.lib")
|
||||||
#else
|
#else
|
||||||
#pragma comment (lib, "dxguid.lib")
|
#pragma comment (lib, "dxguid.lib")
|
||||||
#endif
|
#endif
|
||||||
|
#endif
|
||||||
|
|
||||||
#define DINPUT_BUFFERSIZE 16
|
#define DINPUT_BUFFERSIZE 16
|
||||||
#define iDirectInputCreate(a,b,c,d) pDirectInputCreate(a,b,c,d)
|
#define iDirectInputCreate(a,b,c,d) pDirectInputCreate(a,b,c,d)
|
||||||
|
@ -637,7 +639,7 @@ unsigned int _stdcall IN_SerialMSRun(void *param)
|
||||||
{
|
{
|
||||||
mouse_t *mouse = param;
|
mouse_t *mouse = param;
|
||||||
char code[3];
|
char code[3];
|
||||||
int read;
|
DWORD read;
|
||||||
int total=0;
|
int total=0;
|
||||||
IN_SetSerialBoad(mouse->comhandle, 1200);
|
IN_SetSerialBoad(mouse->comhandle, 1200);
|
||||||
total=0;
|
total=0;
|
||||||
|
@ -668,11 +670,11 @@ unsigned int _stdcall IN_SerialMSRun(void *param)
|
||||||
|
|
||||||
//microsofts's intellimouse protocol
|
//microsofts's intellimouse protocol
|
||||||
//used by most wheel mice.
|
//used by most wheel mice.
|
||||||
unsigned int _stdcall IN_SerialMSIntelliRun(void *param)
|
unsigned long __stdcall IN_SerialMSIntelliRun(void *param)
|
||||||
{
|
{
|
||||||
mouse_t *mouse = param;
|
mouse_t *mouse = param;
|
||||||
unsigned char code[80];
|
unsigned char code[80];
|
||||||
int read, total=0;
|
DWORD read, total=0;
|
||||||
IN_SetSerialBoad(mouse->comhandle, 1200);
|
IN_SetSerialBoad(mouse->comhandle, 1200);
|
||||||
|
|
||||||
ReadFile(mouse->comhandle, code, 11*4+2, &read, NULL); //header info which we choose to ignore
|
ReadFile(mouse->comhandle, code, 11*4+2, &read, NULL); //header info which we choose to ignore
|
||||||
|
@ -1473,7 +1475,7 @@ qboolean IN_ReadJoystick (void)
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
// read error occurred
|
// read error occurred
|
||||||
// turning off the joystick seems too harsh for 1 read error,\
|
// turning off the joystick seems too harsh for 1 read error,
|
||||||
// but what should be done?
|
// but what should be done?
|
||||||
// Con_Printf ("IN_ReadJoystick: no response\n");
|
// Con_Printf ("IN_ReadJoystick: no response\n");
|
||||||
// joy_avail = false;
|
// joy_avail = false;
|
||||||
|
|
|
@ -1010,6 +1010,9 @@ qboolean Media_PlayFilm(char *name)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
|
#else
|
||||||
|
case MFT_AVI:
|
||||||
|
break;
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
case MFT_CIN:
|
case MFT_CIN:
|
||||||
|
@ -1025,6 +1028,9 @@ qboolean Media_PlayFilm(char *name)
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
case MFT_NONE:
|
||||||
|
break;
|
||||||
}
|
}
|
||||||
|
|
||||||
media_filmtype = MFT_NONE;
|
media_filmtype = MFT_NONE;
|
||||||
|
@ -1777,6 +1783,9 @@ qboolean Media_ShowFilm(void)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
return true;
|
return true;
|
||||||
|
#else
|
||||||
|
case MFT_AVI:
|
||||||
|
break;
|
||||||
#endif
|
#endif
|
||||||
case MFT_CIN:
|
case MFT_CIN:
|
||||||
if (CIN_RunCinematic())
|
if (CIN_RunCinematic())
|
||||||
|
@ -1790,6 +1799,8 @@ qboolean Media_ShowFilm(void)
|
||||||
|
|
||||||
return false;
|
return false;
|
||||||
#endif
|
#endif
|
||||||
|
case MFT_NONE:
|
||||||
|
break;
|
||||||
}
|
}
|
||||||
Media_PlayFilm(NULL);
|
Media_PlayFilm(NULL);
|
||||||
return false;
|
return false;
|
||||||
|
|
|
@ -965,6 +965,8 @@ void M_Keyup (int key)
|
||||||
case m_xwindows:
|
case m_xwindows:
|
||||||
XWindows_Keyup(key);
|
XWindows_Keyup(key);
|
||||||
return;
|
return;
|
||||||
|
default:
|
||||||
|
break;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -456,4 +456,4 @@ void TP_CheckPickupSound(char *s, vec3_t org)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
#endif
|
#endif
|
||||||
|
|
|
@ -439,4 +439,4 @@
|
||||||
** EOF.. Enjoy.
|
** EOF.. Enjoy.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#endif //_WAFE_H_
|
#endif //_WAFE_H_
|
||||||
|
|
|
@ -2063,7 +2063,11 @@ void *com_pathforfile; //fread and stuff is preferable if null.
|
||||||
|
|
||||||
typedef struct searchpath_s
|
typedef struct searchpath_s
|
||||||
{
|
{
|
||||||
enum {SPT_OS, SPT_PACK, SPT_ZIP} type;
|
enum {SPT_OS, SPT_PACK
|
||||||
|
#ifdef ZLIB
|
||||||
|
, SPT_ZIP
|
||||||
|
#endif
|
||||||
|
} type;
|
||||||
char filename[MAX_OSPATH];
|
char filename[MAX_OSPATH];
|
||||||
union {
|
union {
|
||||||
pack_t *pack; // only one of filename / pack will be used
|
pack_t *pack; // only one of filename / pack will be used
|
||||||
|
|
|
@ -4411,7 +4411,7 @@ Handles offseting and rotation of the end points for moving and
|
||||||
rotating entities
|
rotating entities
|
||||||
==================
|
==================
|
||||||
*/
|
*/
|
||||||
#ifdef _WIN32
|
#ifdef _MSC_VER
|
||||||
#pragma optimize( "", off )
|
#pragma optimize( "", off )
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
@ -4476,7 +4476,7 @@ trace_t CM_TransformedBoxTrace (vec3_t start, vec3_t end,
|
||||||
return trace;
|
return trace;
|
||||||
}
|
}
|
||||||
|
|
||||||
#ifdef _WIN32
|
#ifdef _MSC_VER
|
||||||
#pragma optimize( "", on )
|
#pragma optimize( "", on )
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
|
|
@ -112,7 +112,7 @@ static ID_INLINE void Huff_PrepareTree( tree_t tree ) {
|
||||||
|
|
||||||
// create first node
|
// create first node
|
||||||
node = &tree[263];
|
node = &tree[263];
|
||||||
VALUE( tree[0] )++;
|
tree[0] = (void*)(VALUE( tree[0] )+1);
|
||||||
|
|
||||||
node[7] = NODE_NONE;
|
node[7] = NODE_NONE;
|
||||||
tree[2] = node;
|
tree[2] = node;
|
||||||
|
|
|
@ -83,7 +83,7 @@ void PerpendicularVector( vec3_t dst, const vec3_t src )
|
||||||
VectorNormalize( dst );
|
VectorNormalize( dst );
|
||||||
}
|
}
|
||||||
|
|
||||||
#ifdef _WIN32
|
#ifdef _MSC_VER
|
||||||
#pragma optimize( "", off )
|
#pragma optimize( "", off )
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
@ -143,7 +143,7 @@ void RotatePointAroundVector( vec3_t dst, const vec3_t dir, const vec3_t point,
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
#ifdef _WIN32
|
#ifdef _MSC_VER
|
||||||
#pragma optimize( "", on )
|
#pragma optimize( "", on )
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
|
|
@ -497,7 +497,7 @@ static void inline QVM_Enter(qvm_t *vm, long size)
|
||||||
fp[0]=fp[1]; // unknown /maybe size/
|
fp[0]=fp[1]; // unknown /maybe size/
|
||||||
fp[1]=*vm->sp++; // saved PC
|
fp[1]=*vm->sp++; // saved PC
|
||||||
|
|
||||||
if (vm->sp > (long*)(vm->ss+vm->len_ss)) Sys_Error("QVM Stack overflow");
|
if ((long*)vm->sp > (long*)(vm->ss+vm->len_ss)) Sys_Error("QVM Stack overflow");
|
||||||
}
|
}
|
||||||
|
|
||||||
/*
|
/*
|
||||||
|
@ -888,7 +888,7 @@ vm_t *VM_Create(vm_t *vm, const char *name, sys_call_t syscall, sys_callex_t sys
|
||||||
#ifdef _WIN32
|
#ifdef _WIN32
|
||||||
if (COM_CheckParm("-dllforqvm"))
|
if (COM_CheckParm("-dllforqvm"))
|
||||||
{
|
{
|
||||||
if(vm->hInst=Sys_LoadDLL(name, (void**)&vm->vmMain, syscall))
|
if((vm->hInst=Sys_LoadDLL(name, (void**)&vm->vmMain, syscall)))
|
||||||
{
|
{
|
||||||
Con_Printf("Creating native machine \"%s\"\n", name);
|
Con_Printf("Creating native machine \"%s\"\n", name);
|
||||||
vm->type=VM_NATIVE;
|
vm->type=VM_NATIVE;
|
||||||
|
@ -1002,4 +1002,4 @@ int VARGS VM_Call(vm_t *vm, int instruction, ...)
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
#endif
|
#endif
|
||||||
|
|
|
@ -479,12 +479,12 @@ static galiastexnum_t *GL_ChooseSkin(galiasinfo_t *inf, char *modelname, entity_
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
(char *)skins = (char *)inf + inf->ofsskins;
|
skins = (galiasskin_t*)((char *)inf + inf->ofsskins);
|
||||||
if (!skins->texnums)
|
if (!skins->texnums)
|
||||||
return NULL;
|
return NULL;
|
||||||
if (e->skinnum >= 0 && e->skinnum < inf->numskins)
|
if (e->skinnum >= 0 && e->skinnum < inf->numskins)
|
||||||
skins += e->skinnum;
|
skins += e->skinnum;
|
||||||
(char *)texnums = (char *)skins + skins->ofstexnums;
|
texnums = (galiastexnum_t*)((char *)skins + skins->ofstexnums);
|
||||||
|
|
||||||
|
|
||||||
//colourmap isn't present yet.
|
//colourmap isn't present yet.
|
||||||
|
@ -619,13 +619,13 @@ static galiastexnum_t *GL_ChooseSkin(galiasinfo_t *inf, char *modelname, entity_
|
||||||
|
|
||||||
frame = cl.time*skins->skinspeed;
|
frame = cl.time*skins->skinspeed;
|
||||||
frame = frame%skins->texnums;
|
frame = frame%skins->texnums;
|
||||||
(char *)texnums = (char *)skins + skins->ofstexnums + frame*sizeof(galiastexnum_t);
|
texnums = (galiastexnum_t*)((char *)skins + skins->ofstexnums + frame*sizeof(galiastexnum_t));
|
||||||
memcpy(&cm->texnum, texnums, sizeof(cm->texnum));
|
memcpy(&cm->texnum, texnums, sizeof(cm->texnum));
|
||||||
}
|
}
|
||||||
return &cm->texnum;
|
return &cm->texnum;
|
||||||
}
|
}
|
||||||
|
|
||||||
(char *)skins = (char *)inf + inf->ofsskins;
|
skins = (galiasskin_t*)((char *)inf + inf->ofsskins);
|
||||||
if (e->skinnum >= 0 && e->skinnum < inf->numskins)
|
if (e->skinnum >= 0 && e->skinnum < inf->numskins)
|
||||||
skins += e->skinnum;
|
skins += e->skinnum;
|
||||||
|
|
||||||
|
@ -634,7 +634,7 @@ static galiastexnum_t *GL_ChooseSkin(galiasinfo_t *inf, char *modelname, entity_
|
||||||
|
|
||||||
frame = cl.time*skins->skinspeed;
|
frame = cl.time*skins->skinspeed;
|
||||||
frame = frame%skins->texnums;
|
frame = frame%skins->texnums;
|
||||||
(char *)texnums = (char *)skins + skins->ofstexnums + frame*sizeof(galiastexnum_t);
|
texnums = (galiastexnum_t*)((char *)skins + skins->ofstexnums + frame*sizeof(galiastexnum_t));
|
||||||
|
|
||||||
return texnums;
|
return texnums;
|
||||||
}
|
}
|
||||||
|
@ -1090,7 +1090,7 @@ void R_DrawGAliasModel (entity_t *e)
|
||||||
|
|
||||||
}
|
}
|
||||||
if (inf->nextsurf)
|
if (inf->nextsurf)
|
||||||
(char *)inf = (char *)inf + inf->nextsurf;
|
inf = (galiasinfo_t*)((char *)inf + inf->nextsurf);
|
||||||
else
|
else
|
||||||
inf = NULL;
|
inf = NULL;
|
||||||
}
|
}
|
||||||
|
@ -1505,14 +1505,14 @@ static void *Q1_LoadFrameGroup (daliasframetype_t *pframetype, int *seamremaps)
|
||||||
vec3_t *normals;
|
vec3_t *normals;
|
||||||
vec3_t *verts;
|
vec3_t *verts;
|
||||||
|
|
||||||
(char *)frame = (char *)galias + galias->groupofs;
|
frame = (galiasgroup_t*)((char *)galias + galias->groupofs);
|
||||||
|
|
||||||
for (i = 0; i < pq1inmodel->numframes; i++)
|
for (i = 0; i < pq1inmodel->numframes; i++)
|
||||||
{
|
{
|
||||||
switch(LittleLong(pframetype->type))
|
switch(LittleLong(pframetype->type))
|
||||||
{
|
{
|
||||||
case ALIAS_SINGLE:
|
case ALIAS_SINGLE:
|
||||||
(char *)pinframe = (char *)(pframetype+1)+sizeof(daliasframe_t);
|
pinframe = (dtrivertx_t*)((char *)(pframetype+1)+sizeof(daliasframe_t));
|
||||||
pose = (galiaspose_t *)Hunk_Alloc(sizeof(galiaspose_t) + sizeof(vec3_t)*2*galias->numverts);
|
pose = (galiaspose_t *)Hunk_Alloc(sizeof(galiaspose_t) + sizeof(vec3_t)*2*galias->numverts);
|
||||||
frame->poseofs = (char *)pose - (char *)frame;
|
frame->poseofs = (char *)pose - (char *)frame;
|
||||||
frame->numposes = 1;
|
frame->numposes = 1;
|
||||||
|
@ -1540,10 +1540,10 @@ static void *Q1_LoadFrameGroup (daliasframetype_t *pframetype, int *seamremaps)
|
||||||
|
|
||||||
// GL_GenerateNormals((float*)verts, (float*)normals, (int *)((char *)galias + galias->ofs_indexes), galias->numindexes/3, galias->numverts);
|
// GL_GenerateNormals((float*)verts, (float*)normals, (int *)((char *)galias + galias->ofs_indexes), galias->numindexes/3, galias->numverts);
|
||||||
|
|
||||||
(char *)pframetype = (char *)&pinframe[pq1inmodel->numverts];
|
pframetype = (daliasframetype_t *)&pinframe[pq1inmodel->numverts];
|
||||||
break;
|
break;
|
||||||
case ALIAS_GROUP:
|
case ALIAS_GROUP:
|
||||||
(char *)ingroup = (char *)(pframetype+1);
|
ingroup = (daliasgroup_t *)(pframetype+1);
|
||||||
|
|
||||||
pose = (galiaspose_t *)Hunk_Alloc(ingroup->numframes*(sizeof(galiaspose_t) + sizeof(vec3_t)*2*galias->numverts));
|
pose = (galiaspose_t *)Hunk_Alloc(ingroup->numframes*(sizeof(galiaspose_t) + sizeof(vec3_t)*2*galias->numverts));
|
||||||
frame->poseofs = (char *)pose - (char *)frame;
|
frame->poseofs = (char *)pose - (char *)frame;
|
||||||
|
@ -1585,7 +1585,7 @@ static void *Q1_LoadFrameGroup (daliasframetype_t *pframetype, int *seamremaps)
|
||||||
|
|
||||||
// GL_GenerateNormals((float*)verts, (float*)normals, (int *)((char *)galias + galias->ofs_indexes), galias->numindexes/3, galias->numverts);
|
// GL_GenerateNormals((float*)verts, (float*)normals, (int *)((char *)galias + galias->ofs_indexes), galias->numindexes/3, galias->numverts);
|
||||||
|
|
||||||
(char *)pframetype = (char *)pinframe;
|
pframetype = (daliasframetype_t *)pinframe;
|
||||||
break;
|
break;
|
||||||
default:
|
default:
|
||||||
Sys_Error("Bad frame type\n");
|
Sys_Error("Bad frame type\n");
|
||||||
|
@ -1668,7 +1668,7 @@ static void *Q1_LoadSkins (daliasskintype_t *pskintype, qboolean alpha)
|
||||||
texnums->base = texture;
|
texnums->base = texture;
|
||||||
texnums->fullbright = fbtexture;
|
texnums->fullbright = fbtexture;
|
||||||
|
|
||||||
(char *)pskintype = (char *)(pskintype+1)+s;
|
pskintype = (daliasskintype_t *)((char *)(pskintype+1)+s);
|
||||||
break;
|
break;
|
||||||
|
|
||||||
default:
|
default:
|
||||||
|
@ -1747,7 +1747,7 @@ static void *Q1_LoadSkins (daliasskintype_t *pskintype, qboolean alpha)
|
||||||
BZ_Free(saved);
|
BZ_Free(saved);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
(char *)pskintype = (char *)data;
|
pskintype = (daliasskintype_t *)data;
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
outskin++;
|
outskin++;
|
||||||
|
|
|
@ -229,7 +229,7 @@ static void MakeDeforms(shader_t *shader, vec4_t *out, vec4_t *in, int number)
|
||||||
static void Mesh_DeformTextureCoords(mesh_t *mesh, shaderpass_t *pass)
|
static void Mesh_DeformTextureCoords(mesh_t *mesh, shaderpass_t *pass)
|
||||||
{
|
{
|
||||||
int d;
|
int d;
|
||||||
tcmod_t *tcmod = pass->tcmod;
|
// tcmod_t *tcmod = pass->tcmod;
|
||||||
float *in, *out;
|
float *in, *out;
|
||||||
switch(pass->tcgen)
|
switch(pass->tcgen)
|
||||||
{
|
{
|
||||||
|
|
|
@ -1002,7 +1002,7 @@ static void PPL_BaseChain_Specular_8TMU(msurface_t *first, texture_t *tex)
|
||||||
glRect_t *theRect;
|
glRect_t *theRect;
|
||||||
msurface_t *s;
|
msurface_t *s;
|
||||||
|
|
||||||
float fourhalffloats[4] = {0.5,0.5,0.5,0.5};
|
// float fourhalffloats[4] = {0.5,0.5,0.5,0.5};
|
||||||
|
|
||||||
glColorMask(1,1,1,1);
|
glColorMask(1,1,1,1);
|
||||||
|
|
||||||
|
@ -1226,7 +1226,6 @@ rgb * lightmap -> rgb
|
||||||
|
|
||||||
static void PPL_BaseTextureChain(msurface_t *first)
|
static void PPL_BaseTextureChain(msurface_t *first)
|
||||||
{
|
{
|
||||||
extern int *deluxmap_textures;
|
|
||||||
extern cvar_t gl_bump, gl_specular;
|
extern cvar_t gl_bump, gl_specular;
|
||||||
texture_t *t;
|
texture_t *t;
|
||||||
|
|
||||||
|
@ -1614,7 +1613,6 @@ void PPL_LightTextures(model_t *model, vec3_t modelorigin, dlight_t *light)
|
||||||
int i;
|
int i;
|
||||||
msurface_t *s;
|
msurface_t *s;
|
||||||
texture_t *t;
|
texture_t *t;
|
||||||
extern cvar_t gl_bump;
|
|
||||||
|
|
||||||
vec3_t relativelightorigin;
|
vec3_t relativelightorigin;
|
||||||
|
|
||||||
|
@ -1739,7 +1737,6 @@ void PPL_LightBModelTextures(entity_t *e, dlight_t *light)
|
||||||
|
|
||||||
msurface_t *s;
|
msurface_t *s;
|
||||||
texture_t *t;
|
texture_t *t;
|
||||||
extern cvar_t gl_bump;
|
|
||||||
|
|
||||||
vec3_t relativelightorigin;
|
vec3_t relativelightorigin;
|
||||||
|
|
||||||
|
|
|
@ -27,8 +27,6 @@ void R_RenderBrushPoly (msurface_t *fa);
|
||||||
#define PROJECTION_DISTANCE 200
|
#define PROJECTION_DISTANCE 200
|
||||||
#define MAX_STENCIL_ENTS 128
|
#define MAX_STENCIL_ENTS 128
|
||||||
|
|
||||||
static entity_t *g_stencilEnts[MAX_STENCIL_ENTS];
|
|
||||||
static int g_numStencilEnts = 0;
|
|
||||||
extern int gl_canstencil;
|
extern int gl_canstencil;
|
||||||
|
|
||||||
PFNGLCOMPRESSEDTEXIMAGE2DARBPROC qglCompressedTexImage2DARB;
|
PFNGLCOMPRESSEDTEXIMAGE2DARBPROC qglCompressedTexImage2DARB;
|
||||||
|
|
|
@ -612,7 +612,6 @@ void GLR_BuildDeluxMap (msurface_t *surf, qbyte *dest)
|
||||||
qbyte *deluxmap;
|
qbyte *deluxmap;
|
||||||
unsigned scale;
|
unsigned scale;
|
||||||
int maps;
|
int maps;
|
||||||
extern cvar_t r_ambient;
|
|
||||||
float intensity;
|
float intensity;
|
||||||
vec_t *bnorm;
|
vec_t *bnorm;
|
||||||
vec3_t temp;
|
vec3_t temp;
|
||||||
|
@ -2971,7 +2970,7 @@ void GLR_MarkLeaves (void)
|
||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
if ((r_oldviewleaf == r_viewleaf && r_oldviewleaf2 == r_viewleaf2) && !r_novis.value || r_novis.value == 2)
|
if (((r_oldviewleaf == r_viewleaf && r_oldviewleaf2 == r_viewleaf2) && !r_novis.value) || r_novis.value == 2)
|
||||||
return;
|
return;
|
||||||
|
|
||||||
// if (mirror)
|
// if (mirror)
|
||||||
|
|
|
@ -104,7 +104,6 @@ DWORD WindowStyle, ExWindowStyle;
|
||||||
HWND mainwindow, dibwindow;
|
HWND mainwindow, dibwindow;
|
||||||
|
|
||||||
unsigned char vid_curpal[256*3];
|
unsigned char vid_curpal[256*3];
|
||||||
static qboolean fullsbardraw = false;
|
|
||||||
|
|
||||||
float vid_gamma = 1.0;
|
float vid_gamma = 1.0;
|
||||||
|
|
||||||
|
@ -748,8 +747,6 @@ GL_BeginRendering
|
||||||
*/
|
*/
|
||||||
void GL_BeginRendering (int *x, int *y, int *width, int *height)
|
void GL_BeginRendering (int *x, int *y, int *width, int *height)
|
||||||
{
|
{
|
||||||
extern cvar_t gl_clear;
|
|
||||||
|
|
||||||
*x = *y = 0;
|
*x = *y = 0;
|
||||||
*width = WindowRect.right - WindowRect.left;
|
*width = WindowRect.right - WindowRect.left;
|
||||||
*height = WindowRect.bottom - WindowRect.top;
|
*height = WindowRect.bottom - WindowRect.top;
|
||||||
|
@ -826,7 +823,7 @@ BOOL gammaworks;
|
||||||
|
|
||||||
void GLVID_ShiftPalette (unsigned char *palette)
|
void GLVID_ShiftPalette (unsigned char *palette)
|
||||||
{
|
{
|
||||||
extern qbyte ramps[3][256];
|
// extern qbyte ramps[3][256];
|
||||||
|
|
||||||
// VID_SetPalette (palette);
|
// VID_SetPalette (palette);
|
||||||
|
|
||||||
|
@ -1080,13 +1077,18 @@ LONG WINAPI GLMainWndProc (
|
||||||
// Event.
|
// Event.
|
||||||
case WM_MOUSEWHEEL:
|
case WM_MOUSEWHEEL:
|
||||||
if (!vid_initializing)
|
if (!vid_initializing)
|
||||||
if ((short) HIWORD(wParam) > 0) {
|
{
|
||||||
|
if ((short) HIWORD(wParam) > 0)
|
||||||
|
{
|
||||||
Key_Event(K_MWHEELUP, true);
|
Key_Event(K_MWHEELUP, true);
|
||||||
Key_Event(K_MWHEELUP, false);
|
Key_Event(K_MWHEELUP, false);
|
||||||
} else {
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
Key_Event(K_MWHEELDOWN, true);
|
Key_Event(K_MWHEELDOWN, true);
|
||||||
Key_Event(K_MWHEELDOWN, false);
|
Key_Event(K_MWHEELDOWN, false);
|
||||||
}
|
}
|
||||||
|
}
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case WM_SIZE:
|
case WM_SIZE:
|
||||||
|
|
|
@ -263,13 +263,13 @@ int Doom_LoadFlat(char *name)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
sprintf(texname, "flat-%-0.8s", name);
|
sprintf(texname, "flat-%-.8s", name);
|
||||||
strlwr(texname);
|
strlwr(texname);
|
||||||
tex = Mod_LoadReplacementTexture(texname, true, false);
|
tex = Mod_LoadReplacementTexture(texname, true, false);
|
||||||
if (tex)
|
if (tex)
|
||||||
return tex;
|
return tex;
|
||||||
|
|
||||||
sprintf(texname, "flats/%-0.8s", name);
|
sprintf(texname, "flats/%-.8s", name);
|
||||||
strlwr(texname);
|
strlwr(texname);
|
||||||
file = COM_LoadMallocFile(texname);
|
file = COM_LoadMallocFile(texname);
|
||||||
if (file)
|
if (file)
|
||||||
|
|
|
@ -766,9 +766,6 @@ void LightFace (int surfnum)
|
||||||
vec3_t *light, *norm;
|
vec3_t *light, *norm;
|
||||||
vec3_t wnorm, temp;
|
vec3_t wnorm, temp;
|
||||||
int w, h;
|
int w, h;
|
||||||
|
|
||||||
extern byte *runningrgblightdatabase;
|
|
||||||
extern byte *runninglightnormbase;
|
|
||||||
|
|
||||||
f = dfaces + surfnum;
|
f = dfaces + surfnum;
|
||||||
|
|
||||||
|
@ -946,4 +943,4 @@ void LightFace (int surfnum)
|
||||||
|
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#endif
|
#endif
|
||||||
|
|
|
@ -736,7 +736,7 @@ void FTP_Client_Command (char *cmd)
|
||||||
Q_strncpyz(con->file, server, sizeof(con->file));
|
Q_strncpyz(con->file, server, sizeof(con->file));
|
||||||
Q_strncpyz(con->localfile, server, sizeof(con->localfile));
|
Q_strncpyz(con->localfile, server, sizeof(con->localfile));
|
||||||
|
|
||||||
if (cmd = COM_ParseOut(cmd, server, sizeof(server)))
|
if ((cmd = COM_ParseOut(cmd, server, sizeof(server))))
|
||||||
Q_strncpyz(con->localfile, server, sizeof(con->localfile));
|
Q_strncpyz(con->localfile, server, sizeof(con->localfile));
|
||||||
}
|
}
|
||||||
else if (!stricmp(command, "quit"))
|
else if (!stricmp(command, "quit"))
|
||||||
|
|
Loading…
Reference in a new issue