diff --git a/polymer/eduke32/Makefile b/polymer/eduke32/Makefile index 8337d95fe..f35657a75 100644 --- a/polymer/eduke32/Makefile +++ b/polymer/eduke32/Makefile @@ -35,7 +35,7 @@ endif CC=gcc CXX=g++ # -Werror-implicit-function-declaration -OURCFLAGS=$(debug) -W -Wall -Wimplicit -Wno-char-subscripts -Wno-unused \ +OURCFLAGS=$(debug) -W -Wall -Wimplicit -Wno-char-subscripts -Wunused \ -funsigned-char -fno-strict-aliasing -DNO_GCC_BUILTINS -DNOCOPYPROTECT \ -I$(INC:/=) -I$(EINC:/=) -I$(SRC)jmact -I$(SRC)jaudiolib -I../jfaud/src OURCXXFLAGS=-fno-exceptions -fno-rtti diff --git a/polymer/eduke32/source/_functio.h b/polymer/eduke32/source/_functio.h index 951392053..40be4bcd1 100644 --- a/polymer/eduke32/source/_functio.h +++ b/polymer/eduke32/source/_functio.h @@ -276,15 +276,6 @@ static char * mousedigitaldefaults[] = }; -static char * gamepaddigitaldefaults[] = - { - "Turn_Left", - "Turn_Right", - "Move_Forward", - "Move_Backward", - }; - - static char * joystickanalogdefaults[] = { "analog_turning", diff --git a/polymer/eduke32/source/actors.c b/polymer/eduke32/source/actors.c index 56171e08a..9ca47e87a 100644 --- a/polymer/eduke32/source/actors.c +++ b/polymer/eduke32/source/actors.c @@ -475,7 +475,7 @@ BOLT: int movesprite(short spritenum, long xchange, long ychange, long zchange, unsigned long cliptype) { long daz,h, oldx, oldy; - short retval, dasectnum, a, cd; + short retval, dasectnum, cd; char bg; bg = badguy(&sprite[spritenum]); @@ -859,7 +859,7 @@ short ifhitsectors(short sectnum) short ifhitbyweapon(short sn) { - short j, k, p; + short j,p; spritetype *npc; if( hittype[sn].extra >= 0 ) @@ -1366,8 +1366,8 @@ BOLT: void movestandables(void) { - short i, j, k, m, nexti, nextj, nextk, p=0, q, sect; - long l=0, x, *t, x1, y1; + short i, j, k, m, nexti, nextj, p=0, sect; + long l=0, x, *t; spritetype *s; int switchpicnum; @@ -2340,8 +2340,8 @@ void bounce(short i) void moveweapons(void) { - short i, j=0, k, f, nexti, p, q, tempsect; - long dax,day,daz, x, l, ll, x1, y1; + short i, j=0, k, f, nexti, p, q; + long dax,day,daz, x, ll; unsigned long qq; spritetype *s; @@ -3125,7 +3125,7 @@ BOLT: void movetransports(void) { char warpspriteto; - short i, j, k, l, p, sect, sectlotag, nexti, nextj, nextk; + short i, j, k, l, p, sect, sectlotag, nexti, nextj; long ll,onfloorz,q; i = headspritestat[9]; //Transporters @@ -4762,7 +4762,7 @@ BOLT: void moveexplosions(void) // STATNUM 5 { - short i, j, k, nexti, sect, p; + short i, j, nexti, sect, p; long l, x, *t; spritetype *s; int switchpicnum; diff --git a/polymer/eduke32/source/anim.c b/polymer/eduke32/source/anim.c index b56d5c040..13d08ec3e 100644 --- a/polymer/eduke32/source/anim.c +++ b/polymer/eduke32/source/anim.c @@ -198,7 +198,7 @@ void endanimvol43(long fr) void playanm(char *fn,char t) { char *animbuf, *palptr; - long i, j, k, length=0, numframes=0; + long i, j, length=0, numframes=0; int32 handle=-1; // return; diff --git a/polymer/eduke32/source/astub.c b/polymer/eduke32/source/astub.c index 1ff119429..49fd44d1b 100644 --- a/polymer/eduke32/source/astub.c +++ b/polymer/eduke32/source/astub.c @@ -305,8 +305,6 @@ const char *ExtGetSectorCaption(short sectnum) const char *ExtGetWallCaption(short wallnum) { - long i=0; - if(!(onnames==2 || onnames==4)) { tempbuf[0] = 0; @@ -478,7 +476,7 @@ void ExtShowSectorData(short sectnum) //F5 short statnum=0; int x,x2,y; int nexti; - int i,c=0; + int i; int secrets=0; int totalactors1=0,totalactors2=0,totalactors3=0,totalactors4=0; int totalrespawn=0; @@ -912,8 +910,7 @@ void ExtShowWallData(short wallnum) //F6 void Show2dText(char *name) { - int i,fp; - int t; + int fp,t; char x=0,y=4,xmax=0,xx=0,col=0; clearmidstatbar16(); if((fp=kopen4load(name,0)) == -1) @@ -951,9 +948,9 @@ void Show2dText(char *name) void Show3dText(char *name) { - int i,fp; + int fp,t; char x=0,y=4,xmax=0,xx=0,col=0; - int t; + if((fp=kopen4load(name,0)) == -1) { begindrawing(); @@ -988,8 +985,7 @@ void Show3dText(char *name) void ShowHelpText(char *name) { BFILE *fp; - int i,t; - char x=0,y=4,xmax=0,xx=0,col=0; + char x=0,y=4; if((fp=fopenfrompath("helpdoc.txt","rb")) == NULL) { begindrawing(); @@ -1390,7 +1386,7 @@ long lastupdate, mousecol, mouseadd = 1, bstatus; void m32_showmouse(void) { - int i, j, k, col; + int i, j, col; j = (xdimgame > 640); @@ -1477,15 +1473,11 @@ int AskIfSure(void) void Keys3d(void) { long i,count,rate,nexti; - short statnum=0; - - char smooshyalign=0, repeatpanalign=0, *ptr, buffer[80]; - short sectnum, nextsectnum, startwall, endwall, dasector, daang; - long j, k, cnt, templong, doubvel, changedir, wallfind[2], daz[2]; - long dashade[2], goalz, xvect, yvect, hiz, loz; - short hitsect, hitwall, hitsprite; - long hitx, hity, hitz, dax, day, hihit, lohit; + long j, k, templong, changedir, hiz, loz; + long hitx, hity, hitz, hihit, lohit; long repeatcountx=0,repeatcounty=0; + char smooshyalign=0, repeatpanalign=0, buffer[80]; + short startwall, endwall, dasector, hitsect, hitwall, hitsprite, statnum=0; /* start Mapster32 */ @@ -1695,7 +1687,7 @@ void Keys3d(void) if (keystatus[KEYSC_SEMI] && keystatus[KEYSC_V]) // ; V { - short w, start_wall, end_wall, currsector; + short currsector; unsigned char visval; keystatus[KEYSC_V] = 0; @@ -3696,8 +3688,6 @@ void Keys2d(void) if ((totalclock > getmessagetimeoff) && (totalclock > (lastpm16time + 120*3))) { - long olinehighlight, opointhighlight, ocursectornum; - updatesector(mousxplc,mousyplc,&cursectornum); if (pointhighlight >= 16384) { @@ -4225,7 +4215,7 @@ int osdcmd_quit(const osdfuncparm_t *parm) int ExtInit(void) { - long fil, rv = 0; + long rv = 0; char *duke3dgrp = "duke3d.grp"; #if 1 // defined(_WIN32) @@ -4336,7 +4326,7 @@ void ExtPreCheckKeys(void) // just before drawrooms void ExtAnalyzeSprites(void) { - long i, j, k; + long i, k; spritetype *tspr; char frames=0; signed char l; @@ -4572,7 +4562,7 @@ void ExtCheckKeys(void) void faketimerhandler(void) { - long i, j, dax, day, dist; + long i, dist; long hiz, hihit, loz, lohit, oposx, oposy; short hitwall, daang; @@ -4648,7 +4638,7 @@ void faketimerhandler(void) } void SetBOSS1Palette() -{int x; +{ if(acurpalette==3) return; acurpalette=3; kensetpalette(BOSS1palette); @@ -4656,14 +4646,14 @@ void SetBOSS1Palette() void SetSLIMEPalette() -{int x; +{ if(acurpalette==2) return; acurpalette=2; kensetpalette(SLIMEpalette); } void SetWATERPalette() -{int x; +{ if(acurpalette==1) return; acurpalette=1; kensetpalette(WATERpalette); @@ -4671,7 +4661,7 @@ void SetWATERPalette() void SetGAMEPalette() -{int x; +{ if(acurpalette==0) return; acurpalette=0; kensetpalette(GAMEpalette); @@ -4743,7 +4733,6 @@ void EditSectorData(short sectnum) { char disptext[80]; char edittext[80]; - char snotbuf[80]; char col=1, row=0, rowmax = 6, dispwidth = 24; long xpos = 200, ypos = ydim-STATUS2DSIZ+48; int i = -1; @@ -4981,8 +4970,7 @@ void EditWallData(short wallnum) { char disptext[80]; char edittext[80]; - char snotbuf[80]; - char col=1, row=0, dispwidth = 24; + char row=0, dispwidth = 24; long xpos = 200, ypos = ydim-STATUS2DSIZ+48; int i = -1; char editval = 0; @@ -5114,7 +5102,6 @@ void EditSpriteData(short spritenum) { char disptext[80]; char edittext[80]; - char snotbuf[80]; char col=1, row=0, rowmax=5, dispwidth = 24; long xpos = 200, ypos = ydim-STATUS2DSIZ+48; int i = -1; @@ -5428,9 +5415,10 @@ void Msg(char *string, char color) } +/* long GetAToken(char *name, char *tc, long length) { - int i,x=0; + int x=0; char t,*tmp,tokenfound=0; char *token; long count=0; @@ -5479,7 +5467,7 @@ long GetAToken(char *name, char *tc, long length) return(count); } -/* + void ContextHelp(short spritenum) { int i,fp; diff --git a/polymer/eduke32/source/config.c b/polymer/eduke32/source/config.c index 34c66c0f3..572ff1a3d 100644 --- a/polymer/eduke32/source/config.c +++ b/polymer/eduke32/source/config.c @@ -371,7 +371,7 @@ void CONFIG_ReadKeys( void ) void CONFIG_SetupMouse( void ) { int32 i; - char str[80],*p; + char str[80]; char temp[80]; int32 function, scale; @@ -438,9 +438,9 @@ void CONFIG_SetupMouse( void ) void CONFIG_SetupJoystick( void ) { int32 i; - char str[80],*p; + char str[80]; char temp[80]; - int32 function, scale; + int32 scale; if (scripthandle < 0) return; diff --git a/polymer/eduke32/source/duke3d.h b/polymer/eduke32/source/duke3d.h index a08638e02..6ab314e52 100644 --- a/polymer/eduke32/source/duke3d.h +++ b/polymer/eduke32/source/duke3d.h @@ -452,8 +452,6 @@ extern long *actorLoadEventScrptr[MAXTILES]; extern char actortype[MAXTILES]; extern char *music_pointer; -extern char ipath[80],opath[80]; - extern char music_fn[MAXVOLUMES+1][11][13],music_select; extern char env_music_fn[MAXVOLUMES+1][13]; extern short camsprite; @@ -826,7 +824,7 @@ typedef struct { signed char sxrepeat, syrepeat, txrepeat, tyrepeat, shade, xrepeat, yrepeat, pal, velmult; } proj_struct; -proj_struct projectile[MAXTILES], thisprojectile[MAXSPRITES], defaultprojectile[MAXTILES]; +extern proj_struct projectile[MAXTILES], thisprojectile[MAXSPRITES], defaultprojectile[MAXTILES]; // logo control diff --git a/polymer/eduke32/source/game.c b/polymer/eduke32/source/game.c index 3086c69bd..1d96e62df 100644 --- a/polymer/eduke32/source/game.c +++ b/polymer/eduke32/source/game.c @@ -212,12 +212,12 @@ int txgametext_(int small, int starttile, int x,int y,char *t,char s,char p,shor inline int txgametext(int starttile, int x,int y,char *t,char s,char p,short dabits,long x1, long y1, long x2, long y2) { - return(txgametext_(0,STARTALPHANUM, x,y,t,s,p,dabits,x1, y1, x2, y2)); + return(txgametext_(0,starttile, x,y,t,s,p,dabits,x1, y1, x2, y2)); } inline int txgametextsm(int starttile, int x,int y,char *t,char s,char p,short dabits,long x1, long y1, long x2, long y2) { - return(txgametext_(1,STARTALPHANUM, x,y,t,s,p,dabits,x1, y1, x2, y2)); + return(txgametext_(1,starttile, x,y,t,s,p,dabits,x1, y1, x2, y2)); } inline int gametext(int x,int y,char *t,char s,short dabits) @@ -225,7 +225,7 @@ inline int gametext(int x,int y,char *t,char s,short dabits) return(txgametext_(0,STARTALPHANUM, x,y,t,s,0,dabits,0, 0, xdim-1, ydim-1)); } -inline int mpgametext(int x,int y,char *t,char s,short dabits) +inline int mpgametext(int y,char *t,char s,short dabits) { if(xdim >= 640 && ydim >= 480) return(txgametextsm(STARTALPHANUM, 5,y,t,s,0,dabits,0, 0, xdim-1, ydim-1)); @@ -324,7 +324,6 @@ void adduserquote(char *daquote) void getpackets(void) { long i, j, k, l; - FILE *fp; long other, packbufleng; input *osyn, *nsyn; @@ -722,8 +721,7 @@ extern void computergetinput(long snum, input *syn); void faketimerhandler() { - long i, j, k, l; - long momx, momy; + long i, j, k; // short who; input *osyn, *nsyn; @@ -1064,7 +1062,7 @@ void caches(void) void checksync(void) { - long i, k; + long i; for(i=connecthead;i>=0;i=connectpoint2[i]) if (syncvalhead[i] == syncvaltottail) break; @@ -1320,7 +1318,7 @@ void invennum(long x,long y,char num1,char ha,char sbits) rotatesprite(sbarx(x+4),sbary(y),sbarsc(65536L),0,THREEBYFIVE+dabuf[0]-'0',ha,0,sbits,0,0,xdim-1,ydim-1); } -void orderweaponnum(short ind,long x,long y,long num1, long num2,char ha) +void orderweaponnum(short ind,long x,long y,char ha) { rotatesprite(sbarx(x-7),sbary(y),sbarsc(65536L),0,THREEBYFIVE+ind+1,ha-10,7,10,0,0,xdim-1,ydim-1); rotatesprite(sbarx(x-3),sbary(y),sbarsc(65536L),0,THREEBYFIVE+10,ha,0,10,0,0,xdim-1,ydim-1); @@ -1444,7 +1442,6 @@ void weapon_amounts(struct player_struct *p,long x,long y,long u) if (VOLUMEONE) { orderweaponnum(SHRINKER_WEAPON,x+39,y+12, - p->ammo_amount[SHRINKER_WEAPON],max_ammo_amount[SHRINKER_WEAPON], (!p->gotweapon[SHRINKER_WEAPON]*9)+12-18* (cw == SHRINKER_WEAPON) ); } else { @@ -1466,7 +1463,6 @@ void weapon_amounts(struct player_struct *p,long x,long y,long u) if (VOLUMEONE) { orderweaponnum(DEVISTATOR_WEAPON,x+70,y, - p->ammo_amount[DEVISTATOR_WEAPON],max_ammo_amount[DEVISTATOR_WEAPON], (!p->gotweapon[DEVISTATOR_WEAPON]*9)+12-18* (cw == DEVISTATOR_WEAPON) ); } else { @@ -1481,7 +1477,6 @@ void weapon_amounts(struct player_struct *p,long x,long y,long u) if (u != -1) patchstatusbar(158,184,162+29,184+6); //original code: (166,184,166+8,184+6); if (VOLUMEONE) { orderweaponnum(TRIPBOMB_WEAPON,x+70,y+6, - p->ammo_amount[TRIPBOMB_WEAPON],max_ammo_amount[TRIPBOMB_WEAPON], (!p->gotweapon[TRIPBOMB_WEAPON]*9)+12-18* (cw == TRIPBOMB_WEAPON) ); } else { @@ -1497,7 +1492,6 @@ void weapon_amounts(struct player_struct *p,long x,long y,long u) if (u != -1) patchstatusbar(158,190,162+29,190+6); //original code: (166,190,166+8,190+6); if (VOLUMEONE) { orderweaponnum(-1,x+70,y+12, - p->ammo_amount[FREEZE_WEAPON],max_ammo_amount[FREEZE_WEAPON], (!p->gotweapon[FREEZE_WEAPON]*9)+12-18* (cw == FREEZE_WEAPON) ); } else { @@ -1668,7 +1662,7 @@ void coolgaugetext(short snum) { struct player_struct *p; long i, j, o, ss, u; - char c, permbit; + char permbit; p = &ps[snum]; @@ -2010,9 +2004,9 @@ void operatefta(void) j -= 8; } if (k > 4) - mpgametext(320>>1,j,user_quote[i],0,2+8+16); - else if (k > 2) mpgametext(320>>1,j,user_quote[i],0,2+8+16+1); - else mpgametext(320>>1,j,user_quote[i],0,2+8+16+1+32); + mpgametext(j,user_quote[i],0,2+8+16); + else if (k > 2) mpgametext(j,user_quote[i],0,2+8+16+1); + else mpgametext(j,user_quote[i],0,2+8+16+1+32); j -= 8; } @@ -2089,8 +2083,6 @@ void FTA(short q,struct player_struct *p) void showtwoscreens(void) { - short i; - if (!VOLUMEALL) { setview(0,0,xdim-1,ydim-1); flushperms(); @@ -2128,8 +2120,6 @@ extern long qsetmode; void gameexit(char *t) { - short i; - if(*t != 0) ps[myconnectindex].palette = (char *) &palette[0]; if(numplayers > 1) @@ -2224,13 +2214,13 @@ short strget_(int small,short x,short y,char *t,short dalen,short c) b[ii] = '*'; b[ii] = 0; if(ps[myconnectindex].gm&MODE_TYPE) - x = mpgametext(x,y,b,c,2+8+16); + x = mpgametext(y,b,c,2+8+16); else x = gametext(x,y,b,c,2+8+16); } else { if(ps[myconnectindex].gm&MODE_TYPE) - x = mpgametext(x,y,t,c,2+8+16); + x = mpgametext(y,t,c,2+8+16); else x = gametext(x,y,t,c,2+8+16); } c = 4-(sintable[(totalclock<<4)&2047]>>11); @@ -2336,7 +2326,7 @@ void typemode(void) minitext((320>>1)-40-4,j," ESC - Abort",0,2+8+16); j += 7; if (ud.screen_size > 0) j = 200-45; else j = 200-8; - mpgametext(320>>1,j,typebuf,0,2+8+16); + mpgametext(j,typebuf,0,2+8+16); if( KB_KeyWaiting() ) { @@ -2657,8 +2647,6 @@ void drawoverheadmap(long cposx, long cposy, long czoom, short cang) void palto(char r,char g,char b,long e) { - int i; - char temparray[768]; long tc; /* for(i=0;i<768;i+=3) @@ -2939,7 +2927,7 @@ void displayrest(long smoothratio) void view(struct player_struct *pp, long *vx, long *vy,long *vz,short *vsectnum, short ang, short horiz) { spritetype *sp; - long i, nx, ny, nz, hx, hy, hz, hitx, hity, hitz; + long i, nx, ny, nz, hx, hy, hitx, hity, hitz; short bakcstat, hitsect, hitwall, hitsprite, daang; nx = (sintable[(ang+1536)&2047]>>4); @@ -3293,10 +3281,10 @@ static long oyrepeat=-1; void displayrooms(short snum,long smoothratio) { - long cposx,cposy,cposz,dst,j,fz,cz,hz,lz; - short sect, cang, k, choriz,tsect; + long cposx,cposy,cposz,dst,j,fz,cz; + short sect, cang, k, choriz; struct player_struct *p; - long tposx,tposy,tposz,dx,dy,thoriz,i; + long tposx,tposy,i; short tang; long tiltcx,tiltcy,tiltcs=0; // JBF 20030807 @@ -6413,7 +6401,7 @@ char cheatbuf[MAXCHEATLEN],cheatbuflen; void cheats(void) { - short ch, i, j, k=0,x,y, keystate, weapon; + short ch, i, j, k=0,x,y, weapon; static char z=0; char consolecheat = 0; // JBF 20030914 @@ -6967,7 +6955,7 @@ FOUNDCHEAT: long nonsharedtimer; void nonsharedkeys(void) { - short i,ch, weapon; + short i,ch; long j; if(ud.recstat == 2) @@ -7799,38 +7787,9 @@ void checkcommandline(int argc,char **argv) } } -void printstr(short x, short y, char string[81], char attribute) -{ - char character; - short i, pos; - /* - pos = (y*80+x)<<1; - i = 0; - while (string[i] != 0) - { - character = string[i]; - printchrasm(0xb8000+(long)pos,1L,((long)attribute<<8)+(long)character); - i++; - pos+=2; - } - */ -} - -/* -void cacheicon(void) -{ - if(cachecount > 0) - { - if( (ps[myconnectindex].gm&MODE_MENU) == 0 ) - rotatesprite((320-7)<<16,(200-23)<<16,32768L,0,SPINNINGNUKEICON,0,0,2,windowx1,windowy1,windowx2,windowy2); - cachecount = 0; - } -} - */ - void Logo(void) { - short i,j,soundanm; + short soundanm; long logoflags=GetGameVar("LOGO_FLAGS",255, -1, -1); soundanm = 0; @@ -8030,7 +7989,6 @@ void Shutdown( void ) void compilecons(void) { - char *tempname; int i; label = (char *)&sprite[0]; // V8: 16384*44/64 = 11264 V7: 4096*44/64 = 2816 labelcode = (long *)§or[0]; // V8: 4096*40/4 = 40960 V7: 1024*40/4 = 10240 @@ -8387,7 +8345,7 @@ int load_script(char *szScript) void app_main(int argc,char **argv) { - long i, j, k, l; + long i, j; #ifdef RENDERTYPEWIN if (win_checkinstance()) { if (!wm_ynbox("EDuke32","Another Build game is currently running. " @@ -8939,8 +8897,7 @@ oldinput oldrecsync[RECSYNCBUFSIZ]; // extern long syncs[]; long playback(void) { - long i,j,k,l,t,tc; - short p; + long i,j,k,l; char foundemo; if( ready2send ) return 0; @@ -9833,8 +9790,6 @@ char domovethings(void) void doorders(void) { - short i; - setview(0,0,xdim-1,ydim-1); fadepal(0,0,0, 0,63,7); @@ -9866,7 +9821,7 @@ void doorders(void) void dobonus(char bonusonly) { - short t, r, tinc,gfx_offset; + short t, tinc,gfx_offset; long i, y,xfragtotal,yfragtotal; short bonuscnt; int clockpad = 2; diff --git a/polymer/eduke32/source/gamedef.c b/polymer/eduke32/source/gamedef.c index f147e33d6..34163ce2c 100644 --- a/polymer/eduke32/source/gamedef.c +++ b/polymer/eduke32/source/gamedef.c @@ -1264,8 +1264,6 @@ char AddGameVar(char *pszLabel, long lValue, unsigned long dwFlags) int i; int j; - int b=0; - //Bsprintf(g_szBuf,"AddGameVar(%s, %d, %X)",pszLabel, lValue, dwFlags); //AddLog(g_szBuf); @@ -1590,7 +1588,6 @@ long getlabeloffset(LABELS *pLabel, char *psz) { // find the label psz in the table pLabel. // returns the offset in the array for the label, or -1 - long l=-1; int i; for(i=0;pLabel[i].lId >=0 ; i++) @@ -1716,7 +1713,7 @@ long transword(void) //Returns its code # void transvartype(int type) { - int i=0,l,f=0; + int i=0,f=0; skipcomments(); if(!type && !labelsonly && (isdigit(*textptr) || ((*textptr == '-') && (isdigit(*(textptr+1)))))) @@ -4937,7 +4934,7 @@ void ClearGameVars(void) void InitGameVarPointers(void) { - int i,j; + int i; char aszBuf[64]; // called from game Init AND when level is loaded... @@ -4990,7 +4987,6 @@ void InitGameVarPointers(void) void AddSystemVars() { // only call ONCE - int i; char aszBuf[64]; //AddLog("AddSystemVars"); diff --git a/polymer/eduke32/source/gameexec.c b/polymer/eduke32/source/gameexec.c index c257b6773..d5bb0ff48 100644 --- a/polymer/eduke32/source/gameexec.c +++ b/polymer/eduke32/source/gameexec.c @@ -34,9 +34,8 @@ static spritetype *g_sp; extern int32 scripthandle; -void DoUserDef(char bSet, long lVar1, long lLabelID, long lVar2, short sActor, short sPlayer, long lParm2) +void DoUserDef(char bSet, long lLabelID, long lVar2, short sActor, short sPlayer) { - int iPlayer; long lValue; if(sActor < 0 || sActor >= MAXSPRITES || sPlayer < 0 || sPlayer >= MAXPLAYERS) @@ -1872,7 +1871,6 @@ void DoInput(char bSet, long lVar1, long lLabelID, long lVar2, short sActor, sho { int iPlayer; long lValue; - long lTemp; if(sActor < 0 || sActor >= MAXSPRITES || sPlayer < 0 || sPlayer >= MAXPLAYERS) return; @@ -2959,7 +2957,7 @@ short furthestangle(short sActor,short angs) short furthestcanseepoint(short sActor,spritetype *ts,long *dax,long *day) { - short j, hitsect,hitwall,hitspr, angincs, tempang; + short j, hitsect,hitwall,hitspr, angincs; long hx, hy, hz, d, da;//, d, cd, ca,tempx,tempy,cx,cy; spritetype *s = &sprite[sActor]; @@ -3166,7 +3164,7 @@ void alterang(short a) void move() { long l, *moveptr; - short j, a, goalang, angdif; + short a, goalang, angdif; long daxvel; a = g_sp->hitag; @@ -3421,7 +3419,6 @@ char parse(void) // long lLabelID; long lVar1, lVar2; - long lParm2; insptr++; lVar1=*insptr++; @@ -3505,7 +3502,6 @@ char parse(void) case CON_IFCANSEE: { spritetype *s; - short sect; // select sprite for monster to target // if holoduke is on, let them target holoduke first. @@ -4593,9 +4589,8 @@ SKIPJIBS: case CON_GAMETEXT: case CON_DIGITALNUMBER: { - long x,y,z; + long x,y; short tilenum=0; - short a; signed char shade; char orientation=0; char pal; @@ -5683,15 +5678,13 @@ good: // syntax [gs]etuserdef.xxx // long lLabelID; - long lVar1, lVar2; - long lParm2=0; + long lVar2; insptr++; - lVar1=-1; lLabelID=*insptr++; lVar2=*insptr++; - DoUserDef(tw==CON_SETUSERDEF, lVar1, lLabelID, lVar2, g_i, g_p, lParm2); + DoUserDef(tw==CON_SETUSERDEF, lLabelID, lVar2, g_i, g_p); break; } @@ -5702,7 +5695,6 @@ good: // long lLabelID; long lVar1, lVar2; - long lParm2; insptr++; lVar1=GetGameVarID(*insptr++, g_i, g_p); diff --git a/polymer/eduke32/source/global.c b/polymer/eduke32/source/global.c index c54f2b352..59a90043d 100644 --- a/polymer/eduke32/source/global.c +++ b/polymer/eduke32/source/global.c @@ -176,4 +176,6 @@ int nextvoxid = 0; int spriteflags[MAXTILES], actorspriteflags[MAXSPRITES]; +proj_struct projectile[MAXTILES], thisprojectile[MAXSPRITES], defaultprojectile[MAXTILES]; + char cheatkey[2] = { sc_D, sc_N }; diff --git a/polymer/eduke32/source/jmact/control.c b/polymer/eduke32/source/jmact/control.c index 2eb65e1f0..b53ae09d1 100644 --- a/polymer/eduke32/source/jmact/control.c +++ b/polymer/eduke32/source/jmact/control.c @@ -907,7 +907,6 @@ void CONTROL_Ack( void ) boolean CONTROL_Startup(controltype which, int32 ( *TimeFunction )( void ), int32 ticspersecond) { int32 i; - char *p; if (CONTROL_Started) return false; @@ -968,8 +967,6 @@ boolean CONTROL_Startup(controltype which, int32 ( *TimeFunction )( void ), int3 void CONTROL_Shutdown(void) { - int i; - if (!CONTROL_Started) return; CONTROL_JoyPresent = false; diff --git a/polymer/eduke32/source/jmact/file_lib.c b/polymer/eduke32/source/jmact/file_lib.c index 64a9ab85a..02b731ad1 100644 --- a/polymer/eduke32/source/jmact/file_lib.c +++ b/polymer/eduke32/source/jmact/file_lib.c @@ -74,8 +74,6 @@ int32 SafeOpen(const char *filename, int32 mode, int32 sharemode) int32 SafeOpenRead(const char *filename, int32 filetype) { - int32 h; - switch (filetype) { case filetype_binary: return SafeOpen(filename, O_RDONLY|O_BINARY, S_IREAD); @@ -89,8 +87,6 @@ int32 SafeOpenRead(const char *filename, int32 filetype) void SafeClose ( int32 handle ) { - int r; - if (handle < 0) return; if (close(handle) < 0) { if (handle < MaxFiles) diff --git a/polymer/eduke32/source/jmact/keyboard.c b/polymer/eduke32/source/jmact/keyboard.c index 8bf48e764..3faf46f82 100644 --- a/polymer/eduke32/source/jmact/keyboard.c +++ b/polymer/eduke32/source/jmact/keyboard.c @@ -229,7 +229,6 @@ void KB_FlushKeyboardQueue( void ) void KB_ClearKeysDown( void ) { - int i; KB_LastScan = 0; memset(keystatus, 0, sizeof(keystatus)); //keyfifoplc = keyfifoend = 0; diff --git a/polymer/eduke32/source/jmact/scriplib.c b/polymer/eduke32/source/jmact/scriplib.c index 6ce59bf69..42151d533 100644 --- a/polymer/eduke32/source/jmact/scriplib.c +++ b/polymer/eduke32/source/jmact/scriplib.c @@ -600,7 +600,7 @@ boolean SCRIPT_GetDoubleString( int32 scripthandle, char * sectionname, char * e ScriptSectionType *s; ScriptEntryType *e; char *p, ch; - int c,d=0; + int c; if (!SC(scripthandle)) return 1; if (!SCRIPT(scripthandle,script)) return 1; diff --git a/polymer/eduke32/source/mapster32.h b/polymer/eduke32/source/mapster32.h index 2692b60b5..a5610dbea 100644 --- a/polymer/eduke32/source/mapster32.h +++ b/polymer/eduke32/source/mapster32.h @@ -71,7 +71,6 @@ extern long halfxdim16, midydim16, zoom; extern void fixrepeats(short i); char autospritehelp=0,autosecthelp=0; -static char pskysearch[MAXSECTORS]; short MinRate=24, MinD=3; long xoldtimerhandler, lastmessagetime; @@ -95,7 +94,6 @@ static int counter=0; char nosprites=0,purpleon=0,skill=4; char framerateon=1,tabgraphic=2,shadepreview=0,autosave=1; - static char sidemode=0; extern long vel, svel, hvel, angvel; long xvel, yvel, timoff; diff --git a/polymer/eduke32/source/menus.c b/polymer/eduke32/source/menus.c index bd4875b4d..03dea2aed 100644 --- a/polymer/eduke32/source/menus.c +++ b/polymer/eduke32/source/menus.c @@ -33,7 +33,7 @@ int last_menu; short sh,onbar,buttonstat,deletespot; short last_zero,last_fifty,last_onehundred,last_twoohtwo,last_threehundred = 0; -static char fileselect = 1, menunamecnt, menuname[256][64], curpath[80], menupath[80]; +static char fileselect = 1, menunamecnt, menuname[256][64]; static CACHE1D_FIND_REC *finddirs=NULL, *findfiles=NULL, *finddirshigh=NULL, *findfileshigh=NULL; static int numdirs=0, numfiles=0; @@ -799,6 +799,10 @@ void menus(void) if(current_menu == 20005 && i == last_probey) continue; gametextpal(26,40+(i<<3),ud.ridecule[i],MENUHIGHLIGHT(i),0); } + + gametext(160,144,"UP/DOWN = SELECT MACRO",0,2+8+16); + gametext(160,144+9,"ENTER = MODIFY",0,2+8+16); + break; case 20010: diff --git a/polymer/eduke32/source/osdcmds.c b/polymer/eduke32/source/osdcmds.c index 721601e17..60a5de8e5 100644 --- a/polymer/eduke32/source/osdcmds.c +++ b/polymer/eduke32/source/osdcmds.c @@ -48,7 +48,7 @@ int osdcmd_echo(const osdfuncparm_t *parm) int osdcmd_changelevel(const osdfuncparm_t *parm) { - int volume=0,level,i; + int volume=0,level; char *p; if (!VOLUMEONE) { @@ -214,8 +214,6 @@ int osdcmd_fileinfo(const osdfuncparm_t *parm) static int osdcmd_restartvid(const osdfuncparm_t *parm) { - extern long qsetmode; - resetvideomode(); if (setgamemode(ScreenMode,ScreenWidth,ScreenHeight,ScreenBPP)) gameexit("restartvid: Reset failed...\n"); diff --git a/polymer/eduke32/source/player.c b/polymer/eduke32/source/player.c index 09b3230a4..b26ca8063 100644 --- a/polymer/eduke32/source/player.c +++ b/polymer/eduke32/source/player.c @@ -58,8 +58,7 @@ void fadepal(int r, int g, int b, int start, int end, int step) void incur_damage(short snum) { - long damage = 0L, shield_damage = 0L; - short i; + long damage = 0L, shield_damage = 0L; struct player_struct *p; @@ -2008,7 +2007,7 @@ void DoSpawn(short snum) void displaymasks(short snum) { - short i, p; + short p; if(sprite[ps[snum].i].pal == 1) p = 1; @@ -2115,7 +2114,7 @@ char last_quick_kick[MAXPLAYERS]; void displayweapon(short snum) { long gun_pos, looking_arc, cw; - long weapon_xoffset, i, j, x1, y1, x2; + long weapon_xoffset, i, j; char o,pal; signed char gs; struct player_struct *p; @@ -2713,7 +2712,6 @@ void getinput(short snum) int32 keymove; int32 momx,momy; struct player_struct *p; - unsigned char tmpbuf[2048]; momx = momy = 0; p = &ps[snum]; @@ -2974,7 +2972,7 @@ void getinput(short snum) char doincrements(struct player_struct *p) { - long /*j,*/i,snum; + long snum; snum = sprite[p->i].yvel; // j = sync[snum].avel; @@ -3167,8 +3165,7 @@ short weapon_sprites[MAX_WEAPONS] = { KNEE__STATIC, FIRSTGUNSPRITE__STATIC, SHOT void checkweapons(struct player_struct *p) { - short j,cw; - + short cw; long snum; snum = sprite[p->i].yvel; diff --git a/polymer/eduke32/source/premap.c b/polymer/eduke32/source/premap.c index 4d4703c43..cc951c809 100644 --- a/polymer/eduke32/source/premap.c +++ b/polymer/eduke32/source/premap.c @@ -427,7 +427,6 @@ void pickrandomspot(short snum) void resetplayerstats(short snum) { struct player_struct *p; - short i; p = &ps[snum]; @@ -568,7 +567,6 @@ void resetweapons(short snum) void resetinventory(short snum) { struct player_struct *p; - short i; p = &ps[snum]; @@ -1049,7 +1047,6 @@ void newgame(char vn,char ln,char sk) p->gm = 0; { - int j; //AddLog("Newgame"); ResetGameVars(); @@ -1351,7 +1348,7 @@ void waitforeverybody() void dofrontscreens(char *statustext) { - long tincs,i=0,j; + long i=0; if(ud.recstat != 2) { @@ -1454,7 +1451,7 @@ extern void adduserquote(char *daquote); int enterlevel(char g) { - short i,j; + short i; long l; char levname[BMAX_PATH]; diff --git a/polymer/eduke32/source/sounds.c b/polymer/eduke32/source/sounds.c index 1a06306b0..40c06839d 100644 --- a/polymer/eduke32/source/sounds.c +++ b/polymer/eduke32/source/sounds.c @@ -174,7 +174,6 @@ char menunum=0; void intomenusounds(void) { - short i; short menusnds[] = { LASERTRIP_EXPLODE,