win32 compile fixes

This is an imperfect revision of history.
This commit is contained in:
Bill Currie 2004-11-06 02:21:00 +00:00 committed by Jeff Teunissen
parent e7ab6b65bf
commit 0bfac8dd88
9 changed files with 16 additions and 7 deletions

View file

@ -406,6 +406,7 @@ typedef struct model_s
int numtextures;
texture_t **textures;
texture_t *skytexture;
byte *visdata;
byte *lightdata;

View file

@ -70,7 +70,7 @@ void Sys_RegisterShutdown (void (*func) (void));
double Sys_DoubleTime (void);
void Sys_TimeOfDay(date_t *date);
int Sys_CheckInput (int idle, int net_socket);
int Sys_CheckInput (int idle, unsigned int net_socket);
const char *Sys_ConsoleInput (void);
void Sys_Sleep (void);

View file

@ -177,7 +177,7 @@ Mod_LoadTextures (lump_t *l)
memcpy (tx + 1, mt + 1, pixels);
if (!strncmp (mt->name, "sky", 3))
R_InitSky (tx);
loadmodel->skytexture = tx;
else {
Mod_ProcessTexture (mt, tx);
}

View file

@ -504,7 +504,7 @@ Sys_DebugLog (const char *file, const char *fmt, ...)
}
int
Sys_CheckInput (int idle, int net_socket)
Sys_CheckInput (int idle, unsigned int net_socket)
{
fd_set fdset;
int res;

View file

@ -193,8 +193,10 @@ R_NewMap (model_t *worldmodel, struct model_s **models, int num_models)
tex = r_worldentity.model->textures[i];
if (!tex)
continue;
if (!strncmp (tex->name, "sky", 3))
if (!strncmp (tex->name, "sky", 3)) {
skytexturenum = i;
R_InitSky (tex);
}
if (!strncmp (tex->name, "window02_1", 10))
mirrortexturenum = i;
tex->texturechain = NULL;

View file

@ -198,6 +198,9 @@ R_NewMap (model_t *worldmodel, struct model_s **models, int num_models)
for (i = 0; i < r_worldentity.model->numleafs; i++)
r_worldentity.model->leafs[i].efrags = NULL;
if (worldmodel->skytexture)
R_InitSky (worldmodel->skytexture);
r_viewleaf = NULL;
R_ClearParticles ();

View file

@ -226,6 +226,9 @@ R_NewMap (model_t *worldmodel, struct model_s **models, int num_models)
for (i = 0; i < r_worldentity.model->numleafs; i++)
r_worldentity.model->leafs[i].efrags = NULL;
if (worldmodel->skytexture)
R_InitSky (worldmodel->skytexture);
r_viewleaf = NULL;
R_ClearParticles ();

View file

@ -166,7 +166,7 @@ _JOY_Read (void)
void
JOY_Read (void)
{
int i;
DWORD i;
DWORD buttonstate, povstate;
if (!joy_found) {

View file

@ -119,7 +119,7 @@ QFGL_LoadLibrary (void)
if (!(handle = LoadLibrary (gl_driver->string)))
Sys_Error ("Couldn't load OpenGL library %s!", gl_driver->string);
(FARPROC) glGetProcAddress = GetProcAddress (handle, "wglGetProcAddress");
glGetProcAddress = (void *(WINAPI *)(const char*)) GetProcAddress (handle, "wglGetProcAddress");
return handle;
}
@ -452,7 +452,7 @@ void
VID_Init (unsigned char *palette)
{
BOOL stat;
int bpp, vid_mode;
WORD bpp, vid_mode;
HDC hdc;
HGLRC baseRC;
DWORD lasterror;