Fixed incorrect pointer types, and some other warning types for GCC and MinGW
git-svn-id: https://svn.code.sf.net/p/fteqw/code/branches/wip@3788 fc73d0e0-1445-4013-8a0c-d673dee63da5
This commit is contained in:
parent
f6741d8dde
commit
0e078381b3
35 changed files with 409 additions and 403 deletions
|
@ -49,7 +49,7 @@ static void CDAudio_Eject(void)
|
|||
|
||||
dwReturn = mciSendCommand(wDeviceID, MCI_SET, MCI_SET_DOOR_OPEN, (DWORD_PTR)NULL);
|
||||
if (dwReturn)
|
||||
Con_DPrintf("MCI_SET_DOOR_OPEN failed (%i)\n", dwReturn);
|
||||
Con_DPrintf("MCI_SET_DOOR_OPEN failed (%i)\n", (int)dwReturn);
|
||||
}
|
||||
|
||||
|
||||
|
@ -59,7 +59,7 @@ static void CDAudio_CloseDoor(void)
|
|||
|
||||
dwReturn = mciSendCommand(wDeviceID, MCI_SET, MCI_SET_DOOR_CLOSED, (DWORD_PTR)NULL);
|
||||
if (dwReturn)
|
||||
Con_DPrintf("MCI_SET_DOOR_CLOSED failed (%i)\n", dwReturn);
|
||||
Con_DPrintf("MCI_SET_DOOR_CLOSED failed (%i)\n", (int)dwReturn);
|
||||
}
|
||||
|
||||
|
||||
|
@ -156,7 +156,7 @@ void CDAudio_Play(int track, qboolean looping)
|
|||
dwReturn = mciSendCommand(wDeviceID, MCI_STATUS, MCI_STATUS_ITEM | MCI_TRACK | MCI_WAIT, (DWORD_PTR) (LPVOID) &mciStatusParms);
|
||||
if (dwReturn)
|
||||
{
|
||||
Con_DPrintf("MCI_STATUS failed (%i)\n", dwReturn);
|
||||
Con_DPrintf("MCI_STATUS failed (%i)\n", (int)dwReturn);
|
||||
return;
|
||||
}
|
||||
if (mciStatusParms.dwReturn != MCI_CDA_TRACK_AUDIO)
|
||||
|
@ -171,7 +171,7 @@ void CDAudio_Play(int track, qboolean looping)
|
|||
dwReturn = mciSendCommand(wDeviceID, MCI_STATUS, MCI_STATUS_ITEM | MCI_TRACK | MCI_WAIT, (DWORD_PTR) (LPVOID) &mciStatusParms);
|
||||
if (dwReturn)
|
||||
{
|
||||
Con_DPrintf("MCI_STATUS failed (%i)\n", dwReturn);
|
||||
Con_DPrintf("MCI_STATUS failed (%i)\n", (int)dwReturn);
|
||||
return;
|
||||
}
|
||||
|
||||
|
@ -188,7 +188,7 @@ void CDAudio_Play(int track, qboolean looping)
|
|||
dwReturn = mciSendCommand(wDeviceID, MCI_PLAY, MCI_NOTIFY | MCI_FROM | MCI_TO, (DWORD_PTR)(LPVOID) &mciPlayParms);
|
||||
if (dwReturn)
|
||||
{
|
||||
Con_DPrintf("CDAudio: MCI_PLAY failed (%i)\n", dwReturn);
|
||||
Con_DPrintf("CDAudio: MCI_PLAY failed (%i)\n", (int)dwReturn);
|
||||
return;
|
||||
}
|
||||
|
||||
|
@ -215,7 +215,7 @@ void CDAudio_Stop(void)
|
|||
|
||||
dwReturn = mciSendCommand(wDeviceID, MCI_STOP, 0, (DWORD_PTR)NULL);
|
||||
if (dwReturn)
|
||||
Con_DPrintf("MCI_STOP failed (%i)", dwReturn);
|
||||
Con_DPrintf("MCI_STOP failed (%i)", (int)dwReturn);
|
||||
|
||||
wasPlaying = false;
|
||||
playing = false;
|
||||
|
@ -236,7 +236,7 @@ void CDAudio_Pause(void)
|
|||
mciGenericParms.dwCallback = (DWORD_PTR)mainwindow;
|
||||
dwReturn = mciSendCommand(wDeviceID, MCI_PAUSE, 0, (DWORD_PTR)(LPVOID) &mciGenericParms);
|
||||
if (dwReturn)
|
||||
Con_DPrintf("MCI_PAUSE failed (%i)", dwReturn);
|
||||
Con_DPrintf("MCI_PAUSE failed (%i)", (int)dwReturn);
|
||||
|
||||
wasPlaying = playing;
|
||||
playing = false;
|
||||
|
@ -266,7 +266,7 @@ void CDAudio_Resume(void)
|
|||
dwReturn = mciSendCommand(wDeviceID, MCI_PLAY, MCI_TO | MCI_NOTIFY, (DWORD_PTR)(LPVOID) &mciPlayParms);
|
||||
if (dwReturn)
|
||||
{
|
||||
Con_DPrintf("CDAudio: MCI_PLAY failed (%i)\n", dwReturn);
|
||||
Con_DPrintf("CDAudio: MCI_PLAY failed (%i)\n", (int)dwReturn);
|
||||
return;
|
||||
}
|
||||
playing = true;
|
||||
|
@ -473,7 +473,7 @@ int CDAudio_Init(void)
|
|||
dwReturn = mciSendCommand(0, MCI_OPEN, MCI_OPEN_TYPE | MCI_OPEN_SHAREABLE, (DWORD_PTR) (LPVOID) &mciOpenParms);
|
||||
if (dwReturn)
|
||||
{
|
||||
Con_Printf("CDAudio_Init: MCI_OPEN failed (%i)\n", dwReturn);
|
||||
Con_Printf("CDAudio_Init: MCI_OPEN failed (%i)\n", (int)dwReturn);
|
||||
return -1;
|
||||
}
|
||||
wDeviceID = mciOpenParms.wDeviceID;
|
||||
|
@ -483,7 +483,7 @@ int CDAudio_Init(void)
|
|||
dwReturn = mciSendCommand(wDeviceID, MCI_SET, MCI_SET_TIME_FORMAT, (DWORD_PTR)(LPVOID) &mciSetParms);
|
||||
if (dwReturn)
|
||||
{
|
||||
Con_Printf("MCI_SET_TIME_FORMAT failed (%i)\n", dwReturn);
|
||||
Con_Printf("MCI_SET_TIME_FORMAT failed (%i)\n", (int)dwReturn);
|
||||
mciSendCommand(wDeviceID, MCI_CLOSE, 0, (DWORD_PTR)NULL);
|
||||
return -1;
|
||||
}
|
||||
|
|
|
@ -758,7 +758,7 @@ static qboolean CL_CheckModelResources (char *name)
|
|||
|
||||
// checking for skins in the model
|
||||
|
||||
FS_LoadFile(name, &file);
|
||||
FS_LoadFile(name, (void **)&file);
|
||||
if (!file)
|
||||
{
|
||||
return false; // couldn't load it
|
||||
|
|
|
@ -1005,7 +1005,7 @@ void IN_RawInput_Init(void)
|
|||
break;
|
||||
}
|
||||
}
|
||||
Con_SafePrintf("Raw input type %i: [%i] %s\n", pRawInputDeviceList[i].dwType, i, dname);
|
||||
Con_SafePrintf("Raw input type %i: [%i] %s\n", (int)pRawInputDeviceList[i].dwType, i, dname);
|
||||
}
|
||||
|
||||
|
||||
|
|
|
@ -1231,11 +1231,11 @@ cin_t *Media_Static_TryLoad(char *name)
|
|||
qbyte *file;
|
||||
|
||||
sprintf(fullname, "%s", name);
|
||||
fsize = FS_LoadFile(fullname, &file);
|
||||
fsize = FS_LoadFile(fullname, (void **)&file);
|
||||
if (!file)
|
||||
{
|
||||
sprintf(fullname, "pics/%s", name);
|
||||
fsize = FS_LoadFile(fullname, &file);
|
||||
fsize = FS_LoadFile(fullname, (void **)&file);
|
||||
if (!file)
|
||||
return NULL;
|
||||
}
|
||||
|
|
|
@ -364,7 +364,7 @@ void M_Menu_Setup_f (void)
|
|||
|
||||
menu->selecteditem = (menuoption_t*)
|
||||
(info->nameedit = MC_AddEdit(menu, 64, 40, "Your name", name.string));
|
||||
(info->modeledit = MC_AddCvarCombo(menu, 64, 72, "model", &skin, modeloptions, modeloptions));
|
||||
(info->modeledit = MC_AddCvarCombo(menu, 64, 72, "model", &skin, (const char **)modeloptions, (const char **)modeloptions));
|
||||
info->modeledit->selectedoption = !strncmp(skin.string, "female", 6);
|
||||
cu = MC_AddCustom(menu, 172-16, 88+16, NULL);
|
||||
cu->draw = MSetupQ2_TransDraw;
|
||||
|
@ -416,7 +416,7 @@ void M_Menu_Setup_f (void)
|
|||
if (mgt == MGT_HEXEN2)
|
||||
{
|
||||
cvar_t *pc = Cvar_Get("cl_playerclass", "1", CVAR_USERINFO|CVAR_ARCHIVE, "Hexen2");
|
||||
(info->classedit = MC_AddCombo(menu, 64, 72, "Your class", classnames, pc->ival-1));
|
||||
(info->classedit = MC_AddCombo(menu, 64, 72, "Your class", (const char **)classnames, pc->ival-1));
|
||||
}
|
||||
else
|
||||
(info->skinedit = MC_AddEdit(menu, 64, 72, "Your skin", skin.string));
|
||||
|
|
|
@ -372,7 +372,7 @@ void M_Menu_Particles_f (void)
|
|||
MC_AddWhiteText(menu, 16, y, " €<><E282AC><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>‚ ", false); y+=8;
|
||||
y+=8;
|
||||
|
||||
MC_AddCvarCombo(menu, 16, y, " particle system", &r_particlesystem, psystemopts, psystemvals);y+=8;
|
||||
MC_AddCvarCombo(menu, 16, y, " particle system", &r_particlesystem, (const char **)psystemopts, (const char **)psystemvals);y+=8;
|
||||
//fixme: hide the rest of the options if r_particlesystem==classic
|
||||
MC_AddConsoleCommand(menu, 16, y, " Choose particle set", "menu_particlesets");y+=8;
|
||||
// MC_AddSlider(menu, 16, y, " exp spark count", &r_particles_in_explosion, 16, 1024);y+=8;
|
||||
|
|
|
@ -401,7 +401,7 @@ void M_Menu_Keys_f (void)
|
|||
"3",
|
||||
"4"
|
||||
};
|
||||
MC_AddCvarCombo(menu, 16, y, "Force client", &cl_forcesplitclient, texts, values);
|
||||
MC_AddCvarCombo(menu, 16, y, "Force client", &cl_forcesplitclient, (const char **)texts, (const char **)values);
|
||||
y+=8;
|
||||
}
|
||||
|
||||
|
|
|
@ -59,7 +59,7 @@ struct
|
|||
extern qbyte *host_basepal;
|
||||
|
||||
extern particleengine_t pe_classic;
|
||||
extern particleengine_t *fallback = NULL;
|
||||
particleengine_t *fallback = NULL; //does this really need to be 'extern'?
|
||||
#define FALLBACKBIAS 0x1000000
|
||||
|
||||
static int pt_pointfile = P_INVALID;
|
||||
|
|
|
@ -2529,8 +2529,8 @@ void Surf_BuildLightmaps (void)
|
|||
lightmap_bgra = true;
|
||||
#endif
|
||||
break;
|
||||
#ifdef GLQUAKE
|
||||
case QR_OPENGL:
|
||||
#ifdef GLQUAKE
|
||||
/*favour bgra if the gpu supports it, otherwise use rgb only if it'll be used*/
|
||||
lightmap_bgra = false;
|
||||
if (gl_config.gles)
|
||||
|
|
|
@ -486,7 +486,7 @@ inside the recirculating dma buffer, so the mixing code will know
|
|||
how many sample are required to fill it up.
|
||||
===============
|
||||
*/
|
||||
static int DSOUND_GetDMAPos(soundcardinfo_t *sc)
|
||||
static unsigned int DSOUND_GetDMAPos(soundcardinfo_t *sc)
|
||||
{
|
||||
DWORD mmtime;
|
||||
int s;
|
||||
|
@ -528,7 +528,7 @@ Direct-Sound support
|
|||
*/
|
||||
int DSOUND_InitCard (soundcardinfo_t *sc, int cardnum)
|
||||
{
|
||||
extern cvar_t snd_eax, snd_inactive;
|
||||
extern cvar_t snd_inactive; // snd_eax unused
|
||||
DSBUFFERDESC dsbuf;
|
||||
DSBCAPS dsbcaps;
|
||||
DWORD dwSize, dwWrite;
|
||||
|
|
|
@ -145,7 +145,7 @@ inside the recirculating dma buffer, so the mixing code will know
|
|||
how many sample are required to fill it up.
|
||||
===============
|
||||
*/
|
||||
static int WAV_GetDMAPos(soundcardinfo_t *sc)
|
||||
static unsigned int WAV_GetDMAPos(soundcardinfo_t *sc)
|
||||
{
|
||||
int s;
|
||||
|
||||
|
@ -269,7 +269,7 @@ int WAV_InitCard (soundcardinfo_t *sc, int cardnum)
|
|||
if (hr == WAVERR_BADFORMAT)
|
||||
Con_SafePrintf (CON_ERROR "waveOutOpen failed, format not supported\n");
|
||||
else
|
||||
Con_SafePrintf (CON_ERROR "waveOutOpen failed, return code %i\n", hr);
|
||||
Con_SafePrintf (CON_ERROR "waveOutOpen failed, return code %i\n", (int)hr);
|
||||
WAV_Shutdown (sc);
|
||||
return false;
|
||||
}
|
||||
|
|
|
@ -478,7 +478,7 @@ void *Sys_GetGameAPI(void *parms)
|
|||
char curpath[MAX_OSPATH];
|
||||
char *searchpath;
|
||||
const char *gamename = "gamei386.so";
|
||||
size_t result;
|
||||
char *result;
|
||||
|
||||
void *ret;
|
||||
|
||||
|
@ -583,7 +583,7 @@ void Sys_LowFPPrecision (void)
|
|||
{
|
||||
}
|
||||
|
||||
int main (int c, char **v)
|
||||
int main (int c, const char **v)
|
||||
{
|
||||
double time, oldtime, newtime;
|
||||
quakeparms_t parms;
|
||||
|
|
|
@ -411,7 +411,9 @@ int *debug;
|
|||
DWORD dwExtraInfo;
|
||||
} KBDLLHOOKSTRUCT;
|
||||
#elif defined(MINGW)
|
||||
#ifndef LLKHF_UP
|
||||
#define LLKHF_UP 0x00000080
|
||||
#endif
|
||||
#endif
|
||||
|
||||
HHOOK llkeyboardhook;
|
||||
|
@ -598,7 +600,7 @@ void Sys_MakeCodeWriteable (unsigned long startaddr, unsigned long length)
|
|||
str,
|
||||
sizeof(str),
|
||||
NULL);
|
||||
Sys_Error("Protection change failed!\nError %d: %s\n", GetLastError(), str);
|
||||
Sys_Error("Protection change failed!\nError %d: %s\n", (int)GetLastError(), str);
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -1545,7 +1547,7 @@ int WINAPI WinMain (HINSTANCE hInstance, HINSTANCE hPrevInstance, LPSTR lpCmdLin
|
|||
|
||||
GetModuleFileName(NULL, cwd, sizeof(cwd)-1);
|
||||
strcpy(exename, COM_SkipPath(cwd));
|
||||
parms.argv = argv;
|
||||
parms.argv = (const char **)argv;
|
||||
|
||||
COM_InitArgv (parms.argc, parms.argv);
|
||||
|
||||
|
|
|
@ -522,9 +522,9 @@ void Cmd_Exec_f (void)
|
|||
else
|
||||
Q_strncpyz(name, Cmd_Argv(1), sizeof(name));
|
||||
|
||||
if (FS_LoadFile(name, &f) != -1)
|
||||
if (FS_LoadFile(name, (void **)&f) != -1)
|
||||
;
|
||||
else if (FS_LoadFile(va("%s.cfg", name), &f) != -1)
|
||||
else if (FS_LoadFile(va("%s.cfg", name), (void **)&f) != -1)
|
||||
;
|
||||
else
|
||||
{
|
||||
|
|
|
@ -3457,7 +3457,7 @@ void COM_Effectinfo_Reload(void)
|
|||
COM_Effectinfo_Add(dpnames[i]);
|
||||
|
||||
|
||||
FS_LoadFile("effectinfo.txt", &f);
|
||||
FS_LoadFile("effectinfo.txt", (void **)&f);
|
||||
if (!f)
|
||||
return;
|
||||
buf = f;
|
||||
|
|
|
@ -179,7 +179,7 @@ static vfsfile_t *VFSW32_OpenVFS(void *handle, flocation_t *loc, const char *mod
|
|||
|
||||
static void VFSW32_PrintPath(void *handle)
|
||||
{
|
||||
Con_Printf("%s\n", handle);
|
||||
Con_Printf("%s\n", (char *)handle);
|
||||
}
|
||||
static void VFSW32_ClosePath(void *handle)
|
||||
{
|
||||
|
|
|
@ -1904,7 +1904,7 @@ closesvstream:
|
|||
if (newsock != INVALID_SOCKET)
|
||||
{
|
||||
int _true = true;
|
||||
ioctlsocket(newsock, FIONBIO, &_true);
|
||||
ioctlsocket(newsock, FIONBIO, (u_long *)&_true);
|
||||
setsockopt(newsock, IPPROTO_TCP, TCP_NODELAY, (char *)&_true, sizeof(_true));
|
||||
|
||||
con->active++;
|
||||
|
@ -2444,7 +2444,7 @@ qboolean FTENET_IRCConnect_GetPacket(ftenet_generic_connection_t *gcon)
|
|||
}
|
||||
else
|
||||
{
|
||||
code = strtoul(s, &s, 10);
|
||||
code = strtoul(s, (char ** __restrict__)&s, 10);
|
||||
switch (code)
|
||||
{
|
||||
case 001:
|
||||
|
|
|
@ -265,7 +265,7 @@ int Plug_SystemCallsVM(void *offset, quintptr_t mask, int fn, const int *arg)
|
|||
fn = fn+1;
|
||||
|
||||
if (fn>=0 && fn < numplugbuiltins && plugbuiltins[fn].func!=NULL)
|
||||
return plugbuiltins[fn].func(offset, mask, args);
|
||||
return plugbuiltins[fn].func(offset, mask, (const long int *)args);
|
||||
#undef args
|
||||
Sys_Error("QVM Plugin tried calling invalid builtin %i", fn);
|
||||
return 0;
|
||||
|
@ -816,7 +816,7 @@ qintptr_t VARGS Plug_Net_TCPListen(void *offset, quintptr_t mask, const qintptr_
|
|||
Con_Printf("Failed to create socket\n");
|
||||
return -2;
|
||||
}
|
||||
if (ioctlsocket (sock, FIONBIO, &_true) == -1)
|
||||
if (ioctlsocket (sock, FIONBIO, (u_long *)&_true) == -1)
|
||||
{
|
||||
closesocket(sock);
|
||||
return -2;
|
||||
|
@ -858,7 +858,7 @@ qintptr_t VARGS Plug_Net_Accept(void *offset, quintptr_t mask, const qintptr_t *
|
|||
if (sock < 0)
|
||||
return -1;
|
||||
|
||||
if (ioctlsocket (sock, FIONBIO, &_true) == -1) //now make it non blocking.
|
||||
if (ioctlsocket (sock, FIONBIO, (u_long *)&_true) == -1) //now make it non blocking.
|
||||
{
|
||||
closesocket(sock);
|
||||
return -1;
|
||||
|
@ -922,7 +922,7 @@ qintptr_t VARGS Plug_Net_TCPConnect(void *offset, quintptr_t mask, const qintptr
|
|||
return -2;
|
||||
}
|
||||
|
||||
if (ioctlsocket (sock, FIONBIO, &_true) == -1) //now make it non blocking.
|
||||
if (ioctlsocket (sock, FIONBIO, (u_long *)&_true) == -1) //now make it non blocking.
|
||||
{
|
||||
return -1;
|
||||
}
|
||||
|
|
|
@ -444,7 +444,7 @@ qboolean Q1BSP_Trace(model_t *model, int forcehullnum, int frame, vec3_t axis[3]
|
|||
{
|
||||
vec3_t iaxis[3];
|
||||
vec3_t norm;
|
||||
Matrix3_Invert_Simple(axis, iaxis);
|
||||
Matrix3_Invert_Simple((void *)axis, iaxis);
|
||||
VectorCopy(trace->plane.normal, norm);
|
||||
trace->plane.normal[0] = DotProduct(norm, iaxis[0]);
|
||||
trace->plane.normal[1] = DotProduct(norm, iaxis[1]);
|
||||
|
|
|
@ -340,7 +340,7 @@ qvm_t *QVM_LoadVM(const char *name, sys_callqvm_t syscall)
|
|||
unsigned int i;
|
||||
|
||||
sprintf(path, "%s.qvm", name);
|
||||
FS_LoadFile(path, &raw);
|
||||
FS_LoadFile(path, (void **)&raw);
|
||||
// file not found
|
||||
if(!raw) return NULL;
|
||||
srcheader=(vmHeader_t*)raw;
|
||||
|
|
|
@ -10,7 +10,7 @@
|
|||
extern LPDIRECT3DDEVICE9 pD3DDev9;
|
||||
|
||||
//#define d3dcheck(foo) foo
|
||||
#define d3dcheck(foo) do{HRESULT err = foo; if (FAILED(err)) Sys_Error("D3D reported error on backend line %i - error 0x%x\n", __LINE__, err);} while(0)
|
||||
#define d3dcheck(foo) do{HRESULT err = foo; if (FAILED(err)) Sys_Error("D3D reported error on backend line %i - error 0x%x\n", __LINE__, (unsigned int)err);} while(0)
|
||||
|
||||
#define MAX_TMUS 4
|
||||
|
||||
|
@ -522,7 +522,7 @@ static unsigned int allocindexbuffer(void **dest, unsigned int entries)
|
|||
shaderstate.dynidx_offs += bytes;
|
||||
}
|
||||
|
||||
d3dcheck(IDirect3DIndexBuffer9_Lock(shaderstate.dynidx_buff, offset, entries, dest, offset?D3DLOCK_NOOVERWRITE:D3DLOCK_DISCARD));
|
||||
d3dcheck(IDirect3DIndexBuffer9_Lock(shaderstate.dynidx_buff, offset, (unsigned int)entries, dest, offset?D3DLOCK_NOOVERWRITE:D3DLOCK_DISCARD));
|
||||
return offset/sizeof(index_t);
|
||||
}
|
||||
|
||||
|
@ -690,7 +690,7 @@ static void SelectPassTexture(unsigned int tu, shaderpass_t *pass)
|
|||
}
|
||||
}
|
||||
|
||||
static void colourgenbyte(const shaderpass_t *pass, int cnt, const byte_vec4_t *src, byte_vec4_t *dst, const mesh_t *mesh)
|
||||
static void colourgenbyte(const shaderpass_t *pass, int cnt, byte_vec4_t *src, byte_vec4_t *dst, const mesh_t *mesh)
|
||||
{
|
||||
D3DCOLOR block;
|
||||
switch (pass->rgbgen)
|
||||
|
@ -815,7 +815,7 @@ static void colourgenbyte(const shaderpass_t *pass, int cnt, const byte_vec4_t *
|
|||
}
|
||||
}
|
||||
|
||||
static void alphagenbyte(const shaderpass_t *pass, int cnt, const byte_vec4_t *src, byte_vec4_t *dst, const mesh_t *mesh)
|
||||
static void alphagenbyte(const shaderpass_t *pass, int cnt, byte_vec4_t *src, byte_vec4_t *dst, const mesh_t *mesh)
|
||||
{
|
||||
/*FIXME: Skip this if the rgbgen did it*/
|
||||
float *table;
|
||||
|
@ -901,7 +901,7 @@ static void alphagenbyte(const shaderpass_t *pass, int cnt, const byte_vec4_t *s
|
|||
int i;
|
||||
VectorSubtract(r_origin, shaderstate.curentity->origin, v1);
|
||||
|
||||
if (!Matrix3_Compare(shaderstate.curentity->axis, axisDefault))
|
||||
if (!Matrix3_Compare(shaderstate.curentity->axis, (void *)axisDefault))
|
||||
{
|
||||
Matrix3_Multiply_Vec3(shaderstate.curentity->axis, v2, v2);
|
||||
}
|
||||
|
@ -1161,7 +1161,8 @@ static void tcmod(const tcmod_t *tcmod, int cnt, const float *src, float *dst, c
|
|||
static void GenerateTCMods(const shaderpass_t *pass, float *dest)
|
||||
{
|
||||
mesh_t *mesh;
|
||||
unsigned int fvertex = 0, mno;
|
||||
unsigned int mno;
|
||||
// unsigned int fvertex = 0; //unused variable
|
||||
int i;
|
||||
float *src;
|
||||
for (mno = 0; mno < shaderstate.nummeshes; mno++)
|
||||
|
@ -1188,7 +1189,7 @@ static void GenerateTCMods(const shaderpass_t *pass, float *dest)
|
|||
//end texture coords
|
||||
/*******************************************************************************************************************/
|
||||
|
||||
static void deformgen(const deformv_t *deformv, int cnt, const vecV_t *src, vecV_t *dst, const mesh_t *mesh)
|
||||
static void deformgen(const deformv_t *deformv, int cnt, vecV_t *src, vecV_t *dst, const mesh_t *mesh)
|
||||
{
|
||||
float *table;
|
||||
int j, k;
|
||||
|
@ -1198,14 +1199,14 @@ static void deformgen(const deformv_t *deformv, int cnt, const vecV_t *src, vecV
|
|||
{
|
||||
default:
|
||||
case DEFORMV_NONE:
|
||||
if (src != (const avec4_t*)dst)
|
||||
if (src != dst)
|
||||
memcpy(dst, src, sizeof(*src)*cnt);
|
||||
break;
|
||||
|
||||
case DEFORMV_WAVE:
|
||||
if (!mesh->normals_array)
|
||||
{
|
||||
if (src != (const avec4_t*)dst)
|
||||
if (src != dst)
|
||||
memcpy(dst, src, sizeof(*src)*cnt);
|
||||
return;
|
||||
}
|
||||
|
@ -1227,7 +1228,7 @@ static void deformgen(const deformv_t *deformv, int cnt, const vecV_t *src, vecV
|
|||
case DEFORMV_NORMAL:
|
||||
//normal does not actually move the verts, but it does change the normals array
|
||||
//we don't currently support that.
|
||||
if (src != (const avec4_t*)dst)
|
||||
if (src != dst)
|
||||
memcpy(dst, src, sizeof(*src)*cnt);
|
||||
/*
|
||||
args[0] = deformv->args[1] * shaderstate.curtime;
|
||||
|
@ -1415,7 +1416,7 @@ static void deformgen(const deformv_t *deformv, int cnt, const vecV_t *src, vecV
|
|||
for (j = 0; j < 4; j++)
|
||||
{
|
||||
VectorSubtract(quad[j], rot_centre, tv);
|
||||
Matrix3_Multiply_Vec3(result, tv, quad[j]);
|
||||
Matrix3_Multiply_Vec3((void *)result, tv, quad[j]);
|
||||
VectorAdd(rot_centre, quad[j], quad[j]);
|
||||
}
|
||||
}
|
||||
|
@ -1506,7 +1507,7 @@ static qboolean BE_DrawMeshChain_SetupPass(shaderpass_t *pass, unsigned int vert
|
|||
static void BE_RenderMeshProgram(unsigned int vertcount, unsigned int idxfirst, unsigned int idxcount)
|
||||
{
|
||||
shader_t *s = shaderstate.curshader;
|
||||
shaderpass_t *pass = s->passes;
|
||||
//shaderpass_t *pass = s->passes; //unused variable
|
||||
|
||||
IDirect3DDevice9_SetVertexShader(pD3DDev9, s->prog->handle[0].hlsl.vert);
|
||||
IDirect3DDevice9_SetPixelShader(pD3DDev9, s->prog->handle[0].hlsl.frag);
|
||||
|
@ -1554,7 +1555,7 @@ static void BE_DrawMeshChain_Internal(void)
|
|||
unsigned int mno;
|
||||
unsigned int passno = 0;
|
||||
shaderpass_t *pass = shaderstate.curshader->passes;
|
||||
extern cvar_t r_polygonoffset_submodel_offset, r_polygonoffset_submodel_factor;
|
||||
extern cvar_t r_polygonoffset_submodel_offset; // r_polygonoffset_submodel_factor // unused variable
|
||||
float pushdepth;
|
||||
// float pushfactor;
|
||||
|
||||
|
@ -2198,7 +2199,7 @@ static void TransformDir(vec3_t in, vec3_t planea[3], vec3_t viewa[3], vec3_t re
|
|||
VectorMA(result, d, viewa[i], result);
|
||||
}
|
||||
}
|
||||
static R_RenderScene(void)
|
||||
static void R_RenderScene(void)
|
||||
{
|
||||
IDirect3DDevice9_SetTransform(pD3DDev9, D3DTS_PROJECTION, (D3DMATRIX*)r_refdef.m_projection);
|
||||
IDirect3DDevice9_SetTransform(pD3DDev9, D3DTS_VIEW, (D3DMATRIX*)r_refdef.m_view);
|
||||
|
|
|
@ -405,7 +405,7 @@ texid_t D3D9_LoadTexture (char *identifier, int width, int height, enum uploadfm
|
|||
tid.ptr = D3D9_LoadTexture_32(tex, data, width, height, flags);
|
||||
return tid;
|
||||
default:
|
||||
OutputDebugString(va("D3D_LoadTextureFmt doesn't support fmt %i (%s)", fmt, name));
|
||||
OutputDebugString(va("D3D_LoadTexture doesn't support fmt %i", fmt));
|
||||
return r_nulltex;
|
||||
}
|
||||
}
|
||||
|
|
|
@ -53,7 +53,7 @@
|
|||
|
||||
int gl_bumpmappingpossible;
|
||||
|
||||
static void D3D9_GetBufferSize(int *width, int *height);
|
||||
//static void D3D9_GetBufferSize(int *width, int *height); //not defined
|
||||
static void resetD3D9(void);
|
||||
static LPDIRECT3D9 pD3D;
|
||||
LPDIRECT3DDEVICE9 pD3DDev9;
|
||||
|
@ -637,15 +637,15 @@ static qboolean D3D9_VID_Init(rendererstate_t *info, unsigned char *palette)
|
|||
{
|
||||
DWORD width = info->width;
|
||||
DWORD height = info->height;
|
||||
DWORD bpp = info->bpp;
|
||||
DWORD zbpp = 16;
|
||||
DWORD flags = 0;
|
||||
//DWORD bpp = info->bpp;
|
||||
//DWORD zbpp = 16;
|
||||
//DWORD flags = 0;
|
||||
DWORD wstyle;
|
||||
RECT rect;
|
||||
MSG msg;
|
||||
|
||||
extern cvar_t vid_conwidth;
|
||||
extern cvar_t vid_conheight;
|
||||
//extern cvar_t vid_conheight;
|
||||
|
||||
//DDGAMMARAMP gammaramp;
|
||||
//int i;
|
||||
|
@ -889,17 +889,17 @@ void D3D9_Set2D (void)
|
|||
static int d3d9error(int i)
|
||||
{
|
||||
if (FAILED(i))// != D3D_OK)
|
||||
Con_Printf("D3D error: %x %i\n", i);
|
||||
Con_Printf("D3D error: %i\n", i);
|
||||
return i;
|
||||
}
|
||||
|
||||
static void (D3D9_SCR_UpdateScreen) (void)
|
||||
{
|
||||
extern int keydown[];
|
||||
extern cvar_t vid_conheight;
|
||||
//extern int keydown[];
|
||||
//extern cvar_t vid_conheight;
|
||||
int uimenu;
|
||||
#ifdef TEXTEDITOR
|
||||
extern qboolean editormodal;
|
||||
//extern qboolean editormodal;
|
||||
#endif
|
||||
qboolean nohud, noworld;
|
||||
RSpeedMark();
|
||||
|
|
|
@ -1316,7 +1316,7 @@ void R_DrawGAliasShadowVolume(entity_t *e, vec3_t lightpos, float radius)
|
|||
// if (e->shaderRGBAf[3] < 0.5)
|
||||
// return;
|
||||
|
||||
RotateLightVector(e->axis, e->origin, lightpos, lightorg);
|
||||
RotateLightVector((void *)e->axis, e->origin, lightpos, lightorg);
|
||||
|
||||
if (Length(lightorg) > radius + clmodel->radius)
|
||||
return;
|
||||
|
|
|
@ -648,7 +648,7 @@ void R_DrawHLModel(entity_t *curent)
|
|||
|
||||
for(v = 0; v < amodel->numverts; v++) // Transform per the matrix
|
||||
{
|
||||
VectorTransform(verts[v], transform_matrix[bone[v]], transformed[v]);
|
||||
VectorTransform(verts[v], (void *)transform_matrix[bone[v]], transformed[v]);
|
||||
// glVertex3fv(verts[v]);
|
||||
// glVertex3f( verts[v][0]+10*verts[v][0],
|
||||
// verts[v][1]+10*verts[v][1],
|
||||
|
|
|
@ -1640,7 +1640,7 @@ static void Sh_DrawBrushModelShadow(dlight_t *dl, entity_t *e)
|
|||
if (BE_LightCullModel(e->origin, e->model))
|
||||
return;
|
||||
|
||||
RotateLightVector(e->axis, e->origin, dl->origin, lightorg);
|
||||
RotateLightVector((void *)e->axis, e->origin, dl->origin, lightorg);
|
||||
|
||||
BE_SelectEntity(e);
|
||||
|
||||
|
|
|
@ -537,7 +537,7 @@ qboolean VID_SetFullDIBMode (rendererstate_t *info)
|
|||
|
||||
if (ChangeDisplaySettings (&gdevmode, CDS_FULLSCREEN) != DISP_CHANGE_SUCCESSFUL)
|
||||
{
|
||||
Con_SafePrintf((gdevmode.dmFields&DM_DISPLAYFREQUENCY)?"Windows rejected mode %i*%i*%i*%i\n":"Windows rejected mode %i*%i*%i\n", gdevmode.dmPelsWidth, gdevmode.dmPelsHeight, gdevmode.dmBitsPerPel, gdevmode.dmDisplayFrequency);
|
||||
Con_SafePrintf((gdevmode.dmFields&DM_DISPLAYFREQUENCY)?"Windows rejected mode %i*%i*%i*%i\n":"Windows rejected mode %i*%i*%i\n", (int)gdevmode.dmPelsWidth, (int)gdevmode.dmPelsHeight, (int)gdevmode.dmBitsPerPel, (int)gdevmode.dmDisplayFrequency);
|
||||
return false;
|
||||
}
|
||||
}
|
||||
|
@ -1072,10 +1072,11 @@ void VID_Wait_Override_Callback(struct cvar_s *var, char *oldvalue)
|
|||
|
||||
void GLVID_Recenter_f(void)
|
||||
{
|
||||
int nw = vid_width.value;
|
||||
int nh = vid_height.value;
|
||||
int nx = 0;
|
||||
int ny = 0;
|
||||
// 4 unused variables
|
||||
//int nw = vid_width.value;
|
||||
//int nh = vid_height.value;
|
||||
//int nx = 0;
|
||||
//int ny = 0;
|
||||
|
||||
if (sys_parentwindow && modestate==MS_WINDOWED)
|
||||
{
|
||||
|
@ -1450,14 +1451,14 @@ BOOL bSetupPixelFormat(HDC hDC)
|
|||
|
||||
if ( (pixelformat = ChoosePixelFormat(hDC, &pfd)) == 0 )
|
||||
{
|
||||
Con_Printf("bSetupPixelFormat: ChoosePixelFormat failed (%i)\n", GetLastError());
|
||||
Con_Printf("bSetupPixelFormat: ChoosePixelFormat failed (%i)\n", (int)GetLastError());
|
||||
return FALSE;
|
||||
}
|
||||
}
|
||||
|
||||
if (SetPixelFormat(hDC, pixelformat, &pfd) == FALSE)
|
||||
{
|
||||
Con_Printf("bSetupPixelFormat: SetPixelFormat failed (%i)\n", GetLastError());
|
||||
Con_Printf("bSetupPixelFormat: SetPixelFormat failed (%i)\n", (int)GetLastError());
|
||||
return FALSE;
|
||||
}
|
||||
|
||||
|
|
|
@ -470,7 +470,7 @@ static void R_DrawSkyMesh(batch_t *batch, mesh_t *m, shader_t *shader)
|
|||
VectorCopy(r_refdef.vieworg, skyent.origin);
|
||||
skyent.axis[0][0] = skydist;
|
||||
skyent.axis[0][1] = 0;
|
||||
skyent.axis[0][3] = 0;
|
||||
skyent.axis[0][2] = 0;
|
||||
skyent.axis[1][0] = 0;
|
||||
skyent.axis[1][1] = skydist;
|
||||
skyent.axis[1][2] = 0;
|
||||
|
|
|
@ -296,7 +296,7 @@ iwboolean FTP_ServerThinkForConnection(FTPclient_t *cl)
|
|||
}
|
||||
|
||||
pos = cl->datadir?1:!cl->blocking;
|
||||
if (ioctlsocket (cl->controlsock, FIONBIO, &pos) == -1)
|
||||
if (ioctlsocket (cl->controlsock, FIONBIO, (u_long *)&pos) == -1)
|
||||
{
|
||||
IWebPrintf ("FTP_ServerRun: blocking error: %s\n", strerror(qerrno));
|
||||
return 0;
|
||||
|
@ -488,7 +488,7 @@ iwboolean FTP_ServerThinkForConnection(FTPclient_t *cl)
|
|||
Sys_Error ("FTP_UDP_OpenSocket: socket: %s", strerror(qerrno));
|
||||
}
|
||||
|
||||
if (ioctlsocket (cl->datasock, FIONBIO, &_true) == -1)
|
||||
if (ioctlsocket (cl->datasock, FIONBIO, (u_long *)&_true) == -1)
|
||||
{
|
||||
Sys_Error ("FTTP_UDP_OpenSocket: ioctl FIONBIO: %s", strerror(qerrno));
|
||||
}
|
||||
|
@ -540,7 +540,7 @@ iwboolean FTP_ServerThinkForConnection(FTPclient_t *cl)
|
|||
continue;
|
||||
}
|
||||
else
|
||||
ioctlsocket(cl->datasock, FIONBIO, &_true);
|
||||
ioctlsocket(cl->datasock, FIONBIO, (u_long *)&_true);
|
||||
}
|
||||
if (cl->datasock == INVALID_SOCKET)
|
||||
{
|
||||
|
@ -595,7 +595,7 @@ iwboolean FTP_ServerThinkForConnection(FTPclient_t *cl)
|
|||
continue;
|
||||
}
|
||||
else
|
||||
ioctlsocket(cl->datasock, FIONBIO, &_true);
|
||||
ioctlsocket(cl->datasock, FIONBIO, (u_long *)&_true);
|
||||
}
|
||||
if (cl->datasock == INVALID_SOCKET)
|
||||
{
|
||||
|
@ -674,7 +674,7 @@ iwboolean FTP_ServerThinkForConnection(FTPclient_t *cl)
|
|||
continue;
|
||||
}
|
||||
else
|
||||
ioctlsocket(cl->datasock, FIONBIO, &_true);
|
||||
ioctlsocket(cl->datasock, FIONBIO, (u_long *)&_true);
|
||||
}
|
||||
if (cl->datasock == INVALID_SOCKET)
|
||||
{
|
||||
|
|
|
@ -542,7 +542,7 @@ qboolean HTTP_ServerPoll(qboolean httpserverwanted, int portnum) //loop while tr
|
|||
return false;
|
||||
}
|
||||
|
||||
if (ioctlsocket (clientsock, FIONBIO, &_true) == -1)
|
||||
if (ioctlsocket (clientsock, FIONBIO, (u_long *)&_true) == -1)
|
||||
{
|
||||
IWebPrintf ("HTTP_ServerInit: ioctl FIONBIO: %s\n", strerror(qerrno));
|
||||
closesocket(clientsock);
|
||||
|
|
|
@ -2039,7 +2039,7 @@ void SV_MVD_QTVReverse_f (void)
|
|||
return;
|
||||
}
|
||||
|
||||
if (ioctlsocket (sock, FIONBIO, &nonblocking) == INVALID_SOCKET)
|
||||
if (ioctlsocket (sock, FIONBIO, (u_long *)&nonblocking) == INVALID_SOCKET)
|
||||
{
|
||||
closesocket(sock);
|
||||
Con_Printf ("qtvreverse: ioctl FIONBIO: %s\n", strerror(qerrno));
|
||||
|
@ -2294,7 +2294,7 @@ int MVD_StreamStartListening(int port)
|
|||
Sys_Error ("MVD_StreamStartListening: socket: %s", strerror(qerrno));
|
||||
}
|
||||
|
||||
if (ioctlsocket (sock, FIONBIO, &nonblocking) == INVALID_SOCKET)
|
||||
if (ioctlsocket (sock, FIONBIO, (u_long *)&nonblocking) == INVALID_SOCKET)
|
||||
{
|
||||
Sys_Error ("FTP_TCP_OpenSocket: ioctl FIONBIO: %s", strerror(qerrno));
|
||||
}
|
||||
|
@ -2364,7 +2364,7 @@ void SV_MVDStream_Poll(void)
|
|||
if (client == INVALID_SOCKET)
|
||||
return;
|
||||
|
||||
ioctlsocket(client, FIONBIO, &_true);
|
||||
ioctlsocket(client, FIONBIO, (u_long *)&_true);
|
||||
|
||||
if (qtv_maxstreams.value > 0)
|
||||
{
|
||||
|
|
|
@ -653,7 +653,7 @@ int main(int argc, char *argv[])
|
|||
|
||||
memset (&parms, 0, sizeof(parms));
|
||||
|
||||
COM_InitArgv (argc, argv);
|
||||
COM_InitArgv (argc, (const char **)argv);
|
||||
TL_InitLanguages();
|
||||
parms.argc = com_argc;
|
||||
parms.argv = com_argv;
|
||||
|
@ -826,7 +826,7 @@ void *Sys_GetGameAPI(void *parms)
|
|||
char curpath[MAX_OSPATH];
|
||||
char *searchpath;
|
||||
const char *gamename = "gamei386.so";
|
||||
size_t result;
|
||||
char *result;
|
||||
|
||||
void *ret;
|
||||
|
||||
|
|
|
@ -533,6 +533,8 @@ void Sys_Error (const char *error, ...)
|
|||
CloseHandle(processinfo.hThread);
|
||||
|
||||
Sys_Quit ();
|
||||
|
||||
exit (1); // this function is NORETURN type, complains without this
|
||||
}
|
||||
|
||||
/*
|
||||
|
@ -1097,7 +1099,7 @@ void Signal_Error_Handler (int sig)
|
|||
void StartQuakeServer(void)
|
||||
{
|
||||
quakeparms_t parms;
|
||||
static char cwd[1024];
|
||||
//static char cwd[1024]; //unused variable
|
||||
int t;
|
||||
|
||||
TL_InitLanguages();
|
||||
|
@ -1287,7 +1289,7 @@ int main (int argc, char **argv)
|
|||
__try
|
||||
#endif
|
||||
{
|
||||
COM_InitArgv (argc, argv);
|
||||
COM_InitArgv (argc, (const char **)argv);
|
||||
#ifdef USESERVICE
|
||||
if (COM_CheckParm("-register"))
|
||||
{
|
||||
|
|
|
@ -1397,7 +1397,7 @@ static qintptr_t Q3G_SystemCalls(void *offset, unsigned int mask, qintptr_t fn,
|
|||
return ret;
|
||||
}
|
||||
|
||||
static int Q3G_SystemCallsVM(void *offset, unsigned int mask, int fn, const int *arg)
|
||||
static int Q3G_SystemCallsVM(void *offset, quintptr_t mask, int fn, const int *arg)
|
||||
{
|
||||
qintptr_t args[13];
|
||||
|
||||
|
|
Loading…
Reference in a new issue