mirror of
https://github.com/ZDoom/raze-gles.git
synced 2025-01-11 18:50:46 +00:00
- made Blood's FullMap flag global and removed the hacks to show the full automap.
Also refactor show2dsector into a bit array to get rid of the bit shifting code at play here.
This commit is contained in:
parent
14a2560d5f
commit
73a4e0d1fe
32 changed files with 101 additions and 386 deletions
|
@ -57,7 +57,6 @@ int32_t gMessageFont = 0;
|
||||||
int32_t gMouseSensitivity;
|
int32_t gMouseSensitivity;
|
||||||
bool gNoClip;
|
bool gNoClip;
|
||||||
bool gInfiniteAmmo;
|
bool gInfiniteAmmo;
|
||||||
bool gFullMap;
|
|
||||||
int32_t gDeliriumBlur = 1;
|
int32_t gDeliriumBlur = 1;
|
||||||
|
|
||||||
//////////
|
//////////
|
||||||
|
|
|
@ -43,7 +43,6 @@ extern int32_t gMessageFont;
|
||||||
extern int32_t gMouseSensitivity;
|
extern int32_t gMouseSensitivity;
|
||||||
extern bool gNoClip;
|
extern bool gNoClip;
|
||||||
extern bool gInfiniteAmmo;
|
extern bool gInfiniteAmmo;
|
||||||
extern bool gFullMap;
|
|
||||||
extern int32_t gDeliriumBlur;
|
extern int32_t gDeliriumBlur;
|
||||||
|
|
||||||
///////
|
///////
|
||||||
|
|
|
@ -636,7 +636,7 @@ const int nXWallSize = 24;
|
||||||
|
|
||||||
int dbLoadMap(const char *pPath, int *pX, int *pY, int *pZ, short *pAngle, short *pSector, unsigned int *pCRC) {
|
int dbLoadMap(const char *pPath, int *pX, int *pY, int *pZ, short *pAngle, short *pSector, unsigned int *pCRC) {
|
||||||
int16_t tpskyoff[256];
|
int16_t tpskyoff[256];
|
||||||
memset(show2dsector, 0, sizeof(show2dsector));
|
show2dsector.Zero();
|
||||||
memset(show2dwall, 0, sizeof(show2dwall));
|
memset(show2dwall, 0, sizeof(show2dwall));
|
||||||
memset(show2dsprite, 0, sizeof(show2dsprite));
|
memset(show2dsprite, 0, sizeof(show2dsprite));
|
||||||
#ifdef NOONE_EXTENSIONS
|
#ifdef NOONE_EXTENSIONS
|
||||||
|
|
|
@ -43,7 +43,7 @@ void sub_2541C(int x, int y, int z, short a)
|
||||||
int nSin2 = mulscale16(nSin, yxaspect);
|
int nSin2 = mulscale16(nSin, yxaspect);
|
||||||
for (int i = 0; i < numsectors; i++)
|
for (int i = 0; i < numsectors; i++)
|
||||||
{
|
{
|
||||||
if (gFullMap || (show2dsector[i>>3]&(1<<(i&7))))
|
if (gFullMap || show2dsector[i])
|
||||||
{
|
{
|
||||||
int nStartWall = sector[i].wallptr;
|
int nStartWall = sector[i].wallptr;
|
||||||
int nEndWall = nStartWall+sector[i].wallnum;
|
int nEndWall = nStartWall+sector[i].wallnum;
|
||||||
|
@ -58,9 +58,7 @@ void sub_2541C(int x, int y, int z, short a)
|
||||||
if (sector[pWall->nextsector].ceilingz == nZCeil && sector[pWall->nextsector].floorz == nZFloor
|
if (sector[pWall->nextsector].ceilingz == nZCeil && sector[pWall->nextsector].floorz == nZFloor
|
||||||
&& ((wall[nNextWall].cstat | pWall->cstat) & 0x30) == 0)
|
&& ((wall[nNextWall].cstat | pWall->cstat) & 0x30) == 0)
|
||||||
continue;
|
continue;
|
||||||
if (gFullMap)
|
if (gFullMap || show2dsector[pWall->nextsector])
|
||||||
continue;
|
|
||||||
if (show2dsector[pWall->nextsector>>3]&(1<<(pWall->nextsector&7)))
|
|
||||||
continue;
|
continue;
|
||||||
int wx = pWall->x-x;
|
int wx = pWall->x-x;
|
||||||
int wy = pWall->y-y;
|
int wy = pWall->y-y;
|
||||||
|
@ -80,7 +78,7 @@ void sub_2541C(int x, int y, int z, short a)
|
||||||
int nPSprite = gView->pSprite->index;
|
int nPSprite = gView->pSprite->index;
|
||||||
for (int i = 0; i < numsectors; i++)
|
for (int i = 0; i < numsectors; i++)
|
||||||
{
|
{
|
||||||
if (gFullMap || (show2dsector[i>>3]&(1<<(i&7))))
|
if (gFullMap || show2dsector[i])
|
||||||
{
|
{
|
||||||
for (int nSprite = headspritesect[i]; nSprite >= 0; nSprite = nextspritesect[nSprite])
|
for (int nSprite = headspritesect[i]; nSprite >= 0; nSprite = nextspritesect[nSprite])
|
||||||
{
|
{
|
||||||
|
@ -94,7 +92,7 @@ void sub_2541C(int x, int y, int z, short a)
|
||||||
}
|
}
|
||||||
for (int i = 0; i < numsectors; i++)
|
for (int i = 0; i < numsectors; i++)
|
||||||
{
|
{
|
||||||
if (gFullMap || (show2dsector[i>>3]&(1<<(i&7))))
|
if (gFullMap || show2dsector[i])
|
||||||
{
|
{
|
||||||
int nStartWall = sector[i].wallptr;
|
int nStartWall = sector[i].wallptr;
|
||||||
int nEndWall = nStartWall+sector[i].wallnum;
|
int nEndWall = nStartWall+sector[i].wallnum;
|
||||||
|
|
|
@ -643,7 +643,9 @@ static CONSTEXPR const int32_t pow2long[32] =
|
||||||
// show2dsprite[spritenum>>3] &= ~(1<<(spritenum&7));
|
// show2dsprite[spritenum>>3] &= ~(1<<(spritenum&7));
|
||||||
|
|
||||||
EXTERN int automapping;
|
EXTERN int automapping;
|
||||||
EXTERN char show2dsector[(MAXSECTORS+7)>>3];
|
EXTERN FixedBitArray<MAXSECTORS> show2dsector;
|
||||||
|
EXTERN bool gFullMap;
|
||||||
|
|
||||||
EXTERN char show2dwall[(MAXWALLS+7)>>3];
|
EXTERN char show2dwall[(MAXWALLS+7)>>3];
|
||||||
EXTERN char show2dsprite[(MAXSPRITES+7)>>3];
|
EXTERN char show2dsprite[(MAXSPRITES+7)>>3];
|
||||||
|
|
||||||
|
|
|
@ -1504,7 +1504,7 @@ static void classicScanSector(int16_t startsectnum)
|
||||||
return;
|
return;
|
||||||
|
|
||||||
if (automapping)
|
if (automapping)
|
||||||
show2dsector[startsectnum>>3] |= pow2char[startsectnum&7];
|
show2dsector.Set(startsectnum);
|
||||||
|
|
||||||
sectorborder[0] = startsectnum;
|
sectorborder[0] = startsectnum;
|
||||||
int32_t sectorbordercnt = 1;
|
int32_t sectorbordercnt = 1;
|
||||||
|
@ -7852,7 +7852,7 @@ void renderDrawMapView(int32_t dax, int32_t day, int32_t zoome, int16_t ang)
|
||||||
usectorptr_t sec;
|
usectorptr_t sec;
|
||||||
|
|
||||||
for (s=0,sec=(usectorptr_t)§or[s]; s<numsectors; s++,sec++)
|
for (s=0,sec=(usectorptr_t)§or[s]; s<numsectors; s++,sec++)
|
||||||
if (show2dsector[s>>3]&pow2char[s&7])
|
if (gFullMap || show2dsector[s])
|
||||||
{
|
{
|
||||||
#ifdef YAX_ENABLE
|
#ifdef YAX_ENABLE
|
||||||
if (yax_getbunch(s, YAX_FLOOR) >= 0 && (sector[s].floorstat&(256+128))==0)
|
if (yax_getbunch(s, YAX_FLOOR) >= 0 && (sector[s].floorstat&(256+128))==0)
|
||||||
|
@ -8093,7 +8093,7 @@ static void enginePrepareLoadBoard(FileReader & fr, vec3_t *dapos, int16_t *daan
|
||||||
{
|
{
|
||||||
initspritelists();
|
initspritelists();
|
||||||
|
|
||||||
Bmemset(show2dsector, 0, sizeof(show2dsector));
|
show2dsector.Zero();
|
||||||
Bmemset(show2dsprite, 0, sizeof(show2dsprite));
|
Bmemset(show2dsprite, 0, sizeof(show2dsprite));
|
||||||
Bmemset(show2dwall, 0, sizeof(show2dwall));
|
Bmemset(show2dwall, 0, sizeof(show2dwall));
|
||||||
Bmemset(editwall, 0, sizeof(editwall));
|
Bmemset(editwall, 0, sizeof(editwall));
|
||||||
|
|
|
@ -2912,7 +2912,7 @@ void polymost_scansector(int32_t sectnum)
|
||||||
if (sectnum < 0) return;
|
if (sectnum < 0) return;
|
||||||
|
|
||||||
if (automapping)
|
if (automapping)
|
||||||
show2dsector[sectnum>>3] |= pow2char[sectnum&7];
|
show2dsector.Set(sectnum);
|
||||||
|
|
||||||
sectorborder[0] = sectnum;
|
sectorborder[0] = sectnum;
|
||||||
int sectorbordercnt = 1;
|
int sectorbordercnt = 1;
|
||||||
|
|
|
@ -486,7 +486,7 @@ void SaveEngineState()
|
||||||
|
|
||||||
fw->Write(show2dwall, sizeof(show2dwall));
|
fw->Write(show2dwall, sizeof(show2dwall));
|
||||||
fw->Write(show2dsprite, sizeof(show2dsprite));
|
fw->Write(show2dsprite, sizeof(show2dsprite));
|
||||||
fw->Write(show2dsector, sizeof(show2dsector));
|
fw->Write(&show2dsector, sizeof(show2dsector));
|
||||||
WriteMagic(fw);
|
WriteMagic(fw);
|
||||||
|
|
||||||
fw->Write(&numyaxbunches, sizeof(numyaxbunches));
|
fw->Write(&numyaxbunches, sizeof(numyaxbunches));
|
||||||
|
@ -549,7 +549,7 @@ void LoadEngineState()
|
||||||
|
|
||||||
fr.Read(show2dwall, sizeof(show2dwall));
|
fr.Read(show2dwall, sizeof(show2dwall));
|
||||||
fr.Read(show2dsprite, sizeof(show2dsprite));
|
fr.Read(show2dsprite, sizeof(show2dsprite));
|
||||||
fr.Read(show2dsector, sizeof(show2dsector));
|
fr.Read(&show2dsector, sizeof(show2dsector));
|
||||||
CheckMagic(fr);
|
CheckMagic(fr);
|
||||||
|
|
||||||
fr.Read(&numyaxbunches, sizeof(numyaxbunches));
|
fr.Read(&numyaxbunches, sizeof(numyaxbunches));
|
||||||
|
|
|
@ -1498,6 +1498,11 @@ public:
|
||||||
{
|
{
|
||||||
memset(&bytes[0], 0, sizeof(bytes));
|
memset(&bytes[0], 0, sizeof(bytes));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
void SetAll(bool on)
|
||||||
|
{
|
||||||
|
memset(&bytes[0], on ? -1 : 0, sizeof(bytes));
|
||||||
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
// A wrapper to externally stored data.
|
// A wrapper to externally stored data.
|
||||||
|
|
|
@ -638,13 +638,9 @@ void G_DoCheats(void)
|
||||||
return;
|
return;
|
||||||
|
|
||||||
case CHEAT_SHOWMAP: // SHOW ALL OF THE MAP TOGGLE;
|
case CHEAT_SHOWMAP: // SHOW ALL OF THE MAP TOGGLE;
|
||||||
ud.showallmap = !ud.showallmap;
|
gFullMap = !gFullMap;
|
||||||
|
|
||||||
for (char & i : show2dsector)
|
P_DoQuote(gFullMap ? QUOTE_SHOW_MAP_ON : QUOTE_SHOW_MAP_OFF, pPlayer);
|
||||||
i = ud.showallmap*255;
|
|
||||||
|
|
||||||
P_DoQuote(ud.showallmap ? QUOTE_SHOW_MAP_ON : QUOTE_SHOW_MAP_OFF,
|
|
||||||
pPlayer);
|
|
||||||
|
|
||||||
end_cheat(pPlayer);
|
end_cheat(pPlayer);
|
||||||
return;
|
return;
|
||||||
|
|
|
@ -116,7 +116,7 @@ static int32_t G_OpenDemoRead(int32_t g_whichDemo) // 0 = mine
|
||||||
g_demo_cnt = 1;
|
g_demo_cnt = 1;
|
||||||
ud.reccnt = 0;
|
ud.reccnt = 0;
|
||||||
|
|
||||||
ud.god = ud.cashman = ud.eog = ud.showallmap = 0;
|
ud.god = ud.cashman = ud.eog = gFullMap = 0;
|
||||||
ud.noclip = ud.scrollmode = ud.overhead_on = 0; //= ud.pause_on = 0;
|
ud.noclip = ud.scrollmode = ud.overhead_on = 0; //= ud.pause_on = 0;
|
||||||
|
|
||||||
totalclock = ototalclock = lockclock = 0;
|
totalclock = ototalclock = lockclock = 0;
|
||||||
|
@ -576,9 +576,6 @@ RECHECK:
|
||||||
g_demo_cnt = 1;
|
g_demo_cnt = 1;
|
||||||
ud.reccnt = 0;
|
ud.reccnt = 0;
|
||||||
|
|
||||||
// ud.god = ud.cashman = ud.eog = ud.showallmap = 0;
|
|
||||||
// ud.noclip = ud.scrollmode = ud.overhead_on = ud.pause_on = 0;
|
|
||||||
|
|
||||||
totalclock = ototalclock = lockclock = 0;
|
totalclock = ototalclock = lockclock = 0;
|
||||||
}
|
}
|
||||||
else CORRUPT(0);
|
else CORRUPT(0);
|
||||||
|
|
|
@ -173,7 +173,7 @@ typedef struct {
|
||||||
} config;
|
} config;
|
||||||
|
|
||||||
char overhead_on,last_overhead,showweapons;
|
char overhead_on,last_overhead,showweapons;
|
||||||
char god,warp_on,cashman,eog,showallmap;
|
char god,warp_on,cashman,eog;
|
||||||
char scrollmode,noclip;
|
char scrollmode,noclip;
|
||||||
char display_bonus_screen;
|
char display_bonus_screen;
|
||||||
char show_level_text;
|
char show_level_text;
|
||||||
|
|
|
@ -6535,7 +6535,7 @@ void G_SaveMapState(void)
|
||||||
Bmemcpy(&save->g_mirrorWall[0],&g_mirrorWall[0],sizeof(g_mirrorWall));
|
Bmemcpy(&save->g_mirrorWall[0],&g_mirrorWall[0],sizeof(g_mirrorWall));
|
||||||
Bmemcpy(&save->g_mirrorSector[0],&g_mirrorSector[0],sizeof(g_mirrorSector));
|
Bmemcpy(&save->g_mirrorSector[0],&g_mirrorSector[0],sizeof(g_mirrorSector));
|
||||||
save->g_mirrorCount = g_mirrorCount;
|
save->g_mirrorCount = g_mirrorCount;
|
||||||
Bmemcpy(&save->show2dsector[0],&show2dsector[0],sizeof(show2dsector));
|
save->show2dsector = show2dsector;
|
||||||
save->g_cloudCnt = g_cloudCnt;
|
save->g_cloudCnt = g_cloudCnt;
|
||||||
Bmemcpy(&save->g_cloudSect[0],&g_cloudSect[0],sizeof(g_cloudSect));
|
Bmemcpy(&save->g_cloudSect[0],&g_cloudSect[0],sizeof(g_cloudSect));
|
||||||
save->g_cloudX = g_cloudX;
|
save->g_cloudX = g_cloudX;
|
||||||
|
@ -6672,7 +6672,7 @@ void G_RestoreMapState(void)
|
||||||
Bmemcpy(&g_mirrorWall[0],&pSavedState->g_mirrorWall[0],sizeof(g_mirrorWall));
|
Bmemcpy(&g_mirrorWall[0],&pSavedState->g_mirrorWall[0],sizeof(g_mirrorWall));
|
||||||
Bmemcpy(&g_mirrorSector[0],&pSavedState->g_mirrorSector[0],sizeof(g_mirrorSector));
|
Bmemcpy(&g_mirrorSector[0],&pSavedState->g_mirrorSector[0],sizeof(g_mirrorSector));
|
||||||
g_mirrorCount = pSavedState->g_mirrorCount;
|
g_mirrorCount = pSavedState->g_mirrorCount;
|
||||||
Bmemcpy(&show2dsector[0],&pSavedState->show2dsector[0],sizeof(show2dsector));
|
show2dsector = pSavedState->show2dsector;
|
||||||
g_cloudCnt = pSavedState->g_cloudCnt;
|
g_cloudCnt = pSavedState->g_cloudCnt;
|
||||||
Bmemcpy(&g_cloudSect[0],&pSavedState->g_cloudSect[0],sizeof(g_cloudSect));
|
Bmemcpy(&g_cloudSect[0],&pSavedState->g_cloudSect[0],sizeof(g_cloudSect));
|
||||||
g_cloudX = pSavedState->g_cloudX;
|
g_cloudX = pSavedState->g_cloudX;
|
||||||
|
|
|
@ -1385,7 +1385,7 @@ int32_t __fastcall VM_GetUserdef(int32_t labelNum, int const lParm2)
|
||||||
case USERDEFS_WARP_ON: labelNum = ud.warp_on; break;
|
case USERDEFS_WARP_ON: labelNum = ud.warp_on; break;
|
||||||
case USERDEFS_CASHMAN: labelNum = ud.cashman; break;
|
case USERDEFS_CASHMAN: labelNum = ud.cashman; break;
|
||||||
case USERDEFS_EOG: labelNum = ud.eog; break;
|
case USERDEFS_EOG: labelNum = ud.eog; break;
|
||||||
case USERDEFS_SHOWALLMAP: labelNum = ud.showallmap; break;
|
case USERDEFS_SHOWALLMAP: labelNum = gFullMap; break;
|
||||||
case USERDEFS_SHOW_HELP: labelNum = 0; break;
|
case USERDEFS_SHOW_HELP: labelNum = 0; break;
|
||||||
case USERDEFS_SCROLLMODE: labelNum = ud.scrollmode; break;
|
case USERDEFS_SCROLLMODE: labelNum = ud.scrollmode; break;
|
||||||
case USERDEFS_CLIPPING: labelNum = ud.noclip; break;
|
case USERDEFS_CLIPPING: labelNum = ud.noclip; break;
|
||||||
|
@ -1573,7 +1573,7 @@ void __fastcall VM_SetUserdef(int const labelNum, int const lParm2, int32_t cons
|
||||||
case USERDEFS_WARP_ON: ud.warp_on = iSet; break;
|
case USERDEFS_WARP_ON: ud.warp_on = iSet; break;
|
||||||
case USERDEFS_CASHMAN: ud.cashman = iSet; break;
|
case USERDEFS_CASHMAN: ud.cashman = iSet; break;
|
||||||
case USERDEFS_EOG: ud.eog = iSet; break;
|
case USERDEFS_EOG: ud.eog = iSet; break;
|
||||||
case USERDEFS_SHOWALLMAP: ud.showallmap = iSet; break;
|
case USERDEFS_SHOWALLMAP: gFullMap = iSet; break;
|
||||||
case USERDEFS_SHOW_HELP: break;
|
case USERDEFS_SHOW_HELP: break;
|
||||||
case USERDEFS_SCROLLMODE: ud.scrollmode = iSet; break;
|
case USERDEFS_SCROLLMODE: ud.scrollmode = iSet; break;
|
||||||
case USERDEFS_CLIPPING: ud.noclip = iSet; break;
|
case USERDEFS_CLIPPING: ud.noclip = iSet; break;
|
||||||
|
|
|
@ -1339,7 +1339,7 @@ static void Gv_AddSystemVars(void)
|
||||||
// SYSTEM_GAMEARRAY
|
// SYSTEM_GAMEARRAY
|
||||||
Gv_NewArray("gotpic", (void *)&gotpic[0], MAXTILES, GAMEARRAY_SYSTEM | GAMEARRAY_BITMAP);
|
Gv_NewArray("gotpic", (void *)&gotpic[0], MAXTILES, GAMEARRAY_SYSTEM | GAMEARRAY_BITMAP);
|
||||||
Gv_NewArray("radiusdmgstatnums", (void *)&g_radiusDmgStatnums[0], MAXSTATUS, GAMEARRAY_SYSTEM | GAMEARRAY_BITMAP);
|
Gv_NewArray("radiusdmgstatnums", (void *)&g_radiusDmgStatnums[0], MAXSTATUS, GAMEARRAY_SYSTEM | GAMEARRAY_BITMAP);
|
||||||
Gv_NewArray("show2dsector", (void *)&show2dsector[0], MAXSECTORS, GAMEARRAY_SYSTEM | GAMEARRAY_BITMAP);
|
Gv_NewArray("show2dsector", (void *)&show2dsector, MAXSECTORS, GAMEARRAY_SYSTEM | GAMEARRAY_BITMAP);
|
||||||
Gv_NewArray("tilesizx", (void *)tileWidth, MAXTILES, GAMEARRAY_SYSTEM | GAMEARRAY_FUNC | GAMEARRAY_READONLY);
|
Gv_NewArray("tilesizx", (void *)tileWidth, MAXTILES, GAMEARRAY_SYSTEM | GAMEARRAY_FUNC | GAMEARRAY_READONLY);
|
||||||
Gv_NewArray("tilesizy", (void *)tileHeight, MAXTILES, GAMEARRAY_SYSTEM | GAMEARRAY_FUNC | GAMEARRAY_READONLY);
|
Gv_NewArray("tilesizy", (void *)tileHeight, MAXTILES, GAMEARRAY_SYSTEM | GAMEARRAY_FUNC | GAMEARRAY_READONLY);
|
||||||
#endif
|
#endif
|
||||||
|
|
|
@ -670,7 +670,7 @@ void P_ResetPlayer(int playerNum)
|
||||||
{
|
{
|
||||||
auto &p = *g_player[playerNum].ps;
|
auto &p = *g_player[playerNum].ps;
|
||||||
|
|
||||||
ud.showallmap = 0;
|
gFullMap = 0;
|
||||||
|
|
||||||
p.access_spritenum = -1;
|
p.access_spritenum = -1;
|
||||||
p.actorsqu = -1;
|
p.actorsqu = -1;
|
||||||
|
@ -1205,7 +1205,7 @@ static void G_DeleteTempEffectors()
|
||||||
|
|
||||||
static void prelevel(int g)
|
static void prelevel(int g)
|
||||||
{
|
{
|
||||||
Bmemset(show2dsector, 0, sizeof(show2dsector));
|
show2dsector.Zero();
|
||||||
#ifdef LEGACY_ROR
|
#ifdef LEGACY_ROR
|
||||||
Bmemset(ror_protectedsectors, 0, MAXSECTORS);
|
Bmemset(ror_protectedsectors, 0, MAXSECTORS);
|
||||||
#endif
|
#endif
|
||||||
|
|
|
@ -1162,7 +1162,6 @@ static const dataspec_t svgm_anmisc[] =
|
||||||
{ 0, &g_spriteDeleteQueuePos, sizeof(g_spriteDeleteQueuePos), 1 },
|
{ 0, &g_spriteDeleteQueuePos, sizeof(g_spriteDeleteQueuePos), 1 },
|
||||||
{ DS_NOCHK, &g_deleteQueueSize, sizeof(g_deleteQueueSize), 1 },
|
{ DS_NOCHK, &g_deleteQueueSize, sizeof(g_deleteQueueSize), 1 },
|
||||||
{ DS_CNT(g_deleteQueueSize), &SpriteDeletionQueue[0], sizeof(int16_t), (intptr_t)&g_deleteQueueSize },
|
{ DS_CNT(g_deleteQueueSize), &SpriteDeletionQueue[0], sizeof(int16_t), (intptr_t)&g_deleteQueueSize },
|
||||||
{ 0, &show2dsector[0], sizeof(uint8_t), (MAXSECTORS+7)>>3 },
|
|
||||||
{ DS_NOCHK, &g_cloudCnt, sizeof(g_cloudCnt), 1 },
|
{ DS_NOCHK, &g_cloudCnt, sizeof(g_cloudCnt), 1 },
|
||||||
{ 0, &g_cloudSect[0], sizeof(g_cloudSect), 1 },
|
{ 0, &g_cloudSect[0], sizeof(g_cloudSect), 1 },
|
||||||
{ 0, &g_cloudX, sizeof(g_cloudX), 1 },
|
{ 0, &g_cloudX, sizeof(g_cloudX), 1 },
|
||||||
|
|
|
@ -249,7 +249,7 @@ static void G_DrawOverheadMap(int32_t cposx, int32_t cposy, int32_t czoom, int16
|
||||||
//Draw red lines
|
//Draw red lines
|
||||||
for (i=numsectors-1; i>=0; i--)
|
for (i=numsectors-1; i>=0; i--)
|
||||||
{
|
{
|
||||||
if (!(show2dsector[i>>3]&pow2char[i&7])) continue;
|
if (!gFullMap && !show2dsector[i]) continue;
|
||||||
|
|
||||||
startwall = sector[i].wallptr;
|
startwall = sector[i].wallptr;
|
||||||
endwall = sector[i].wallptr + sector[i].wallnum;
|
endwall = sector[i].wallptr + sector[i].wallnum;
|
||||||
|
@ -265,7 +265,7 @@ static void G_DrawOverheadMap(int32_t cposx, int32_t cposy, int32_t czoom, int16
|
||||||
if (sector[wal->nextsector].ceilingz == z1 && sector[wal->nextsector].floorz == z2)
|
if (sector[wal->nextsector].ceilingz == z1 && sector[wal->nextsector].floorz == z2)
|
||||||
if (((wal->cstat|wall[wal->nextwall].cstat)&(16+32)) == 0) continue;
|
if (((wal->cstat|wall[wal->nextwall].cstat)&(16+32)) == 0) continue;
|
||||||
|
|
||||||
if (!(show2dsector[wal->nextsector >> 3] & pow2char[wal->nextsector & 7]))
|
if (!gFullMap && !show2dsector[wal->nextsector])
|
||||||
col = PalEntry(170, 170, 170);
|
col = PalEntry(170, 170, 170);
|
||||||
else continue;
|
else continue;
|
||||||
|
|
||||||
|
@ -288,7 +288,7 @@ static void G_DrawOverheadMap(int32_t cposx, int32_t cposy, int32_t czoom, int16
|
||||||
k = g_player[screenpeek].ps->i;
|
k = g_player[screenpeek].ps->i;
|
||||||
if (!FURY) for (i=numsectors-1; i>=0; i--)
|
if (!FURY) for (i=numsectors-1; i>=0; i--)
|
||||||
{
|
{
|
||||||
if (!(show2dsector[i>>3]&pow2char[i&7])) continue;
|
if (!gFullMap && !show2dsector[i]) continue;
|
||||||
for (j=headspritesect[i]; j>=0; j=nextspritesect[j])
|
for (j=headspritesect[i]; j>=0; j=nextspritesect[j])
|
||||||
{
|
{
|
||||||
spr = &sprite[j];
|
spr = &sprite[j];
|
||||||
|
@ -432,7 +432,7 @@ static void G_DrawOverheadMap(int32_t cposx, int32_t cposy, int32_t czoom, int16
|
||||||
//Draw white lines
|
//Draw white lines
|
||||||
for (i=numsectors-1; i>=0; i--)
|
for (i=numsectors-1; i>=0; i--)
|
||||||
{
|
{
|
||||||
if (!(show2dsector[i>>3]&pow2char[i&7])) continue;
|
if (!gFullMap && !show2dsector[i]) continue;
|
||||||
|
|
||||||
startwall = sector[i].wallptr;
|
startwall = sector[i].wallptr;
|
||||||
endwall = sector[i].wallptr + sector[i].wallnum;
|
endwall = sector[i].wallptr + sector[i].wallnum;
|
||||||
|
@ -728,7 +728,7 @@ void G_DisplayRest(int32_t smoothratio)
|
||||||
{
|
{
|
||||||
const walltype *wal = &wall[sector[i].wallptr];
|
const walltype *wal = &wall[sector[i].wallptr];
|
||||||
|
|
||||||
show2dsector[i>>3] |= pow2char[i&7];
|
show2dsector.Set(i);
|
||||||
for (j=sector[i].wallnum; j>0; j--, wal++)
|
for (j=sector[i].wallnum; j>0; j--, wal++)
|
||||||
{
|
{
|
||||||
i = wal->nextsector;
|
i = wal->nextsector;
|
||||||
|
@ -737,7 +737,7 @@ void G_DisplayRest(int32_t smoothratio)
|
||||||
if (wall[wal->nextwall].cstat&0x0071) continue;
|
if (wall[wal->nextwall].cstat&0x0071) continue;
|
||||||
if (sector[i].lotag == 32767) continue;
|
if (sector[i].lotag == 32767) continue;
|
||||||
if (sector[i].ceilingz >= sector[i].floorz) continue;
|
if (sector[i].ceilingz >= sector[i].floorz) continue;
|
||||||
show2dsector[i>>3] |= pow2char[i&7];
|
show2dsector.Set(i);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -901,13 +901,7 @@ void G_DisplayRest(int32_t smoothratio)
|
||||||
if (ud.pause_on==1 && (g_player[myconnectindex].ps->gm&MODE_MENU) == 0)
|
if (ud.pause_on==1 && (g_player[myconnectindex].ps->gm&MODE_MENU) == 0)
|
||||||
menutext_center(100, GStrings("Game Paused"));
|
menutext_center(100, GStrings("Game Paused"));
|
||||||
|
|
||||||
#ifdef YAX_DEBUG
|
|
||||||
M32_drawdebug();
|
|
||||||
#endif
|
|
||||||
|
|
||||||
#ifdef USE_OPENGL
|
|
||||||
mdpause = (ud.pause_on || (ud.recstat==2 && (g_demo_paused && g_demo_goalCnt==0)) || (g_player[myconnectindex].ps->gm&MODE_MENU && numplayers < 2));
|
mdpause = (ud.pause_on || (ud.recstat==2 && (g_demo_paused && g_demo_goalCnt==0)) || (g_player[myconnectindex].ps->gm&MODE_MENU && numplayers < 2));
|
||||||
#endif
|
|
||||||
|
|
||||||
// JBF 20040124: display level stats in screen corner
|
// JBF 20040124: display level stats in screen corner
|
||||||
if (ud.overhead_on != 2 && hud_stats && VM_OnEvent(EVENT_DISPLAYLEVELSTATS, g_player[screenpeek].ps->i, screenpeek) == 0)
|
if (ud.overhead_on != 2 && hud_stats && VM_OnEvent(EVENT_DISPLAYLEVELSTATS, g_player[screenpeek].ps->i, screenpeek) == 0)
|
||||||
|
|
|
@ -74,7 +74,7 @@ typedef struct {
|
||||||
uint16_t g_earthquakeTime;
|
uint16_t g_earthquakeTime;
|
||||||
int8_t g_playerSpawnCnt;
|
int8_t g_playerSpawnCnt;
|
||||||
|
|
||||||
uint8_t show2dsector[(MAXSECTORS+7)>>3];
|
FixedBitArray<MAXSECTORS> show2dsector;
|
||||||
|
|
||||||
actor_t actor[MAXSPRITES];
|
actor_t actor[MAXSPRITES];
|
||||||
playerspawn_t g_playerSpawnPoints[MAXPLAYERS];
|
playerspawn_t g_playerSpawnPoints[MAXPLAYERS];
|
||||||
|
|
|
@ -37,7 +37,7 @@ void MarkSectorSeen(short nSector);
|
||||||
|
|
||||||
void InitMap()
|
void InitMap()
|
||||||
{
|
{
|
||||||
memset(show2dsector, 0, sizeof(show2dsector));
|
show2dsector.Zero();
|
||||||
memset(show2dwall, 0, sizeof(show2dwall));
|
memset(show2dwall, 0, sizeof(show2dwall));
|
||||||
memset(show2dsprite, 0, sizeof(show2dsprite));
|
memset(show2dsprite, 0, sizeof(show2dsprite));
|
||||||
|
|
||||||
|
@ -54,9 +54,9 @@ void GrabMap()
|
||||||
|
|
||||||
void MarkSectorSeen(short nSector)
|
void MarkSectorSeen(short nSector)
|
||||||
{
|
{
|
||||||
if (!((1 << (nSector & 7)) & show2dsector[nSector >> 3]))
|
if (!show2dsector[nSector])
|
||||||
{
|
{
|
||||||
show2dsector[nSector >> 3] |= 1 << (nSector & 7);
|
show2dsector.Set(nSector);
|
||||||
|
|
||||||
short startwall = sector[nSector].wallptr;
|
short startwall = sector[nSector].wallptr;
|
||||||
short nWalls = sector[nSector].wallnum;
|
short nWalls = sector[nSector].wallnum;
|
||||||
|
@ -321,7 +321,7 @@ static void G_DrawOverheadMap(int32_t cposx, int32_t cposy, int32_t czoom, int16
|
||||||
//Draw red lines
|
//Draw red lines
|
||||||
for (i=numsectors-1; i>=0; i--)
|
for (i=numsectors-1; i>=0; i--)
|
||||||
{
|
{
|
||||||
if (!(show2dsector[i>>3]&pow2char[i&7])) continue;
|
if (!gFullMap && !show2dsector[i]) continue;
|
||||||
|
|
||||||
startwall = sector[i].wallptr;
|
startwall = sector[i].wallptr;
|
||||||
endwall = sector[i].wallptr + sector[i].wallnum;
|
endwall = sector[i].wallptr + sector[i].wallnum;
|
||||||
|
@ -357,161 +357,10 @@ static void G_DrawOverheadMap(int32_t cposx, int32_t cposy, int32_t czoom, int16
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
#if 0
|
|
||||||
renderEnableFog();
|
|
||||||
|
|
||||||
//Draw sprites
|
|
||||||
k = PlayerList[nLocalPlayer].nSprite;
|
|
||||||
if (!FURY) for (i=numsectors-1; i>=0; i--)
|
|
||||||
{
|
|
||||||
if (!(show2dsector[i>>3]&pow2char[i&7])) continue;
|
|
||||||
for (j=headspritesect[i]; j>=0; j=nextspritesect[j])
|
|
||||||
{
|
|
||||||
spr = &sprite[j];
|
|
||||||
|
|
||||||
if (j == k || (spr->cstat&0x8000) || spr->cstat == 257 || spr->xrepeat == 0) continue;
|
|
||||||
|
|
||||||
col = PalEntry(0, 170, 170);
|
|
||||||
if (spr->cstat & 1) col = PalEntry(170, 0, 170);
|
|
||||||
|
|
||||||
sprx = spr->x;
|
|
||||||
spry = spr->y;
|
|
||||||
|
|
||||||
if ((spr->cstat&257) != 0) switch (spr->cstat&48)
|
|
||||||
{
|
|
||||||
case 0:
|
|
||||||
// break;
|
|
||||||
|
|
||||||
ox = sprx-cposx;
|
|
||||||
oy = spry-cposy;
|
|
||||||
x1 = dmulscale16(ox, xvect, -oy, yvect);
|
|
||||||
y1 = dmulscale16(oy, xvect2, ox, yvect2);
|
|
||||||
|
|
||||||
ox = (sintable[(spr->ang+512)&2047]>>7);
|
|
||||||
oy = (sintable[(spr->ang)&2047]>>7);
|
|
||||||
x2 = dmulscale16(ox, xvect, -oy, yvect);
|
|
||||||
y2 = dmulscale16(oy, xvect, ox, yvect);
|
|
||||||
|
|
||||||
x3 = mulscale16(x2, yxaspect);
|
|
||||||
y3 = mulscale16(y2, yxaspect);
|
|
||||||
|
|
||||||
renderDrawLine(x1-x2+(xdim<<11), y1-y3+(ydim<<11),
|
|
||||||
x1+x2+(xdim<<11), y1+y3+(ydim<<11), col);
|
|
||||||
renderDrawLine(x1-y2+(xdim<<11), y1+x3+(ydim<<11),
|
|
||||||
x1+x2+(xdim<<11), y1+y3+(ydim<<11), col);
|
|
||||||
renderDrawLine(x1+y2+(xdim<<11), y1-x3+(ydim<<11),
|
|
||||||
x1+x2+(xdim<<11), y1+y3+(ydim<<11), col);
|
|
||||||
break;
|
|
||||||
|
|
||||||
case 16:
|
|
||||||
if (spr->picnum == LASERLINE)
|
|
||||||
{
|
|
||||||
x1 = sprx;
|
|
||||||
y1 = spry;
|
|
||||||
tilenum = spr->picnum;
|
|
||||||
xoff = picanm[tilenum].xofs + spr->xoffset;
|
|
||||||
if ((spr->cstat&4) > 0) xoff = -xoff;
|
|
||||||
k = spr->ang;
|
|
||||||
l = spr->xrepeat;
|
|
||||||
dax = sintable[k&2047]*l;
|
|
||||||
day = sintable[(k+1536)&2047]*l;
|
|
||||||
l = tilesiz[tilenum].x;
|
|
||||||
k = (l>>1)+xoff;
|
|
||||||
x1 -= mulscale16(dax, k);
|
|
||||||
x2 = x1+mulscale16(dax, l);
|
|
||||||
y1 -= mulscale16(day, k);
|
|
||||||
y2 = y1+mulscale16(day, l);
|
|
||||||
|
|
||||||
ox = x1-cposx;
|
|
||||||
oy = y1-cposy;
|
|
||||||
x1 = dmulscale16(ox, xvect, -oy, yvect);
|
|
||||||
y1 = dmulscale16(oy, xvect2, ox, yvect2);
|
|
||||||
|
|
||||||
ox = x2-cposx;
|
|
||||||
oy = y2-cposy;
|
|
||||||
x2 = dmulscale16(ox, xvect, -oy, yvect);
|
|
||||||
y2 = dmulscale16(oy, xvect2, ox, yvect2);
|
|
||||||
|
|
||||||
renderDrawLine(x1+(xdim<<11), y1+(ydim<<11),
|
|
||||||
x2+(xdim<<11), y2+(ydim<<11), col);
|
|
||||||
}
|
|
||||||
|
|
||||||
break;
|
|
||||||
|
|
||||||
case 32:
|
|
||||||
tilenum = spr->picnum;
|
|
||||||
xoff = picanm[tilenum].xofs + spr->xoffset;
|
|
||||||
yoff = picanm[tilenum].yofs + spr->yoffset;
|
|
||||||
if ((spr->cstat&4) > 0) xoff = -xoff;
|
|
||||||
if ((spr->cstat&8) > 0) yoff = -yoff;
|
|
||||||
|
|
||||||
k = spr->ang;
|
|
||||||
cosang = sintable[(k+512)&2047];
|
|
||||||
sinang = sintable[k&2047];
|
|
||||||
xspan = tilesiz[tilenum].x;
|
|
||||||
xrepeat = spr->xrepeat;
|
|
||||||
yspan = tilesiz[tilenum].y;
|
|
||||||
yrepeat = spr->yrepeat;
|
|
||||||
|
|
||||||
dax = ((xspan>>1)+xoff)*xrepeat;
|
|
||||||
day = ((yspan>>1)+yoff)*yrepeat;
|
|
||||||
x1 = sprx + dmulscale16(sinang, dax, cosang, day);
|
|
||||||
y1 = spry + dmulscale16(sinang, day, -cosang, dax);
|
|
||||||
l = xspan*xrepeat;
|
|
||||||
x2 = x1 - mulscale16(sinang, l);
|
|
||||||
y2 = y1 + mulscale16(cosang, l);
|
|
||||||
l = yspan*yrepeat;
|
|
||||||
k = -mulscale16(cosang, l);
|
|
||||||
x3 = x2+k;
|
|
||||||
x4 = x1+k;
|
|
||||||
k = -mulscale16(sinang, l);
|
|
||||||
y3 = y2+k;
|
|
||||||
y4 = y1+k;
|
|
||||||
|
|
||||||
ox = x1-cposx;
|
|
||||||
oy = y1-cposy;
|
|
||||||
x1 = dmulscale16(ox, xvect, -oy, yvect);
|
|
||||||
y1 = dmulscale16(oy, xvect2, ox, yvect2);
|
|
||||||
|
|
||||||
ox = x2-cposx;
|
|
||||||
oy = y2-cposy;
|
|
||||||
x2 = dmulscale16(ox, xvect, -oy, yvect);
|
|
||||||
y2 = dmulscale16(oy, xvect2, ox, yvect2);
|
|
||||||
|
|
||||||
ox = x3-cposx;
|
|
||||||
oy = y3-cposy;
|
|
||||||
x3 = dmulscale16(ox, xvect, -oy, yvect);
|
|
||||||
y3 = dmulscale16(oy, xvect2, ox, yvect2);
|
|
||||||
|
|
||||||
ox = x4-cposx;
|
|
||||||
oy = y4-cposy;
|
|
||||||
x4 = dmulscale16(ox, xvect, -oy, yvect);
|
|
||||||
y4 = dmulscale16(oy, xvect2, ox, yvect2);
|
|
||||||
|
|
||||||
renderDrawLine(x1+(xdim<<11), y1+(ydim<<11),
|
|
||||||
x2+(xdim<<11), y2+(ydim<<11), col);
|
|
||||||
|
|
||||||
renderDrawLine(x2+(xdim<<11), y2+(ydim<<11),
|
|
||||||
x3+(xdim<<11), y3+(ydim<<11), col);
|
|
||||||
|
|
||||||
renderDrawLine(x3+(xdim<<11), y3+(ydim<<11),
|
|
||||||
x4+(xdim<<11), y4+(ydim<<11), col);
|
|
||||||
|
|
||||||
renderDrawLine(x4+(xdim<<11), y4+(ydim<<11),
|
|
||||||
x1+(xdim<<11), y1+(ydim<<11), col);
|
|
||||||
|
|
||||||
break;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
renderDisableFog();
|
|
||||||
#endif
|
|
||||||
|
|
||||||
//Draw white lines
|
//Draw white lines
|
||||||
for (i=numsectors-1; i>=0; i--)
|
for (i=numsectors-1; i>=0; i--)
|
||||||
{
|
{
|
||||||
if (!(show2dsector[i>>3]&pow2char[i&7])) continue;
|
if (!gFullMap && !show2dsector[i]) continue;
|
||||||
|
|
||||||
startwall = sector[i].wallptr;
|
startwall = sector[i].wallptr;
|
||||||
endwall = sector[i].wallptr + sector[i].wallnum;
|
endwall = sector[i].wallptr + sector[i].wallnum;
|
||||||
|
|
|
@ -687,12 +687,9 @@ void G_DoCheats(void)
|
||||||
return;
|
return;
|
||||||
|
|
||||||
case CHEAT_SHOWMAP: // SHOW ALL OF THE MAP TOGGLE;
|
case CHEAT_SHOWMAP: // SHOW ALL OF THE MAP TOGGLE;
|
||||||
ud.showallmap = !ud.showallmap;
|
gFullMap = !gFullMap;
|
||||||
|
|
||||||
for (char & i : show2dsector)
|
P_DoQuote(gFullMap ? QUOTE_SHOW_MAP_ON : QUOTE_SHOW_MAP_OFF,
|
||||||
i = ud.showallmap*255;
|
|
||||||
|
|
||||||
P_DoQuote(ud.showallmap ? QUOTE_SHOW_MAP_ON : QUOTE_SHOW_MAP_OFF,
|
|
||||||
pPlayer);
|
pPlayer);
|
||||||
|
|
||||||
end_cheat(pPlayer);
|
end_cheat(pPlayer);
|
||||||
|
|
|
@ -118,7 +118,8 @@ static int32_t G_OpenDemoRead(int32_t g_whichDemo) // 0 = mine
|
||||||
g_demo_cnt = 1;
|
g_demo_cnt = 1;
|
||||||
ud.reccnt = 0;
|
ud.reccnt = 0;
|
||||||
|
|
||||||
ud.god = ud.cashman = ud.eog = ud.showallmap = 0;
|
gFullMap = false;
|
||||||
|
ud.god = ud.cashman = ud.eog = 0;
|
||||||
ud.noclip = ud.scrollmode = ud.overhead_on = 0; //= ud.pause_on = 0;
|
ud.noclip = ud.scrollmode = ud.overhead_on = 0; //= ud.pause_on = 0;
|
||||||
|
|
||||||
totalclock = ototalclock = lockclock = 0;
|
totalclock = ototalclock = lockclock = 0;
|
||||||
|
@ -578,9 +579,6 @@ RECHECK:
|
||||||
g_demo_cnt = 1;
|
g_demo_cnt = 1;
|
||||||
ud.reccnt = 0;
|
ud.reccnt = 0;
|
||||||
|
|
||||||
// ud.god = ud.cashman = ud.eog = ud.showallmap = 0;
|
|
||||||
// ud.noclip = ud.scrollmode = ud.overhead_on = ud.pause_on = 0;
|
|
||||||
|
|
||||||
totalclock = ototalclock = lockclock = 0;
|
totalclock = ototalclock = lockclock = 0;
|
||||||
}
|
}
|
||||||
else CORRUPT(0);
|
else CORRUPT(0);
|
||||||
|
|
|
@ -167,7 +167,7 @@ typedef struct {
|
||||||
} config;
|
} config;
|
||||||
|
|
||||||
char overhead_on,last_overhead,showweapons;
|
char overhead_on,last_overhead,showweapons;
|
||||||
char god,warp_on,cashman,eog,showallmap;
|
char god,warp_on,cashman,eog;
|
||||||
char scrollmode,noclip;
|
char scrollmode,noclip;
|
||||||
char display_bonus_screen;
|
char display_bonus_screen;
|
||||||
char show_level_text;
|
char show_level_text;
|
||||||
|
|
|
@ -844,7 +844,7 @@ void P_ResetStatus(int playerNum)
|
||||||
{
|
{
|
||||||
DukePlayer_t *const pPlayer = g_player[playerNum].ps;
|
DukePlayer_t *const pPlayer = g_player[playerNum].ps;
|
||||||
|
|
||||||
ud.showallmap = 0;
|
gFullMap = 0;
|
||||||
pPlayer->dead_flag = 0;
|
pPlayer->dead_flag = 0;
|
||||||
pPlayer->wackedbyactor = -1;
|
pPlayer->wackedbyactor = -1;
|
||||||
pPlayer->falling_counter = 0;
|
pPlayer->falling_counter = 0;
|
||||||
|
@ -1306,7 +1306,7 @@ static void prelevel(char g)
|
||||||
Bmemset(g_geoSectorWarp2, -1, sizeof(g_geoSectorWarp2));
|
Bmemset(g_geoSectorWarp2, -1, sizeof(g_geoSectorWarp2));
|
||||||
Bmemset(g_ambientHitag, -1, sizeof(g_ambientHitag));
|
Bmemset(g_ambientHitag, -1, sizeof(g_ambientHitag));
|
||||||
Bmemset(g_ambientLotag, -1, sizeof(g_ambientLotag));
|
Bmemset(g_ambientLotag, -1, sizeof(g_ambientLotag));
|
||||||
Bmemset(show2dsector, 0, sizeof(show2dsector));
|
show2dsector.Zero();
|
||||||
#ifdef LEGACY_ROR
|
#ifdef LEGACY_ROR
|
||||||
Bmemset(ror_protectedsectors, 0, MAXSECTORS);
|
Bmemset(ror_protectedsectors, 0, MAXSECTORS);
|
||||||
#endif
|
#endif
|
||||||
|
|
|
@ -3406,8 +3406,7 @@ int dword_AAAEC;
|
||||||
void sub_57AC0(void)
|
void sub_57AC0(void)
|
||||||
{
|
{
|
||||||
int i;
|
int i;
|
||||||
for (i = 0; i < MAXSECTORS; i++)
|
show2dsector.SetAll(1);
|
||||||
show2dsector[i>>3] |= 1<<(i&7);
|
|
||||||
for (i = 0; i < MAXWALLS; i++)
|
for (i = 0; i < MAXWALLS; i++)
|
||||||
show2dwall[i>>3] |= 1<<(i&7);
|
show2dwall[i>>3] |= 1<<(i&7);
|
||||||
dword_AAAEC ^= 1;
|
dword_AAAEC ^= 1;
|
||||||
|
@ -3444,7 +3443,7 @@ void sub_57B38(long cposx, long cposy, long czoom, short cang)
|
||||||
//Draw white lines
|
//Draw white lines
|
||||||
for(i=0;i<numsectors;i++)
|
for(i=0;i<numsectors;i++)
|
||||||
{
|
{
|
||||||
if (!(show2dsector[i>>3]&(1<<(i&7)))) continue;
|
if (!gFullMap && !show2dsector[i]) continue;
|
||||||
|
|
||||||
startwall = sector[i].wallptr;
|
startwall = sector[i].wallptr;
|
||||||
endwall = sector[i].wallptr + sector[i].wallnum;
|
endwall = sector[i].wallptr + sector[i].wallnum;
|
||||||
|
|
|
@ -892,7 +892,6 @@ static const dataspec_t svgm_anmisc[] =
|
||||||
{ 0, &g_spriteDeleteQueuePos, sizeof(g_spriteDeleteQueuePos), 1 },
|
{ 0, &g_spriteDeleteQueuePos, sizeof(g_spriteDeleteQueuePos), 1 },
|
||||||
{ DS_NOCHK, &g_deleteQueueSize, sizeof(g_deleteQueueSize), 1 },
|
{ DS_NOCHK, &g_deleteQueueSize, sizeof(g_deleteQueueSize), 1 },
|
||||||
{ DS_CNT(g_deleteQueueSize), &SpriteDeletionQueue[0], sizeof(int16_t), (intptr_t)&g_deleteQueueSize },
|
{ DS_CNT(g_deleteQueueSize), &SpriteDeletionQueue[0], sizeof(int16_t), (intptr_t)&g_deleteQueueSize },
|
||||||
{ 0, &show2dsector[0], sizeof(uint8_t), MAXSECTORS>>3 },
|
|
||||||
{ DS_NOCHK, &g_cloudCnt, sizeof(g_cloudCnt), 1 },
|
{ DS_NOCHK, &g_cloudCnt, sizeof(g_cloudCnt), 1 },
|
||||||
{ 0, &g_cloudSect[0], sizeof(g_cloudSect), 1 },
|
{ 0, &g_cloudSect[0], sizeof(g_cloudSect), 1 },
|
||||||
{ 0, &g_cloudX, sizeof(g_cloudX), 1 },
|
{ 0, &g_cloudX, sizeof(g_cloudX), 1 },
|
||||||
|
|
|
@ -183,6 +183,9 @@ static int32_t gtextsc(int32_t sc)
|
||||||
|
|
||||||
static void G_DrawCameraText(int16_t i)
|
static void G_DrawCameraText(int16_t i)
|
||||||
{
|
{
|
||||||
|
//if (VM_OnEvent(EVENT_DISPLAYCAMERAOSD, i, screenpeek) != 0)
|
||||||
|
// return;
|
||||||
|
|
||||||
if (!T1(i))
|
if (!T1(i))
|
||||||
{
|
{
|
||||||
rotatesprite_win(24<<16, 33<<16, 65536L, 0, CAMCORNER, 0, 0, 2);
|
rotatesprite_win(24<<16, 33<<16, 65536L, 0, CAMCORNER, 0, 0, 2);
|
||||||
|
@ -245,7 +248,7 @@ static void G_DrawOverheadMap(int32_t cposx, int32_t cposy, int32_t czoom, int16
|
||||||
//Draw red lines
|
//Draw red lines
|
||||||
for (i=numsectors-1; i>=0; i--)
|
for (i=numsectors-1; i>=0; i--)
|
||||||
{
|
{
|
||||||
if (!(show2dsector[i>>3]&(1<<(i&7)))) continue;
|
if (!gFullMap && !show2dsector[i]) continue;
|
||||||
|
|
||||||
startwall = sector[i].wallptr;
|
startwall = sector[i].wallptr;
|
||||||
endwall = sector[i].wallptr + sector[i].wallnum;
|
endwall = sector[i].wallptr + sector[i].wallnum;
|
||||||
|
@ -258,17 +261,13 @@ static void G_DrawOverheadMap(int32_t cposx, int32_t cposy, int32_t czoom, int16
|
||||||
k = wal->nextwall;
|
k = wal->nextwall;
|
||||||
if (k < 0) continue;
|
if (k < 0) continue;
|
||||||
|
|
||||||
if (sector[wal->nextsector].ceilingz == z1)
|
if (sector[wal->nextsector].ceilingz == z1 && sector[wal->nextsector].floorz == z2)
|
||||||
if (sector[wal->nextsector].floorz == z2)
|
|
||||||
if (((wal->cstat|wall[wal->nextwall].cstat)&(16+32)) == 0) continue;
|
if (((wal->cstat|wall[wal->nextwall].cstat)&(16+32)) == 0) continue;
|
||||||
|
|
||||||
col = PalEntry(255, 0, 0);
|
if (!gFullMap && !show2dsector[wal->nextsector])
|
||||||
if ((wal->cstat | wall[wal->nextwall].cstat) & 1) col = PalEntry(170, 0, 170);
|
{
|
||||||
|
|
||||||
if (!(show2dsector[wal->nextsector >> 3] & (1 << (wal->nextsector & 7))))
|
|
||||||
col = PalEntry(170, 170, 170);
|
col = PalEntry(170, 170, 170);
|
||||||
else continue;
|
|
||||||
|
|
||||||
ox = wal->x-cposx;
|
ox = wal->x-cposx;
|
||||||
oy = wal->y-cposy;
|
oy = wal->y-cposy;
|
||||||
x1 = dmulscale16(ox, xvect, -oy, yvect)+(xdim<<11);
|
x1 = dmulscale16(ox, xvect, -oy, yvect)+(xdim<<11);
|
||||||
|
@ -283,12 +282,13 @@ static void G_DrawOverheadMap(int32_t cposx, int32_t cposy, int32_t czoom, int16
|
||||||
drawlinergb(x1, y1, x2, y2, col);
|
drawlinergb(x1, y1, x2, y2, col);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
//Draw sprites
|
//Draw sprites
|
||||||
k = g_player[screenpeek].ps->i;
|
k = g_player[screenpeek].ps->i;
|
||||||
for (i=numsectors-1; i>=0; i--)
|
/*if (!FURY)*/ for (i=numsectors-1; i>=0; i--) // todo - make a switchable flag.
|
||||||
{
|
{
|
||||||
if (!(show2dsector[i>>3]&(1<<(i&7)))) continue;
|
if (!gFullMap || !show2dsector[i]) continue;
|
||||||
for (j=headspritesect[i]; j>=0; j=nextspritesect[j])
|
for (j=headspritesect[i]; j>=0; j=nextspritesect[j])
|
||||||
{
|
{
|
||||||
spr = &sprite[j];
|
spr = &sprite[j];
|
||||||
|
@ -432,7 +432,7 @@ static void G_DrawOverheadMap(int32_t cposx, int32_t cposy, int32_t czoom, int16
|
||||||
//Draw white lines
|
//Draw white lines
|
||||||
for (i=numsectors-1; i>=0; i--)
|
for (i=numsectors-1; i>=0; i--)
|
||||||
{
|
{
|
||||||
if (!(show2dsector[i>>3]&(1<<(i&7)))) continue;
|
if (!gFullMap && !show2dsector[i]) continue;
|
||||||
|
|
||||||
startwall = sector[i].wallptr;
|
startwall = sector[i].wallptr;
|
||||||
endwall = sector[i].wallptr + sector[i].wallnum;
|
endwall = sector[i].wallptr + sector[i].wallnum;
|
||||||
|
@ -465,7 +465,7 @@ static void G_DrawOverheadMap(int32_t cposx, int32_t cposy, int32_t czoom, int16
|
||||||
x2 = dmulscale16(ox, xvect, -oy, yvect)+(xdim<<11);
|
x2 = dmulscale16(ox, xvect, -oy, yvect)+(xdim<<11);
|
||||||
y2 = dmulscale16(oy, xvect2, ox, yvect2)+(ydim<<11);
|
y2 = dmulscale16(oy, xvect2, ox, yvect2)+(ydim<<11);
|
||||||
|
|
||||||
renderDrawLine(x1, y1, x2, y2, PalEntry(170, 170, 170));
|
drawlinergb(x1, y1, x2, y2, PalEntry(170, 170, 170));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -497,6 +497,8 @@ static void G_DrawOverheadMap(int32_t cposx, int32_t cposy, int32_t czoom, int16
|
||||||
else
|
else
|
||||||
i = APLAYERTOP;
|
i = APLAYERTOP;
|
||||||
|
|
||||||
|
//i = VM_OnEventWithReturn(EVENT_DISPLAYOVERHEADMAPPLAYER, pPlayer->i, p, i);
|
||||||
|
|
||||||
if (i < 0)
|
if (i < 0)
|
||||||
continue;
|
continue;
|
||||||
|
|
||||||
|
@ -569,17 +571,6 @@ FString GameInterface::GetCoordString()
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
#define LOW_FPS 30
|
|
||||||
#define SLOW_FRAME_TIME 33
|
|
||||||
|
|
||||||
#if defined GEKKO
|
|
||||||
# define FPS_YOFFSET 16
|
|
||||||
#else
|
|
||||||
# define FPS_YOFFSET 0
|
|
||||||
#endif
|
|
||||||
|
|
||||||
#define FPS_COLOR(x) ((x) ? COLOR_RED : COLOR_WHITE)
|
|
||||||
|
|
||||||
FString GameInterface::statFPS()
|
FString GameInterface::statFPS()
|
||||||
{
|
{
|
||||||
FString output;
|
FString output;
|
||||||
|
@ -667,12 +658,8 @@ void G_DisplayRest(int32_t smoothratio)
|
||||||
palaccum_t tint = PALACCUM_INITIALIZER;
|
palaccum_t tint = PALACCUM_INITIALIZER;
|
||||||
|
|
||||||
DukePlayer_t *const pp = g_player[screenpeek].ps;
|
DukePlayer_t *const pp = g_player[screenpeek].ps;
|
||||||
#ifdef SPLITSCREEN_MOD_HACKS
|
|
||||||
DukePlayer_t *const pp2 = g_fakeMultiMode==2 ? g_player[1].ps : NULL;
|
|
||||||
#endif
|
|
||||||
int32_t cposx, cposy, cang;
|
int32_t cposx, cposy, cang;
|
||||||
|
|
||||||
#ifdef USE_OPENGL
|
|
||||||
// this takes care of fullscreen tint for OpenGL
|
// this takes care of fullscreen tint for OpenGL
|
||||||
if (videoGetRenderMode() >= REND_POLYMOST)
|
if (videoGetRenderMode() >= REND_POLYMOST)
|
||||||
{
|
{
|
||||||
|
@ -700,22 +687,12 @@ void G_DisplayRest(int32_t smoothratio)
|
||||||
fstint.f = 0;
|
fstint.f = 0;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
#endif // USE_OPENGL
|
|
||||||
|
|
||||||
palaccum_add(&tint, &pp->pals, pp->pals.f);
|
palaccum_add(&tint, &pp->pals, pp->pals.f);
|
||||||
#ifdef SPLITSCREEN_MOD_HACKS
|
|
||||||
if (pp2)
|
|
||||||
palaccum_add(&tint, &pp2->pals, pp2->pals.f);
|
|
||||||
#endif
|
|
||||||
if (!RR)
|
if (!RR)
|
||||||
{
|
{
|
||||||
static const palette_t loogiepal = { 0, 63, 0, 0 };
|
static const palette_t loogiepal = { 0, 63, 0, 0 };
|
||||||
|
|
||||||
palaccum_add(&tint, &loogiepal, pp->loogcnt>>1);
|
palaccum_add(&tint, &loogiepal, pp->loogcnt>>1);
|
||||||
#ifdef SPLITSCREEN_MOD_HACKS
|
|
||||||
if (pp2)
|
|
||||||
palaccum_add(&tint, &loogiepal, pp2->loogcnt>>1);
|
|
||||||
#endif
|
|
||||||
}
|
}
|
||||||
|
|
||||||
if (g_restorePalette)
|
if (g_restorePalette)
|
||||||
|
@ -726,21 +703,9 @@ void G_DisplayRest(int32_t smoothratio)
|
||||||
if (g_restorePalette < 2 || omovethingscnt+1 == g_moveThingsCount)
|
if (g_restorePalette < 2 || omovethingscnt+1 == g_moveThingsCount)
|
||||||
{
|
{
|
||||||
int32_t pal = pp->palette;
|
int32_t pal = pp->palette;
|
||||||
#ifdef SPLITSCREEN_MOD_HACKS
|
|
||||||
const int32_t opal = pal;
|
|
||||||
|
|
||||||
if (pp2) // splitscreen HACK: BASEPAL trumps all, then it's arbitrary.
|
|
||||||
pal = min(pal, pp2->palette);
|
|
||||||
#endif
|
|
||||||
|
|
||||||
// g_restorePalette < 0: reset tinting, too (e.g. when loading new game)
|
// g_restorePalette < 0: reset tinting, too (e.g. when loading new game)
|
||||||
P_SetGamePalette(pp, pal, (g_restorePalette > 0) ? Pal_DontResetFade : ESetPalFlags::FromInt(0));
|
P_SetGamePalette(pp, pal, (g_restorePalette > 0) ? Pal_DontResetFade : ESetPalFlags::FromInt(0));
|
||||||
|
|
||||||
#ifdef SPLITSCREEN_MOD_HACKS
|
|
||||||
if (pp2) // keep first player's pal as its member!
|
|
||||||
pp->palette = opal;
|
|
||||||
#endif
|
|
||||||
|
|
||||||
g_restorePalette = 0;
|
g_restorePalette = 0;
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
|
@ -755,7 +720,7 @@ void G_DisplayRest(int32_t smoothratio)
|
||||||
{
|
{
|
||||||
const walltype *wal = &wall[sector[i].wallptr];
|
const walltype *wal = &wall[sector[i].wallptr];
|
||||||
|
|
||||||
show2dsector[i>>3] |= (1<<(i&7));
|
show2dsector.Set(i);
|
||||||
for (j=sector[i].wallnum; j>0; j--, wal++)
|
for (j=sector[i].wallnum; j>0; j--, wal++)
|
||||||
{
|
{
|
||||||
i = wal->nextsector;
|
i = wal->nextsector;
|
||||||
|
@ -764,7 +729,7 @@ void G_DisplayRest(int32_t smoothratio)
|
||||||
if (wall[wal->nextwall].cstat&0x0071) continue;
|
if (wall[wal->nextwall].cstat&0x0071) continue;
|
||||||
if (sector[i].lotag == 32767) continue;
|
if (sector[i].lotag == 32767) continue;
|
||||||
if (sector[i].ceilingz >= sector[i].floorz) continue;
|
if (sector[i].ceilingz >= sector[i].floorz) continue;
|
||||||
show2dsector[i>>3] |= (1<<(i&7));
|
show2dsector.Set(i);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -778,27 +743,9 @@ void G_DisplayRest(int32_t smoothratio)
|
||||||
{
|
{
|
||||||
PspTwoDSetter set;
|
PspTwoDSetter set;
|
||||||
P_DisplayWeapon();
|
P_DisplayWeapon();
|
||||||
#ifdef SPLITSCREEN_MOD_HACKS
|
|
||||||
if (pp2) // HACK
|
|
||||||
{
|
|
||||||
const int32_t oscreenpeek = screenpeek;
|
|
||||||
screenpeek = 1;
|
|
||||||
P_DisplayWeapon();
|
|
||||||
screenpeek = oscreenpeek;
|
|
||||||
}
|
|
||||||
#endif
|
|
||||||
|
|
||||||
if (pp->over_shoulder_on == 0)
|
if (pp->over_shoulder_on == 0)
|
||||||
P_DisplayScuba();
|
P_DisplayScuba();
|
||||||
#ifdef SPLITSCREEN_MOD_HACKS
|
|
||||||
if (pp2 && pp2->over_shoulder_on == 0) // HACK
|
|
||||||
{
|
|
||||||
const int32_t oscreenpeek = screenpeek;
|
|
||||||
screenpeek = 1;
|
|
||||||
P_DisplayScuba();
|
|
||||||
screenpeek = oscreenpeek;
|
|
||||||
}
|
|
||||||
#endif
|
|
||||||
}
|
}
|
||||||
if (!RR)
|
if (!RR)
|
||||||
G_MoveClouds();
|
G_MoveClouds();
|
||||||
|
@ -860,10 +807,12 @@ void G_DisplayRest(int32_t smoothratio)
|
||||||
|
|
||||||
G_RestoreInterpolations();
|
G_RestoreInterpolations();
|
||||||
|
|
||||||
if (ud.overhead_on == 2)
|
//int32_t const textret = VM_OnEvent(EVENT_DISPLAYOVERHEADMAPTEXT, g_player[screenpeek].ps->i, screenpeek);
|
||||||
|
if (/*textret == 0 &&*/ ud.overhead_on == 2)
|
||||||
{
|
{
|
||||||
const int32_t a = RR ? 0 : ((ud.screen_size > 0) ? 147 : 179);
|
const int32_t a = RR ? 0 : ((ud.screen_size > 0) ? 147 : 179);
|
||||||
if (!G_HaveUserMap())
|
|
||||||
|
if (!G_HaveUserMap()) // && !(G_GetLogoFlags() & LOGO_HIDEEPISODE))
|
||||||
minitext(5, a+6, GStrings.localize(gVolumeNames[ud.volume_number]), 0, 2+8+16+256);
|
minitext(5, a+6, GStrings.localize(gVolumeNames[ud.volume_number]), 0, 2+8+16+256);
|
||||||
minitext(5, a+6+6, currentLevel->DisplayName(), 0, 2+8+16+256);
|
minitext(5, a+6+6, currentLevel->DisplayName(), 0, 2+8+16+256);
|
||||||
}
|
}
|
||||||
|
@ -872,17 +821,9 @@ void G_DisplayRest(int32_t smoothratio)
|
||||||
|
|
||||||
if (pp->invdisptime > 0) G_DrawInventory(pp);
|
if (pp->invdisptime > 0) G_DrawInventory(pp);
|
||||||
|
|
||||||
|
//if (VM_OnEvent(EVENT_DISPLAYSBAR, g_player[screenpeek].ps->i, screenpeek) == 0)
|
||||||
G_DrawStatusBar(screenpeek);
|
G_DrawStatusBar(screenpeek);
|
||||||
|
|
||||||
#ifdef SPLITSCREEN_MOD_HACKS
|
|
||||||
// HACK
|
|
||||||
if (g_fakeMultiMode==2)
|
|
||||||
{
|
|
||||||
G_DrawStatusBar(1);
|
|
||||||
G_PrintGameQuotes(1);
|
|
||||||
}
|
|
||||||
#endif
|
|
||||||
|
|
||||||
G_PrintGameQuotes(screenpeek);
|
G_PrintGameQuotes(screenpeek);
|
||||||
|
|
||||||
if (ud.show_level_text && hud_showmapname && g_levelTextTime > 1 && !M_Active())
|
if (ud.show_level_text && hud_showmapname && g_levelTextTime > 1 && !M_Active())
|
||||||
|
@ -900,9 +841,13 @@ void G_DisplayRest(int32_t smoothratio)
|
||||||
if (!DEER && g_player[myconnectindex].ps->newowner == -1 && ud.overhead_on == 0 && cl_crosshair && ud.camerasprite == -1)
|
if (!DEER && g_player[myconnectindex].ps->newowner == -1 && ud.overhead_on == 0 && cl_crosshair && ud.camerasprite == -1)
|
||||||
{
|
{
|
||||||
int32_t a = CROSSHAIR;
|
int32_t a = CROSSHAIR;
|
||||||
|
//ud.returnvar[0] = (160<<16) - (g_player[myconnectindex].ps->look_ang<<15);
|
||||||
|
//ud.returnvar[1] = 100<<16;
|
||||||
|
//int32_t a = VM_OnEventWithReturn(EVENT_DISPLAYCROSSHAIR, g_player[screenpeek].ps->i, screenpeek, CROSSHAIR);
|
||||||
if ((unsigned) a < MAXTILES)
|
if ((unsigned) a < MAXTILES)
|
||||||
{
|
{
|
||||||
vec2_t crosshairpos = { (160<<16) - (g_player[myconnectindex].ps->look_ang<<15), 100<<16 };
|
vec2_t crosshairpos = { (160<<16) - (g_player[myconnectindex].ps->look_ang<<15), 100<<16 };
|
||||||
|
//vec2_t crosshairpos = { ud.returnvar[0], ud.returnvar[1] };
|
||||||
uint32_t crosshair_o = 1|2;
|
uint32_t crosshair_o = 1|2;
|
||||||
uint32_t crosshair_scale = divscale16(cl_crosshairscale, 100);
|
uint32_t crosshair_scale = divscale16(cl_crosshairscale, 100);
|
||||||
if (RR)
|
if (RR)
|
||||||
|
@ -912,20 +857,22 @@ void G_DisplayRest(int32_t smoothratio)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/*
|
||||||
|
if (VM_HaveEvent(EVENT_DISPLAYREST))
|
||||||
|
{
|
||||||
|
int32_t vr=viewingrange, asp=yxaspect;
|
||||||
|
VM_ExecuteEvent(EVENT_DISPLAYREST, g_player[screenpeek].ps->i, screenpeek);
|
||||||
|
renderSetAspect(vr, asp);
|
||||||
|
}
|
||||||
|
*/
|
||||||
|
|
||||||
if (ud.pause_on==1 && (g_player[myconnectindex].ps->gm&MODE_MENU) == 0)
|
if (ud.pause_on==1 && (g_player[myconnectindex].ps->gm&MODE_MENU) == 0)
|
||||||
menutext_center(100, GStrings("Game Paused"));
|
menutext_center(100, GStrings("Game Paused"));
|
||||||
|
|
||||||
#ifdef YAX_DEBUG
|
|
||||||
M32_drawdebug();
|
|
||||||
#endif
|
|
||||||
|
|
||||||
#ifdef USE_OPENGL
|
|
||||||
mdpause = (ud.pause_on || (ud.recstat==2 && (g_demo_paused && g_demo_goalCnt==0)) || (g_player[myconnectindex].ps->gm&MODE_MENU && numplayers < 2));
|
mdpause = (ud.pause_on || (ud.recstat==2 && (g_demo_paused && g_demo_goalCnt==0)) || (g_player[myconnectindex].ps->gm&MODE_MENU && numplayers < 2));
|
||||||
#endif
|
|
||||||
|
|
||||||
// JBF 20040124: display level stats in screen corner
|
// JBF 20040124: display level stats in screen corner
|
||||||
if (ud.overhead_on != 2 && hud_stats)
|
if (ud.overhead_on != 2 && hud_stats) // && VM_OnEvent(EVENT_DISPLAYLEVELSTATS, g_player[screenpeek].ps->i, screenpeek) == 0)
|
||||||
{
|
{
|
||||||
DukePlayer_t const * const myps = g_player[myconnectindex].ps;
|
DukePlayer_t const * const myps = g_player[myconnectindex].ps;
|
||||||
int const sbarshift = RR ? 15 : 16;
|
int const sbarshift = RR ? 15 : 16;
|
||||||
|
@ -1085,10 +1032,6 @@ static void fadepaltile(int32_t r, int32_t g, int32_t b, int32_t start, int32_t
|
||||||
} while (start != end+step);
|
} while (start != end+step);
|
||||||
}
|
}
|
||||||
|
|
||||||
#ifdef __ANDROID__
|
|
||||||
int inExtraScreens = 0;
|
|
||||||
#endif
|
|
||||||
|
|
||||||
void G_DisplayExtraScreens(void)
|
void G_DisplayExtraScreens(void)
|
||||||
{
|
{
|
||||||
Mus_Stop();
|
Mus_Stop();
|
||||||
|
@ -1098,9 +1041,6 @@ void G_DisplayExtraScreens(void)
|
||||||
|
|
||||||
if (!VOLUMEALL)
|
if (!VOLUMEALL)
|
||||||
{
|
{
|
||||||
#ifdef __ANDROID__
|
|
||||||
inExtraScreens = 1;
|
|
||||||
#endif
|
|
||||||
videoSetViewableArea(0, 0, xdim-1, ydim-1);
|
videoSetViewableArea(0, 0, xdim-1, ydim-1);
|
||||||
renderFlushPerms();
|
renderFlushPerms();
|
||||||
//g_player[myconnectindex].ps->palette = palette;
|
//g_player[myconnectindex].ps->palette = palette;
|
||||||
|
@ -1118,16 +1058,10 @@ void G_DisplayExtraScreens(void)
|
||||||
while (!inputState.CheckAllInput())
|
while (!inputState.CheckAllInput())
|
||||||
G_HandleAsync();
|
G_HandleAsync();
|
||||||
|
|
||||||
#ifdef __ANDROID__
|
|
||||||
inExtraScreens = 0;
|
|
||||||
#endif
|
|
||||||
}
|
}
|
||||||
|
|
||||||
if (0)
|
if (0)
|
||||||
{
|
{
|
||||||
#ifdef __ANDROID__
|
|
||||||
inExtraScreens = 1;
|
|
||||||
#endif
|
|
||||||
videoSetViewableArea(0, 0, xdim-1, ydim-1);
|
videoSetViewableArea(0, 0, xdim-1, ydim-1);
|
||||||
renderFlushPerms();
|
renderFlushPerms();
|
||||||
//g_player[myconnectindex].ps->palette = palette;
|
//g_player[myconnectindex].ps->palette = palette;
|
||||||
|
@ -1142,9 +1076,6 @@ void G_DisplayExtraScreens(void)
|
||||||
|
|
||||||
fadepaltile(0, 0, 0, 0, 252, 28, TENSCREEN);
|
fadepaltile(0, 0, 0, 0, 252, 28, TENSCREEN);
|
||||||
inputState.ClearAllInput();
|
inputState.ClearAllInput();
|
||||||
#ifdef __ANDROID__
|
|
||||||
inExtraScreens = 0;
|
|
||||||
#endif
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -1317,9 +1248,7 @@ void G_DisplayLogo(void)
|
||||||
}
|
}
|
||||||
if (!g_noLogo && !userConfig.nologo /* && (!g_netServer && ud.multimode < 2) */)
|
if (!g_noLogo && !userConfig.nologo /* && (!g_netServer && ud.multimode < 2) */)
|
||||||
{
|
{
|
||||||
#ifndef EDUKE32_TOUCH_DEVICES
|
|
||||||
if (VOLUMEALL)
|
if (VOLUMEALL)
|
||||||
#endif
|
|
||||||
{
|
{
|
||||||
if (!inputState.CheckAllInput() && g_noLogoAnim == 0 && !userConfig.nologo)
|
if (!inputState.CheckAllInput() && g_noLogoAnim == 0 && !userConfig.nologo)
|
||||||
{
|
{
|
||||||
|
@ -1396,9 +1325,7 @@ void G_DisplayLogo(void)
|
||||||
totalclock = 0;
|
totalclock = 0;
|
||||||
|
|
||||||
while (
|
while (
|
||||||
#ifndef EDUKE32_SIMPLE_MENU
|
|
||||||
totalclock < (860+120) &&
|
totalclock < (860+120) &&
|
||||||
#endif
|
|
||||||
!inputState.CheckAllInput())
|
!inputState.CheckAllInput())
|
||||||
{
|
{
|
||||||
if (G_FPSLimit())
|
if (G_FPSLimit())
|
||||||
|
@ -2358,11 +2285,6 @@ void G_BonusScreen(int32_t bonusonly)
|
||||||
else
|
else
|
||||||
menutext(231, yy, tempbuf);
|
menutext(231, yy, tempbuf);
|
||||||
yy += yystep;
|
yy += yystep;
|
||||||
#if 0
|
|
||||||
// Always overwritten.
|
|
||||||
if (g_player[myconnectindex].ps->secret_rooms > 0)
|
|
||||||
Bsprintf(tempbuf, "%-3d%%", (100*g_player[myconnectindex].ps->secret_rooms/g_player[myconnectindex].ps->max_secret_rooms));
|
|
||||||
#endif
|
|
||||||
Bsprintf(tempbuf, "%-3d", g_player[myconnectindex].ps->max_secret_rooms-g_player[myconnectindex].ps->secret_rooms);
|
Bsprintf(tempbuf, "%-3d", g_player[myconnectindex].ps->max_secret_rooms-g_player[myconnectindex].ps->secret_rooms);
|
||||||
if (!RR)
|
if (!RR)
|
||||||
gametext_number((320>>2)+70, yy+9, tempbuf);
|
gametext_number((320>>2)+70, yy+9, tempbuf);
|
||||||
|
@ -2857,11 +2779,6 @@ void G_BonusScreenRRRA(int32_t bonusonly)
|
||||||
Bsprintf(tempbuf, "%-3d", g_player[myconnectindex].ps->secret_rooms);
|
Bsprintf(tempbuf, "%-3d", g_player[myconnectindex].ps->secret_rooms);
|
||||||
menutext(231, yy, tempbuf);
|
menutext(231, yy, tempbuf);
|
||||||
yy += yystep;
|
yy += yystep;
|
||||||
#if 0
|
|
||||||
// Always overwritten.
|
|
||||||
if (g_player[myconnectindex].ps->secret_rooms > 0)
|
|
||||||
Bsprintf(tempbuf, "%-3d%%", (100*g_player[myconnectindex].ps->secret_rooms/g_player[myconnectindex].ps->max_secret_rooms));
|
|
||||||
#endif
|
|
||||||
Bsprintf(tempbuf, "%-3d", g_player[myconnectindex].ps->max_secret_rooms-g_player[myconnectindex].ps->secret_rooms);
|
Bsprintf(tempbuf, "%-3d", g_player[myconnectindex].ps->max_secret_rooms-g_player[myconnectindex].ps->secret_rooms);
|
||||||
menutext(231, yy, tempbuf);
|
menutext(231, yy, tempbuf);
|
||||||
yy += yystep;
|
yy += yystep;
|
||||||
|
|
|
@ -76,7 +76,7 @@ typedef struct {
|
||||||
uint16_t g_earthquakeTime;
|
uint16_t g_earthquakeTime;
|
||||||
int8_t g_playerSpawnCnt;
|
int8_t g_playerSpawnCnt;
|
||||||
|
|
||||||
uint8_t show2dsector[(MAXSECTORS+7)>>3];
|
FixedBitArray<MAXSECTORS> show2dsector;
|
||||||
|
|
||||||
actor_t actor[MAXSPRITES];
|
actor_t actor[MAXSPRITES];
|
||||||
playerspawn_t g_playerSpawnPoints[MAXPLAYERS];
|
playerspawn_t g_playerSpawnPoints[MAXPLAYERS];
|
||||||
|
|
|
@ -2164,7 +2164,7 @@ drawscreen(PLAYERp pp)
|
||||||
|
|
||||||
if (i >= 0)
|
if (i >= 0)
|
||||||
{
|
{
|
||||||
show2dsector[i>>3] |= (1<<(i&7));
|
show2dsector.Set(i);
|
||||||
walltype *wal = &wall[sector[i].wallptr];
|
walltype *wal = &wall[sector[i].wallptr];
|
||||||
for (j=sector[i].wallnum; j>0; j--,wal++)
|
for (j=sector[i].wallnum; j>0; j--,wal++)
|
||||||
{
|
{
|
||||||
|
@ -2175,7 +2175,7 @@ drawscreen(PLAYERp pp)
|
||||||
if (nextwall < MAXWALLS && wall[nextwall].cstat&0x0071) continue;
|
if (nextwall < MAXWALLS && wall[nextwall].cstat&0x0071) continue;
|
||||||
if (sector[i].lotag == 32767) continue;
|
if (sector[i].lotag == 32767) continue;
|
||||||
if (sector[i].ceilingz >= sector[i].floorz) continue;
|
if (sector[i].ceilingz >= sector[i].floorz) continue;
|
||||||
show2dsector[i>>3] |= (1<<(i&7));
|
show2dsector.Set(i);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -562,33 +562,6 @@ Distance(int x1, int y1, int x2, int y2)
|
||||||
return x2 + y2 - DIV2(min);
|
return x2 + y2 - DIV2(min);
|
||||||
}
|
}
|
||||||
|
|
||||||
void
|
|
||||||
MapSetAll2D(uint8_t fill)
|
|
||||||
{
|
|
||||||
#if 0
|
|
||||||
int i;
|
|
||||||
|
|
||||||
for (i = 0; i < (MAXWALLS >> 3); i++)
|
|
||||||
show2dwall[i] = fill;
|
|
||||||
for (i = 0; i < (MAXSPRITES >> 3); i++)
|
|
||||||
show2dsprite[i] = fill;
|
|
||||||
|
|
||||||
//for (i = 0; i < (MAXSECTORS >> 3); i++)
|
|
||||||
for (i = 0; i < MAXSECTORS; i++)
|
|
||||||
{
|
|
||||||
if (sector[i].ceilingpicnum != 342 && sector[i].floorpicnum != 342)
|
|
||||||
show2dsector[i>>3] |= (1<<(i&7));
|
|
||||||
//show2dsector[i] = fill;
|
|
||||||
}
|
|
||||||
#endif
|
|
||||||
}
|
|
||||||
|
|
||||||
void
|
|
||||||
MapSetup(void)
|
|
||||||
{
|
|
||||||
MapSetAll2D(0xFF);
|
|
||||||
}
|
|
||||||
|
|
||||||
void
|
void
|
||||||
setup2dscreen(void)
|
setup2dscreen(void)
|
||||||
{
|
{
|
||||||
|
@ -969,10 +942,6 @@ void InitLevelGlobals(void)
|
||||||
extern SWBOOL zillawasseen;
|
extern SWBOOL zillawasseen;
|
||||||
extern short BossSpriteNum[3];
|
extern short BossSpriteNum[3];
|
||||||
|
|
||||||
// A few IMPORTANT GLOBAL RESETS
|
|
||||||
// !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!1
|
|
||||||
MapSetup();
|
|
||||||
//Zombies = 0;
|
|
||||||
ChopTics = 0;
|
ChopTics = 0;
|
||||||
dimensionmode = 3;
|
dimensionmode = 3;
|
||||||
zoom = 768;
|
zoom = 768;
|
||||||
|
@ -1176,7 +1145,6 @@ InitLevel(void)
|
||||||
TrackSetup();
|
TrackSetup();
|
||||||
|
|
||||||
PlayerPanelSetup();
|
PlayerPanelSetup();
|
||||||
MapSetup();
|
|
||||||
SectorSetup();
|
SectorSetup();
|
||||||
JS_InitMirrors();
|
JS_InitMirrors();
|
||||||
JS_InitLockouts(); // Setup the lockout linked lists
|
JS_InitLockouts(); // Setup the lockout linked lists
|
||||||
|
|
|
@ -2337,7 +2337,6 @@ int BunnyHatch2(short Weapon); // bunny.c
|
||||||
int DoSkullBeginDeath(int16_t SpriteNum); // skull.c
|
int DoSkullBeginDeath(int16_t SpriteNum); // skull.c
|
||||||
|
|
||||||
void AnimateCacheCursor(void); // game.c
|
void AnimateCacheCursor(void); // game.c
|
||||||
void MapSetAll2D(uint8_t fill); // game.c
|
|
||||||
void TerminateGame(void); // game.c
|
void TerminateGame(void); // game.c
|
||||||
void TerminateLevel(void); // game.c
|
void TerminateLevel(void); // game.c
|
||||||
void drawoverheadmap(int cposx,int cposy,int czoom,short cang); // game.c
|
void drawoverheadmap(int cposx,int cposy,int czoom,short cang); // game.c
|
||||||
|
|
|
@ -410,7 +410,7 @@ static int goalx[MAX_SW_PLAYERS_REG], goaly[MAX_SW_PLAYERS_REG], goalz[MAX_SW_PL
|
||||||
static int goalsect[MAX_SW_PLAYERS_REG], goalwall[MAX_SW_PLAYERS_REG], goalsprite[MAX_SW_PLAYERS_REG];
|
static int goalsect[MAX_SW_PLAYERS_REG], goalwall[MAX_SW_PLAYERS_REG], goalsprite[MAX_SW_PLAYERS_REG];
|
||||||
static int goalplayer[MAX_SW_PLAYERS_REG], clipmovecount[MAX_SW_PLAYERS_REG];
|
static int goalplayer[MAX_SW_PLAYERS_REG], clipmovecount[MAX_SW_PLAYERS_REG];
|
||||||
short searchsect[MAXSECTORS], searchparent[MAXSECTORS];
|
short searchsect[MAXSECTORS], searchparent[MAXSECTORS];
|
||||||
char dashow2dsector[(MAXSECTORS+7)>>3];
|
uint8_t dashow2dsector[(MAXSECTORS+7)>>3];
|
||||||
|
|
||||||
void computergetinput(int snum, SW_PACKET *syn)
|
void computergetinput(int snum, SW_PACKET *syn)
|
||||||
{
|
{
|
||||||
|
|
Loading…
Reference in a new issue