diff --git a/polymer/build/Makefile b/polymer/build/Makefile index 7e1802903..8632acee7 100644 --- a/polymer/build/Makefile +++ b/polymer/build/Makefile @@ -57,7 +57,7 @@ AS=nasm RC=windres AR=ar 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 \ -DKSFORBUILD -I$(INC) OURCXXFLAGS=-fno-exceptions -fno-rtti diff --git a/polymer/build/include/compat.h b/polymer/build/include/compat.h index 250d34d96..b52c1c43d 100644 --- a/polymer/build/include/compat.h +++ b/polymer/build/include/compat.h @@ -5,6 +5,10 @@ #ifndef __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 // abstractions to the size of a pointer on a given platform // (ie, they're guaranteed to be the same size as a pointer) @@ -453,8 +457,6 @@ char *Bstrlwr(char *); char *Bstrupr(char *); #endif -#define UNUSED_PARAMETER(x) x=x - #ifdef __cplusplus } #endif diff --git a/polymer/build/src/baselayer.c b/polymer/build/src/baselayer.c index 102727946..362ba9f14 100644 --- a/polymer/build/src/baselayer.c +++ b/polymer/build/src/baselayer.c @@ -34,7 +34,7 @@ struct glinfo glinfo = }; #endif -static void onvideomodechange(int newmode) { } +static void onvideomodechange(int newmode) { UNREFERENCED_PARAMETER(newmode); } void (*baselayer_onvideomodechange)(int) = onvideomodechange; static int osdfunc_setrendermode(const osdfuncparm_t *parm) @@ -84,6 +84,8 @@ int osdcmd_glinfo(const osdfuncparm_t *parm) { char *s,*t,*u,i; + UNREFERENCED_PARAMETER(parm); + if (bpp == 8) { initprintf("glinfo: Not in OpenGL mode.\n"); diff --git a/polymer/build/src/cache1d.c b/polymer/build/src/cache1d.c index bdb582dbc..d15f9aa31 100644 --- a/polymer/build/src/cache1d.c +++ b/polymer/build/src/cache1d.c @@ -270,7 +270,6 @@ int addsearchpath(const char *p) struct stat st; char *s; searchpath_t *srch; - int i; if (Bstat(p, &st) < 0) { @@ -450,7 +449,6 @@ int initgroupfile(char *filename) int i, j, k; #ifdef WITHKPLIB char *zfn; - searchpath_t *sp = NULL; #endif #ifdef _WIN32 @@ -765,9 +763,7 @@ int kfilelength(int handle) int ktell(int handle) { - int i, groupnum; - - groupnum = filegrp[handle]; + int groupnum = filegrp[handle]; if (groupnum == 255) return(Blseek(filehan[handle],0,BSEEK_CUR)); #ifdef WITHKPLIB @@ -980,7 +976,7 @@ CACHE1D_FIND_REC *klistpath(const char *_path, const char *mask, int type) if (!pathsearchmode) // next, zip files { - char buf[BMAX_PATH], *p; + char buf[BMAX_PATH]; int i, j, ftype; strcpy(buf,path); if (*path) strcat(buf,"/"); diff --git a/polymer/build/src/compat.c b/polymer/build/src/compat.c index 989819124..a5345bae5 100644 --- a/polymer/build/src/compat.c +++ b/polymer/build/src/compat.c @@ -369,6 +369,7 @@ char *Bgethomedir(void) char *Bgetsupportdir(int global) { #ifndef __APPLE__ + UNREFERENCED_PARAMETER(global); return Bgethomedir(); #else FSRef ref; @@ -490,7 +491,7 @@ int Bcanonicalisefilename(char *filename, int removefn) #ifdef _WIN32 fnp += 2; // skip the drive #endif - + UNREFERENCED_PARAMETER(removefn); // change the call below to use removefn instead of 1? return Bcorrectfilename(fnp,1); } diff --git a/polymer/build/src/defs.c b/polymer/build/src/defs.c index c94756c65..27e9b28ef 100644 --- a/polymer/build/src/defs.c +++ b/polymer/build/src/defs.c @@ -364,7 +364,7 @@ static int defsparser(scriptfile *script) break; case T_DEFINESKYBOX: { - int tile,pal,i,j,ii; + int tile,pal,i,ii; char *fn[6],happy=1,*tfn = NULL; if (scriptfile_getsymbol(script,&tile)) break; @@ -690,7 +690,7 @@ static int defsparser(scriptfile *script) break; case T_DEFINEMODELSKIN: { - int palnum, palnumer; + int palnum; char *skinfn; 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 *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; while (script->textptr < modelend) diff --git a/polymer/build/src/engine.c b/polymer/build/src/engine.c index dbaa54f10..f61193df1 100644 --- a/polymer/build/src/engine.c +++ b/polymer/build/src/engine.c @@ -653,7 +653,7 @@ static permfifotype permfifo[MAXPERMS]; static int permhead = 0, permtail = 0; short numscans, numhits, numbunches; -static short posfil, capturecount = 0, hitcnt; +static short capturecount = 0; char vgapal16[4*256] = { @@ -1076,6 +1076,7 @@ static int spritewallfront(spritetype *s, int w) // // spritebehindwall(internal) // +#if 0 static int spriteobstructswall(spritetype *s, int w) { walltype *wal; @@ -1123,7 +1124,7 @@ static int spriteobstructswall(spritetype *s, int w) else return (0); } - +#endif // // bunchfront (internal) // @@ -1276,6 +1277,8 @@ int animateoffs(short tilenum, short fakevar) { int i, k, offs; + UNREFERENCED_PARAMETER(fakevar); + offs = 0; i = (totalclocklock>>((picanm[tilenum]>>24)&15)); 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; short *topptr, *botptr; + UNREFERENCED_PARAMETER(dax1); + UNREFERENCED_PARAMETER(dax2); + sectnum = thesector[bunchfirst[bunch]]; sec = §or[sectnum]; 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 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 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; //============================================================================= //POLYMOST BEGINS @@ -5081,7 +5087,7 @@ static void initksqrt(void) // static void dosetaspect(void) { - int i, j, k, x, xinc,a; + int i, j, k, x, xinc; if (xyaspect != oxyaspect) { @@ -5213,7 +5219,7 @@ static void initfastcolorlookup(int rscale, int gscale, int bscale) // static void loadpalette(void) { - int fil,i; + int fil; if (paletteloaded != 0) return; if ((fil = kopen4load("palette.dat",0)) == -1) return; @@ -6084,7 +6090,7 @@ void drawpeel(int peel) // 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 _equation maskeq, p1eq, p2eq; _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) { sectortype *sec, *sec2; - walltype *wal, *wal2; - spritetype *spr; + walltype *wal; int i, j, k, t, dx, dy, dax, day, daz, daz2, bad, dir; int dasprclipmask, dawalclipmask; 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; + UNREFERENCED_PARAMETER(daz); + UNREFERENCED_PARAMETER(dahoriz); + UNREFERENCED_PARAMETER(dasector); + x = wall[dawall].x; dx = wall[wall[dawall].point2].x-x; y = wall[dawall].y; dy = wall[wall[dawall].point2].y-y; 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; + UNREFERENCED_PARAMETER(ange); + if (gride > 0) { begindrawing(); //{{{ @@ -10935,8 +10946,8 @@ char spritecol2d[MAXTILES][2]; void draw2dscreen(int posxe, int posye, short ange, int zoome, short gride) { walltype *wal; - int i, j, k, xp1, yp1, xp2, yp2, tempy, tempint; - char col, mask; + int i, j, xp1, yp1, xp2, yp2, tempint; + char col; 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) { char ths, last; - int srcIndex, i; + int srcIndex; unsigned char runCount; runCount = 1; @@ -11638,7 +11649,7 @@ int screencapture_pcx(char *filename, char inverseit) int i,j,bpl; char *ptr, head[128]; //char palette[4*256]; - char *fn = Bstrdup(filename), *inversebuf, c; + char *fn = Bstrdup(filename), *inversebuf; BFILE *fil; do // JBF 2004022: So we don't overwrite existing screenshots @@ -11783,8 +11794,6 @@ int screencapture(char *filename, char inverseit) int setrendermode(int renderer) { #ifdef POLYMOST - int method; - if (bpp == 8) { if (renderer < 0) renderer = 0; diff --git a/polymer/build/src/glbuild.c b/polymer/build/src/glbuild.c index 729cd4d82..f3444140d 100644 --- a/polymer/build/src/glbuild.c +++ b/polymer/build/src/glbuild.c @@ -210,7 +210,6 @@ static void * getproc_(const char *s, int *err, int fatal, int extension) int loadgldriver(const char *driver) { - void *t; int err=0; #ifdef RENDERTYPEWIN @@ -580,7 +579,6 @@ static void * glugetproc_(const char *s, int *err, int fatal) int loadglulibrary(const char *driver) { - void *t; int err=0; #ifdef RENDERTYPEWIN diff --git a/polymer/build/src/kplib.c b/polymer/build/src/kplib.c index 1363aaa90..d99e9f189 100644 --- a/polymer/build/src/kplib.c +++ b/polymer/build/src/kplib.c @@ -985,6 +985,8 @@ static int kpngrend(const char *kfilebuf, int kfilength, int slidew, slider; //int qhuf0v, qhuf1v; + UNREFERENCED_PARAMETER(kfilength); + if (!pnginited) { pnginited = 1; initpngtables(); } 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 lcomphvsamp0, lcomphsampshift0, lcompvsampshift0; 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) @@ -1536,8 +1538,8 @@ static int kpegrend(const char *kfilebuf, int kfilength, int daframeplace, int dabytesperline, int daxres, int dayres, int daglobxoffs, int daglobyoffs) { - int i, j, p, 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 i, j, v, leng, xdim = 0, ydim = 0, index, prec, restartcnt, restartinterval; + 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 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; @@ -1955,6 +1957,8 @@ static int kgifrend(const char *kfilebuf, int kfilelength, char numbits, startnumbits, chunkind, ilacefirst; const unsigned char *ptr, *cptr = 0; + UNREFERENCED_PARAMETER(kfilelength); + coltype = 3; bitdepth = 8; //For PNGOUT 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; const char *cptr; + UNREFERENCED_PARAMETER(fleng); + UNREFERENCED_PARAMETER(daglobxoffs); + UNREFERENCED_PARAMETER(daglobyoffs); + if ((buf[0] != 0x19) || (buf[1] != 0x91) || (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; const char *cptr; + UNREFERENCED_PARAMETER(fleng); + headsiz = *(int *)&buf[14]; 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 char *uptr, *wptr; + UNREFERENCED_PARAMETER(leng); + xsiz = LSWAPIB(*(int *)&buf[16]); ysiz = LSWAPIB(*(int *)&buf[12]); if ((*(int *)&buf[80])&LSWAPIB(64)) //Uncompressed supports only A8R8G8B8 for now diff --git a/polymer/build/src/mdsprite.c b/polymer/build/src/mdsprite.c index 512178dc7..51fcf477b 100644 --- a/polymer/build/src/mdsprite.c +++ b/polymer/build/src/mdsprite.c @@ -200,6 +200,7 @@ static tile2model_t tile2model[MAXTILES+EXTRATILES]; int addtileP(int model,int tile,int pallet) { + UNREFERENCED_PARAMETER(model); if (curextra==MAXTILES+EXTRATILES-2)return curextra; if (tile2model[tile].modelid==-1){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) { - void *vm; md2model *m; int i; @@ -788,6 +788,8 @@ static int mdloadskin_cached(int fil, texcacheheader *head, int *doalloc, GLuint void *midbuf = NULL; int alloclen=0; + UNREFERENCED_PARAMETER(pal); + if (*doalloc&1) { bglGenTextures(1,glpic); //# of textures (make OpenGL allocate structure) @@ -1172,8 +1174,6 @@ static void mdloadvbos(md3model *m) } //--------------------------------------- MD2 LIBRARY BEGINS --------------------------------------- -static int memoryusage = 0; - static md2model *md2load(int fil, const char *filnam) { md2model *m; @@ -1181,7 +1181,7 @@ static md2model *md2load(int fil, const char *filnam) md3surf_t *s; md2frame_t *f; md2head_t head; - char *buf, st[BMAX_PATH]; + char st[BMAX_PATH]; int i, j, k; 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 int partition(unsigned short *indexes, float *depths, int f, int l) { - int up,down,temp; + int up,down; float tempf; unsigned short tempus; float piv = depths[f]; @@ -1448,8 +1448,7 @@ void quicksort(unsigned short *indexes, float *depths, int first, int last) static md3model *md3load(int fil) { - char *buf, st[BMAX_PATH+2], bst[BMAX_PATH+2]; - int i, j, surfi, ofsurf, bsc, offs[4], leng[4]; + int i, surfi, ofsurf, offs[4], leng[4]; int maxtrispersurf; md3model *m; md3surf_t *s; @@ -1579,6 +1578,10 @@ static md3model *md3load(int fil) } #if 0 + { + char *buf, st[BMAX_PATH+2], bst[BMAX_PATH+2]; + int j, bsc; + strcpy(st,filnam); for (i=0,j=0;st[i];i++) if ((st[i] == '/') || (st[i] == '\\')) j = i+1; st[j] = '*'; st[j+1] = 0; @@ -1597,6 +1600,7 @@ static md3model *md3load(int fil) } } if (!mdloadskin(&m->texid,&m->usesalpha,bst)) ;//bad! + } #endif m->indexes = malloc(sizeof(unsigned short) * maxtrispersurf); @@ -1610,16 +1614,15 @@ static md3model *md3load(int fil) 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; - int i, j, k, l, surfi, *lptr; - float f, g, k0, k1, k2, k3, k4, k5, k6, k7, mat[16], mult; + int i, j, k, l, surfi; + float f, g, k0, k1, k2, k3, k4, k5, k6, k7, mat[16]; md3surf_t *s; - GLfloat pc[4],pc1[4]; + GLfloat pc[4]; int texunits = GL_TEXTURE0_ARB; mdskinmap_t *sk; //PLAG : sorting stuff - unsigned short tempus; void* vbotemp; point3d* vertexhandle = NULL; 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 +#if 0 static void setzrange0(int *lptr, int z0, int z1) { int z, ze; @@ -2255,7 +2259,7 @@ static void setzrange0(int *lptr, int z0, int z1) lptr[z] &=~(-1<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) { 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; 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 xx, yy, xi, d0, u0, v0, d1, u1, v1, xmodnice = 0, ymulnice = 0, dorot; char dacol = 0, *walptr, *palptr = NULL, *vidp, *vide; - GLfloat pc1[4]; #ifdef USE_OPENGL - pthtyp *pth, *detailpth, *glowpth, *palpth; + pthtyp *pth, *detailpth, *glowpth; int texunits = GL_TEXTURE0_ARB; #endif // backup of the n for possible redrawing of fullbright @@ -2827,7 +2827,7 @@ static void polymost_drawalls(int bunch) sectortype *sec, *nextsec; walltype *wal, *wal2, *nwal; 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 oguo, ogux, oguy; int i, x, y, z, cz, fz, wallnum, sectnum, nextsectnum; @@ -3935,7 +3935,7 @@ static void polymost_scansector(int sectnum) 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]; if (!rendmode) return; @@ -3961,7 +3961,6 @@ void polymost_drawrooms() //Enable this for OpenGL red-blue glasses mode :) if (glredbluemode) { - float m[4][4]; static int grbfcnt = 0; grbfcnt++; if (redblueclearcnt < numpages) { redblueclearcnt++; bglColorMask(1,1,1,1); bglClear(GL_COLOR_BUFFER_BIT); } if (grbfcnt&1) @@ -4180,9 +4179,9 @@ void polymost_drawrooms() void polymost_drawmaskwall(int damaskwallcnt) { 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 f, r, t, t0, t1, nx0, ny0, nx1, ny1, py[4], csy[4], fsy[4]; - int i, j, k, n, n2, x, z, sectnum, z1, z2, lx, rx, cz[4], fz[4], method; + float fy, x0, x1, sx0, sy0, sx1, sy1, xp0, yp0, xp1, yp1, oxp0, oyp0, ryp0, ryp1; + float r, t, t0, t1, csy[4], fsy[4]; + int i, j, n, n2, z, sectnum, z1, z2, cz[4], fz[4], method; sectortype *sec, *nsec; walltype *wal, *wal2; @@ -4355,7 +4354,7 @@ void polymost_drawmaskwall(int damaskwallcnt) void polymost_drawsprite(int snum) { 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; int i, j, spritenum, xoff=0, yoff=0, method, npoints; 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) { 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; double ogxyaspect; double ogchang, ogshang, ogctang, ogstang, oghalfx, oghoriz, fx, fy, x1, y1, z1, x2, y2; double ogrhalfxdown10, ogrhalfxdown10x; double d, cosang, sinang, cosang2, sinang2, px[8], py[8], px2[8], py2[8]; float m[4][4]; - int fovcorrect; #ifdef USE_OPENGL if (rendmode >= 3 && usemodels && hudmem[(dastat&4)>>2][picnum].angadd) @@ -5246,7 +5244,7 @@ void polymost_fillpolygon(int npoints) { pthtyp *pth; float f,a=0.0; - int i, j, k; + int i; globalx1 = mulscale16(globalx1,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 unsigned char *tbuf, *cptr, *tptr; - int h,i,j,l; + int h,i,j; bglGenTextures(1,&polymosttext); if (!polymosttext) return -1; diff --git a/polymer/eduke32/source/astub.c b/polymer/eduke32/source/astub.c index 5ef66cd80..0b03014c9 100644 --- a/polymer/eduke32/source/astub.c +++ b/polymer/eduke32/source/astub.c @@ -49,6 +49,10 @@ static char *duke3dgrp = defaultduke3dgrp; static int fixmapbeforesaving = 1; static int NoAutoLoad = 0; +#if !defined(_WIN32) +static int usecwd = 0; +#endif + static struct strllist { struct strllist *next; @@ -290,7 +294,7 @@ void ExtLoadMap(const char *mapname) void ExtSaveMap(const char *mapname) { - UNUSED_PARAMETER(mapname); + UNREFERENCED_PARAMETER(mapname); 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 totalrespawn=0; - UNUSED_PARAMETER(sectnum); + UNREFERENCED_PARAMETER(sectnum); if (qsetmode==200) return; @@ -819,7 +823,7 @@ void ExtShowWallData(short wallnum) //F6 int i,nextfreetag=0,total=0; char x,y; - UNUSED_PARAMETER(wallnum); + UNREFERENCED_PARAMETER(wallnum); if (qsetmode==200) return; @@ -1184,7 +1188,7 @@ static void ShowHelpText(char *name) { BFILE *fp; char x=0,y=4; - UNUSED_PARAMETER(name); + UNREFERENCED_PARAMETER(name); if ((fp=fopenfrompath("helpdoc.txt","rb")) == NULL) { begindrawing(); @@ -1217,7 +1221,7 @@ static void ShowHelpText(char *name) #endif void ExtShowSpriteData(short spritenum) //F6 { - UNUSED_PARAMETER(spritenum); + UNREFERENCED_PARAMETER(spritenum); if (qsetmode != 200) Show2dText("sehelp.hlp"); /* 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) { - UNUSED_PARAMETER(parm); + UNREFERENCED_PARAMETER(parm); clearfilenames(); ExtUnInit(); uninitengine(); @@ -5386,7 +5390,7 @@ static int osdcmd_exec(const osdfuncparm_t *parm) static int osdcmd_noclip(const osdfuncparm_t *parm) { - UNUSED_PARAMETER(parm); + UNREFERENCED_PARAMETER(parm); noclip = !noclip; return OSDCMD_OK; diff --git a/polymer/eduke32/source/game.c b/polymer/eduke32/source/game.c index 79e8a2da1..52983a9ee 100644 --- a/polymer/eduke32/source/game.c +++ b/polymer/eduke32/source/game.c @@ -10713,6 +10713,9 @@ MAIN_LOOP_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) { closedemowrite(); diff --git a/polymer/eduke32/source/jaudiolib/dsl.c b/polymer/eduke32/source/jaudiolib/dsl.c index b18bd1c52..147fed020 100755 --- a/polymer/eduke32/source/jaudiolib/dsl.c +++ b/polymer/eduke32/source/jaudiolib/dsl.c @@ -112,8 +112,8 @@ static void mixer_callback(int chan, void *stream, int len, void *udata) Uint8 *stptr; Uint8 *fxptr; int copysize; - UNUSED_PARAMETER(chan); - UNUSED_PARAMETER(udata); + UNREFERENCED_PARAMETER(chan); + UNREFERENCED_PARAMETER(udata); /* len should equal _BufferSize, else this is screwed up */ stptr = (Uint8 *)stream; @@ -264,7 +264,7 @@ int DisableInterrupts(void) int RestoreInterrupts(int flags) { - UNUSED_PARAMETER(flags); + UNREFERENCED_PARAMETER(flags); SDL_UnlockAudio(); return(0); } diff --git a/polymer/eduke32/source/jaudiolib/dsoundout.c b/polymer/eduke32/source/jaudiolib/dsoundout.c index 95ff1c7b5..d191a01f9 100644 --- a/polymer/eduke32/source/jaudiolib/dsoundout.c +++ b/polymer/eduke32/source/jaudiolib/dsoundout.c @@ -178,7 +178,7 @@ int DSOUND_Init(int soundcard, int mixrate, int numchannels, int samplebits, int WAVEFORMATEX wfex; DSBPOSITIONNOTIFY posn; - UNUSED_PARAMETER(soundcard); + UNREFERENCED_PARAMETER(soundcard); if (DSOUND_Installed) { @@ -410,7 +410,7 @@ static DWORD WINAPI isr(LPVOID parm) LPVOID lockptr; DWORD lockbytes; LPVOID lockptr2; DWORD lockbytes2; - UNUSED_PARAMETER(parm); + UNREFERENCED_PARAMETER(parm); handles = (HANDLE *)malloc(sizeof(HANDLE)*(1+_DSOUND_NumBuffers)); if (!handles) return 1; diff --git a/polymer/eduke32/source/jaudiolib/mpu401.c b/polymer/eduke32/source/jaudiolib/mpu401.c index ae408e2df..b6086054f 100644 --- a/polymer/eduke32/source/jaudiolib/mpu401.c +++ b/polymer/eduke32/source/jaudiolib/mpu401.c @@ -116,8 +116,8 @@ void CALLBACK MPU_MIDICallback(HMIDIOUT handle, UINT uMsg, DWORD dwInstance, DWO { int i; - UNUSED_PARAMETER(dwInstance); - UNUSED_PARAMETER(dwParam2); + UNREFERENCED_PARAMETER(dwInstance); + UNREFERENCED_PARAMETER(dwParam2); switch (uMsg) { @@ -483,7 +483,7 @@ void MPU_SetVolume(int volume) mixerClose(hmixer); */ - UNUSED_PARAMETER(volume); + UNREFERENCED_PARAMETER(volume); } int MPU_GetVolume(void) diff --git a/polymer/eduke32/source/jaudiolib/multivoc.c b/polymer/eduke32/source/jaudiolib/multivoc.c index 3f411aaa6..10c5351e6 100644 --- a/polymer/eduke32/source/jaudiolib/multivoc.c +++ b/polymer/eduke32/source/jaudiolib/multivoc.c @@ -419,7 +419,7 @@ int MV_ServiceVoc(int buffer) #if defined(_WIN32) MV_MixPage = buffer; #else - UNUSED_PARAMETER(buffer); + UNREFERENCED_PARAMETER(buffer); #endif // Toggle which buffer we'll mix next @@ -1803,12 +1803,13 @@ intptr_t TellOgg(void *datasource) return d->pos; } -/* + int CloseOgg(void *datasource) { + UNREFERENCED_PARAMETER(datasource); return 0; } -*/ + /*--------------------------------------------------------------------- Function: MV_StartPlayback @@ -1821,7 +1822,7 @@ int MV_StartPlayback(void) int status; int buffer; - cb.close_func=NULL; //CloseOgg + cb.close_func=CloseOgg; cb.read_func =ReadOgg; cb.seek_func =SeekOgg; cb.tell_func =(void *)TellOgg; diff --git a/polymer/eduke32/source/jaudiolib/music.c b/polymer/eduke32/source/jaudiolib/music.c index a96d710ef..288e3ff53 100644 --- a/polymer/eduke32/source/jaudiolib/music.c +++ b/polymer/eduke32/source/jaudiolib/music.c @@ -503,8 +503,8 @@ int MUSIC_InitMidi ) { - UNUSED_PARAMETER(card); - UNUSED_PARAMETER(Address); + UNREFERENCED_PARAMETER(card); + UNREFERENCED_PARAMETER(Address); Funcs->NoteOff = MPU_NoteOff; Funcs->NoteOn = MPU_NoteOn; Funcs->PolyAftertouch = MPU_PolyAftertouch; @@ -537,7 +537,7 @@ int MUSIC_FadeVolume ) { - UNUSED_PARAMETER(milliseconds); + UNREFERENCED_PARAMETER(milliseconds); MIDI_SetVolume(tovolume); return(MUSIC_Ok); } @@ -603,7 +603,7 @@ void MUSIC_RegisterTimbreBank ) { - UNUSED_PARAMETER(timbres); + UNREFERENCED_PARAMETER(timbres); } diff --git a/polymer/eduke32/source/jaudiolib/openal.c b/polymer/eduke32/source/jaudiolib/openal.c index adefe8d8d..570aaa292 100644 --- a/polymer/eduke32/source/jaudiolib/openal.c +++ b/polymer/eduke32/source/jaudiolib/openal.c @@ -4,6 +4,8 @@ #include "baselayer.h" #include "compat.h" +#define AL_NO_PROTOTYPES +#define ALC_NO_PROTOTYPES #include #include #include @@ -34,36 +36,34 @@ sounddef1 music; #ifdef _WIN32 // Windows -static HANDLE hALDLL = NULL; +static HMODULE hALDLL = NULL; #else #include static void *alhandle = NULL; #endif static char *aldriver = NULL; - -static void (AL_APIENTRY * balGetSourcei)(ALuint sid, ALenum param, ALint* value); -static void (AL_APIENTRY * balSourcef)(ALuint sid, ALenum param, ALfloat value); -static void (AL_APIENTRY * balSourcePlay)(ALuint sid); -static void (AL_APIENTRY * balSourcePause)(ALuint sid); -static ALCenum(ALC_APIENTRY * balcGetError)(ALCdevice *device); -static ALenum(AL_APIENTRY * balGetError)(void); -static void (AL_APIENTRY * balBufferData)(ALuint bid, ALenum format, const ALvoid* data, ALsizei size, ALsizei freq); -static void (AL_APIENTRY * balGenBuffers)(ALsizei n, ALuint* buffers); -static void (AL_APIENTRY * balGenSources)(ALsizei n, ALuint* sources); -static void (AL_APIENTRY * balSourcei)(ALuint sid, ALenum param, ALint value); -static void (AL_APIENTRY * balSourceQueueBuffers)(ALuint sid, ALsizei numEntries, const ALuint *bids); -static void (AL_APIENTRY * balSourceStop)(ALuint sid); -static void (AL_APIENTRY * balSourceUnqueueBuffers)(ALuint sid, ALsizei numEntries, ALuint *bids); -static void (AL_APIENTRY * bbalDeleteSources)(ALsizei n, const ALuint* sources); -static ALCboolean(ALC_APIENTRY * balcMakeContextCurrent)(ALCcontext *context); -static void (AL_APIENTRY * balDeleteSources)(ALsizei n, const ALuint* sources); -static void (AL_APIENTRY * balDeleteBuffers)(ALsizei n, const ALuint* buffers); -static void (ALC_APIENTRY * balcDestroyContext)(ALCcontext *context); -static ALCboolean(ALC_APIENTRY * balcCloseDevice)(ALCdevice *device); -static ALCdevice *(ALC_APIENTRY * balcOpenDevice)(const ALCchar *devicename); -static ALCcontext *(ALC_APIENTRY * balcCreateContext)(ALCdevice *device, const ALCint* attrlist); -static const ALchar*(AL_APIENTRY * balGetString)(ALenum param); +static LPALGETSOURCEI balGetSourcei = NULL; +static LPALSOURCEF balSourcef = NULL; +static LPALSOURCEPLAY balSourcePlay = NULL; +static LPALSOURCEPAUSE balSourcePause = NULL; +static LPALCGETERROR balcGetError = NULL; +static LPALGETERROR balGetError = NULL; +static LPALBUFFERDATA balBufferData = NULL; +static LPALGENBUFFERS balGenBuffers = NULL; +static LPALGENSOURCES balGenSources = NULL; +static LPALSOURCEI balSourcei = NULL; +static LPALSOURCEQUEUEBUFFERS balSourceQueueBuffers = NULL; +static LPALSOURCESTOP balSourceStop = NULL; +static LPALSOURCEUNQUEUEBUFFERS balSourceUnqueueBuffers = NULL; +static LPALCMAKECONTEXTCURRENT balcMakeContextCurrent = NULL; +static LPALDELETESOURCES balDeleteSources = NULL; +static LPALDELETEBUFFERS balDeleteBuffers = NULL; +static LPALCDESTROYCONTEXT balcDestroyContext = NULL; +static LPALCCLOSEDEVICE balcCloseDevice = NULL; +static LPALCOPENDEVICE balcOpenDevice = NULL; +static LPALCCREATECONTEXT balcCreateContext = NULL; +static LPALGETSTRING balGetString = NULL; static void * algetproc_(const char *s, int *err, int fatal) { @@ -116,7 +116,7 @@ static int unloadaldriver(void) balSourceQueueBuffers = NULL; balSourceStop = NULL; balSourceUnqueueBuffers = NULL; - bbalDeleteSources = NULL; + balDeleteSources = NULL; balcMakeContextCurrent = NULL; balDeleteSources = NULL; balDeleteBuffers = NULL; @@ -399,7 +399,8 @@ void AL_Stop() { int queued=0;ALuint buffer; - if (!music.def.size)return; + if (!music.def.size) + return; balSourceStop(music.source); balGetSourcei(music.source,AL_BUFFERS_QUEUED,&queued); @@ -413,16 +414,18 @@ void AL_Stop() balDeleteSources(1,&music.source);check(1); balDeleteBuffers(2, music.buffers);check(1); - if (music.type==1)ov_clear(&music.def.oggStream); - Bmemset(&music,0,sizeof(sounddef1)); + if (music.type == 1) + ov_clear(&music.def.oggStream); + Bmemset(&music,0,sizeof(music)); } +static char pcm[BUFFER_SIZE]; + int stream(ALuint buffer) { ALsizei size=0; int section,result; - static char pcm[BUFFER_SIZE]; - + while (size - -int AL_Init(); -void AL_Shutdown(); -void AL_Update(); -char *AL_ErrorString(int code); -char *ALC_ErrorString(int code); - -void AL_Stop(); -int AL_isntALmusic(); -void AL_PlaySong(char *song,int loopflag); -void AL_Pause(); -void AL_Continue(); -void AL_SetMusicVolume(int volume); - -int openal_disabled; - +#ifndef __OPENAL_H +#define __OPENAL_H + +#include + +int AL_Init(); +void AL_Shutdown(); +void AL_Update(); +char *AL_ErrorString(int code); +char *ALC_ErrorString(int code); + +void AL_Stop(); +int AL_isntALmusic(); +void AL_PlaySong(char *song,int loopflag); +void AL_Pause(); +void AL_Continue(); +void AL_SetMusicVolume(int volume); + +int openal_disabled; + typedef struct sounddef { unsigned pos; @@ -25,4 +25,4 @@ typedef struct sounddef unsigned size; OggVorbis_File oggStream; } sounddef; -#endif +#endif diff --git a/polymer/eduke32/source/jaudiolib/sdlmusic.c b/polymer/eduke32/source/jaudiolib/sdlmusic.c index 00e8cd811..641cfba8c 100755 --- a/polymer/eduke32/source/jaudiolib/sdlmusic.c +++ b/polymer/eduke32/source/jaudiolib/sdlmusic.c @@ -356,44 +356,44 @@ int MUSIC_GetContext(void) void MUSIC_SetSongTick(unsigned int PositionInTicks) { - UNUSED_PARAMETER(PositionInTicks); + UNREFERENCED_PARAMETER(PositionInTicks); musdebug("STUB ... MUSIC_SetSongTick().\n"); } // MUSIC_SetSongTick void MUSIC_SetSongTime(unsigned int milliseconds) { - UNUSED_PARAMETER(milliseconds); + UNREFERENCED_PARAMETER(milliseconds); musdebug("STUB ... MUSIC_SetSongTime().\n"); }// MUSIC_SetSongTime void MUSIC_SetSongPosition(int measure, int beat, int tick) { - UNUSED_PARAMETER(measure); - UNUSED_PARAMETER(beat); - UNUSED_PARAMETER(tick); + UNREFERENCED_PARAMETER(measure); + UNREFERENCED_PARAMETER(beat); + UNREFERENCED_PARAMETER(tick); musdebug("STUB ... MUSIC_SetSongPosition().\n"); } // MUSIC_SetSongPosition void MUSIC_GetSongPosition(songposition *pos) { - UNUSED_PARAMETER(pos); + UNREFERENCED_PARAMETER(pos); musdebug("STUB ... MUSIC_GetSongPosition().\n"); } // MUSIC_GetSongPosition void MUSIC_GetSongLength(songposition *pos) { - UNUSED_PARAMETER(pos); + UNREFERENCED_PARAMETER(pos); musdebug("STUB ... MUSIC_GetSongLength().\n"); } // MUSIC_GetSongLength int MUSIC_FadeVolume(int tovolume, int milliseconds) { - UNUSED_PARAMETER(tovolume); + UNREFERENCED_PARAMETER(tovolume); Mix_FadeOutMusic(milliseconds); return(MUSIC_Ok); } // MUSIC_FadeVolume @@ -413,15 +413,15 @@ void MUSIC_StopFade(void) void MUSIC_RerouteMidiChannel(int channel, int cdecl(*function)(int event, int c1, int c2)) { - UNUSED_PARAMETER(channel); - UNUSED_PARAMETER(function); + UNREFERENCED_PARAMETER(channel); + UNREFERENCED_PARAMETER(function); musdebug("STUB ... MUSIC_RerouteMidiChannel().\n"); } // MUSIC_RerouteMidiChannel void MUSIC_RegisterTimbreBank(unsigned char *timbres) { - UNUSED_PARAMETER(timbres); + UNREFERENCED_PARAMETER(timbres); musdebug("STUB ... MUSIC_RegisterTimbreBank().\n"); } // MUSIC_RegisterTimbreBank diff --git a/polymer/eduke32/source/jmact/control.c b/polymer/eduke32/source/jmact/control.c index 5f1801507..152b52301 100644 --- a/polymer/eduke32/source/jmact/control.c +++ b/polymer/eduke32/source/jmact/control.c @@ -110,13 +110,13 @@ void CONTROL_GetJoyDelta( void ) boolean CONTROL_StartJoy(int32 joy) { - UNUSED_PARAMETER(joy); + UNREFERENCED_PARAMETER(joy); return (inputdevices & 4) == 4; } void CONTROL_ShutJoy(int32 joy) { - UNUSED_PARAMETER(joy); + UNREFERENCED_PARAMETER(joy); CONTROL_JoyPresent = false; } @@ -820,7 +820,7 @@ boolean CONTROL_Startup(controltype which, int32 ( *TimeFunction )( void ), int3 { int32 i; - UNUSED_PARAMETER(which); + UNREFERENCED_PARAMETER(which); if (CONTROL_Started) return false; diff --git a/polymer/eduke32/source/jmact/scriplib.c b/polymer/eduke32/source/jmact/scriplib.c index 0064c018f..9218b648b 100644 --- a/polymer/eduke32/source/jmact/scriplib.c +++ b/polymer/eduke32/source/jmact/scriplib.c @@ -838,7 +838,7 @@ void SCRIPT_PutNumber { char raw[64]; - UNUSED_PARAMETER(defaultvalue); + UNREFERENCED_PARAMETER(defaultvalue); if (hexadecimal) sprintf(raw, "0x%X", number); else sprintf(raw, "%d", number); @@ -871,7 +871,7 @@ void SCRIPT_PutDouble { char raw[64]; - UNUSED_PARAMETER(defaultvalue); + UNREFERENCED_PARAMETER(defaultvalue); sprintf(raw, "%g", number); SCRIPT_AddEntry(scripthandle, sectionname, entryname, raw); diff --git a/polymer/eduke32/source/osdcmds.c b/polymer/eduke32/source/osdcmds.c index b1a321a37..6fc4a2dfb 100644 --- a/polymer/eduke32/source/osdcmds.c +++ b/polymer/eduke32/source/osdcmds.c @@ -35,7 +35,7 @@ struct osdcmd_cheatsinfo osdcmd_cheatsinfo_stat; static inline int osdcmd_quit(const osdfuncparm_t *parm) { - UNUSED_PARAMETER(parm); + UNREFERENCED_PARAMETER(parm); sendquit(); return OSDCMD_OK; } @@ -262,7 +262,7 @@ static int osdcmd_map(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) { 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) { - UNUSED_PARAMETER(parm); + UNREFERENCED_PARAMETER(parm); if (numplayers == 1 && g_player[myconnectindex].ps->gm & MODE_GAME) { 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) { - UNUSED_PARAMETER(parm); + UNREFERENCED_PARAMETER(parm); SoundShutdown(); MusicShutdown(); @@ -376,7 +376,7 @@ static int osdcmd_restartsound(const osdfuncparm_t *parm) static int osdcmd_restartvid(const osdfuncparm_t *parm) { - UNUSED_PARAMETER(parm); + UNREFERENCED_PARAMETER(parm); resetvideomode(); if (setgamemode(ud.config.ScreenMode,ud.config.ScreenWidth,ud.config.ScreenHeight,ud.config.ScreenBPP)) gameexit("restartvid: Reset failed...\n"); diff --git a/polymer/eduke32/source/osdfuncs.c b/polymer/eduke32/source/osdfuncs.c index 6e2634456..9f26def61 100644 --- a/polymer/eduke32/source/osdfuncs.c +++ b/polymer/eduke32/source/osdfuncs.c @@ -76,7 +76,7 @@ void GAME_clearbackground(int c, int r) int x, y, xsiz, ysiz, tx2, ty2; int daydim, bits; - UNUSED_PARAMETER(c); + UNREFERENCED_PARAMETER(c); if (getrendermode() < 3) bits = BITS; else bits = BITSTL; diff --git a/polymer/eduke32/source/premap.c b/polymer/eduke32/source/premap.c index 0fd57ae24..bd1ce6668 100644 --- a/polymer/eduke32/source/premap.c +++ b/polymer/eduke32/source/premap.c @@ -401,7 +401,7 @@ void cacheit(void) if (ud.recstat == 2) return; -// MUSIC_StopSong(); + MUSIC_StopSong(); playmusicMAP(&env_music_fn[2][0],MAXVOLUMES*MAXLEVELS+2); // loadmus starttime = getticks(); diff --git a/polymer/eduke32/source/sounds.c b/polymer/eduke32/source/sounds.c index e06731586..01e0e1962 100644 --- a/polymer/eduke32/source/sounds.c +++ b/polymer/eduke32/source/sounds.c @@ -504,7 +504,7 @@ int spritesound(unsigned int num, int i) void stopspritesound(int num, int i) { - UNUSED_PARAMETER(i); + UNREFERENCED_PARAMETER(i); stopsound(num); } @@ -666,7 +666,7 @@ void clearsoundlocks(void) int isspritemakingsound(int i, int num) { - UNUSED_PARAMETER(i); + UNREFERENCED_PARAMETER(i); if (num < 0) num=0; // FIXME return (g_sounds[num].num > 0); } diff --git a/polymer/eduke32/source/startgtk.game.c b/polymer/eduke32/source/startgtk.game.c index 32a8c7078..b5ef26a8d 100755 --- a/polymer/eduke32/source/startgtk.game.c +++ b/polymer/eduke32/source/startgtk.game.c @@ -167,7 +167,7 @@ static void on_vmode3dcombo_changed(GtkComboBox *combobox, gpointer user_data) GtkTreeModel *data; GtkTreeIter iter; int val; - UNUSED_PARAMETER(user_data); + UNREFERENCED_PARAMETER(user_data); if (!gtk_combo_box_get_active_iter(combobox, &iter)) return; if (!(data = gtk_combo_box_get_model(combobox))) return; 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) { - UNUSED_PARAMETER(user_data); + UNREFERENCED_PARAMETER(user_data); settings.fullscreen = (gtk_toggle_button_get_active(togglebutton) == TRUE); PopulateForm(1< #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) { @@ -18,9 +17,9 @@ int WINAPI WinMain(HINSTANCE hInstance, HINSTANCE hPrevInst, LPSTR lpCmdLine, in STARTUPINFO si; PROCESS_INFORMATION pi; - UNUSED_PARAMETER(hInstance); - UNUSED_PARAMETER(hPrevInst); - UNUSED_PARAMETER(nCmdShow); + UNREFERENCED_PARAMETER(hInstance); + UNREFERENCED_PARAMETER(hPrevInst); + UNREFERENCED_PARAMETER(nCmdShow); strcpy(sCmdLine,lpCmdLine); szFileName[0] = '\0';