mirror of
https://github.com/ZDoom/raze-gles.git
synced 2025-01-11 18:50:46 +00:00
More warning fixes
git-svn-id: https://svn.eduke32.com/eduke32@347 1a8010ca-5511-0410-912e-c29ae57300e0
This commit is contained in:
parent
1b91c1bae3
commit
730129aee6
5 changed files with 21 additions and 18 deletions
|
@ -5542,7 +5542,7 @@ int initengine(void)
|
||||||
#if !defined _WIN32 && defined DEBUGGINGAIDS
|
#if !defined _WIN32 && defined DEBUGGINGAIDS
|
||||||
struct sigaction sigact, oldact;
|
struct sigaction sigact, oldact;
|
||||||
memset(&sigact, 0, sizeof(sigact));
|
memset(&sigact, 0, sizeof(sigact));
|
||||||
sigact.sa_sigaction = sighandler;
|
sigact.sa_sigaction = (void *)sighandler;
|
||||||
sigact.sa_flags = SA_SIGINFO;
|
sigact.sa_flags = SA_SIGINFO;
|
||||||
sigaction(SIGFPE, &sigact, &oldact);
|
sigaction(SIGFPE, &sigact, &oldact);
|
||||||
#endif
|
#endif
|
||||||
|
|
|
@ -663,7 +663,7 @@ failure:
|
||||||
//Note: even though it says md2model, it works for both md2model&md3model
|
//Note: even though it says md2model, it works for both md2model&md3model
|
||||||
static long mdloadskin (md2model *m, int number, int pal, int surf)
|
static long mdloadskin (md2model *m, int number, int pal, int surf)
|
||||||
{
|
{
|
||||||
long i,j, fptr=0, bpl, xsiz, ysiz, osizx, osizy, texfmt = GL_RGBA, intexfmt = GL_RGBA;
|
long i,j, fptr=0, bpl, xsiz=0, ysiz=0, osizx, osizy, texfmt = GL_RGBA, intexfmt = GL_RGBA;
|
||||||
char *skinfile, hasalpha, fn[BMAX_PATH+65];
|
char *skinfile, hasalpha, fn[BMAX_PATH+65];
|
||||||
GLuint *texidx = NULL;
|
GLuint *texidx = NULL;
|
||||||
mdskinmap_t *sk, *skzero = NULL;
|
mdskinmap_t *sk, *skzero = NULL;
|
||||||
|
|
|
@ -198,7 +198,7 @@ long netread (long *other, char *dabuf, long bufsiz) //0:no packets in buffer
|
||||||
long i;
|
long i;
|
||||||
|
|
||||||
i = sizeof(ip);
|
i = sizeof(ip);
|
||||||
if (recvfrom(mysock,dabuf,bufsiz,0,(struct sockaddr *)&ip,(int *)&i) == -1) return(0);
|
if (recvfrom(mysock,dabuf,bufsiz,0,(struct sockaddr *)&ip,(unsigned int *)&i) == -1) return(0);
|
||||||
#if (SIMMIS > 0)
|
#if (SIMMIS > 0)
|
||||||
if ((rand()&255) < SIMMIS) return(0);
|
if ((rand()&255) < SIMMIS) return(0);
|
||||||
#endif
|
#endif
|
||||||
|
|
|
@ -971,7 +971,7 @@ void writexcache(char *fn, long len, long dameth, char effect, texcacheheader *h
|
||||||
char *pic = NULL, *packbuf = NULL;
|
char *pic = NULL, *packbuf = NULL;
|
||||||
void *midbuf = NULL;
|
void *midbuf = NULL;
|
||||||
unsigned long alloclen=0, level, miplen;
|
unsigned long alloclen=0, level, miplen;
|
||||||
unsigned long padx, pady;
|
unsigned long padx=0, pady=0;
|
||||||
GLuint gi;
|
GLuint gi;
|
||||||
long j, k;
|
long j, k;
|
||||||
|
|
||||||
|
@ -1006,7 +1006,7 @@ void writexcache(char *fn, long len, long dameth, char effect, texcacheheader *h
|
||||||
}
|
}
|
||||||
|
|
||||||
gi = GL_FALSE;
|
gi = GL_FALSE;
|
||||||
bglGetTexLevelParameteriv(GL_TEXTURE_2D, 0, GL_TEXTURE_COMPRESSED_ARB, &gi);
|
bglGetTexLevelParameteriv(GL_TEXTURE_2D, 0, GL_TEXTURE_COMPRESSED_ARB, (GLint *)&gi);
|
||||||
if (gi != GL_TRUE) return;
|
if (gi != GL_TRUE) return;
|
||||||
|
|
||||||
md4once((unsigned char *)fn, strlen(fn), mdsum);
|
md4once((unsigned char *)fn, strlen(fn), mdsum);
|
||||||
|
@ -1032,25 +1032,25 @@ void writexcache(char *fn, long len, long dameth, char effect, texcacheheader *h
|
||||||
|
|
||||||
bglGetError();
|
bglGetError();
|
||||||
for (level = 0; level==0 || (padx > 1 || pady > 1); level++) {
|
for (level = 0; level==0 || (padx > 1 || pady > 1); level++) {
|
||||||
bglGetTexLevelParameteriv(GL_TEXTURE_2D, level, GL_TEXTURE_COMPRESSED_ARB, &gi);
|
bglGetTexLevelParameteriv(GL_TEXTURE_2D, level, GL_TEXTURE_COMPRESSED_ARB, (GLint *)&gi);
|
||||||
if (bglGetError() != GL_NO_ERROR) goto failure;
|
if (bglGetError() != GL_NO_ERROR) goto failure;
|
||||||
if (gi != GL_TRUE) goto failure; // an uncompressed mipmap
|
if (gi != GL_TRUE) goto failure; // an uncompressed mipmap
|
||||||
bglGetTexLevelParameteriv(GL_TEXTURE_2D, level, GL_TEXTURE_INTERNAL_FORMAT, &gi);
|
bglGetTexLevelParameteriv(GL_TEXTURE_2D, level, GL_TEXTURE_INTERNAL_FORMAT, (GLint *)&gi);
|
||||||
if (bglGetError() != GL_NO_ERROR) goto failure;
|
if (bglGetError() != GL_NO_ERROR) goto failure;
|
||||||
pict.format = B_LITTLE32(gi);
|
pict.format = B_LITTLE32(gi);
|
||||||
bglGetTexLevelParameteriv(GL_TEXTURE_2D, level, GL_TEXTURE_WIDTH, &gi);
|
bglGetTexLevelParameteriv(GL_TEXTURE_2D, level, GL_TEXTURE_WIDTH, (GLint *)&gi);
|
||||||
if (bglGetError() != GL_NO_ERROR) goto failure;
|
if (bglGetError() != GL_NO_ERROR) goto failure;
|
||||||
padx = gi; pict.xdim = B_LITTLE32(gi);
|
padx = gi; pict.xdim = B_LITTLE32(gi);
|
||||||
bglGetTexLevelParameteriv(GL_TEXTURE_2D, level, GL_TEXTURE_HEIGHT, &gi);
|
bglGetTexLevelParameteriv(GL_TEXTURE_2D, level, GL_TEXTURE_HEIGHT, (GLint *)&gi);
|
||||||
if (bglGetError() != GL_NO_ERROR) goto failure;
|
if (bglGetError() != GL_NO_ERROR) goto failure;
|
||||||
pady = gi; pict.ydim = B_LITTLE32(gi);
|
pady = gi; pict.ydim = B_LITTLE32(gi);
|
||||||
bglGetTexLevelParameteriv(GL_TEXTURE_2D, level, GL_TEXTURE_BORDER, &gi);
|
bglGetTexLevelParameteriv(GL_TEXTURE_2D, level, GL_TEXTURE_BORDER, (GLint *)&gi);
|
||||||
if (bglGetError() != GL_NO_ERROR) goto failure;
|
if (bglGetError() != GL_NO_ERROR) goto failure;
|
||||||
pict.border = B_LITTLE32(gi);
|
pict.border = B_LITTLE32(gi);
|
||||||
bglGetTexLevelParameteriv(GL_TEXTURE_2D, level, GL_TEXTURE_DEPTH, &gi);
|
bglGetTexLevelParameteriv(GL_TEXTURE_2D, level, GL_TEXTURE_DEPTH, (GLint *)&gi);
|
||||||
if (bglGetError() != GL_NO_ERROR) goto failure;
|
if (bglGetError() != GL_NO_ERROR) goto failure;
|
||||||
pict.depth = B_LITTLE32(gi);
|
pict.depth = B_LITTLE32(gi);
|
||||||
bglGetTexLevelParameteriv(GL_TEXTURE_2D, level, GL_TEXTURE_COMPRESSED_IMAGE_SIZE_ARB, &gi);
|
bglGetTexLevelParameteriv(GL_TEXTURE_2D, level, GL_TEXTURE_COMPRESSED_IMAGE_SIZE_ARB, (GLint *)&gi);
|
||||||
if (bglGetError() != GL_NO_ERROR) goto failure;
|
if (bglGetError() != GL_NO_ERROR) goto failure;
|
||||||
miplen = (long)gi; pict.size = B_LITTLE32(gi);
|
miplen = (long)gi; pict.size = B_LITTLE32(gi);
|
||||||
|
|
||||||
|
@ -1492,6 +1492,7 @@ void drawpoly (double *dpx, double *dpy, long n, long method)
|
||||||
pc[0] = pc[1] = pc[2] = f;
|
pc[0] = pc[1] = pc[2] = f;
|
||||||
switch (method&3)
|
switch (method&3)
|
||||||
{
|
{
|
||||||
|
default:
|
||||||
case 0:
|
case 0:
|
||||||
pc[3] = 1.0; break;
|
pc[3] = 1.0; break;
|
||||||
case 1:
|
case 1:
|
||||||
|
|
|
@ -481,16 +481,16 @@ void grabmouse(char a)
|
||||||
{
|
{
|
||||||
if (a != mouseacquired)
|
if (a != mouseacquired)
|
||||||
{
|
{
|
||||||
// #ifndef DEBUGGINGAIDS
|
#ifndef DEBUGGINGAIDS
|
||||||
SDL_GrabMode g;
|
SDL_GrabMode g;
|
||||||
|
|
||||||
g = SDL_WM_GrabInput(a ? SDL_GRAB_ON : SDL_GRAB_OFF);
|
g = SDL_WM_GrabInput(a ? SDL_GRAB_ON : SDL_GRAB_OFF);
|
||||||
mouseacquired = (g == SDL_GRAB_ON);
|
mouseacquired = (g == SDL_GRAB_ON);
|
||||||
|
|
||||||
SDL_ShowCursor(mouseacquired ? SDL_DISABLE : SDL_ENABLE);
|
SDL_ShowCursor(mouseacquired ? SDL_DISABLE : SDL_ENABLE);
|
||||||
// #else
|
#else
|
||||||
// mouseacquired = a;
|
mouseacquired = a;
|
||||||
// #endif
|
#endif
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
|
@ -1361,6 +1361,7 @@ int handleevents(void)
|
||||||
if (ev.active.state & SDL_APPINPUTFOCUS)
|
if (ev.active.state & SDL_APPINPUTFOCUS)
|
||||||
{
|
{
|
||||||
appactive = ev.active.gain;
|
appactive = ev.active.gain;
|
||||||
|
#ifndef DEBUGGINGAIDS
|
||||||
if (mouseacquired && moustat)
|
if (mouseacquired && moustat)
|
||||||
{
|
{
|
||||||
if (appactive)
|
if (appactive)
|
||||||
|
@ -1374,6 +1375,7 @@ int handleevents(void)
|
||||||
SDL_ShowCursor(SDL_ENABLE);
|
SDL_ShowCursor(SDL_ENABLE);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
#endif
|
||||||
rv=-1;
|
rv=-1;
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
|
@ -1478,12 +1480,12 @@ int handleevents(void)
|
||||||
|
|
||||||
if (moustat)
|
if (moustat)
|
||||||
{
|
{
|
||||||
if ((mwheelup) && (mwheelup <= (totalclock - MWHEELTICKS)))
|
if ((mwheelup) && (mwheelup <= (unsigned)(totalclock - MWHEELTICKS)))
|
||||||
{
|
{
|
||||||
mouseb &= ~16;
|
mouseb &= ~16;
|
||||||
mwheelup = 0;
|
mwheelup = 0;
|
||||||
}
|
}
|
||||||
if ((mwheeldown) && (mwheeldown <= (totalclock - MWHEELTICKS)))
|
if ((mwheeldown) && (mwheeldown <= (unsigned)(totalclock - MWHEELTICKS)))
|
||||||
{
|
{
|
||||||
mouseb &= ~32;
|
mouseb &= ~32;
|
||||||
mwheeldown = 0;
|
mwheeldown = 0;
|
||||||
|
|
Loading…
Reference in a new issue