diff --git a/polymer/eduke32/build/include/cache1d.h b/polymer/eduke32/build/include/cache1d.h index 6474df728..22de54fe4 100644 --- a/polymer/eduke32/build/include/cache1d.h +++ b/polymer/eduke32/build/include/cache1d.h @@ -17,7 +17,6 @@ extern char filegrp[MAXOPENFILES]; void initcache(intptr_t dacachestart, int32_t dacachesize); void allocache(intptr_t *newhandle, int32_t newbytes, char *newlockptr); -//void suckcache(intptr_t *suckptr); void agecache(void); extern int32_t pathsearchmode; // 0 = gamefs mode (default), 1 = localfs mode (editor's mode) diff --git a/polymer/eduke32/build/src/build.c b/polymer/eduke32/build/src/build.c index 00f3c751c..814b45f90 100644 --- a/polymer/eduke32/build/src/build.c +++ b/polymer/eduke32/build/src/build.c @@ -2476,19 +2476,6 @@ static int32_t backup_drawn_walls(int32_t restore) return 0; } -#if 0 -#define GETWALCOORD(w) (*(int64_t *)&wall[*(const int32_t *)(w)].x) -static int32_t compare_wall_coords(const void *w1, const void *w2) -{ - if (GETWALCOORD(w1) == GETWALCOORD(w2)) - return 0; - if (GETWALCOORD(w1) > GETWALCOORD(w2)) - return 1; - return -1; -} -#undef GETWALCOORD -#endif - // VARIOUS RESETTING FUNCTIONS #define RESET_EDITOR_VARS() do { \ sectorhighlightstat = -1; \ diff --git a/polymer/eduke32/build/src/cache1d.c b/polymer/eduke32/build/src/cache1d.c index 121602c64..392e6cc88 100644 --- a/polymer/eduke32/build/src/cache1d.c +++ b/polymer/eduke32/build/src/cache1d.c @@ -207,40 +207,6 @@ void allocache(intptr_t *newhandle, int32_t newbytes, char *newlockptr) } #endif -#if 0 -void suckcache(intptr_t *suckptr) -{ - int32_t i; - - //Can't exit early, because invalid pointer might be same even though lock = 0 - for (i=0; i 0) && (*cac[i-1].lock == 0)) - { - cac[i-1].leng += cac[i].leng; - cacnum--; - //copybuf(&cac[i+1],&cac[i],(cacnum-i)*sizeof(cactype)); // this looks suspicious, copybuf already multiplies by 4... - Bmemmove(&cac[i], &cac[i+1], (cacnum-i)*sizeof(cactype)); - } - else if ((i < cacnum-1) && (*cac[i+1].lock == 0)) - { - cac[i+1].leng += cac[i].leng; - cacnum--; - //copybuf(&cac[i+1],&cac[i],(cacnum-i)*sizeof(cactype)); // see above - Bmemmove(&cac[i], &cac[i+1], (cacnum-i)*sizeof(cactype)); - } - } - } -} -#endif - void agecache(void) { #ifndef DEBUG_ALLOCACHE_AS_MALLOC diff --git a/polymer/eduke32/source/actors.c b/polymer/eduke32/source/actors.c index a1ce123d3..62dd9f538 100644 --- a/polymer/eduke32/source/actors.c +++ b/polymer/eduke32/source/actors.c @@ -8168,27 +8168,8 @@ void G_MoveWorld(void) { int32_t dx = sintable[(s->ang+512)&2047]; int32_t dy = sintable[(s->ang)&2047]; -#if 0 - int32_t madevisagain = 0; - // dynamic make-invisible check for 'hidden' switches - if (spriteext[i].flags&SPREXT_TEMPINVISIBLE) - { - int16_t sprsect = s->sectnum; - - updatesectorz(s->x, s->y, s->z, &sprsect); - - if (sprsect < 0) - s->cstat |= 32768; - else if (inside(s->x+(dx>>9), s->y+(dx>>9), s->sectnum)==1) - { - s->cstat &= ~32768; - madevisagain = 1; - } - } -#endif if ((s->cstat & 32768) || A_CheckSpriteFlags(i, SPRITE_NOLIGHT)) -// || (madevisagain==0 && !inside(s->x+(dx>>9), s->y+(dx>>9), s->sectnum)) { if (actor[i].lightptr != NULL) { diff --git a/polymer/eduke32/source/astub.c b/polymer/eduke32/source/astub.c index f3c6cbf3e..2b52b7138 100644 --- a/polymer/eduke32/source/astub.c +++ b/polymer/eduke32/source/astub.c @@ -2919,20 +2919,6 @@ void ExtEditSpriteData(int16_t spritenum) //F8 if (eitherALT) //ALT GenericSpriteSearch(); -#if 0 - { - wallsprite=2; - cursearchsprite = spritenum; - curwallnum = 0; - cursearchspritenum = 0; - cursectornum = 0; - search_lotag = sprite[cursearchsprite].lotag; - search_hitag = sprite[cursearchsprite].hitag; - search_lotag = getnumber16("Enter sprite search lotag : ", search_lotag, BTAG_MAX,0); - search_hitag = getnumber16("Enter sprite search hitag : ", search_hitag, BTAG_MAX,0); - printmessage16("Search sprite lo=%d hi=%d",search_lotag,search_hitag); - } -#endif else EditSpriteData(spritenum); } @@ -7824,15 +7810,6 @@ static void Keys2d(void) yax_updategrays(pos.z); } -#if 0 - if (keystatus[KEYSC_QUOTE] && PRESSED_KEYSC(Z)) // ' z - { - editorzrange[0] = getnumber16("Upper Z range: ", editorzrange[0], INT32_MAX, 1); - editorzrange[1] = getnumber16("Lower Z range: ", editorzrange[1], INT32_MAX, 1); - // printmessage16(""); - } -#endif - if (PRESSED_KEYSC(T)) // T (tag) { char buffer[80]; diff --git a/polymer/eduke32/source/m32def.c b/polymer/eduke32/source/m32def.c index 57dad22eb..a9b6653d4 100644 --- a/polymer/eduke32/source/m32def.c +++ b/polymer/eduke32/source/m32def.c @@ -2704,25 +2704,6 @@ repeatcase: C_GetNextVar(); return 0; -#if 0 - case CON_WRITEARRAYTOFILE: - case CON_READARRAYFROMFILE: - if (C_GetNextLabelName(1)) - return 1; - i = GetGamearrayID(tlabel, 0); - if (i > (-1)) - { - *g_scriptPtr++ = i; - } - else - { - C_ReportError(ERROR_NOTAGAMEARRAY); - g_numCompilerErrors++; - } - C_GetNextValue(LABEL_DEFINE); - return 0; -#endif - // *** var ops case CON_RANDVAR: case CON_DISPLAYRANDVAR: @@ -3355,11 +3336,6 @@ repeatcase: else if (tw==CON_QSUBSTR) C_GetManyVars(2); return 0; -#if 0 - case CON_QGETSYSSTR: - C_GetManyVars(2); - return 0; -#endif // *** findnear* case CON_FINDNEARSPRITE: diff --git a/polymer/eduke32/source/m32exec.c b/polymer/eduke32/source/m32exec.c index 2134909e9..f2b04771b 100644 --- a/polymer/eduke32/source/m32exec.c +++ b/polymer/eduke32/source/m32exec.c @@ -2553,26 +2553,6 @@ badindex: switch (tw) { -#if 0 - case CON_QGETSYSSTR: - if (ScriptQuotes[i] == NULL) - { - M32_ERROR("null quote %d %d", i,j); - break; - } - switch (j) - { - case STR_MAPFILENAME: - Bstrcpy(ScriptQuotes[i], boardfilename); - break; - case STR_VERSION: - Bstrcpy(ScriptQuotes[i], "Mapster32"VERSION BUILDDATE); - break; - default: - M32_ERROR("unknown str ID %d %d", i,j); - } - break; -#endif case CON_QSTRCAT: Bstrncat(ScriptQuotes[i], quotetext, (MAXQUOTELEN-1)-Bstrlen(ScriptQuotes[i])); break; diff --git a/polymer/eduke32/source/menus.c b/polymer/eduke32/source/menus.c index 83bc65f89..188e02c64 100644 --- a/polymer/eduke32/source/menus.c +++ b/polymer/eduke32/source/menus.c @@ -115,20 +115,6 @@ void ChangeToMenu(int32_t cm) lastsavehead = -1; } -#if 0 -void savetemp(char *fn,int32_t daptr,int32_t dasiz) -{ - FILE *fp; - - if ((fp = fopen(fn,"wb")) == (FILE *)NULL) - return; - - fwrite((char *)daptr,dasiz,1,fp); - - fclose(fp); -} -#endif - #define LMB (buttonstat&LEFT_MOUSE) #define RMB (buttonstat&RIGHT_MOUSE) #define WHEELUP (buttonstat&WHEELUP_MOUSE) @@ -4811,7 +4797,6 @@ cheat_for_port_credits: ChangeToMenu(351); g_screenCapture = 1; G_DrawRooms(myconnectindex,65536); - //savetemp("duke3d.tmp",waloff[TILE_SAVESHOT],160*100); g_screenCapture = 0; break; diff --git a/polymer/eduke32/source/premap.c b/polymer/eduke32/source/premap.c index bcf54fd9c..a9df00727 100644 --- a/polymer/eduke32/source/premap.c +++ b/polymer/eduke32/source/premap.c @@ -1225,10 +1225,7 @@ static inline void prelevel(char g) for (i=headspritestat[STAT_DEFAULT]; i>=0; i=nextspritestat[i]) { int32_t ii; -#if 0 - int32_t dx, dy; - int16_t sprsec; -#endif + if (PN <= 0) // oob safety for switch below continue; @@ -1248,28 +1245,7 @@ static inline void prelevel(char g) case POWERSWITCH1__STATIC: case LOCKSWITCH1__STATIC: case POWERSWITCH2__STATIC: -#if 0 - dx = sintable[(sprite[i].ang+512)&2047]>>9; - dy = sintable[(sprite[i].ang)&2047]>>9; - - sprsec = sprite[i].sectnum; - - // check if in 'air' (and not inside something 'solid' like - // sprite #624 in E4L1): - updatesectorz(sprite[i].x, sprite[i].y, sprite[i].z, &sprsec); - - // check 2 (slightly different from 'would generate light?'): - if (sprsec >= 0) - updatesectorz(sprite[i].x+dx, sprite[i].y+dy, sprite[i].z, &sprsec); - if (sprsec < 0) - { - // dynamic re-check occurs in G_MoveWorld(): - spriteext[i].flags |= SPREXT_TEMPINVISIBLE; - sprite[i].cstat |= 32768; - } -#endif - // invisi-make for both switch states, but the lower code only - // for the 'on' state (*) + // the lower code only for the 'on' state (*) if (ii==0) { j = sprite[i].lotag+32768;