mirror of
https://github.com/ZDoom/raze-gles.git
synced 2024-12-25 11:10:47 +00:00
Remove some #if 0 blocks that are probably of no interest any more.
For reference, they are the following: - cache1d.c: suckcache() - build.c: compare_wall_coords() - make switch-invisible heuristic - Mapster32: old sprite search - Mapster32: manual z range - m32script: read/writearray, qgetsysstr - menus.c: savetemp() git-svn-id: https://svn.eduke32.com/eduke32@2981 1a8010ca-5511-0410-912e-c29ae57300e0
This commit is contained in:
parent
e4bb83cd39
commit
b8ed142c6b
9 changed files with 2 additions and 175 deletions
|
@ -17,7 +17,6 @@ extern char filegrp[MAXOPENFILES];
|
||||||
|
|
||||||
void initcache(intptr_t dacachestart, int32_t dacachesize);
|
void initcache(intptr_t dacachestart, int32_t dacachesize);
|
||||||
void allocache(intptr_t *newhandle, int32_t newbytes, char *newlockptr);
|
void allocache(intptr_t *newhandle, int32_t newbytes, char *newlockptr);
|
||||||
//void suckcache(intptr_t *suckptr);
|
|
||||||
void agecache(void);
|
void agecache(void);
|
||||||
|
|
||||||
extern int32_t pathsearchmode; // 0 = gamefs mode (default), 1 = localfs mode (editor's mode)
|
extern int32_t pathsearchmode; // 0 = gamefs mode (default), 1 = localfs mode (editor's mode)
|
||||||
|
|
|
@ -2476,19 +2476,6 @@ static int32_t backup_drawn_walls(int32_t restore)
|
||||||
return 0;
|
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
|
// VARIOUS RESETTING FUNCTIONS
|
||||||
#define RESET_EDITOR_VARS() do { \
|
#define RESET_EDITOR_VARS() do { \
|
||||||
sectorhighlightstat = -1; \
|
sectorhighlightstat = -1; \
|
||||||
|
|
|
@ -207,40 +207,6 @@ void allocache(intptr_t *newhandle, int32_t newbytes, char *newlockptr)
|
||||||
}
|
}
|
||||||
#endif
|
#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<cacnum; i++)
|
|
||||||
{
|
|
||||||
if ((intptr_t)(*cac[i].hand) == (intptr_t)suckptr)
|
|
||||||
{
|
|
||||||
if (*cac[i].lock) *cac[i].hand = 0;
|
|
||||||
cac[i].lock = &zerochar;
|
|
||||||
cac[i].hand = 0;
|
|
||||||
|
|
||||||
//Combine empty blocks
|
|
||||||
if ((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)
|
void agecache(void)
|
||||||
{
|
{
|
||||||
#ifndef DEBUG_ALLOCACHE_AS_MALLOC
|
#ifndef DEBUG_ALLOCACHE_AS_MALLOC
|
||||||
|
|
|
@ -8168,27 +8168,8 @@ void G_MoveWorld(void)
|
||||||
{
|
{
|
||||||
int32_t dx = sintable[(s->ang+512)&2047];
|
int32_t dx = sintable[(s->ang+512)&2047];
|
||||||
int32_t dy = sintable[(s->ang)&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))
|
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)
|
if (actor[i].lightptr != NULL)
|
||||||
{
|
{
|
||||||
|
|
|
@ -2919,20 +2919,6 @@ void ExtEditSpriteData(int16_t spritenum) //F8
|
||||||
|
|
||||||
if (eitherALT) //ALT
|
if (eitherALT) //ALT
|
||||||
GenericSpriteSearch();
|
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);
|
else EditSpriteData(spritenum);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -7824,15 +7810,6 @@ static void Keys2d(void)
|
||||||
yax_updategrays(pos.z);
|
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)
|
if (PRESSED_KEYSC(T)) // T (tag)
|
||||||
{
|
{
|
||||||
char buffer[80];
|
char buffer[80];
|
||||||
|
|
|
@ -2704,25 +2704,6 @@ repeatcase:
|
||||||
C_GetNextVar();
|
C_GetNextVar();
|
||||||
return 0;
|
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
|
// *** var ops
|
||||||
case CON_RANDVAR:
|
case CON_RANDVAR:
|
||||||
case CON_DISPLAYRANDVAR:
|
case CON_DISPLAYRANDVAR:
|
||||||
|
@ -3355,11 +3336,6 @@ repeatcase:
|
||||||
else if (tw==CON_QSUBSTR)
|
else if (tw==CON_QSUBSTR)
|
||||||
C_GetManyVars(2);
|
C_GetManyVars(2);
|
||||||
return 0;
|
return 0;
|
||||||
#if 0
|
|
||||||
case CON_QGETSYSSTR:
|
|
||||||
C_GetManyVars(2);
|
|
||||||
return 0;
|
|
||||||
#endif
|
|
||||||
|
|
||||||
// *** findnear*
|
// *** findnear*
|
||||||
case CON_FINDNEARSPRITE:
|
case CON_FINDNEARSPRITE:
|
||||||
|
|
|
@ -2553,26 +2553,6 @@ badindex:
|
||||||
|
|
||||||
switch (tw)
|
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:
|
case CON_QSTRCAT:
|
||||||
Bstrncat(ScriptQuotes[i], quotetext, (MAXQUOTELEN-1)-Bstrlen(ScriptQuotes[i]));
|
Bstrncat(ScriptQuotes[i], quotetext, (MAXQUOTELEN-1)-Bstrlen(ScriptQuotes[i]));
|
||||||
break;
|
break;
|
||||||
|
|
|
@ -115,20 +115,6 @@ void ChangeToMenu(int32_t cm)
|
||||||
lastsavehead = -1;
|
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 LMB (buttonstat&LEFT_MOUSE)
|
||||||
#define RMB (buttonstat&RIGHT_MOUSE)
|
#define RMB (buttonstat&RIGHT_MOUSE)
|
||||||
#define WHEELUP (buttonstat&WHEELUP_MOUSE)
|
#define WHEELUP (buttonstat&WHEELUP_MOUSE)
|
||||||
|
@ -4811,7 +4797,6 @@ cheat_for_port_credits:
|
||||||
ChangeToMenu(351);
|
ChangeToMenu(351);
|
||||||
g_screenCapture = 1;
|
g_screenCapture = 1;
|
||||||
G_DrawRooms(myconnectindex,65536);
|
G_DrawRooms(myconnectindex,65536);
|
||||||
//savetemp("duke3d.tmp",waloff[TILE_SAVESHOT],160*100);
|
|
||||||
g_screenCapture = 0;
|
g_screenCapture = 0;
|
||||||
break;
|
break;
|
||||||
|
|
||||||
|
|
|
@ -1225,10 +1225,7 @@ static inline void prelevel(char g)
|
||||||
for (i=headspritestat[STAT_DEFAULT]; i>=0; i=nextspritestat[i])
|
for (i=headspritestat[STAT_DEFAULT]; i>=0; i=nextspritestat[i])
|
||||||
{
|
{
|
||||||
int32_t ii;
|
int32_t ii;
|
||||||
#if 0
|
|
||||||
int32_t dx, dy;
|
|
||||||
int16_t sprsec;
|
|
||||||
#endif
|
|
||||||
if (PN <= 0) // oob safety for switch below
|
if (PN <= 0) // oob safety for switch below
|
||||||
continue;
|
continue;
|
||||||
|
|
||||||
|
@ -1248,28 +1245,7 @@ static inline void prelevel(char g)
|
||||||
case POWERSWITCH1__STATIC:
|
case POWERSWITCH1__STATIC:
|
||||||
case LOCKSWITCH1__STATIC:
|
case LOCKSWITCH1__STATIC:
|
||||||
case POWERSWITCH2__STATIC:
|
case POWERSWITCH2__STATIC:
|
||||||
#if 0
|
// the lower code only for the 'on' state (*)
|
||||||
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 (*)
|
|
||||||
if (ii==0)
|
if (ii==0)
|
||||||
{
|
{
|
||||||
j = sprite[i].lotag+32768;
|
j = sprite[i].lotag+32768;
|
||||||
|
|
Loading…
Reference in a new issue