mirror of
https://github.com/ZDoom/raze-gles.git
synced 2025-01-11 18:50:46 +00:00
git-svn-id: https://svn.eduke32.com/eduke32@654 1a8010ca-5511-0410-912e-c29ae57300e0
This commit is contained in:
parent
3496113ca4
commit
408ca47fbd
30 changed files with 223 additions and 189 deletions
|
@ -57,7 +57,7 @@ AS=nasm
|
||||||
RC=windres
|
RC=windres
|
||||||
AR=ar
|
AR=ar
|
||||||
RANLIB=ranlib
|
RANLIB=ranlib
|
||||||
OURCFLAGS=$(debug) -W -Wall -Wimplicit -Wno-char-subscripts -Wno-unused \
|
OURCFLAGS=$(debug) -W -Wall -Wimplicit -Wno-char-subscripts \
|
||||||
-funsigned-char -fno-strict-aliasing -DNO_GCC_BUILTINS \
|
-funsigned-char -fno-strict-aliasing -DNO_GCC_BUILTINS \
|
||||||
-DKSFORBUILD -I$(INC)
|
-DKSFORBUILD -I$(INC)
|
||||||
OURCXXFLAGS=-fno-exceptions -fno-rtti
|
OURCXXFLAGS=-fno-exceptions -fno-rtti
|
||||||
|
|
|
@ -5,6 +5,10 @@
|
||||||
#ifndef __compat_h__
|
#ifndef __compat_h__
|
||||||
#define __compat_h__
|
#define __compat_h__
|
||||||
|
|
||||||
|
#ifndef UNREFERENCED_PARAMETER
|
||||||
|
#define UNREFERENCED_PARAMETER(x) x=x
|
||||||
|
#endif
|
||||||
|
|
||||||
// This gives us access to 'intptr_t' and 'uintptr_t', which are
|
// This gives us access to 'intptr_t' and 'uintptr_t', which are
|
||||||
// abstractions to the size of a pointer on a given platform
|
// abstractions to the size of a pointer on a given platform
|
||||||
// (ie, they're guaranteed to be the same size as a pointer)
|
// (ie, they're guaranteed to be the same size as a pointer)
|
||||||
|
@ -453,8 +457,6 @@ char *Bstrlwr(char *);
|
||||||
char *Bstrupr(char *);
|
char *Bstrupr(char *);
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#define UNUSED_PARAMETER(x) x=x
|
|
||||||
|
|
||||||
#ifdef __cplusplus
|
#ifdef __cplusplus
|
||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
|
|
|
@ -34,7 +34,7 @@ struct glinfo glinfo =
|
||||||
};
|
};
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
static void onvideomodechange(int newmode) { }
|
static void onvideomodechange(int newmode) { UNREFERENCED_PARAMETER(newmode); }
|
||||||
void (*baselayer_onvideomodechange)(int) = onvideomodechange;
|
void (*baselayer_onvideomodechange)(int) = onvideomodechange;
|
||||||
|
|
||||||
static int osdfunc_setrendermode(const osdfuncparm_t *parm)
|
static int osdfunc_setrendermode(const osdfuncparm_t *parm)
|
||||||
|
@ -84,6 +84,8 @@ int osdcmd_glinfo(const osdfuncparm_t *parm)
|
||||||
{
|
{
|
||||||
char *s,*t,*u,i;
|
char *s,*t,*u,i;
|
||||||
|
|
||||||
|
UNREFERENCED_PARAMETER(parm);
|
||||||
|
|
||||||
if (bpp == 8)
|
if (bpp == 8)
|
||||||
{
|
{
|
||||||
initprintf("glinfo: Not in OpenGL mode.\n");
|
initprintf("glinfo: Not in OpenGL mode.\n");
|
||||||
|
|
|
@ -270,7 +270,6 @@ int addsearchpath(const char *p)
|
||||||
struct stat st;
|
struct stat st;
|
||||||
char *s;
|
char *s;
|
||||||
searchpath_t *srch;
|
searchpath_t *srch;
|
||||||
int i;
|
|
||||||
|
|
||||||
if (Bstat(p, &st) < 0)
|
if (Bstat(p, &st) < 0)
|
||||||
{
|
{
|
||||||
|
@ -450,7 +449,6 @@ int initgroupfile(char *filename)
|
||||||
int i, j, k;
|
int i, j, k;
|
||||||
#ifdef WITHKPLIB
|
#ifdef WITHKPLIB
|
||||||
char *zfn;
|
char *zfn;
|
||||||
searchpath_t *sp = NULL;
|
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#ifdef _WIN32
|
#ifdef _WIN32
|
||||||
|
@ -765,9 +763,7 @@ int kfilelength(int handle)
|
||||||
|
|
||||||
int ktell(int handle)
|
int ktell(int handle)
|
||||||
{
|
{
|
||||||
int i, groupnum;
|
int groupnum = filegrp[handle];
|
||||||
|
|
||||||
groupnum = filegrp[handle];
|
|
||||||
|
|
||||||
if (groupnum == 255) return(Blseek(filehan[handle],0,BSEEK_CUR));
|
if (groupnum == 255) return(Blseek(filehan[handle],0,BSEEK_CUR));
|
||||||
#ifdef WITHKPLIB
|
#ifdef WITHKPLIB
|
||||||
|
@ -980,7 +976,7 @@ CACHE1D_FIND_REC *klistpath(const char *_path, const char *mask, int type)
|
||||||
|
|
||||||
if (!pathsearchmode) // next, zip files
|
if (!pathsearchmode) // next, zip files
|
||||||
{
|
{
|
||||||
char buf[BMAX_PATH], *p;
|
char buf[BMAX_PATH];
|
||||||
int i, j, ftype;
|
int i, j, ftype;
|
||||||
strcpy(buf,path);
|
strcpy(buf,path);
|
||||||
if (*path) strcat(buf,"/");
|
if (*path) strcat(buf,"/");
|
||||||
|
|
|
@ -369,6 +369,7 @@ char *Bgethomedir(void)
|
||||||
char *Bgetsupportdir(int global)
|
char *Bgetsupportdir(int global)
|
||||||
{
|
{
|
||||||
#ifndef __APPLE__
|
#ifndef __APPLE__
|
||||||
|
UNREFERENCED_PARAMETER(global);
|
||||||
return Bgethomedir();
|
return Bgethomedir();
|
||||||
#else
|
#else
|
||||||
FSRef ref;
|
FSRef ref;
|
||||||
|
@ -490,7 +491,7 @@ int Bcanonicalisefilename(char *filename, int removefn)
|
||||||
#ifdef _WIN32
|
#ifdef _WIN32
|
||||||
fnp += 2; // skip the drive
|
fnp += 2; // skip the drive
|
||||||
#endif
|
#endif
|
||||||
|
UNREFERENCED_PARAMETER(removefn); // change the call below to use removefn instead of 1?
|
||||||
return Bcorrectfilename(fnp,1);
|
return Bcorrectfilename(fnp,1);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -364,7 +364,7 @@ static int defsparser(scriptfile *script)
|
||||||
break;
|
break;
|
||||||
case T_DEFINESKYBOX:
|
case T_DEFINESKYBOX:
|
||||||
{
|
{
|
||||||
int tile,pal,i,j,ii;
|
int tile,pal,i,ii;
|
||||||
char *fn[6],happy=1,*tfn = NULL;
|
char *fn[6],happy=1,*tfn = NULL;
|
||||||
|
|
||||||
if (scriptfile_getsymbol(script,&tile)) break;
|
if (scriptfile_getsymbol(script,&tile)) break;
|
||||||
|
@ -690,7 +690,7 @@ static int defsparser(scriptfile *script)
|
||||||
break;
|
break;
|
||||||
case T_DEFINEMODELSKIN:
|
case T_DEFINEMODELSKIN:
|
||||||
{
|
{
|
||||||
int palnum, palnumer;
|
int palnum;
|
||||||
char *skinfn;
|
char *skinfn;
|
||||||
|
|
||||||
if (scriptfile_getsymbol(script,&palnum)) break;
|
if (scriptfile_getsymbol(script,&palnum)) break;
|
||||||
|
@ -1180,7 +1180,7 @@ case T_REDPAL: case T_BLUEPAL: case T_BROWNPAL: case T_GREYPAL: case T_GREENPAL:
|
||||||
{
|
{
|
||||||
char *skyboxtokptr = script->ltextptr;
|
char *skyboxtokptr = script->ltextptr;
|
||||||
char *fn[6] = {0,0,0,0,0,0}, *modelend, happy=1, *tfn = NULL;
|
char *fn[6] = {0,0,0,0,0,0}, *modelend, happy=1, *tfn = NULL;
|
||||||
int i, tile = -1, pal = 0,j,ii;
|
int i, tile = -1, pal = 0,ii;
|
||||||
|
|
||||||
if (scriptfile_getbraces(script,&modelend)) break;
|
if (scriptfile_getbraces(script,&modelend)) break;
|
||||||
while (script->textptr < modelend)
|
while (script->textptr < modelend)
|
||||||
|
|
|
@ -653,7 +653,7 @@ static permfifotype permfifo[MAXPERMS];
|
||||||
static int permhead = 0, permtail = 0;
|
static int permhead = 0, permtail = 0;
|
||||||
|
|
||||||
short numscans, numhits, numbunches;
|
short numscans, numhits, numbunches;
|
||||||
static short posfil, capturecount = 0, hitcnt;
|
static short capturecount = 0;
|
||||||
|
|
||||||
char vgapal16[4*256] =
|
char vgapal16[4*256] =
|
||||||
{
|
{
|
||||||
|
@ -1076,6 +1076,7 @@ static int spritewallfront(spritetype *s, int w)
|
||||||
//
|
//
|
||||||
// spritebehindwall(internal)
|
// spritebehindwall(internal)
|
||||||
//
|
//
|
||||||
|
#if 0
|
||||||
static int spriteobstructswall(spritetype *s, int w)
|
static int spriteobstructswall(spritetype *s, int w)
|
||||||
{
|
{
|
||||||
walltype *wal;
|
walltype *wal;
|
||||||
|
@ -1123,7 +1124,7 @@ static int spriteobstructswall(spritetype *s, int w)
|
||||||
else
|
else
|
||||||
return (0);
|
return (0);
|
||||||
}
|
}
|
||||||
|
#endif
|
||||||
//
|
//
|
||||||
// bunchfront (internal)
|
// bunchfront (internal)
|
||||||
//
|
//
|
||||||
|
@ -1276,6 +1277,8 @@ int animateoffs(short tilenum, short fakevar)
|
||||||
{
|
{
|
||||||
int i, k, offs;
|
int i, k, offs;
|
||||||
|
|
||||||
|
UNREFERENCED_PARAMETER(fakevar);
|
||||||
|
|
||||||
offs = 0;
|
offs = 0;
|
||||||
i = (totalclocklock>>((picanm[tilenum]>>24)&15));
|
i = (totalclocklock>>((picanm[tilenum]>>24)&15));
|
||||||
if ((picanm[tilenum]&63) > 0)
|
if ((picanm[tilenum]&63) > 0)
|
||||||
|
@ -2405,6 +2408,9 @@ static void parascan(int dax1, int dax2, int sectnum, char dastat, int bunch)
|
||||||
int j, k, l, m, n, x, z, wallnum, nextsectnum, globalhorizbak;
|
int j, k, l, m, n, x, z, wallnum, nextsectnum, globalhorizbak;
|
||||||
short *topptr, *botptr;
|
short *topptr, *botptr;
|
||||||
|
|
||||||
|
UNREFERENCED_PARAMETER(dax1);
|
||||||
|
UNREFERENCED_PARAMETER(dax2);
|
||||||
|
|
||||||
sectnum = thesector[bunchfirst[bunch]]; sec = §or[sectnum];
|
sectnum = thesector[bunchfirst[bunch]]; sec = §or[sectnum];
|
||||||
|
|
||||||
globalhorizbak = globalhoriz;
|
globalhorizbak = globalhoriz;
|
||||||
|
@ -4583,7 +4589,7 @@ static void dorotatesprite(int sx, int sy, int z, short a, short picnum, signed
|
||||||
int cosang, sinang, v, nextv, dax1, dax2, oy, bx, by, ny1, ny2;
|
int cosang, sinang, v, nextv, dax1, dax2, oy, bx, by, ny1, ny2;
|
||||||
int i, x, y, x1, y1, x2, y2, gx1, gy1, p, bufplc, palookupoffs;
|
int i, x, y, x1, y1, x2, y2, gx1, gy1, p, bufplc, palookupoffs;
|
||||||
int xsiz, ysiz, xoff, yoff, npoints, yplc, yinc, lx, rx, xx, xend;
|
int xsiz, ysiz, xoff, yoff, npoints, yplc, yinc, lx, rx, xx, xend;
|
||||||
int xv, yv, xv2, yv2, obuffermode, qlinemode=0, y1ve[4], y2ve[4], u4, d4;
|
int xv, yv, xv2, yv2, qlinemode=0, y1ve[4], y2ve[4], u4, d4;
|
||||||
char bad;
|
char bad;
|
||||||
|
|
||||||
//============================================================================= //POLYMOST BEGINS
|
//============================================================================= //POLYMOST BEGINS
|
||||||
|
@ -5081,7 +5087,7 @@ static void initksqrt(void)
|
||||||
//
|
//
|
||||||
static void dosetaspect(void)
|
static void dosetaspect(void)
|
||||||
{
|
{
|
||||||
int i, j, k, x, xinc,a;
|
int i, j, k, x, xinc;
|
||||||
|
|
||||||
if (xyaspect != oxyaspect)
|
if (xyaspect != oxyaspect)
|
||||||
{
|
{
|
||||||
|
@ -5213,7 +5219,7 @@ static void initfastcolorlookup(int rscale, int gscale, int bscale)
|
||||||
//
|
//
|
||||||
static void loadpalette(void)
|
static void loadpalette(void)
|
||||||
{
|
{
|
||||||
int fil,i;
|
int fil;
|
||||||
|
|
||||||
if (paletteloaded != 0) return;
|
if (paletteloaded != 0) return;
|
||||||
if ((fil = kopen4load("palette.dat",0)) == -1) return;
|
if ((fil = kopen4load("palette.dat",0)) == -1) return;
|
||||||
|
@ -6084,7 +6090,7 @@ void drawpeel(int peel)
|
||||||
//
|
//
|
||||||
void drawmasks(void)
|
void drawmasks(void)
|
||||||
{
|
{
|
||||||
int i, j, k, l, m, gap, xs, ys, xp, yp, yoff, yspan;
|
int i, j, k, l, gap, xs, ys, xp, yp, yoff, yspan;
|
||||||
// PLAG: sorting stuff
|
// PLAG: sorting stuff
|
||||||
_equation maskeq, p1eq, p2eq;
|
_equation maskeq, p1eq, p2eq;
|
||||||
_point2d dot, dot2, middle, pos, spr;
|
_point2d dot, dot2, middle, pos, spr;
|
||||||
|
@ -9215,8 +9221,7 @@ int pushmove(int *x, int *y, int *z, short *sectnum,
|
||||||
int walldist, int ceildist, int flordist, unsigned int cliptype)
|
int walldist, int ceildist, int flordist, unsigned int cliptype)
|
||||||
{
|
{
|
||||||
sectortype *sec, *sec2;
|
sectortype *sec, *sec2;
|
||||||
walltype *wal, *wal2;
|
walltype *wal;
|
||||||
spritetype *spr;
|
|
||||||
int i, j, k, t, dx, dy, dax, day, daz, daz2, bad, dir;
|
int i, j, k, t, dx, dy, dax, day, daz, daz2, bad, dir;
|
||||||
int dasprclipmask, dawalclipmask;
|
int dasprclipmask, dawalclipmask;
|
||||||
short startwall, endwall, clipsectcnt;
|
short startwall, endwall, clipsectcnt;
|
||||||
|
@ -10201,6 +10206,10 @@ void preparemirror(int dax, int day, int daz, short daang, int dahoriz, short da
|
||||||
{
|
{
|
||||||
int i, j, x, y, dx, dy;
|
int i, j, x, y, dx, dy;
|
||||||
|
|
||||||
|
UNREFERENCED_PARAMETER(daz);
|
||||||
|
UNREFERENCED_PARAMETER(dahoriz);
|
||||||
|
UNREFERENCED_PARAMETER(dasector);
|
||||||
|
|
||||||
x = wall[dawall].x; dx = wall[wall[dawall].point2].x-x;
|
x = wall[dawall].x; dx = wall[wall[dawall].point2].x-x;
|
||||||
y = wall[dawall].y; dy = wall[wall[dawall].point2].y-y;
|
y = wall[dawall].y; dy = wall[wall[dawall].point2].y-y;
|
||||||
j = dx*dx + dy*dy; if (j == 0) return;
|
j = dx*dx + dy*dy; if (j == 0) return;
|
||||||
|
@ -10874,6 +10883,8 @@ void draw2dgrid(int posxe, int posye, short ange, int zoome, short gride)
|
||||||
{
|
{
|
||||||
int i, xp1, yp1, xp2=0, yp2, tempy;
|
int i, xp1, yp1, xp2=0, yp2, tempy;
|
||||||
|
|
||||||
|
UNREFERENCED_PARAMETER(ange);
|
||||||
|
|
||||||
if (gride > 0)
|
if (gride > 0)
|
||||||
{
|
{
|
||||||
begindrawing(); //{{{
|
begindrawing(); //{{{
|
||||||
|
@ -10935,8 +10946,8 @@ char spritecol2d[MAXTILES][2];
|
||||||
void draw2dscreen(int posxe, int posye, short ange, int zoome, short gride)
|
void draw2dscreen(int posxe, int posye, short ange, int zoome, short gride)
|
||||||
{
|
{
|
||||||
walltype *wal;
|
walltype *wal;
|
||||||
int i, j, k, xp1, yp1, xp2, yp2, tempy, tempint;
|
int i, j, xp1, yp1, xp2, yp2, tempint;
|
||||||
char col, mask;
|
char col;
|
||||||
|
|
||||||
if (qsetmode == 200) return;
|
if (qsetmode == 200) return;
|
||||||
|
|
||||||
|
@ -11601,7 +11612,7 @@ static int writepcxbyte(char colour, unsigned char count, BFILE *fp)
|
||||||
static void writepcxline(char *buf, int bytes, int step, BFILE *fp)
|
static void writepcxline(char *buf, int bytes, int step, BFILE *fp)
|
||||||
{
|
{
|
||||||
char ths, last;
|
char ths, last;
|
||||||
int srcIndex, i;
|
int srcIndex;
|
||||||
unsigned char runCount;
|
unsigned char runCount;
|
||||||
|
|
||||||
runCount = 1;
|
runCount = 1;
|
||||||
|
@ -11638,7 +11649,7 @@ int screencapture_pcx(char *filename, char inverseit)
|
||||||
int i,j,bpl;
|
int i,j,bpl;
|
||||||
char *ptr, head[128];
|
char *ptr, head[128];
|
||||||
//char palette[4*256];
|
//char palette[4*256];
|
||||||
char *fn = Bstrdup(filename), *inversebuf, c;
|
char *fn = Bstrdup(filename), *inversebuf;
|
||||||
BFILE *fil;
|
BFILE *fil;
|
||||||
|
|
||||||
do // JBF 2004022: So we don't overwrite existing screenshots
|
do // JBF 2004022: So we don't overwrite existing screenshots
|
||||||
|
@ -11783,8 +11794,6 @@ int screencapture(char *filename, char inverseit)
|
||||||
int setrendermode(int renderer)
|
int setrendermode(int renderer)
|
||||||
{
|
{
|
||||||
#ifdef POLYMOST
|
#ifdef POLYMOST
|
||||||
int method;
|
|
||||||
|
|
||||||
if (bpp == 8)
|
if (bpp == 8)
|
||||||
{
|
{
|
||||||
if (renderer < 0) renderer = 0;
|
if (renderer < 0) renderer = 0;
|
||||||
|
|
|
@ -210,7 +210,6 @@ static void * getproc_(const char *s, int *err, int fatal, int extension)
|
||||||
|
|
||||||
int loadgldriver(const char *driver)
|
int loadgldriver(const char *driver)
|
||||||
{
|
{
|
||||||
void *t;
|
|
||||||
int err=0;
|
int err=0;
|
||||||
|
|
||||||
#ifdef RENDERTYPEWIN
|
#ifdef RENDERTYPEWIN
|
||||||
|
@ -580,7 +579,6 @@ static void * glugetproc_(const char *s, int *err, int fatal)
|
||||||
|
|
||||||
int loadglulibrary(const char *driver)
|
int loadglulibrary(const char *driver)
|
||||||
{
|
{
|
||||||
void *t;
|
|
||||||
int err=0;
|
int err=0;
|
||||||
|
|
||||||
#ifdef RENDERTYPEWIN
|
#ifdef RENDERTYPEWIN
|
||||||
|
|
|
@ -985,6 +985,8 @@ static int kpngrend(const char *kfilebuf, int kfilength,
|
||||||
int slidew, slider;
|
int slidew, slider;
|
||||||
//int qhuf0v, qhuf1v;
|
//int qhuf0v, qhuf1v;
|
||||||
|
|
||||||
|
UNREFERENCED_PARAMETER(kfilength);
|
||||||
|
|
||||||
if (!pnginited) { pnginited = 1; initpngtables(); }
|
if (!pnginited) { pnginited = 1; initpngtables(); }
|
||||||
|
|
||||||
if ((*(int *)&kfilebuf[0] != LSWAPIB(0x474e5089)) || (*(int *)&kfilebuf[4] != LSWAPIB(0x0a1a0a0d)))
|
if ((*(int *)&kfilebuf[0] != LSWAPIB(0x474e5089)) || (*(int *)&kfilebuf[4] != LSWAPIB(0x0a1a0a0d)))
|
||||||
|
@ -1259,7 +1261,7 @@ static int gcompid[4], gcomphsamp[4], gcompvsamp[4], gcompquantab[4], gcomphsamp
|
||||||
static int lnumcomponents, lcompid[4], lcompdc[4], lcompac[4], lcomphsamp[4], lcompvsamp[4], lcompquantab[4];
|
static int lnumcomponents, lcompid[4], lcompdc[4], lcompac[4], lcomphsamp[4], lcompvsamp[4], lcompquantab[4];
|
||||||
static int lcomphvsamp0, lcomphsampshift0, lcompvsampshift0;
|
static int lcomphvsamp0, lcomphsampshift0, lcompvsampshift0;
|
||||||
static int colclip[1024], colclipup8[1024], colclipup16[1024];
|
static int colclip[1024], colclipup8[1024], colclipup16[1024];
|
||||||
static unsigned char pow2char[8] = {1,2,4,8,16,32,64,128};
|
// static unsigned char pow2char[8] = {1,2,4,8,16,32,64,128};
|
||||||
|
|
||||||
#if defined(__WATCOMC__) && !defined(NOASM)
|
#if defined(__WATCOMC__) && !defined(NOASM)
|
||||||
|
|
||||||
|
@ -1536,8 +1538,8 @@ static int kpegrend(const char *kfilebuf, int kfilength,
|
||||||
int daframeplace, int dabytesperline, int daxres, int dayres,
|
int daframeplace, int dabytesperline, int daxres, int dayres,
|
||||||
int daglobxoffs, int daglobyoffs)
|
int daglobxoffs, int daglobyoffs)
|
||||||
{
|
{
|
||||||
int i, j, p, v, leng, xdim = 0, ydim = 0, index, prec, restartcnt, restartinterval;
|
int i, j, v, leng, xdim = 0, ydim = 0, index, prec, restartcnt, restartinterval;
|
||||||
int x, y, z, xx, yy, zz, *dc = 0, *dc2, num, curbits, c, daval, dabits, *hqval, *hqbits, hqcnt, *quanptr = 0;
|
int x, y, z, xx, yy, zz, *dc = 0, num, curbits, c, daval, dabits, *hqval, *hqbits, hqcnt, *quanptr = 0;
|
||||||
int passcnt = 0, ghsampmax = 0, gvsampmax = 0, glhsampmax = 0, glvsampmax = 0, glhstep, glvstep;
|
int passcnt = 0, ghsampmax = 0, gvsampmax = 0, glhsampmax = 0, glvsampmax = 0, glhstep, glvstep;
|
||||||
int eobrun, Ss, Se, Ah, Al, Alut[2], dctx[12], dcty[12], ldctx[12], ldcty[12], lshx[4], lshy[4];
|
int 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 = 0;
|
short *dctbuf = 0, *dctptr[12], *ldctptr[12], *dcs = 0;
|
||||||
|
@ -1955,6 +1957,8 @@ static int kgifrend(const char *kfilebuf, int kfilelength,
|
||||||
char numbits, startnumbits, chunkind, ilacefirst;
|
char numbits, startnumbits, chunkind, ilacefirst;
|
||||||
const unsigned char *ptr, *cptr = 0;
|
const unsigned char *ptr, *cptr = 0;
|
||||||
|
|
||||||
|
UNREFERENCED_PARAMETER(kfilelength);
|
||||||
|
|
||||||
coltype = 3; bitdepth = 8; //For PNGOUT
|
coltype = 3; bitdepth = 8; //For PNGOUT
|
||||||
|
|
||||||
if ((kfilebuf[0] != 'G') || (kfilebuf[1] != 'I') ||
|
if ((kfilebuf[0] != 'G') || (kfilebuf[1] != 'I') ||
|
||||||
|
@ -2102,6 +2106,10 @@ static int kcelrend(const char *buf, int fleng,
|
||||||
int i, x, y, x0, x1, y0, y1, xsiz, ysiz;
|
int i, x, y, x0, x1, y0, y1, xsiz, ysiz;
|
||||||
const char *cptr;
|
const char *cptr;
|
||||||
|
|
||||||
|
UNREFERENCED_PARAMETER(fleng);
|
||||||
|
UNREFERENCED_PARAMETER(daglobxoffs);
|
||||||
|
UNREFERENCED_PARAMETER(daglobyoffs);
|
||||||
|
|
||||||
if ((buf[0] != 0x19) || (buf[1] != 0x91) ||
|
if ((buf[0] != 0x19) || (buf[1] != 0x91) ||
|
||||||
(buf[10] != 8) || (buf[11] != 0)) return(-1);
|
(buf[10] != 8) || (buf[11] != 0)) return(-1);
|
||||||
|
|
||||||
|
@ -2245,6 +2253,8 @@ static int kbmprend(const char *buf, int fleng,
|
||||||
int i, j, x, y, x0, x1, y0, y1, rastoff, headsiz, xsiz, ysiz, cdim, comp, cptrinc, *lptr;
|
int i, j, x, y, x0, x1, y0, y1, rastoff, headsiz, xsiz, ysiz, cdim, comp, cptrinc, *lptr;
|
||||||
const char *cptr;
|
const char *cptr;
|
||||||
|
|
||||||
|
UNREFERENCED_PARAMETER(fleng);
|
||||||
|
|
||||||
headsiz = *(int *)&buf[14];
|
headsiz = *(int *)&buf[14];
|
||||||
if (headsiz == LSWAPIB(12)) //OS/2 1.x (old format)
|
if (headsiz == LSWAPIB(12)) //OS/2 1.x (old format)
|
||||||
{
|
{
|
||||||
|
@ -2452,6 +2462,8 @@ static int kddsrend(const char *buf, int leng,
|
||||||
unsigned int lut[256], r[4], g[4], b[4], a[8], rr, gg, bb;
|
unsigned int lut[256], r[4], g[4], b[4], a[8], rr, gg, bb;
|
||||||
unsigned char *uptr, *wptr;
|
unsigned char *uptr, *wptr;
|
||||||
|
|
||||||
|
UNREFERENCED_PARAMETER(leng);
|
||||||
|
|
||||||
xsiz = LSWAPIB(*(int *)&buf[16]);
|
xsiz = LSWAPIB(*(int *)&buf[16]);
|
||||||
ysiz = LSWAPIB(*(int *)&buf[12]);
|
ysiz = LSWAPIB(*(int *)&buf[12]);
|
||||||
if ((*(int *)&buf[80])&LSWAPIB(64)) //Uncompressed supports only A8R8G8B8 for now
|
if ((*(int *)&buf[80])&LSWAPIB(64)) //Uncompressed supports only A8R8G8B8 for now
|
||||||
|
|
|
@ -200,6 +200,7 @@ static tile2model_t tile2model[MAXTILES+EXTRATILES];
|
||||||
|
|
||||||
int addtileP(int model,int tile,int pallet)
|
int addtileP(int model,int tile,int pallet)
|
||||||
{
|
{
|
||||||
|
UNREFERENCED_PARAMETER(model);
|
||||||
if (curextra==MAXTILES+EXTRATILES-2)return curextra;
|
if (curextra==MAXTILES+EXTRATILES-2)return curextra;
|
||||||
if (tile2model[tile].modelid==-1){tile2model[tile].pal=pallet;return tile;}
|
if (tile2model[tile].modelid==-1){tile2model[tile].pal=pallet;return tile;}
|
||||||
if (tile2model[tile].pal==pallet)return tile;
|
if (tile2model[tile].pal==pallet)return tile;
|
||||||
|
@ -403,7 +404,6 @@ static int framename2index(mdmodel *vm, const char *nam)
|
||||||
|
|
||||||
int md_defineframe(int modelid, const char *framename, int tilenume, int skinnum, float smoothduration, int pal)
|
int md_defineframe(int modelid, const char *framename, int tilenume, int skinnum, float smoothduration, int pal)
|
||||||
{
|
{
|
||||||
void *vm;
|
|
||||||
md2model *m;
|
md2model *m;
|
||||||
int i;
|
int i;
|
||||||
|
|
||||||
|
@ -788,6 +788,8 @@ static int mdloadskin_cached(int fil, texcacheheader *head, int *doalloc, GLuint
|
||||||
void *midbuf = NULL;
|
void *midbuf = NULL;
|
||||||
int alloclen=0;
|
int alloclen=0;
|
||||||
|
|
||||||
|
UNREFERENCED_PARAMETER(pal);
|
||||||
|
|
||||||
if (*doalloc&1)
|
if (*doalloc&1)
|
||||||
{
|
{
|
||||||
bglGenTextures(1,glpic); //# of textures (make OpenGL allocate structure)
|
bglGenTextures(1,glpic); //# of textures (make OpenGL allocate structure)
|
||||||
|
@ -1172,8 +1174,6 @@ static void mdloadvbos(md3model *m)
|
||||||
}
|
}
|
||||||
|
|
||||||
//--------------------------------------- MD2 LIBRARY BEGINS ---------------------------------------
|
//--------------------------------------- MD2 LIBRARY BEGINS ---------------------------------------
|
||||||
static int memoryusage = 0;
|
|
||||||
|
|
||||||
static md2model *md2load(int fil, const char *filnam)
|
static md2model *md2load(int fil, const char *filnam)
|
||||||
{
|
{
|
||||||
md2model *m;
|
md2model *m;
|
||||||
|
@ -1181,7 +1181,7 @@ static md2model *md2load(int fil, const char *filnam)
|
||||||
md3surf_t *s;
|
md3surf_t *s;
|
||||||
md2frame_t *f;
|
md2frame_t *f;
|
||||||
md2head_t head;
|
md2head_t head;
|
||||||
char *buf, st[BMAX_PATH];
|
char st[BMAX_PATH];
|
||||||
int i, j, k;
|
int i, j, k;
|
||||||
|
|
||||||
m = (md2model *)calloc(1,sizeof(md2model)); if (!m) return(0);
|
m = (md2model *)calloc(1,sizeof(md2model)); if (!m) return(0);
|
||||||
|
@ -1401,7 +1401,7 @@ static md2model *md2load(int fil, const char *filnam)
|
||||||
// DICHOTOMIC RECURSIVE SORTING - USED BY MD3DRAW - MAY PUT IT IN ITS OWN SOURCE FILE LATER
|
// DICHOTOMIC RECURSIVE SORTING - USED BY MD3DRAW - MAY PUT IT IN ITS OWN SOURCE FILE LATER
|
||||||
int partition(unsigned short *indexes, float *depths, int f, int l)
|
int partition(unsigned short *indexes, float *depths, int f, int l)
|
||||||
{
|
{
|
||||||
int up,down,temp;
|
int up,down;
|
||||||
float tempf;
|
float tempf;
|
||||||
unsigned short tempus;
|
unsigned short tempus;
|
||||||
float piv = depths[f];
|
float piv = depths[f];
|
||||||
|
@ -1448,8 +1448,7 @@ void quicksort(unsigned short *indexes, float *depths, int first, int last)
|
||||||
|
|
||||||
static md3model *md3load(int fil)
|
static md3model *md3load(int fil)
|
||||||
{
|
{
|
||||||
char *buf, st[BMAX_PATH+2], bst[BMAX_PATH+2];
|
int i, surfi, ofsurf, offs[4], leng[4];
|
||||||
int i, j, surfi, ofsurf, bsc, offs[4], leng[4];
|
|
||||||
int maxtrispersurf;
|
int maxtrispersurf;
|
||||||
md3model *m;
|
md3model *m;
|
||||||
md3surf_t *s;
|
md3surf_t *s;
|
||||||
|
@ -1579,6 +1578,10 @@ static md3model *md3load(int fil)
|
||||||
}
|
}
|
||||||
|
|
||||||
#if 0
|
#if 0
|
||||||
|
{
|
||||||
|
char *buf, st[BMAX_PATH+2], bst[BMAX_PATH+2];
|
||||||
|
int j, bsc;
|
||||||
|
|
||||||
strcpy(st,filnam);
|
strcpy(st,filnam);
|
||||||
for (i=0,j=0;st[i];i++) if ((st[i] == '/') || (st[i] == '\\')) j = i+1;
|
for (i=0,j=0;st[i];i++) if ((st[i] == '/') || (st[i] == '\\')) j = i+1;
|
||||||
st[j] = '*'; st[j+1] = 0;
|
st[j] = '*'; st[j+1] = 0;
|
||||||
|
@ -1597,6 +1600,7 @@ static md3model *md3load(int fil)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
if (!mdloadskin(&m->texid,&m->usesalpha,bst)) ;//bad!
|
if (!mdloadskin(&m->texid,&m->usesalpha,bst)) ;//bad!
|
||||||
|
}
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
m->indexes = malloc(sizeof(unsigned short) * maxtrispersurf);
|
m->indexes = malloc(sizeof(unsigned short) * maxtrispersurf);
|
||||||
|
@ -1610,16 +1614,15 @@ static md3model *md3load(int fil)
|
||||||
|
|
||||||
static int md3draw(md3model *m, spritetype *tspr)
|
static int md3draw(md3model *m, spritetype *tspr)
|
||||||
{
|
{
|
||||||
point3d fp, fp1, fp2, m0, m1, a0, a1;
|
point3d fp, fp1, fp2, m0, m1, a0;
|
||||||
md3xyzn_t *v0, *v1;
|
md3xyzn_t *v0, *v1;
|
||||||
int i, j, k, l, surfi, *lptr;
|
int i, j, k, l, surfi;
|
||||||
float f, g, k0, k1, k2, k3, k4, k5, k6, k7, mat[16], mult;
|
float f, g, k0, k1, k2, k3, k4, k5, k6, k7, mat[16];
|
||||||
md3surf_t *s;
|
md3surf_t *s;
|
||||||
GLfloat pc[4],pc1[4];
|
GLfloat pc[4];
|
||||||
int texunits = GL_TEXTURE0_ARB;
|
int texunits = GL_TEXTURE0_ARB;
|
||||||
mdskinmap_t *sk;
|
mdskinmap_t *sk;
|
||||||
//PLAG : sorting stuff
|
//PLAG : sorting stuff
|
||||||
unsigned short tempus;
|
|
||||||
void* vbotemp;
|
void* vbotemp;
|
||||||
point3d* vertexhandle = NULL;
|
point3d* vertexhandle = NULL;
|
||||||
unsigned short* indexhandle;
|
unsigned short* indexhandle;
|
||||||
|
@ -2247,6 +2250,7 @@ static void putvox(int x, int y, int z, int col)
|
||||||
}
|
}
|
||||||
|
|
||||||
//Set all bits in vbit from (x,y,z0) to (x,y,z1-1) to 0's
|
//Set all bits in vbit from (x,y,z0) to (x,y,z1-1) to 0's
|
||||||
|
#if 0
|
||||||
static void setzrange0(int *lptr, int z0, int z1)
|
static void setzrange0(int *lptr, int z0, int z1)
|
||||||
{
|
{
|
||||||
int z, ze;
|
int z, ze;
|
||||||
|
@ -2255,7 +2259,7 @@ static void setzrange0(int *lptr, int z0, int z1)
|
||||||
lptr[z] &=~(-1<<SHIFTMOD32(z0)); for (z++;z<ze;z++) lptr[z] = 0;
|
lptr[z] &=~(-1<<SHIFTMOD32(z0)); for (z++;z<ze;z++) lptr[z] = 0;
|
||||||
lptr[z] &= (-1<<SHIFTMOD32(z1));
|
lptr[z] &= (-1<<SHIFTMOD32(z1));
|
||||||
}
|
}
|
||||||
|
#endif
|
||||||
//Set all bits in vbit from (x,y,z0) to (x,y,z1-1) to 1's
|
//Set all bits in vbit from (x,y,z0) to (x,y,z1-1) to 1's
|
||||||
static void setzrange1(int *lptr, int z0, int z1)
|
static void setzrange1(int *lptr, int z0, int z1)
|
||||||
{
|
{
|
||||||
|
@ -2321,6 +2325,11 @@ static void cntquad(int x0, int y0, int z0, int x1, int y1, int z1, int x2, int
|
||||||
{
|
{
|
||||||
int x, y, z;
|
int x, y, z;
|
||||||
|
|
||||||
|
UNREFERENCED_PARAMETER(x1);
|
||||||
|
UNREFERENCED_PARAMETER(y1);
|
||||||
|
UNREFERENCED_PARAMETER(z1);
|
||||||
|
UNREFERENCED_PARAMETER(face);
|
||||||
|
|
||||||
x = labs(x2-x0); y = labs(y2-y0); z = labs(z2-z0);
|
x = labs(x2-x0); y = labs(y2-y0); z = labs(z2-z0);
|
||||||
if (!x) x = z; else if (!y) y = z;
|
if (!x) x = z; else if (!y) y = z;
|
||||||
if (x < y) { z = x; x = y; y = z; }
|
if (x < y) { z = x; x = y; y = z; }
|
||||||
|
@ -2437,10 +2446,8 @@ static int isolid(int x, int y, int z)
|
||||||
|
|
||||||
static voxmodel *vox2poly()
|
static voxmodel *vox2poly()
|
||||||
{
|
{
|
||||||
int i, j, x, y, z, v, ov, oz = 0, cnt, sc, x0, y0, dx, dy, i0, i1, *bx0, *by0;
|
int i, j, x, y, z, v, ov, oz = 0, cnt, sc, x0, y0, dx, dy, *bx0, *by0;
|
||||||
void (*daquad)(int, int, int, int, int, int, int, int, int, int);
|
void (*daquad)(int, int, int, int, int, int, int, int, int, int);
|
||||||
coltype *pic;
|
|
||||||
unsigned char *cptr, ch;
|
|
||||||
|
|
||||||
gvox = (voxmodel *)malloc(sizeof(voxmodel)); if (!gvox) return(0);
|
gvox = (voxmodel *)malloc(sizeof(voxmodel)); if (!gvox) return(0);
|
||||||
memset(gvox,0,sizeof(voxmodel));
|
memset(gvox,0,sizeof(voxmodel));
|
||||||
|
@ -2699,7 +2706,7 @@ static int loadkvx(const char *filnam)
|
||||||
|
|
||||||
static int loadkv6(const char *filnam)
|
static int loadkv6(const char *filnam)
|
||||||
{
|
{
|
||||||
int i, j, x, y, z, numvoxs, z0, z1, fil;
|
int i, j, x, y, numvoxs, z0, z1, fil;
|
||||||
unsigned short *ylen;
|
unsigned short *ylen;
|
||||||
unsigned char c[8];
|
unsigned char c[8];
|
||||||
|
|
||||||
|
@ -2838,8 +2845,8 @@ static voxmodel *voxload(const char *filnam)
|
||||||
static int voxdraw(voxmodel *m, spritetype *tspr)
|
static int voxdraw(voxmodel *m, spritetype *tspr)
|
||||||
{
|
{
|
||||||
point3d fp, m0, a0;
|
point3d fp, m0, a0;
|
||||||
int i, j, k, fi, *lptr, xx, yy, zz;
|
int i, j, fi, xx, yy, zz;
|
||||||
float ru, rv, uhack[2], vhack[2], phack[2], clut[6] = {1,1,1,1,1,1}; //1.02,1.02,0.94,1.06,0.98,0.98};
|
float ru, rv, phack[2], clut[6] = {1,1,1,1,1,1}; //1.02,1.02,0.94,1.06,0.98,0.98};
|
||||||
float f, g, k0, k1, k2, k3, k4, k5, k6, k7, mat[16], omat[16], pc[4];
|
float f, g, k0, k1, k2, k3, k4, k5, k6, k7, mat[16], omat[16], pc[4];
|
||||||
vert_t *vptr;
|
vert_t *vptr;
|
||||||
|
|
||||||
|
@ -3014,7 +3021,6 @@ mdmodel *mdload(const char *filnam)
|
||||||
|
|
||||||
int mddraw(spritetype *tspr)
|
int mddraw(spritetype *tspr)
|
||||||
{
|
{
|
||||||
mdanim_t *anim;
|
|
||||||
mdmodel *vm;
|
mdmodel *vm;
|
||||||
int i;
|
int i;
|
||||||
|
|
||||||
|
|
|
@ -504,7 +504,7 @@ int gltexmayhavealpha(int dapicnum, int dapalnum)
|
||||||
|
|
||||||
void gltexinvalidate(int dapicnum, int dapalnum, int dameth)
|
void gltexinvalidate(int dapicnum, int dapalnum, int dameth)
|
||||||
{
|
{
|
||||||
int i, j;
|
int j;
|
||||||
pthtyp *pth;
|
pthtyp *pth;
|
||||||
|
|
||||||
j = (dapicnum&(GLTEXCACHEADSIZ-1));
|
j = (dapicnum&(GLTEXCACHEADSIZ-1));
|
||||||
|
@ -1055,7 +1055,7 @@ static void uploadtexture(int doalloc, int xsiz, int ysiz, int intexfmt, int tex
|
||||||
int gloadtile_art(int dapic, int dapal, int dameth, pthtyp *pth, int doalloc)
|
int gloadtile_art(int dapic, int dapal, int dameth, pthtyp *pth, int doalloc)
|
||||||
{
|
{
|
||||||
coltype *pic, *wpptr;
|
coltype *pic, *wpptr;
|
||||||
int j, x, y, x2, y2, xsiz, ysiz, dacol, tsizx, tsizy;
|
int x, y, x2, y2, xsiz, ysiz, dacol, tsizx, tsizy;
|
||||||
char hasalpha = 0, hasfullbright = 0;
|
char hasalpha = 0, hasfullbright = 0;
|
||||||
|
|
||||||
tsizx = tilesizx[dapic];
|
tsizx = tilesizx[dapic];
|
||||||
|
@ -1253,7 +1253,6 @@ void writexcache(char *fn, int len, int dameth, char effect, texcacheheader *hea
|
||||||
unsigned int alloclen=0, level, miplen;
|
unsigned int alloclen=0, level, miplen;
|
||||||
unsigned int padx=0, pady=0;
|
unsigned int padx=0, pady=0;
|
||||||
GLuint gi;
|
GLuint gi;
|
||||||
int j, k;
|
|
||||||
|
|
||||||
if (!glinfo.texcompr || !glusetexcompr || !glusetexcache) return;
|
if (!glinfo.texcompr || !glusetexcompr || !glusetexcache) return;
|
||||||
if (!bglCompressedTexImage2DARB || !bglGetCompressedTexImageARB)
|
if (!bglCompressedTexImage2DARB || !bglGetCompressedTexImageARB)
|
||||||
|
@ -1379,6 +1378,8 @@ int gloadtile_cached(int fil, texcacheheader *head, int *doalloc, pthtyp *pth,in
|
||||||
void *midbuf = NULL;
|
void *midbuf = NULL;
|
||||||
int alloclen=0;
|
int alloclen=0;
|
||||||
|
|
||||||
|
UNREFERENCED_PARAMETER(dapalnum);
|
||||||
|
|
||||||
if (*doalloc&1)
|
if (*doalloc&1)
|
||||||
{
|
{
|
||||||
bglGenTextures(1,(GLuint*)&pth->glpic); //# of textures (make OpenGL allocate structure)
|
bglGenTextures(1,(GLuint*)&pth->glpic); //# of textures (make OpenGL allocate structure)
|
||||||
|
@ -1470,7 +1471,7 @@ static void applypalmapsT(char *pic, int sizx, int sizy, int pal)
|
||||||
int gloadtile_hi(int dapic,int dapalnum, int facen, hicreplctyp *hicr, int dameth, pthtyp *pth, int doalloc, char effect)
|
int gloadtile_hi(int dapic,int dapalnum, int facen, hicreplctyp *hicr, int dameth, pthtyp *pth, int doalloc, char effect)
|
||||||
{
|
{
|
||||||
coltype *pic = NULL, *rpptr;
|
coltype *pic = NULL, *rpptr;
|
||||||
int j, x, y, x2, y2, xsiz=0, ysiz=0, tsizx, tsizy;
|
int j, x, y, xsiz=0, ysiz=0, tsizx, tsizy;
|
||||||
|
|
||||||
char *picfil = NULL, *fn, hasalpha = 255;
|
char *picfil = NULL, *fn, hasalpha = 255;
|
||||||
int picfillen, texfmt = GL_RGBA, intexfmt = GL_RGBA, filh;
|
int picfillen, texfmt = GL_RGBA, intexfmt = GL_RGBA, filh;
|
||||||
|
@ -1704,9 +1705,8 @@ void drawpoly(double *dpx, double *dpy, int n, int method)
|
||||||
int i, j, k, x, y, z, nn, ix0, ix1, mini, maxi, tsizx, tsizy, tsizxm1 = 0, tsizym1 = 0, ltsizy = 0;
|
int i, j, k, x, y, z, nn, ix0, ix1, mini, maxi, tsizx, tsizy, tsizxm1 = 0, tsizym1 = 0, ltsizy = 0;
|
||||||
int xx, yy, xi, d0, u0, v0, d1, u1, v1, xmodnice = 0, ymulnice = 0, dorot;
|
int xx, yy, xi, d0, u0, v0, d1, u1, v1, xmodnice = 0, ymulnice = 0, dorot;
|
||||||
char dacol = 0, *walptr, *palptr = NULL, *vidp, *vide;
|
char dacol = 0, *walptr, *palptr = NULL, *vidp, *vide;
|
||||||
GLfloat pc1[4];
|
|
||||||
#ifdef USE_OPENGL
|
#ifdef USE_OPENGL
|
||||||
pthtyp *pth, *detailpth, *glowpth, *palpth;
|
pthtyp *pth, *detailpth, *glowpth;
|
||||||
int texunits = GL_TEXTURE0_ARB;
|
int texunits = GL_TEXTURE0_ARB;
|
||||||
#endif
|
#endif
|
||||||
// backup of the n for possible redrawing of fullbright
|
// backup of the n for possible redrawing of fullbright
|
||||||
|
@ -2827,7 +2827,7 @@ static void polymost_drawalls(int bunch)
|
||||||
sectortype *sec, *nextsec;
|
sectortype *sec, *nextsec;
|
||||||
walltype *wal, *wal2, *nwal;
|
walltype *wal, *wal2, *nwal;
|
||||||
double ox, oy, oz, ox2, oy2, px[3], py[3], dd[3], uu[3], vv[3];
|
double ox, oy, oz, ox2, oy2, px[3], py[3], dd[3], uu[3], vv[3];
|
||||||
double fx, fy, x0, x1, y0, y1, cy0, cy1, fy0, fy1, xp0, yp0, xp1, yp1, ryp0, ryp1, nx0, ny0, nx1, ny1;
|
double fx, fy, x0, x1, cy0, cy1, fy0, fy1, xp0, yp0, xp1, yp1, ryp0, ryp1, nx0, ny0, nx1, ny1;
|
||||||
double t, r, t0, t1, ocy0, ocy1, ofy0, ofy1, oxp0, oyp0, ft[4];
|
double t, r, t0, t1, ocy0, ocy1, ofy0, ofy1, oxp0, oyp0, ft[4];
|
||||||
double oguo, ogux, oguy;
|
double oguo, ogux, oguy;
|
||||||
int i, x, y, z, cz, fz, wallnum, sectnum, nextsectnum;
|
int i, x, y, z, cz, fz, wallnum, sectnum, nextsectnum;
|
||||||
|
@ -3935,7 +3935,7 @@ static void polymost_scansector(int sectnum)
|
||||||
|
|
||||||
void polymost_drawrooms()
|
void polymost_drawrooms()
|
||||||
{
|
{
|
||||||
int i, j, k, n, n2, closest;
|
int i, j, n, n2, closest;
|
||||||
double ox, oy, oz, ox2, oy2, oz2, r, px[6], py[6], pz[6], px2[6], py2[6], pz2[6], sx[6], sy[6];
|
double ox, oy, oz, ox2, oy2, oz2, r, px[6], py[6], pz[6], px2[6], py2[6], pz2[6], sx[6], sy[6];
|
||||||
|
|
||||||
if (!rendmode) return;
|
if (!rendmode) return;
|
||||||
|
@ -3961,7 +3961,6 @@ void polymost_drawrooms()
|
||||||
//Enable this for OpenGL red-blue glasses mode :)
|
//Enable this for OpenGL red-blue glasses mode :)
|
||||||
if (glredbluemode)
|
if (glredbluemode)
|
||||||
{
|
{
|
||||||
float m[4][4];
|
|
||||||
static int grbfcnt = 0; grbfcnt++;
|
static int grbfcnt = 0; grbfcnt++;
|
||||||
if (redblueclearcnt < numpages) { redblueclearcnt++; bglColorMask(1,1,1,1); bglClear(GL_COLOR_BUFFER_BIT); }
|
if (redblueclearcnt < numpages) { redblueclearcnt++; bglColorMask(1,1,1,1); bglClear(GL_COLOR_BUFFER_BIT); }
|
||||||
if (grbfcnt&1)
|
if (grbfcnt&1)
|
||||||
|
@ -4180,9 +4179,9 @@ void polymost_drawrooms()
|
||||||
void polymost_drawmaskwall(int damaskwallcnt)
|
void polymost_drawmaskwall(int damaskwallcnt)
|
||||||
{
|
{
|
||||||
double dpx[8], dpy[8], dpx2[8], dpy2[8];
|
double dpx[8], dpy[8], dpx2[8], dpy2[8];
|
||||||
float fx, fy, x0, x1, sx0, sy0, sx1, sy1, xp0, yp0, xp1, yp1, oxp0, oyp0, ryp0, ryp1;
|
float fy, x0, x1, sx0, sy0, sx1, sy1, xp0, yp0, xp1, yp1, oxp0, oyp0, ryp0, ryp1;
|
||||||
float f, r, t, t0, t1, nx0, ny0, nx1, ny1, py[4], csy[4], fsy[4];
|
float r, t, t0, t1, csy[4], fsy[4];
|
||||||
int i, j, k, n, n2, x, z, sectnum, z1, z2, lx, rx, cz[4], fz[4], method;
|
int i, j, n, n2, z, sectnum, z1, z2, cz[4], fz[4], method;
|
||||||
sectortype *sec, *nsec;
|
sectortype *sec, *nsec;
|
||||||
walltype *wal, *wal2;
|
walltype *wal, *wal2;
|
||||||
|
|
||||||
|
@ -4355,7 +4354,7 @@ void polymost_drawmaskwall(int damaskwallcnt)
|
||||||
void polymost_drawsprite(int snum)
|
void polymost_drawsprite(int snum)
|
||||||
{
|
{
|
||||||
double px[6], py[6];
|
double px[6], py[6];
|
||||||
float f, r, c, s, fx, fy, sx0, sy0, sx1, sy1, xp0, yp0, xp1, yp1, oxp0, oyp0, ryp0, ryp1, ft[4];
|
float f, c, s, fx, fy, sx0, sy0, sx1, xp0, yp0, xp1, yp1, oxp0, oyp0, ryp0, ryp1, ft[4];
|
||||||
float x0, y0, x1, y1, sc0, sf0, sc1, sf1, px2[6], py2[6], xv, yv, t0, t1;
|
float x0, y0, x1, y1, sc0, sf0, sc1, sf1, px2[6], py2[6], xv, yv, t0, t1;
|
||||||
int i, j, spritenum, xoff=0, yoff=0, method, npoints;
|
int i, j, spritenum, xoff=0, yoff=0, method, npoints;
|
||||||
spritetype *tspr;
|
spritetype *tspr;
|
||||||
|
@ -4778,14 +4777,13 @@ void polymost_dorotatesprite(int sx, int sy, int z, short a, short picnum,
|
||||||
signed char dashade, char dapalnum, char dastat, int cx1, int cy1, int cx2, int cy2, int uniqid)
|
signed char dashade, char dapalnum, char dastat, int cx1, int cy1, int cx2, int cy2, int uniqid)
|
||||||
{
|
{
|
||||||
static int onumframes = 0;
|
static int onumframes = 0;
|
||||||
int i, n, nn, x, zz, xoff, yoff, xsiz, ysiz, method;
|
int n, nn, x, zz, xoff, yoff, xsiz, ysiz, method;
|
||||||
int ogpicnum, ogshade, ogpal, ofoffset, oxdimen, oydimen, oldviewingrange;
|
int ogpicnum, ogshade, ogpal, ofoffset, oxdimen, oydimen, oldviewingrange;
|
||||||
double ogxyaspect;
|
double ogxyaspect;
|
||||||
double ogchang, ogshang, ogctang, ogstang, oghalfx, oghoriz, fx, fy, x1, y1, z1, x2, y2;
|
double ogchang, ogshang, ogctang, ogstang, oghalfx, oghoriz, fx, fy, x1, y1, z1, x2, y2;
|
||||||
double ogrhalfxdown10, ogrhalfxdown10x;
|
double ogrhalfxdown10, ogrhalfxdown10x;
|
||||||
double d, cosang, sinang, cosang2, sinang2, px[8], py[8], px2[8], py2[8];
|
double d, cosang, sinang, cosang2, sinang2, px[8], py[8], px2[8], py2[8];
|
||||||
float m[4][4];
|
float m[4][4];
|
||||||
int fovcorrect;
|
|
||||||
|
|
||||||
#ifdef USE_OPENGL
|
#ifdef USE_OPENGL
|
||||||
if (rendmode >= 3 && usemodels && hudmem[(dastat&4)>>2][picnum].angadd)
|
if (rendmode >= 3 && usemodels && hudmem[(dastat&4)>>2][picnum].angadd)
|
||||||
|
@ -5246,7 +5244,7 @@ void polymost_fillpolygon(int npoints)
|
||||||
{
|
{
|
||||||
pthtyp *pth;
|
pthtyp *pth;
|
||||||
float f,a=0.0;
|
float f,a=0.0;
|
||||||
int i, j, k;
|
int i;
|
||||||
|
|
||||||
globalx1 = mulscale16(globalx1,xyaspect);
|
globalx1 = mulscale16(globalx1,xyaspect);
|
||||||
globaly2 = mulscale16(globaly2,xyaspect);
|
globaly2 = mulscale16(globaly2,xyaspect);
|
||||||
|
@ -5399,7 +5397,7 @@ int polymost_printext256(int xpos, int ypos, short col, short backcol, char *nam
|
||||||
{
|
{
|
||||||
// construct a 256x128 8-bit alpha-only texture for the font glyph matrix
|
// construct a 256x128 8-bit alpha-only texture for the font glyph matrix
|
||||||
unsigned char *tbuf, *cptr, *tptr;
|
unsigned char *tbuf, *cptr, *tptr;
|
||||||
int h,i,j,l;
|
int h,i,j;
|
||||||
|
|
||||||
bglGenTextures(1,&polymosttext);
|
bglGenTextures(1,&polymosttext);
|
||||||
if (!polymosttext) return -1;
|
if (!polymosttext) return -1;
|
||||||
|
|
|
@ -49,6 +49,10 @@ static char *duke3dgrp = defaultduke3dgrp;
|
||||||
static int fixmapbeforesaving = 1;
|
static int fixmapbeforesaving = 1;
|
||||||
static int NoAutoLoad = 0;
|
static int NoAutoLoad = 0;
|
||||||
|
|
||||||
|
#if !defined(_WIN32)
|
||||||
|
static int usecwd = 0;
|
||||||
|
#endif
|
||||||
|
|
||||||
static struct strllist
|
static struct strllist
|
||||||
{
|
{
|
||||||
struct strllist *next;
|
struct strllist *next;
|
||||||
|
@ -290,7 +294,7 @@ void ExtLoadMap(const char *mapname)
|
||||||
|
|
||||||
void ExtSaveMap(const char *mapname)
|
void ExtSaveMap(const char *mapname)
|
||||||
{
|
{
|
||||||
UNUSED_PARAMETER(mapname);
|
UNREFERENCED_PARAMETER(mapname);
|
||||||
saveboard("backup.map",&posx,&posy,&posz,&ang,&cursectnum);
|
saveboard("backup.map",&posx,&posy,&posz,&ang,&cursectnum);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -632,7 +636,7 @@ void ExtShowSectorData(short sectnum) //F5
|
||||||
int totalactors1=0,totalactors2=0,totalactors3=0,totalactors4=0;
|
int totalactors1=0,totalactors2=0,totalactors3=0,totalactors4=0;
|
||||||
int totalrespawn=0;
|
int totalrespawn=0;
|
||||||
|
|
||||||
UNUSED_PARAMETER(sectnum);
|
UNREFERENCED_PARAMETER(sectnum);
|
||||||
if (qsetmode==200)
|
if (qsetmode==200)
|
||||||
return;
|
return;
|
||||||
|
|
||||||
|
@ -819,7 +823,7 @@ void ExtShowWallData(short wallnum) //F6
|
||||||
int i,nextfreetag=0,total=0;
|
int i,nextfreetag=0,total=0;
|
||||||
char x,y;
|
char x,y;
|
||||||
|
|
||||||
UNUSED_PARAMETER(wallnum);
|
UNREFERENCED_PARAMETER(wallnum);
|
||||||
|
|
||||||
if (qsetmode==200)
|
if (qsetmode==200)
|
||||||
return;
|
return;
|
||||||
|
@ -1184,7 +1188,7 @@ static void ShowHelpText(char *name)
|
||||||
{
|
{
|
||||||
BFILE *fp;
|
BFILE *fp;
|
||||||
char x=0,y=4;
|
char x=0,y=4;
|
||||||
UNUSED_PARAMETER(name);
|
UNREFERENCED_PARAMETER(name);
|
||||||
if ((fp=fopenfrompath("helpdoc.txt","rb")) == NULL)
|
if ((fp=fopenfrompath("helpdoc.txt","rb")) == NULL)
|
||||||
{
|
{
|
||||||
begindrawing();
|
begindrawing();
|
||||||
|
@ -1217,7 +1221,7 @@ static void ShowHelpText(char *name)
|
||||||
#endif
|
#endif
|
||||||
void ExtShowSpriteData(short spritenum) //F6
|
void ExtShowSpriteData(short spritenum) //F6
|
||||||
{
|
{
|
||||||
UNUSED_PARAMETER(spritenum);
|
UNREFERENCED_PARAMETER(spritenum);
|
||||||
if (qsetmode != 200)
|
if (qsetmode != 200)
|
||||||
Show2dText("sehelp.hlp");
|
Show2dText("sehelp.hlp");
|
||||||
/* if (qsetmode == 200) // In 3D mode
|
/* if (qsetmode == 200) // In 3D mode
|
||||||
|
@ -5222,7 +5226,7 @@ int ExtPreInit(int argc,const char **argv)
|
||||||
|
|
||||||
static int osdcmd_quit(const osdfuncparm_t *parm)
|
static int osdcmd_quit(const osdfuncparm_t *parm)
|
||||||
{
|
{
|
||||||
UNUSED_PARAMETER(parm);
|
UNREFERENCED_PARAMETER(parm);
|
||||||
clearfilenames();
|
clearfilenames();
|
||||||
ExtUnInit();
|
ExtUnInit();
|
||||||
uninitengine();
|
uninitengine();
|
||||||
|
@ -5386,7 +5390,7 @@ static int osdcmd_exec(const osdfuncparm_t *parm)
|
||||||
|
|
||||||
static int osdcmd_noclip(const osdfuncparm_t *parm)
|
static int osdcmd_noclip(const osdfuncparm_t *parm)
|
||||||
{
|
{
|
||||||
UNUSED_PARAMETER(parm);
|
UNREFERENCED_PARAMETER(parm);
|
||||||
noclip = !noclip;
|
noclip = !noclip;
|
||||||
|
|
||||||
return OSDCMD_OK;
|
return OSDCMD_OK;
|
||||||
|
|
|
@ -10713,6 +10713,9 @@ MAIN_LOOP_RESTART:
|
||||||
|
|
||||||
if (g_player[myconnectindex].ps->gm&MODE_EOL || g_player[myconnectindex].ps->gm&MODE_RESTART)
|
if (g_player[myconnectindex].ps->gm&MODE_EOL || g_player[myconnectindex].ps->gm&MODE_RESTART)
|
||||||
{
|
{
|
||||||
|
setgamepalette(g_player[myconnectindex].ps, palette, 0);
|
||||||
|
setpal(g_player[myconnectindex].ps);
|
||||||
|
|
||||||
if (g_player[myconnectindex].ps->gm&MODE_EOL)
|
if (g_player[myconnectindex].ps->gm&MODE_EOL)
|
||||||
{
|
{
|
||||||
closedemowrite();
|
closedemowrite();
|
||||||
|
|
|
@ -112,8 +112,8 @@ static void mixer_callback(int chan, void *stream, int len, void *udata)
|
||||||
Uint8 *stptr;
|
Uint8 *stptr;
|
||||||
Uint8 *fxptr;
|
Uint8 *fxptr;
|
||||||
int copysize;
|
int copysize;
|
||||||
UNUSED_PARAMETER(chan);
|
UNREFERENCED_PARAMETER(chan);
|
||||||
UNUSED_PARAMETER(udata);
|
UNREFERENCED_PARAMETER(udata);
|
||||||
/* len should equal _BufferSize, else this is screwed up */
|
/* len should equal _BufferSize, else this is screwed up */
|
||||||
|
|
||||||
stptr = (Uint8 *)stream;
|
stptr = (Uint8 *)stream;
|
||||||
|
@ -264,7 +264,7 @@ int DisableInterrupts(void)
|
||||||
|
|
||||||
int RestoreInterrupts(int flags)
|
int RestoreInterrupts(int flags)
|
||||||
{
|
{
|
||||||
UNUSED_PARAMETER(flags);
|
UNREFERENCED_PARAMETER(flags);
|
||||||
SDL_UnlockAudio();
|
SDL_UnlockAudio();
|
||||||
return(0);
|
return(0);
|
||||||
}
|
}
|
||||||
|
|
|
@ -178,7 +178,7 @@ int DSOUND_Init(int soundcard, int mixrate, int numchannels, int samplebits, int
|
||||||
WAVEFORMATEX wfex;
|
WAVEFORMATEX wfex;
|
||||||
DSBPOSITIONNOTIFY posn;
|
DSBPOSITIONNOTIFY posn;
|
||||||
|
|
||||||
UNUSED_PARAMETER(soundcard);
|
UNREFERENCED_PARAMETER(soundcard);
|
||||||
|
|
||||||
if (DSOUND_Installed)
|
if (DSOUND_Installed)
|
||||||
{
|
{
|
||||||
|
@ -410,7 +410,7 @@ static DWORD WINAPI isr(LPVOID parm)
|
||||||
LPVOID lockptr; DWORD lockbytes;
|
LPVOID lockptr; DWORD lockbytes;
|
||||||
LPVOID lockptr2; DWORD lockbytes2;
|
LPVOID lockptr2; DWORD lockbytes2;
|
||||||
|
|
||||||
UNUSED_PARAMETER(parm);
|
UNREFERENCED_PARAMETER(parm);
|
||||||
|
|
||||||
handles = (HANDLE *)malloc(sizeof(HANDLE)*(1+_DSOUND_NumBuffers));
|
handles = (HANDLE *)malloc(sizeof(HANDLE)*(1+_DSOUND_NumBuffers));
|
||||||
if (!handles) return 1;
|
if (!handles) return 1;
|
||||||
|
|
|
@ -116,8 +116,8 @@ void CALLBACK MPU_MIDICallback(HMIDIOUT handle, UINT uMsg, DWORD dwInstance, DWO
|
||||||
{
|
{
|
||||||
int i;
|
int i;
|
||||||
|
|
||||||
UNUSED_PARAMETER(dwInstance);
|
UNREFERENCED_PARAMETER(dwInstance);
|
||||||
UNUSED_PARAMETER(dwParam2);
|
UNREFERENCED_PARAMETER(dwParam2);
|
||||||
|
|
||||||
switch (uMsg)
|
switch (uMsg)
|
||||||
{
|
{
|
||||||
|
@ -483,7 +483,7 @@ void MPU_SetVolume(int volume)
|
||||||
|
|
||||||
mixerClose(hmixer);
|
mixerClose(hmixer);
|
||||||
*/
|
*/
|
||||||
UNUSED_PARAMETER(volume);
|
UNREFERENCED_PARAMETER(volume);
|
||||||
}
|
}
|
||||||
|
|
||||||
int MPU_GetVolume(void)
|
int MPU_GetVolume(void)
|
||||||
|
|
|
@ -419,7 +419,7 @@ int MV_ServiceVoc(int buffer)
|
||||||
#if defined(_WIN32)
|
#if defined(_WIN32)
|
||||||
MV_MixPage = buffer;
|
MV_MixPage = buffer;
|
||||||
#else
|
#else
|
||||||
UNUSED_PARAMETER(buffer);
|
UNREFERENCED_PARAMETER(buffer);
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
// Toggle which buffer we'll mix next
|
// Toggle which buffer we'll mix next
|
||||||
|
@ -1803,12 +1803,13 @@ intptr_t TellOgg(void *datasource)
|
||||||
return d->pos;
|
return d->pos;
|
||||||
}
|
}
|
||||||
|
|
||||||
/*
|
|
||||||
int CloseOgg(void *datasource)
|
int CloseOgg(void *datasource)
|
||||||
{
|
{
|
||||||
|
UNREFERENCED_PARAMETER(datasource);
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
*/
|
|
||||||
|
|
||||||
/*---------------------------------------------------------------------
|
/*---------------------------------------------------------------------
|
||||||
Function: MV_StartPlayback
|
Function: MV_StartPlayback
|
||||||
|
@ -1821,7 +1822,7 @@ int MV_StartPlayback(void)
|
||||||
int status;
|
int status;
|
||||||
int buffer;
|
int buffer;
|
||||||
|
|
||||||
cb.close_func=NULL; //CloseOgg
|
cb.close_func=CloseOgg;
|
||||||
cb.read_func =ReadOgg;
|
cb.read_func =ReadOgg;
|
||||||
cb.seek_func =SeekOgg;
|
cb.seek_func =SeekOgg;
|
||||||
cb.tell_func =(void *)TellOgg;
|
cb.tell_func =(void *)TellOgg;
|
||||||
|
|
|
@ -503,8 +503,8 @@ int MUSIC_InitMidi
|
||||||
)
|
)
|
||||||
|
|
||||||
{
|
{
|
||||||
UNUSED_PARAMETER(card);
|
UNREFERENCED_PARAMETER(card);
|
||||||
UNUSED_PARAMETER(Address);
|
UNREFERENCED_PARAMETER(Address);
|
||||||
Funcs->NoteOff = MPU_NoteOff;
|
Funcs->NoteOff = MPU_NoteOff;
|
||||||
Funcs->NoteOn = MPU_NoteOn;
|
Funcs->NoteOn = MPU_NoteOn;
|
||||||
Funcs->PolyAftertouch = MPU_PolyAftertouch;
|
Funcs->PolyAftertouch = MPU_PolyAftertouch;
|
||||||
|
@ -537,7 +537,7 @@ int MUSIC_FadeVolume
|
||||||
)
|
)
|
||||||
|
|
||||||
{
|
{
|
||||||
UNUSED_PARAMETER(milliseconds);
|
UNREFERENCED_PARAMETER(milliseconds);
|
||||||
MIDI_SetVolume(tovolume);
|
MIDI_SetVolume(tovolume);
|
||||||
return(MUSIC_Ok);
|
return(MUSIC_Ok);
|
||||||
}
|
}
|
||||||
|
@ -603,7 +603,7 @@ void MUSIC_RegisterTimbreBank
|
||||||
)
|
)
|
||||||
|
|
||||||
{
|
{
|
||||||
UNUSED_PARAMETER(timbres);
|
UNREFERENCED_PARAMETER(timbres);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
|
@ -4,6 +4,8 @@
|
||||||
|
|
||||||
#include "baselayer.h"
|
#include "baselayer.h"
|
||||||
#include "compat.h"
|
#include "compat.h"
|
||||||
|
#define AL_NO_PROTOTYPES
|
||||||
|
#define ALC_NO_PROTOTYPES
|
||||||
#include <AL/al.h>
|
#include <AL/al.h>
|
||||||
#include <AL/alc.h>
|
#include <AL/alc.h>
|
||||||
#include <vorbis/vorbisfile.h>
|
#include <vorbis/vorbisfile.h>
|
||||||
|
@ -34,36 +36,34 @@ sounddef1 music;
|
||||||
|
|
||||||
#ifdef _WIN32
|
#ifdef _WIN32
|
||||||
// Windows
|
// Windows
|
||||||
static HANDLE hALDLL = NULL;
|
static HMODULE hALDLL = NULL;
|
||||||
#else
|
#else
|
||||||
#include <dlfcn.h>
|
#include <dlfcn.h>
|
||||||
static void *alhandle = NULL;
|
static void *alhandle = NULL;
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
static char *aldriver = NULL;
|
static char *aldriver = NULL;
|
||||||
|
static LPALGETSOURCEI balGetSourcei = NULL;
|
||||||
static void (AL_APIENTRY * balGetSourcei)(ALuint sid, ALenum param, ALint* value);
|
static LPALSOURCEF balSourcef = NULL;
|
||||||
static void (AL_APIENTRY * balSourcef)(ALuint sid, ALenum param, ALfloat value);
|
static LPALSOURCEPLAY balSourcePlay = NULL;
|
||||||
static void (AL_APIENTRY * balSourcePlay)(ALuint sid);
|
static LPALSOURCEPAUSE balSourcePause = NULL;
|
||||||
static void (AL_APIENTRY * balSourcePause)(ALuint sid);
|
static LPALCGETERROR balcGetError = NULL;
|
||||||
static ALCenum(ALC_APIENTRY * balcGetError)(ALCdevice *device);
|
static LPALGETERROR balGetError = NULL;
|
||||||
static ALenum(AL_APIENTRY * balGetError)(void);
|
static LPALBUFFERDATA balBufferData = NULL;
|
||||||
static void (AL_APIENTRY * balBufferData)(ALuint bid, ALenum format, const ALvoid* data, ALsizei size, ALsizei freq);
|
static LPALGENBUFFERS balGenBuffers = NULL;
|
||||||
static void (AL_APIENTRY * balGenBuffers)(ALsizei n, ALuint* buffers);
|
static LPALGENSOURCES balGenSources = NULL;
|
||||||
static void (AL_APIENTRY * balGenSources)(ALsizei n, ALuint* sources);
|
static LPALSOURCEI balSourcei = NULL;
|
||||||
static void (AL_APIENTRY * balSourcei)(ALuint sid, ALenum param, ALint value);
|
static LPALSOURCEQUEUEBUFFERS balSourceQueueBuffers = NULL;
|
||||||
static void (AL_APIENTRY * balSourceQueueBuffers)(ALuint sid, ALsizei numEntries, const ALuint *bids);
|
static LPALSOURCESTOP balSourceStop = NULL;
|
||||||
static void (AL_APIENTRY * balSourceStop)(ALuint sid);
|
static LPALSOURCEUNQUEUEBUFFERS balSourceUnqueueBuffers = NULL;
|
||||||
static void (AL_APIENTRY * balSourceUnqueueBuffers)(ALuint sid, ALsizei numEntries, ALuint *bids);
|
static LPALCMAKECONTEXTCURRENT balcMakeContextCurrent = NULL;
|
||||||
static void (AL_APIENTRY * bbalDeleteSources)(ALsizei n, const ALuint* sources);
|
static LPALDELETESOURCES balDeleteSources = NULL;
|
||||||
static ALCboolean(ALC_APIENTRY * balcMakeContextCurrent)(ALCcontext *context);
|
static LPALDELETEBUFFERS balDeleteBuffers = NULL;
|
||||||
static void (AL_APIENTRY * balDeleteSources)(ALsizei n, const ALuint* sources);
|
static LPALCDESTROYCONTEXT balcDestroyContext = NULL;
|
||||||
static void (AL_APIENTRY * balDeleteBuffers)(ALsizei n, const ALuint* buffers);
|
static LPALCCLOSEDEVICE balcCloseDevice = NULL;
|
||||||
static void (ALC_APIENTRY * balcDestroyContext)(ALCcontext *context);
|
static LPALCOPENDEVICE balcOpenDevice = NULL;
|
||||||
static ALCboolean(ALC_APIENTRY * balcCloseDevice)(ALCdevice *device);
|
static LPALCCREATECONTEXT balcCreateContext = NULL;
|
||||||
static ALCdevice *(ALC_APIENTRY * balcOpenDevice)(const ALCchar *devicename);
|
static LPALGETSTRING balGetString = NULL;
|
||||||
static ALCcontext *(ALC_APIENTRY * balcCreateContext)(ALCdevice *device, const ALCint* attrlist);
|
|
||||||
static const ALchar*(AL_APIENTRY * balGetString)(ALenum param);
|
|
||||||
|
|
||||||
static void * algetproc_(const char *s, int *err, int fatal)
|
static void * algetproc_(const char *s, int *err, int fatal)
|
||||||
{
|
{
|
||||||
|
@ -116,7 +116,7 @@ static int unloadaldriver(void)
|
||||||
balSourceQueueBuffers = NULL;
|
balSourceQueueBuffers = NULL;
|
||||||
balSourceStop = NULL;
|
balSourceStop = NULL;
|
||||||
balSourceUnqueueBuffers = NULL;
|
balSourceUnqueueBuffers = NULL;
|
||||||
bbalDeleteSources = NULL;
|
balDeleteSources = NULL;
|
||||||
balcMakeContextCurrent = NULL;
|
balcMakeContextCurrent = NULL;
|
||||||
balDeleteSources = NULL;
|
balDeleteSources = NULL;
|
||||||
balDeleteBuffers = NULL;
|
balDeleteBuffers = NULL;
|
||||||
|
@ -399,7 +399,8 @@ void AL_Stop()
|
||||||
{
|
{
|
||||||
int queued=0;ALuint buffer;
|
int queued=0;ALuint buffer;
|
||||||
|
|
||||||
if (!music.def.size)return;
|
if (!music.def.size)
|
||||||
|
return;
|
||||||
|
|
||||||
balSourceStop(music.source);
|
balSourceStop(music.source);
|
||||||
balGetSourcei(music.source,AL_BUFFERS_QUEUED,&queued);
|
balGetSourcei(music.source,AL_BUFFERS_QUEUED,&queued);
|
||||||
|
@ -413,16 +414,18 @@ void AL_Stop()
|
||||||
balDeleteSources(1,&music.source);check(1);
|
balDeleteSources(1,&music.source);check(1);
|
||||||
balDeleteBuffers(2, music.buffers);check(1);
|
balDeleteBuffers(2, music.buffers);check(1);
|
||||||
|
|
||||||
if (music.type==1)ov_clear(&music.def.oggStream);
|
if (music.type == 1)
|
||||||
Bmemset(&music,0,sizeof(sounddef1));
|
ov_clear(&music.def.oggStream);
|
||||||
|
Bmemset(&music,0,sizeof(music));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
static char pcm[BUFFER_SIZE];
|
||||||
|
|
||||||
int stream(ALuint buffer)
|
int stream(ALuint buffer)
|
||||||
{
|
{
|
||||||
ALsizei size=0;
|
ALsizei size=0;
|
||||||
int section,result;
|
int section,result;
|
||||||
static char pcm[BUFFER_SIZE];
|
|
||||||
|
|
||||||
while (size<BUFFER_SIZE)
|
while (size<BUFFER_SIZE)
|
||||||
{
|
{
|
||||||
result=ov_read(&music.def.oggStream,pcm+size,BUFFER_SIZE-size,0,2,1,§ion);
|
result=ov_read(&music.def.oggStream,pcm+size,BUFFER_SIZE-size,0,2,1,§ion);
|
||||||
|
|
|
@ -1,23 +1,23 @@
|
||||||
#ifndef __OPENAL_H
|
#ifndef __OPENAL_H
|
||||||
#define __OPENAL_H
|
#define __OPENAL_H
|
||||||
|
|
||||||
#include <vorbis/vorbisfile.h>
|
#include <vorbis/vorbisfile.h>
|
||||||
|
|
||||||
int AL_Init();
|
int AL_Init();
|
||||||
void AL_Shutdown();
|
void AL_Shutdown();
|
||||||
void AL_Update();
|
void AL_Update();
|
||||||
char *AL_ErrorString(int code);
|
char *AL_ErrorString(int code);
|
||||||
char *ALC_ErrorString(int code);
|
char *ALC_ErrorString(int code);
|
||||||
|
|
||||||
void AL_Stop();
|
void AL_Stop();
|
||||||
int AL_isntALmusic();
|
int AL_isntALmusic();
|
||||||
void AL_PlaySong(char *song,int loopflag);
|
void AL_PlaySong(char *song,int loopflag);
|
||||||
void AL_Pause();
|
void AL_Pause();
|
||||||
void AL_Continue();
|
void AL_Continue();
|
||||||
void AL_SetMusicVolume(int volume);
|
void AL_SetMusicVolume(int volume);
|
||||||
|
|
||||||
int openal_disabled;
|
int openal_disabled;
|
||||||
|
|
||||||
typedef struct sounddef
|
typedef struct sounddef
|
||||||
{
|
{
|
||||||
unsigned pos;
|
unsigned pos;
|
||||||
|
@ -25,4 +25,4 @@ typedef struct sounddef
|
||||||
unsigned size;
|
unsigned size;
|
||||||
OggVorbis_File oggStream;
|
OggVorbis_File oggStream;
|
||||||
} sounddef;
|
} sounddef;
|
||||||
#endif
|
#endif
|
||||||
|
|
|
@ -356,44 +356,44 @@ int MUSIC_GetContext(void)
|
||||||
|
|
||||||
void MUSIC_SetSongTick(unsigned int PositionInTicks)
|
void MUSIC_SetSongTick(unsigned int PositionInTicks)
|
||||||
{
|
{
|
||||||
UNUSED_PARAMETER(PositionInTicks);
|
UNREFERENCED_PARAMETER(PositionInTicks);
|
||||||
musdebug("STUB ... MUSIC_SetSongTick().\n");
|
musdebug("STUB ... MUSIC_SetSongTick().\n");
|
||||||
} // MUSIC_SetSongTick
|
} // MUSIC_SetSongTick
|
||||||
|
|
||||||
|
|
||||||
void MUSIC_SetSongTime(unsigned int milliseconds)
|
void MUSIC_SetSongTime(unsigned int milliseconds)
|
||||||
{
|
{
|
||||||
UNUSED_PARAMETER(milliseconds);
|
UNREFERENCED_PARAMETER(milliseconds);
|
||||||
musdebug("STUB ... MUSIC_SetSongTime().\n");
|
musdebug("STUB ... MUSIC_SetSongTime().\n");
|
||||||
}// MUSIC_SetSongTime
|
}// MUSIC_SetSongTime
|
||||||
|
|
||||||
|
|
||||||
void MUSIC_SetSongPosition(int measure, int beat, int tick)
|
void MUSIC_SetSongPosition(int measure, int beat, int tick)
|
||||||
{
|
{
|
||||||
UNUSED_PARAMETER(measure);
|
UNREFERENCED_PARAMETER(measure);
|
||||||
UNUSED_PARAMETER(beat);
|
UNREFERENCED_PARAMETER(beat);
|
||||||
UNUSED_PARAMETER(tick);
|
UNREFERENCED_PARAMETER(tick);
|
||||||
musdebug("STUB ... MUSIC_SetSongPosition().\n");
|
musdebug("STUB ... MUSIC_SetSongPosition().\n");
|
||||||
} // MUSIC_SetSongPosition
|
} // MUSIC_SetSongPosition
|
||||||
|
|
||||||
|
|
||||||
void MUSIC_GetSongPosition(songposition *pos)
|
void MUSIC_GetSongPosition(songposition *pos)
|
||||||
{
|
{
|
||||||
UNUSED_PARAMETER(pos);
|
UNREFERENCED_PARAMETER(pos);
|
||||||
musdebug("STUB ... MUSIC_GetSongPosition().\n");
|
musdebug("STUB ... MUSIC_GetSongPosition().\n");
|
||||||
} // MUSIC_GetSongPosition
|
} // MUSIC_GetSongPosition
|
||||||
|
|
||||||
|
|
||||||
void MUSIC_GetSongLength(songposition *pos)
|
void MUSIC_GetSongLength(songposition *pos)
|
||||||
{
|
{
|
||||||
UNUSED_PARAMETER(pos);
|
UNREFERENCED_PARAMETER(pos);
|
||||||
musdebug("STUB ... MUSIC_GetSongLength().\n");
|
musdebug("STUB ... MUSIC_GetSongLength().\n");
|
||||||
} // MUSIC_GetSongLength
|
} // MUSIC_GetSongLength
|
||||||
|
|
||||||
|
|
||||||
int MUSIC_FadeVolume(int tovolume, int milliseconds)
|
int MUSIC_FadeVolume(int tovolume, int milliseconds)
|
||||||
{
|
{
|
||||||
UNUSED_PARAMETER(tovolume);
|
UNREFERENCED_PARAMETER(tovolume);
|
||||||
Mix_FadeOutMusic(milliseconds);
|
Mix_FadeOutMusic(milliseconds);
|
||||||
return(MUSIC_Ok);
|
return(MUSIC_Ok);
|
||||||
} // MUSIC_FadeVolume
|
} // MUSIC_FadeVolume
|
||||||
|
@ -413,15 +413,15 @@ void MUSIC_StopFade(void)
|
||||||
|
|
||||||
void MUSIC_RerouteMidiChannel(int channel, int cdecl(*function)(int event, int c1, int c2))
|
void MUSIC_RerouteMidiChannel(int channel, int cdecl(*function)(int event, int c1, int c2))
|
||||||
{
|
{
|
||||||
UNUSED_PARAMETER(channel);
|
UNREFERENCED_PARAMETER(channel);
|
||||||
UNUSED_PARAMETER(function);
|
UNREFERENCED_PARAMETER(function);
|
||||||
musdebug("STUB ... MUSIC_RerouteMidiChannel().\n");
|
musdebug("STUB ... MUSIC_RerouteMidiChannel().\n");
|
||||||
} // MUSIC_RerouteMidiChannel
|
} // MUSIC_RerouteMidiChannel
|
||||||
|
|
||||||
|
|
||||||
void MUSIC_RegisterTimbreBank(unsigned char *timbres)
|
void MUSIC_RegisterTimbreBank(unsigned char *timbres)
|
||||||
{
|
{
|
||||||
UNUSED_PARAMETER(timbres);
|
UNREFERENCED_PARAMETER(timbres);
|
||||||
musdebug("STUB ... MUSIC_RegisterTimbreBank().\n");
|
musdebug("STUB ... MUSIC_RegisterTimbreBank().\n");
|
||||||
} // MUSIC_RegisterTimbreBank
|
} // MUSIC_RegisterTimbreBank
|
||||||
|
|
||||||
|
|
|
@ -110,13 +110,13 @@ void CONTROL_GetJoyDelta( void )
|
||||||
|
|
||||||
boolean CONTROL_StartJoy(int32 joy)
|
boolean CONTROL_StartJoy(int32 joy)
|
||||||
{
|
{
|
||||||
UNUSED_PARAMETER(joy);
|
UNREFERENCED_PARAMETER(joy);
|
||||||
return (inputdevices & 4) == 4;
|
return (inputdevices & 4) == 4;
|
||||||
}
|
}
|
||||||
|
|
||||||
void CONTROL_ShutJoy(int32 joy)
|
void CONTROL_ShutJoy(int32 joy)
|
||||||
{
|
{
|
||||||
UNUSED_PARAMETER(joy);
|
UNREFERENCED_PARAMETER(joy);
|
||||||
CONTROL_JoyPresent = false;
|
CONTROL_JoyPresent = false;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -820,7 +820,7 @@ boolean CONTROL_Startup(controltype which, int32 ( *TimeFunction )( void ), int3
|
||||||
{
|
{
|
||||||
int32 i;
|
int32 i;
|
||||||
|
|
||||||
UNUSED_PARAMETER(which);
|
UNREFERENCED_PARAMETER(which);
|
||||||
|
|
||||||
if (CONTROL_Started) return false;
|
if (CONTROL_Started) return false;
|
||||||
|
|
||||||
|
|
|
@ -838,7 +838,7 @@ void SCRIPT_PutNumber
|
||||||
{
|
{
|
||||||
char raw[64];
|
char raw[64];
|
||||||
|
|
||||||
UNUSED_PARAMETER(defaultvalue);
|
UNREFERENCED_PARAMETER(defaultvalue);
|
||||||
if (hexadecimal) sprintf(raw, "0x%X", number);
|
if (hexadecimal) sprintf(raw, "0x%X", number);
|
||||||
else sprintf(raw, "%d", number);
|
else sprintf(raw, "%d", number);
|
||||||
|
|
||||||
|
@ -871,7 +871,7 @@ void SCRIPT_PutDouble
|
||||||
{
|
{
|
||||||
char raw[64];
|
char raw[64];
|
||||||
|
|
||||||
UNUSED_PARAMETER(defaultvalue);
|
UNREFERENCED_PARAMETER(defaultvalue);
|
||||||
sprintf(raw, "%g", number);
|
sprintf(raw, "%g", number);
|
||||||
|
|
||||||
SCRIPT_AddEntry(scripthandle, sectionname, entryname, raw);
|
SCRIPT_AddEntry(scripthandle, sectionname, entryname, raw);
|
||||||
|
|
|
@ -35,7 +35,7 @@ struct osdcmd_cheatsinfo osdcmd_cheatsinfo_stat;
|
||||||
|
|
||||||
static inline int osdcmd_quit(const osdfuncparm_t *parm)
|
static inline int osdcmd_quit(const osdfuncparm_t *parm)
|
||||||
{
|
{
|
||||||
UNUSED_PARAMETER(parm);
|
UNREFERENCED_PARAMETER(parm);
|
||||||
sendquit();
|
sendquit();
|
||||||
return OSDCMD_OK;
|
return OSDCMD_OK;
|
||||||
}
|
}
|
||||||
|
@ -262,7 +262,7 @@ static int osdcmd_map(const osdfuncparm_t *parm)
|
||||||
|
|
||||||
static int osdcmd_god(const osdfuncparm_t *parm)
|
static int osdcmd_god(const osdfuncparm_t *parm)
|
||||||
{
|
{
|
||||||
UNUSED_PARAMETER(parm);
|
UNREFERENCED_PARAMETER(parm);
|
||||||
if (numplayers == 1 && g_player[myconnectindex].ps->gm & MODE_GAME)
|
if (numplayers == 1 && g_player[myconnectindex].ps->gm & MODE_GAME)
|
||||||
{
|
{
|
||||||
osdcmd_cheatsinfo_stat.cheatnum = 0;
|
osdcmd_cheatsinfo_stat.cheatnum = 0;
|
||||||
|
@ -277,7 +277,7 @@ static int osdcmd_god(const osdfuncparm_t *parm)
|
||||||
|
|
||||||
static int osdcmd_noclip(const osdfuncparm_t *parm)
|
static int osdcmd_noclip(const osdfuncparm_t *parm)
|
||||||
{
|
{
|
||||||
UNUSED_PARAMETER(parm);
|
UNREFERENCED_PARAMETER(parm);
|
||||||
if (numplayers == 1 && g_player[myconnectindex].ps->gm & MODE_GAME)
|
if (numplayers == 1 && g_player[myconnectindex].ps->gm & MODE_GAME)
|
||||||
{
|
{
|
||||||
osdcmd_cheatsinfo_stat.cheatnum = 20;
|
osdcmd_cheatsinfo_stat.cheatnum = 20;
|
||||||
|
@ -349,7 +349,7 @@ static int osdcmd_rate(const osdfuncparm_t *parm)
|
||||||
|
|
||||||
static int osdcmd_restartsound(const osdfuncparm_t *parm)
|
static int osdcmd_restartsound(const osdfuncparm_t *parm)
|
||||||
{
|
{
|
||||||
UNUSED_PARAMETER(parm);
|
UNREFERENCED_PARAMETER(parm);
|
||||||
SoundShutdown();
|
SoundShutdown();
|
||||||
MusicShutdown();
|
MusicShutdown();
|
||||||
|
|
||||||
|
@ -376,7 +376,7 @@ static int osdcmd_restartsound(const osdfuncparm_t *parm)
|
||||||
|
|
||||||
static int osdcmd_restartvid(const osdfuncparm_t *parm)
|
static int osdcmd_restartvid(const osdfuncparm_t *parm)
|
||||||
{
|
{
|
||||||
UNUSED_PARAMETER(parm);
|
UNREFERENCED_PARAMETER(parm);
|
||||||
resetvideomode();
|
resetvideomode();
|
||||||
if (setgamemode(ud.config.ScreenMode,ud.config.ScreenWidth,ud.config.ScreenHeight,ud.config.ScreenBPP))
|
if (setgamemode(ud.config.ScreenMode,ud.config.ScreenWidth,ud.config.ScreenHeight,ud.config.ScreenBPP))
|
||||||
gameexit("restartvid: Reset failed...\n");
|
gameexit("restartvid: Reset failed...\n");
|
||||||
|
|
|
@ -76,7 +76,7 @@ void GAME_clearbackground(int c, int r)
|
||||||
int x, y, xsiz, ysiz, tx2, ty2;
|
int x, y, xsiz, ysiz, tx2, ty2;
|
||||||
int daydim, bits;
|
int daydim, bits;
|
||||||
|
|
||||||
UNUSED_PARAMETER(c);
|
UNREFERENCED_PARAMETER(c);
|
||||||
|
|
||||||
if (getrendermode() < 3) bits = BITS;
|
if (getrendermode() < 3) bits = BITS;
|
||||||
else bits = BITSTL;
|
else bits = BITSTL;
|
||||||
|
|
|
@ -401,7 +401,7 @@ void cacheit(void)
|
||||||
if (ud.recstat == 2)
|
if (ud.recstat == 2)
|
||||||
return;
|
return;
|
||||||
|
|
||||||
// MUSIC_StopSong();
|
MUSIC_StopSong();
|
||||||
playmusicMAP(&env_music_fn[2][0],MAXVOLUMES*MAXLEVELS+2); // loadmus
|
playmusicMAP(&env_music_fn[2][0],MAXVOLUMES*MAXLEVELS+2); // loadmus
|
||||||
|
|
||||||
starttime = getticks();
|
starttime = getticks();
|
||||||
|
|
|
@ -504,7 +504,7 @@ int spritesound(unsigned int num, int i)
|
||||||
|
|
||||||
void stopspritesound(int num, int i)
|
void stopspritesound(int num, int i)
|
||||||
{
|
{
|
||||||
UNUSED_PARAMETER(i);
|
UNREFERENCED_PARAMETER(i);
|
||||||
stopsound(num);
|
stopsound(num);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -666,7 +666,7 @@ void clearsoundlocks(void)
|
||||||
|
|
||||||
int isspritemakingsound(int i, int num)
|
int isspritemakingsound(int i, int num)
|
||||||
{
|
{
|
||||||
UNUSED_PARAMETER(i);
|
UNREFERENCED_PARAMETER(i);
|
||||||
if (num < 0) num=0; // FIXME
|
if (num < 0) num=0; // FIXME
|
||||||
return (g_sounds[num].num > 0);
|
return (g_sounds[num].num > 0);
|
||||||
}
|
}
|
||||||
|
|
|
@ -167,7 +167,7 @@ static void on_vmode3dcombo_changed(GtkComboBox *combobox, gpointer user_data)
|
||||||
GtkTreeModel *data;
|
GtkTreeModel *data;
|
||||||
GtkTreeIter iter;
|
GtkTreeIter iter;
|
||||||
int val;
|
int val;
|
||||||
UNUSED_PARAMETER(user_data);
|
UNREFERENCED_PARAMETER(user_data);
|
||||||
if (!gtk_combo_box_get_active_iter(combobox, &iter)) return;
|
if (!gtk_combo_box_get_active_iter(combobox, &iter)) return;
|
||||||
if (!(data = gtk_combo_box_get_model(combobox))) return;
|
if (!(data = gtk_combo_box_get_model(combobox))) return;
|
||||||
gtk_tree_model_get(data, &iter, 1, &val, -1);
|
gtk_tree_model_get(data, &iter, 1, &val, -1);
|
||||||
|
@ -177,29 +177,29 @@ static void on_vmode3dcombo_changed(GtkComboBox *combobox, gpointer user_data)
|
||||||
|
|
||||||
static void on_fullscreencheck_toggled(GtkToggleButton *togglebutton, gpointer user_data)
|
static void on_fullscreencheck_toggled(GtkToggleButton *togglebutton, gpointer user_data)
|
||||||
{
|
{
|
||||||
UNUSED_PARAMETER(user_data);
|
UNREFERENCED_PARAMETER(user_data);
|
||||||
settings.fullscreen = (gtk_toggle_button_get_active(togglebutton) == TRUE);
|
settings.fullscreen = (gtk_toggle_button_get_active(togglebutton) == TRUE);
|
||||||
PopulateForm(1<<TAB_CONFIG);
|
PopulateForm(1<<TAB_CONFIG);
|
||||||
}
|
}
|
||||||
|
|
||||||
static void on_alwaysshowcheck_toggled(GtkToggleButton *togglebutton, gpointer user_data)
|
static void on_alwaysshowcheck_toggled(GtkToggleButton *togglebutton, gpointer user_data)
|
||||||
{
|
{
|
||||||
UNUSED_PARAMETER(user_data);
|
UNREFERENCED_PARAMETER(user_data);
|
||||||
settings.forcesetup = (gtk_toggle_button_get_active(togglebutton) == TRUE);
|
settings.forcesetup = (gtk_toggle_button_get_active(togglebutton) == TRUE);
|
||||||
}
|
}
|
||||||
|
|
||||||
static void on_cancelbutton_clicked(GtkButton *button, gpointer user_data)
|
static void on_cancelbutton_clicked(GtkButton *button, gpointer user_data)
|
||||||
{
|
{
|
||||||
UNUSED_PARAMETER(button);
|
UNREFERENCED_PARAMETER(button);
|
||||||
UNUSED_PARAMETER(user_data);
|
UNREFERENCED_PARAMETER(user_data);
|
||||||
if (mode == TAB_CONFIG) { retval = 0; gtk_main_quit(); }
|
if (mode == TAB_CONFIG) { retval = 0; gtk_main_quit(); }
|
||||||
else quitevent++;
|
else quitevent++;
|
||||||
}
|
}
|
||||||
|
|
||||||
static void on_startbutton_clicked(GtkButton *button, gpointer user_data)
|
static void on_startbutton_clicked(GtkButton *button, gpointer user_data)
|
||||||
{
|
{
|
||||||
UNUSED_PARAMETER(button);
|
UNREFERENCED_PARAMETER(button);
|
||||||
UNUSED_PARAMETER(user_data);
|
UNREFERENCED_PARAMETER(user_data);
|
||||||
retval = 1;
|
retval = 1;
|
||||||
gtk_main_quit();
|
gtk_main_quit();
|
||||||
}
|
}
|
||||||
|
@ -210,13 +210,13 @@ static void on_startbutton_clicked(GtkButton *button, gpointer user_data)
|
||||||
|
|
||||||
static void on_inputmousecheck_toggled(GtkToggleButton *togglebutton, gpointer user_data)
|
static void on_inputmousecheck_toggled(GtkToggleButton *togglebutton, gpointer user_data)
|
||||||
{
|
{
|
||||||
UNUSED_PARAMETER(user_data);
|
UNREFERENCED_PARAMETER(user_data);
|
||||||
settings.usemouse = (gtk_toggle_button_get_active(togglebutton) == TRUE);
|
settings.usemouse = (gtk_toggle_button_get_active(togglebutton) == TRUE);
|
||||||
}
|
}
|
||||||
|
|
||||||
static void on_inputjoycheck_toggled(GtkToggleButton *togglebutton, gpointer user_data)
|
static void on_inputjoycheck_toggled(GtkToggleButton *togglebutton, gpointer user_data)
|
||||||
{
|
{
|
||||||
UNUSED_PARAMETER(user_data);
|
UNREFERENCED_PARAMETER(user_data);
|
||||||
settings.usejoy = (gtk_toggle_button_get_active(togglebutton) == TRUE);
|
settings.usejoy = (gtk_toggle_button_get_active(togglebutton) == TRUE);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -225,7 +225,7 @@ static void on_gamelist_selection_changed(GtkTreeSelection *selection, gpointer
|
||||||
GtkTreeIter iter;
|
GtkTreeIter iter;
|
||||||
GtkTreeModel *model;
|
GtkTreeModel *model;
|
||||||
struct grpfile *fg;
|
struct grpfile *fg;
|
||||||
UNUSED_PARAMETER(user_data);
|
UNREFERENCED_PARAMETER(user_data);
|
||||||
if (gtk_tree_selection_get_selected(selection, &model, &iter))
|
if (gtk_tree_selection_get_selected(selection, &model, &iter))
|
||||||
{
|
{
|
||||||
gtk_tree_model_get(model, &iter, 2, (gpointer)&fg, -1);
|
gtk_tree_model_get(model, &iter, 2, (gpointer)&fg, -1);
|
||||||
|
@ -236,9 +236,9 @@ static void on_gamelist_selection_changed(GtkTreeSelection *selection, gpointer
|
||||||
|
|
||||||
static gboolean on_startwin_delete_event(GtkWidget *widget, GdkEvent *event, gpointer user_data)
|
static gboolean on_startwin_delete_event(GtkWidget *widget, GdkEvent *event, gpointer user_data)
|
||||||
{
|
{
|
||||||
UNUSED_PARAMETER(widget);
|
UNREFERENCED_PARAMETER(widget);
|
||||||
UNUSED_PARAMETER(event);
|
UNREFERENCED_PARAMETER(event);
|
||||||
UNUSED_PARAMETER(user_data);
|
UNREFERENCED_PARAMETER(user_data);
|
||||||
if (mode == TAB_CONFIG) { retval = 0; gtk_main_quit(); }
|
if (mode == TAB_CONFIG) { retval = 0; gtk_main_quit(); }
|
||||||
else quitevent++;
|
else quitevent++;
|
||||||
return TRUE; // FALSE would let the event go through. we want the game to decide when to close
|
return TRUE; // FALSE would let the event go through. we want the game to decide when to close
|
||||||
|
@ -249,7 +249,7 @@ static gint name_sorter(GtkTreeModel *model, GtkTreeIter *a, GtkTreeIter *b, gpo
|
||||||
{
|
{
|
||||||
gchar *as, *bs;
|
gchar *as, *bs;
|
||||||
gint r;
|
gint r;
|
||||||
UNUSED_PARAMETER(user_data);
|
UNREFERENCED_PARAMETER(user_data);
|
||||||
gtk_tree_model_get(model, a, 0, &as, -1);
|
gtk_tree_model_get(model, a, 0, &as, -1);
|
||||||
gtk_tree_model_get(model, b, 0, &bs, -1);
|
gtk_tree_model_get(model, b, 0, &bs, -1);
|
||||||
|
|
||||||
|
@ -741,7 +741,7 @@ int startwin_settitle(const char *title)
|
||||||
|
|
||||||
int startwin_idle(void *s)
|
int startwin_idle(void *s)
|
||||||
{
|
{
|
||||||
UNUSED_PARAMETER(s);
|
UNREFERENCED_PARAMETER(s);
|
||||||
if (!gtkenabled) return 0;
|
if (!gtkenabled) return 0;
|
||||||
//if (!startwin) return 1;
|
//if (!startwin) return 1;
|
||||||
gtk_main_iteration_do(FALSE);
|
gtk_main_iteration_do(FALSE);
|
||||||
|
|
|
@ -195,7 +195,7 @@ static INT_PTR CALLBACK ConfigPageProc(HWND hwndDlg, UINT uMsg, WPARAM wParam, L
|
||||||
|
|
||||||
static INT_PTR CALLBACK GamePageProc(HWND hwndDlg, UINT uMsg, WPARAM wParam, LPARAM lParam)
|
static INT_PTR CALLBACK GamePageProc(HWND hwndDlg, UINT uMsg, WPARAM wParam, LPARAM lParam)
|
||||||
{
|
{
|
||||||
UNUSED_PARAMETER(hwndDlg);
|
UNREFERENCED_PARAMETER(hwndDlg);
|
||||||
switch (uMsg)
|
switch (uMsg)
|
||||||
{
|
{
|
||||||
case WM_COMMAND:
|
case WM_COMMAND:
|
||||||
|
|
|
@ -6,7 +6,6 @@
|
||||||
#include <stdio.h>
|
#include <stdio.h>
|
||||||
|
|
||||||
#define ISWS(x) ((x == ' ') || (x == '\t') || (x == '\r') || (x == '\n'))
|
#define ISWS(x) ((x == ' ') || (x == '\t') || (x == '\r') || (x == '\n'))
|
||||||
#define UNUSED_PARAMETER(x) x=x
|
|
||||||
|
|
||||||
int WINAPI WinMain(HINSTANCE hInstance, HINSTANCE hPrevInst, LPSTR lpCmdLine, int nCmdShow)
|
int WINAPI WinMain(HINSTANCE hInstance, HINSTANCE hPrevInst, LPSTR lpCmdLine, int nCmdShow)
|
||||||
{
|
{
|
||||||
|
@ -18,9 +17,9 @@ int WINAPI WinMain(HINSTANCE hInstance, HINSTANCE hPrevInst, LPSTR lpCmdLine, in
|
||||||
STARTUPINFO si;
|
STARTUPINFO si;
|
||||||
PROCESS_INFORMATION pi;
|
PROCESS_INFORMATION pi;
|
||||||
|
|
||||||
UNUSED_PARAMETER(hInstance);
|
UNREFERENCED_PARAMETER(hInstance);
|
||||||
UNUSED_PARAMETER(hPrevInst);
|
UNREFERENCED_PARAMETER(hPrevInst);
|
||||||
UNUSED_PARAMETER(nCmdShow);
|
UNREFERENCED_PARAMETER(nCmdShow);
|
||||||
|
|
||||||
strcpy(sCmdLine,lpCmdLine);
|
strcpy(sCmdLine,lpCmdLine);
|
||||||
szFileName[0] = '\0';
|
szFileName[0] = '\0';
|
||||||
|
|
Loading…
Reference in a new issue