mirror of
https://github.com/ZDoom/raze-gles.git
synced 2025-01-26 00:40:56 +00:00
More warning fixes
git-svn-id: https://svn.eduke32.com/eduke32@349 1a8010ca-5511-0410-912e-c29ae57300e0
This commit is contained in:
parent
643f4d1e44
commit
65dc97d55b
7 changed files with 99 additions and 105 deletions
|
@ -17,6 +17,7 @@
|
||||||
#define _WIN32_IE 0x0400
|
#define _WIN32_IE 0x0400
|
||||||
#include <windows.h>
|
#include <windows.h>
|
||||||
#include <shlobj.h>
|
#include <shlobj.h>
|
||||||
|
#include <direct.h>
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#include <stdio.h>
|
#include <stdio.h>
|
||||||
|
|
|
@ -314,7 +314,7 @@ __asm__ __volatile__ ("bswap %0" : "+r" (a) : : "cc" );
|
||||||
|
|
||||||
static inline long bitrev (long b, long c)
|
static inline long bitrev (long b, long c)
|
||||||
{
|
{
|
||||||
long a;
|
long a = 0;
|
||||||
__asm__ __volatile__ (
|
__asm__ __volatile__ (
|
||||||
"xorl %%eax, %%eax\n\t0:\n\tshrl $1, %%ebx\n\tadcl %%eax, %%eax\n\tsubl $1, %%ecx\n\tjnz 0b"
|
"xorl %%eax, %%eax\n\t0:\n\tshrl $1, %%ebx\n\tadcl %%eax, %%eax\n\tsubl $1, %%ecx\n\tjnz 0b"
|
||||||
: "+a" (a), "+b" (b), "+c" (c) : : "cc");
|
: "+a" (a), "+b" (b), "+c" (c) : : "cc");
|
||||||
|
@ -1523,11 +1523,11 @@ static long kpegrend (const char *kfilebuf, long kfilength,
|
||||||
long daframeplace, long dabytesperline, long daxres, long dayres,
|
long daframeplace, long dabytesperline, long daxres, long dayres,
|
||||||
long daglobxoffs, long daglobyoffs)
|
long daglobxoffs, long daglobyoffs)
|
||||||
{
|
{
|
||||||
long i, j, p, v, leng, xdim, ydim, index, prec, restartcnt, restartinterval;
|
long i, j, p, v, leng, xdim = 0, ydim = 0, index, prec, restartcnt, restartinterval;
|
||||||
long x, y, z, xx, yy, zz, *dc, *dc2, num, curbits, c, daval, dabits, *hqval, *hqbits, hqcnt, *quanptr;
|
long x, y, z, xx, yy, zz, *dc = 0, *dc2, num, curbits, c, daval, dabits, *hqval, *hqbits, hqcnt, *quanptr = 0;
|
||||||
long passcnt = 0, ghsampmax, gvsampmax, glhsampmax, glvsampmax, glhstep, glvstep;
|
long passcnt = 0, ghsampmax = 0, gvsampmax = 0, glhsampmax = 0, glvsampmax = 0, glhstep, glvstep;
|
||||||
long eobrun, Ss, Se, Ah, Al, Alut[2], dctx[12], dcty[12], ldctx[12], ldcty[12], lshx[4], lshy[4];
|
long eobrun, Ss, Se, Ah, Al, Alut[2], dctx[12], dcty[12], ldctx[12], ldcty[12], lshx[4], lshy[4];
|
||||||
short *dctbuf = 0, *dctptr[12], *ldctptr[12], *dcs;
|
short *dctbuf = 0, *dctptr[12], *ldctptr[12], *dcs = 0;
|
||||||
unsigned char ch, marker, dcflag;
|
unsigned char ch, marker, dcflag;
|
||||||
const unsigned char *kfileptr;
|
const unsigned char *kfileptr;
|
||||||
|
|
||||||
|
@ -1932,7 +1932,7 @@ static long kgifrend (const char *kfilebuf, long kfilelength,
|
||||||
long i, x, y, xsiz, ysiz, yinc, xend, xspan, yspan, currstr, numbitgoal;
|
long i, x, y, xsiz, ysiz, yinc, xend, xspan, yspan, currstr, numbitgoal;
|
||||||
long lzcols, dat, blocklen, bitcnt, xoff, yoff, transcol, backcol, *lptr;
|
long lzcols, dat, blocklen, bitcnt, xoff, yoff, transcol, backcol, *lptr;
|
||||||
char numbits, startnumbits, chunkind, ilacefirst;
|
char numbits, startnumbits, chunkind, ilacefirst;
|
||||||
const unsigned char *ptr, *cptr;
|
const unsigned char *ptr, *cptr = 0;
|
||||||
|
|
||||||
coltype = 3; bitdepth = 8; //For PNGOUT
|
coltype = 3; bitdepth = 8; //For PNGOUT
|
||||||
|
|
||||||
|
@ -2114,8 +2114,8 @@ static long ktgarend (const char *header, long fleng,
|
||||||
long daframeplace, long dabytesperline, long daxres, long dayres,
|
long daframeplace, long dabytesperline, long daxres, long dayres,
|
||||||
long daglobxoffs, long daglobyoffs)
|
long daglobxoffs, long daglobyoffs)
|
||||||
{
|
{
|
||||||
long i, p, x, y, pi, xi, yi, x0, x1, y0, y1, xsiz, ysiz, rlestat, colbyte, pixbyte;
|
long i = 0, p, x, y, pi, xi, yi, x0, x1, y0, y1, xsiz, ysiz, rlestat, colbyte, pixbyte;
|
||||||
const unsigned char *fptr, *cptr, *nptr;
|
const unsigned char *fptr = 0, *cptr = 0, *nptr = 0;
|
||||||
|
|
||||||
//Ugly and unreliable identification for .TGA!
|
//Ugly and unreliable identification for .TGA!
|
||||||
if ((fleng < 20) || (header[1]&0xfe)) return(-1);
|
if ((fleng < 20) || (header[1]&0xfe)) return(-1);
|
||||||
|
@ -2417,7 +2417,7 @@ static long kpcxrend (const char *buf, long fleng,
|
||||||
static long kddsrend (const char *buf, long leng,
|
static long kddsrend (const char *buf, long leng,
|
||||||
long frameptr, long bpl, long xdim, long ydim, long xoff, long yoff)
|
long frameptr, long bpl, long xdim, long ydim, long xoff, long yoff)
|
||||||
{
|
{
|
||||||
long x, y, z, xx, yy, xsiz, ysiz, dxt, al[2], ai, j, k, v, c0, c1, stride;
|
long x = 0, y = 0, z = 0, xx, yy, xsiz, ysiz, dxt, al[2], ai, j, k, v, c0, c1, stride;
|
||||||
unsigned long lut[256], r[4], g[4], b[4], a[8], rr, gg, bb;
|
unsigned long lut[256], r[4], g[4], b[4], a[8], rr, gg, bb;
|
||||||
unsigned char *uptr, *wptr;
|
unsigned char *uptr, *wptr;
|
||||||
|
|
||||||
|
@ -2425,11 +2425,11 @@ static long kddsrend (const char *buf, long leng,
|
||||||
ysiz = LSWAPIB(*(long *)&buf[12]);
|
ysiz = LSWAPIB(*(long *)&buf[12]);
|
||||||
if ((*(long *)&buf[80])&LSWAPIB(64)) //Uncompressed supports only A8R8G8B8 for now
|
if ((*(long *)&buf[80])&LSWAPIB(64)) //Uncompressed supports only A8R8G8B8 for now
|
||||||
{
|
{
|
||||||
if ((*(long *)&buf[88]) != LSWAPIB(32)) return(-1);
|
if ((*(long *)&buf[88]) != (signed)LSWAPIB(32)) return(-1);
|
||||||
if ((*(long *)&buf[92]) != LSWAPIB(0x00ff0000)) return(-1);
|
if ((*(long *)&buf[92]) != (signed)LSWAPIB(0x00ff0000)) return(-1);
|
||||||
if ((*(long *)&buf[96]) != LSWAPIB(0x0000ff00)) return(-1);
|
if ((*(long *)&buf[96]) != (signed)LSWAPIB(0x0000ff00)) return(-1);
|
||||||
if ((*(long *)&buf[100]) != LSWAPIB(0x000000ff)) return(-1);
|
if ((*(long *)&buf[100]) != (signed)LSWAPIB(0x000000ff)) return(-1);
|
||||||
if ((*(long *)&buf[104]) != LSWAPIB(0xff000000)) return(-1);
|
if ((*(long *)&buf[104]) != (signed)LSWAPIB(0xff000000)) return(-1);
|
||||||
buf += 128;
|
buf += 128;
|
||||||
|
|
||||||
j = yoff*bpl + (xoff<<2) + frameptr; xx = (xsiz<<2);
|
j = yoff*bpl + (xoff<<2) + frameptr; xx = (xsiz<<2);
|
||||||
|
|
|
@ -218,7 +218,7 @@ extern short spawn(short j,short pn);
|
||||||
extern void animatesprites(long x,long y,short a,long smoothratio);
|
extern void animatesprites(long x,long y,short a,long smoothratio);
|
||||||
extern void cheats(void);
|
extern void cheats(void);
|
||||||
extern void nonsharedkeys(void);
|
extern void nonsharedkeys(void);
|
||||||
extern void comlinehelp(char **argv);
|
extern void comlinehelp(void);
|
||||||
extern void checkcommandline(int argc,char **argv);
|
extern void checkcommandline(int argc,char **argv);
|
||||||
extern void printstr(short x,short y,char string[],char attribute);
|
extern void printstr(short x,short y,char string[],char attribute);
|
||||||
extern void Logo(void);
|
extern void Logo(void);
|
||||||
|
|
|
@ -7352,6 +7352,7 @@ FOUNDCHEAT:
|
||||||
hittype[ps[myconnectindex].i].extra = 0;
|
hittype[ps[myconnectindex].i].extra = 0;
|
||||||
ps[myconnectindex].cheat_phase = 0;
|
ps[myconnectindex].cheat_phase = 0;
|
||||||
KB_FlushKeyBoardQueue();
|
KB_FlushKeyBoardQueue();
|
||||||
|
Bstrcpy(terminx,terminx);
|
||||||
return;
|
return;
|
||||||
|
|
||||||
case CHEAT_STUFF:
|
case CHEAT_STUFF:
|
||||||
|
@ -8161,7 +8162,7 @@ FAKE_F3:
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
void comlinehelp(char **argv)
|
void comlinehelp(void)
|
||||||
{
|
{
|
||||||
char *s = "Command line help.\n"
|
char *s = "Command line help.\n"
|
||||||
"?, -?\t\tThis help message\n"
|
"?, -?\t\tThis help message\n"
|
||||||
|
@ -8563,7 +8564,7 @@ void checkcommandline(int argc,char **argv)
|
||||||
switch (*c)
|
switch (*c)
|
||||||
{
|
{
|
||||||
case '?':
|
case '?':
|
||||||
comlinehelp(argv);
|
comlinehelp();
|
||||||
exit(0);
|
exit(0);
|
||||||
break;
|
break;
|
||||||
case 'a':
|
case 'a':
|
||||||
|
@ -8719,7 +8720,7 @@ void checkcommandline(int argc,char **argv)
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
comlinehelp(argv);
|
comlinehelp();
|
||||||
exit(-1);
|
exit(-1);
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
|
|
|
@ -48,12 +48,6 @@ int MUSIC_ErrorCode = MUSIC_Ok;
|
||||||
|
|
||||||
static midifuncs MUSIC_MidiFunctions;
|
static midifuncs MUSIC_MidiFunctions;
|
||||||
|
|
||||||
static int MUSIC_FadeLength;
|
|
||||||
static int MUSIC_FadeRate;
|
|
||||||
static unsigned MUSIC_CurrentFadeVolume;
|
|
||||||
static unsigned MUSIC_LastFadeVolume;
|
|
||||||
static int MUSIC_EndingFadeVolume;
|
|
||||||
|
|
||||||
int MUSIC_InitMidi(int card, midifuncs *Funcs, int Address);
|
int MUSIC_InitMidi(int card, midifuncs *Funcs, int Address);
|
||||||
|
|
||||||
#define MUSIC_SetErrorCode( status ) \
|
#define MUSIC_SetErrorCode( status ) \
|
||||||
|
@ -483,8 +477,6 @@ int MUSIC_InitMidi
|
||||||
)
|
)
|
||||||
|
|
||||||
{
|
{
|
||||||
int status;
|
|
||||||
|
|
||||||
Funcs->NoteOff = MPU_NoteOff;
|
Funcs->NoteOff = MPU_NoteOff;
|
||||||
Funcs->NoteOn = MPU_NoteOn;
|
Funcs->NoteOn = MPU_NoteOn;
|
||||||
Funcs->PolyAftertouch = MPU_PolyAftertouch;
|
Funcs->PolyAftertouch = MPU_PolyAftertouch;
|
||||||
|
@ -517,8 +509,6 @@ int MUSIC_FadeVolume
|
||||||
)
|
)
|
||||||
|
|
||||||
{
|
{
|
||||||
int fromvolume;
|
|
||||||
|
|
||||||
MIDI_SetVolume(tovolume);
|
MIDI_SetVolume(tovolume);
|
||||||
return(MUSIC_Ok);
|
return(MUSIC_Ok);
|
||||||
}
|
}
|
||||||
|
|
|
@ -38,7 +38,9 @@ extern "C" {
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#ifdef __GNUC__
|
#ifdef __GNUC__
|
||||||
|
# ifndef PACKED
|
||||||
# define PACKED __attribute__ ((packed))
|
# define PACKED __attribute__ ((packed))
|
||||||
|
# endif
|
||||||
#else
|
#else
|
||||||
# define PACKED
|
# define PACKED
|
||||||
# ifdef _MSC_VER
|
# ifdef _MSC_VER
|
||||||
|
|
|
@ -224,7 +224,7 @@ void playmusic(char *fn)
|
||||||
|
|
||||||
kread(fp, MusicPtr, l);
|
kread(fp, MusicPtr, l);
|
||||||
kclose(fp);
|
kclose(fp);
|
||||||
MUSIC_PlaySong(MusicPtr, MUSIC_LoopSong);
|
MUSIC_PlaySong((unsigned char *)MusicPtr, MUSIC_LoopSong);
|
||||||
#else
|
#else
|
||||||
void PlayMusic(char *_filename);
|
void PlayMusic(char *_filename);
|
||||||
if(MusicToggle == 0) return;
|
if(MusicToggle == 0) return;
|
||||||
|
|
Loading…
Reference in a new issue