- renamed all tile variables so that the engine can be reverted to the old constant setup instead of the mostly useless tile remapping feature.

If this is supposed to be made customizable it has to be done very differently.

# Conflicts:
#	source/games/duke/src/game.cpp
#	source/games/duke/src/sbar.cpp
This commit is contained in:
Christoph Oelckers 2020-05-05 14:37:20 +02:00
parent 27c313d74e
commit 30cf62d9c2
26 changed files with 6186 additions and 6184 deletions

View file

@ -47,6 +47,7 @@ Note:
#include "ns.h" #include "ns.h"
#include "global.h" #include "global.h"
#include "names.h"
BEGIN_DUKE_NS BEGIN_DUKE_NS
@ -55,7 +56,7 @@ bool ifsquished(int i, int p)
if (g_gameType & GAMEFLAG_RRALL) return false; // this function is a no-op in RR's source. if (g_gameType & GAMEFLAG_RRALL) return false; // this function is a no-op in RR's source.
bool squishme = false; bool squishme = false;
if (sprite[i].picnum == APLAYER && ud.clipping) if (sprite[i].picnum == TILE_APLAYER && ud.clipping)
return false; return false;
auto &sc = sector[sprite[i].sectnum]; auto &sc = sector[sprite[i].sectnum];

View file

@ -324,13 +324,13 @@ ACTOR_INLINE int A_SetSprite(int const spriteNum, uint32_t cliptype)
EXTERN_INLINE int G_CheckForSpaceCeiling(int const sectnum) EXTERN_INLINE int G_CheckForSpaceCeiling(int const sectnum)
{ {
return ((sector[sectnum].ceilingstat&1) && sector[sectnum].ceilingpal == 0 && return ((sector[sectnum].ceilingstat&1) && sector[sectnum].ceilingpal == 0 &&
(sector[sectnum].ceilingpicnum==MOONSKY1 || sector[sectnum].ceilingpicnum==BIGORBIT1)); (sector[sectnum].ceilingpicnum==TILE_MOONSKY1 || sector[sectnum].ceilingpicnum==TILE_BIGORBIT1));
} }
EXTERN_INLINE int G_CheckForSpaceFloor(int const sectnum) EXTERN_INLINE int G_CheckForSpaceFloor(int const sectnum)
{ {
return ((sector[sectnum].floorstat&1) && sector[sectnum].ceilingpal == 0 && return ((sector[sectnum].floorstat&1) && sector[sectnum].ceilingpal == 0 &&
(sector[sectnum].floorpicnum==MOONSKY1 || sector[sectnum].floorpicnum==BIGORBIT1)); (sector[sectnum].floorpicnum==TILE_MOONSKY1 || sector[sectnum].floorpicnum==TILE_BIGORBIT1));
} }
EXTERN_INLINE int A_CheckEnemySprite(void const * const pSprite) EXTERN_INLINE int A_CheckEnemySprite(void const * const pSprite)

File diff suppressed because it is too large Load diff

View file

@ -824,7 +824,7 @@ void G_DoCheats(void)
case CHEAT_RAKFC: case CHEAT_RAKFC:
for (int i = 0; i < 7; i++) for (int i = 0; i < 7; i++)
{ {
int const newSprite = A_Spawn(pPlayer->i, HEN); int const newSprite = A_Spawn(pPlayer->i, TILE_HEN);
sprite[newSprite].pal = 1; sprite[newSprite].pal = 1;
sprite[newSprite].xrepeat <<= 2; sprite[newSprite].xrepeat <<= 2;
sprite[newSprite].yrepeat <<= 2; sprite[newSprite].yrepeat <<= 2;

View file

@ -32,13 +32,13 @@ void G_InitMultiPsky(int CLOUDYOCEAN__DYN, int MOONSKY1__DYN, int BIGORBIT1__DYN
sky->lognumtiles = 3; sky->lognumtiles = 3;
sky->horizfrac = 32768; sky->horizfrac = 32768;
// CLOUDYOCEAN // TILE_CLOUDYOCEAN
// Aligns with the drawn scene horizon because it has one itself. // Aligns with the drawn scene horizon because it has one itself.
sky = tileSetupSky(CLOUDYOCEAN__DYN); sky = tileSetupSky(CLOUDYOCEAN__DYN);
sky->lognumtiles = 3; sky->lognumtiles = 3;
sky->horizfrac = 65536; sky->horizfrac = 65536;
// MOONSKY1 // TILE_MOONSKY1
// earth mountain mountain sun // earth mountain mountain sun
sky = tileSetupSky(MOONSKY1__DYN); sky = tileSetupSky(MOONSKY1__DYN);
sky->lognumtiles = 3; sky->lognumtiles = 3;
@ -48,7 +48,7 @@ void G_InitMultiPsky(int CLOUDYOCEAN__DYN, int MOONSKY1__DYN, int BIGORBIT1__DYN
sky->tileofs[4] = 2; sky->tileofs[4] = 2;
sky->tileofs[2] = 3; sky->tileofs[2] = 3;
// BIGORBIT1 // orbit // TILE_BIGORBIT1 // orbit
// earth1 2 3 moon/sun // earth1 2 3 moon/sun
sky = tileSetupSky(BIGORBIT1__DYN); sky = tileSetupSky(BIGORBIT1__DYN);
sky->lognumtiles = 3; sky->lognumtiles = 3;
@ -58,7 +58,7 @@ void G_InitMultiPsky(int CLOUDYOCEAN__DYN, int MOONSKY1__DYN, int BIGORBIT1__DYN
sky->tileofs[7] = 3; sky->tileofs[7] = 3;
sky->tileofs[2] = 4; sky->tileofs[2] = 4;
// LA // la city // TILE_LA // la city
// earth1 2 3 moon/sun // earth1 2 3 moon/sun
sky = tileSetupSky(LA__DYN); sky = tileSetupSky(LA__DYN);
sky->lognumtiles = 3; sky->lognumtiles = 3;
@ -123,7 +123,7 @@ void G_LoadLookups(void)
for (j=1; j<=5; j++) for (j=1; j<=5; j++)
{ {
// Account for TITLE and REALMS swap between basepal number and on-disk order. // Account for TILE_TITLE and REALMS swap between basepal number and on-disk order.
int32_t basepalnum = (j == 3 || j == 4) ? 4+3-j : j; int32_t basepalnum = (j == 3 || j == 4) ? 4+3-j : j;
if (fr.Read(paldata, 768) != 768) if (fr.Read(paldata, 768) != 768)

View file

@ -87,9 +87,9 @@ void Menu_Init(void)
// prepare menu fonts // prepare menu fonts
// check if tilenum is -1 in case it was set in EVENT_SETDEFAULTS // check if tilenum is -1 in case it was set in EVENT_SETDEFAULTS
if ((unsigned)MF_Redfont.tilenum >= MAXTILES) MF_Redfont.tilenum = BIGALPHANUM; if ((unsigned)MF_Redfont.tilenum >= MAXTILES) MF_Redfont.tilenum = TILE_BIGALPHANUM;
if ((unsigned)MF_Bluefont.tilenum >= MAXTILES) MF_Bluefont.tilenum = STARTALPHANUM; if ((unsigned)MF_Bluefont.tilenum >= MAXTILES) MF_Bluefont.tilenum = TILE_STARTALPHANUM;
if ((unsigned)MF_Minifont.tilenum >= MAXTILES) MF_Minifont.tilenum = MINIFONT; if ((unsigned)MF_Minifont.tilenum >= MAXTILES) MF_Minifont.tilenum = TILE_MINIFONT;
MF_Redfont.emptychar.y = tilesiz[MF_Redfont.tilenum].y << 16; MF_Redfont.emptychar.y = tilesiz[MF_Redfont.tilenum].y << 16;
MF_Bluefont.emptychar.y = tilesiz[MF_Bluefont.tilenum].y << 16; MF_Bluefont.emptychar.y = tilesiz[MF_Bluefont.tilenum].y << 16;
MF_Minifont.emptychar.y = tilesiz[MF_Minifont.tilenum].y << 16; MF_Minifont.emptychar.y = tilesiz[MF_Minifont.tilenum].y << 16;
@ -122,12 +122,12 @@ void Menu_Init(void)
static void Menu_DrawBackground(const DVector2 &origin) static void Menu_DrawBackground(const DVector2 &origin)
{ {
rotatesprite_fs(int(origin.X * 65536) + (MENU_MARGIN_CENTER << 16), int(origin.Y * 65536) + (100 << 16), 65536L, 0, MENUSCREEN, 16, 0, 10 + 64); rotatesprite_fs(int(origin.X * 65536) + (MENU_MARGIN_CENTER << 16), int(origin.Y * 65536) + (100 << 16), 65536L, 0, TILE_MENUSCREEN, 16, 0, 10 + 64);
} }
static void Menu_DrawTopBar(const DVector2 &origin) static void Menu_DrawTopBar(const DVector2 &origin)
{ {
rotatesprite_fs(int(origin.X*65536) + (MENU_MARGIN_CENTER<<16), int(origin.Y*65536) + (19<<16), MF_Redfont.cursorScale3, 0,MENUBAR,16,0,10); rotatesprite_fs(int(origin.X*65536) + (MENU_MARGIN_CENTER<<16), int(origin.Y*65536) + (19<<16), MF_Redfont.cursorScale3, 0,TILE_MENUBAR,16,0,10);
} }
static void Menu_DrawTopBarCaption(const char* caption, const DVector2& origin) static void Menu_DrawTopBarCaption(const char* caption, const DVector2& origin)
@ -198,13 +198,13 @@ static void Menu_DrawCursorCommon(int32_t x, int32_t y, int32_t z, int32_t picnu
static void Menu_DrawCursorLeft(int32_t x, int32_t y, int32_t z) static void Menu_DrawCursorLeft(int32_t x, int32_t y, int32_t z)
{ {
const int frames = RR ? 16 : 7; const int frames = RR ? 16 : 7;
Menu_DrawCursorCommon(x, y, z, SPINNINGNUKEICON+(((int32_t) totalclock>>3)%frames)); Menu_DrawCursorCommon(x, y, z, TILE_SPINNINGNUKEICON+(((int32_t) totalclock>>3)%frames));
} }
static void Menu_DrawCursorRight(int32_t x, int32_t y, int32_t z) static void Menu_DrawCursorRight(int32_t x, int32_t y, int32_t z)
{ {
const int frames = RR ? 16 : 7; const int frames = RR ? 16 : 7;
Menu_DrawCursorCommon(x, y, z, SPINNINGNUKEICON+frames-1-((frames-1+((int32_t) totalclock>>3))%frames)); Menu_DrawCursorCommon(x, y, z, TILE_SPINNINGNUKEICON+frames-1-((frames-1+((int32_t) totalclock>>3))%frames));
} }
static int Menu_GetFontHeight(int fontnum) static int Menu_GetFontHeight(int fontnum)
@ -248,7 +248,7 @@ void Menu_DHLeaonardHeadDisplay(vec2_t pos)
dword_A99A4 = 160 - ((rrdh_random() & 255) - 128); dword_A99A4 = 160 - ((rrdh_random() & 255) - 128);
word_A99B0 = ((rrdh_random() & 127) + 1984) & 2047; word_A99B0 = ((rrdh_random() & 127) + 1984) & 2047;
dword_A99AC = (rrdh_random() & 4095) - 4090; dword_A99AC = (rrdh_random() & 4095) - 4090;
word_A99B2 = SPINNINGNUKEICON + (rrdh_random() & 15); word_A99B2 = TILE_SPINNINGNUKEICON + (rrdh_random() & 15);
} }
break; break;
case 1: case 1:
@ -285,10 +285,10 @@ void Menu_DHLeaonardHeadDisplay(vec2_t pos)
dword_A99A0 = 3; dword_A99A0 = 3;
} }
} }
if (word_A99B2 < SPINNINGNUKEICON) if (word_A99B2 < TILE_SPINNINGNUKEICON)
word_A99B2 = SPINNINGNUKEICON + 15; word_A99B2 = TILE_SPINNINGNUKEICON + 15;
if (word_A99B2 > SPINNINGNUKEICON + 15) if (word_A99B2 > TILE_SPINNINGNUKEICON + 15)
word_A99B2 = SPINNINGNUKEICON; word_A99B2 = TILE_SPINNINGNUKEICON;
pos.x += dword_A99A4 << 16; pos.x += dword_A99A4 << 16;
pos.y += (240 - dword_A99A8) << 16; pos.y += (240 - dword_A99A8) << 16;
rotatesprite(pos.x, pos.y, 32768 - dword_A99AC, word_A99B0, word_A99B2, 0, 0, 10, 0, 0, xdim - 1, ydim - 1); rotatesprite(pos.x, pos.y, 32768 - dword_A99AC, word_A99B0, word_A99B2, 0, 0, 10, 0, 0, xdim - 1, ydim - 1);
@ -384,21 +384,21 @@ class DukeMainMenu : public DukeListMenu
{ {
vec2_t forigin = { int(origin.X * 65536), int(origin.Y * 65536) }; vec2_t forigin = { int(origin.X * 65536), int(origin.Y * 65536) };
Menu_DHLeaonardHeadDisplay(forigin); Menu_DHLeaonardHeadDisplay(forigin);
rotatesprite_fs(forigin.x + (MENU_MARGIN_CENTER << 16), forigin.y + ((32) << 16), 20480L, 0, DUKENUKEM, 0, 0, 10); rotatesprite_fs(forigin.x + (MENU_MARGIN_CENTER << 16), forigin.y + ((32) << 16), 20480L, 0, TILE_DUKENUKEM, 0, 0, 10);
} }
else if (RRRA) else if (RRRA)
{ {
rotatesprite_fs(int(origin.X * 65536) + ((MENU_MARGIN_CENTER - 5) << 16), int(origin.Y * 65536) + ((57) << 16), 16592L, 0, THREEDEE, 0, 0, 10); rotatesprite_fs(int(origin.X * 65536) + ((MENU_MARGIN_CENTER - 5) << 16), int(origin.Y * 65536) + ((57) << 16), 16592L, 0, TILE_THREEDEE, 0, 0, 10);
} }
else if (RR) else if (RR)
{ {
rotatesprite_fs(int(origin.X * 65536) + ((MENU_MARGIN_CENTER + 5) << 16), int(origin.Y * 65536) + ((24) << 16), 23592L, 0, INGAMEDUKETHREEDEE, 0, 0, 10); rotatesprite_fs(int(origin.X * 65536) + ((MENU_MARGIN_CENTER + 5) << 16), int(origin.Y * 65536) + ((24) << 16), 23592L, 0, TILE_INGAMEDUKETHREEDEE, 0, 0, 10);
} }
else else
{ {
rotatesprite_fs(int(origin.X * 65536) + (MENU_MARGIN_CENTER<<16), int(origin.Y * 65536) + ((28)<<16), 65536L,0,INGAMEDUKETHREEDEE,0,0,10); rotatesprite_fs(int(origin.X * 65536) + (MENU_MARGIN_CENTER<<16), int(origin.Y * 65536) + ((28)<<16), 65536L,0,TILE_INGAMEDUKETHREEDEE,0,0,10);
if (PLUTOPAK) // JBF 20030804 if (PLUTOPAK) // JBF 20030804
rotatesprite_fs(int(origin.X * 65536) + ((MENU_MARGIN_CENTER+100)<<16), int(origin.Y * 65536) + (36<<16), 65536L,0,PLUTOPAKSPRITE+2,(sintable[((int32_t) totalclock<<4)&2047]>>11),0,2+8); rotatesprite_fs(int(origin.X * 65536) + ((MENU_MARGIN_CENTER+100)<<16), int(origin.Y * 65536) + (36<<16), 65536L,0,TILE_PLUTOPAKSPRITE+2,(sintable[((int32_t) totalclock<<4)&2047]>>11),0,2+8);
} }
} }
@ -753,9 +753,9 @@ void GameInterface::DrawCenteredTextScreen(const DVector2 &origin, const char *t
void GameInterface::DrawPlayerSprite(const DVector2& origin, bool onteam) void GameInterface::DrawPlayerSprite(const DVector2& origin, bool onteam)
{ {
if (RR) if (RR)
rotatesprite_fs(int(origin.X * 65536) + (260<<16), int(origin.Y * 65536) + ((24+(tilesiz[APLAYER].y>>2))<<16), 24576L,0,3845+36-((((8-((int32_t) totalclock>>4)))&7)*5),0,onteam ? G_GetTeamPalette(playerteam) : G_CheckPlayerColor(playercolor),10); rotatesprite_fs(int(origin.X * 65536) + (260<<16), int(origin.Y * 65536) + ((24+(tilesiz[TILE_APLAYER].y>>2))<<16), 24576L,0,3845+36-((((8-((int32_t) totalclock>>4)))&7)*5),0,onteam ? G_GetTeamPalette(playerteam) : G_CheckPlayerColor(playercolor),10);
else else
rotatesprite_fs(int(origin.X * 65536) + (260<<16), int(origin.Y * 65536) + ((24+(tilesiz[APLAYER].y>>1))<<16), 49152L,0,1441-((((4-((int32_t) totalclock>>4)))&3)*5),0,onteam ? G_GetTeamPalette(playerteam) : G_CheckPlayerColor(playercolor),10); rotatesprite_fs(int(origin.X * 65536) + (260<<16), int(origin.Y * 65536) + ((24+(tilesiz[TILE_APLAYER].y>>1))<<16), 49152L,0,1441-((((4-((int32_t) totalclock>>4)))&3)*5),0,onteam ? G_GetTeamPalette(playerteam) : G_CheckPlayerColor(playercolor),10);
} }
void GameInterface::QuitToTitle() void GameInterface::QuitToTitle()

View file

@ -828,16 +828,16 @@ nextdemo_nomenu:
Bsprintf(buf, "%02d:%02d", j/60, j%60); Bsprintf(buf, "%02d:%02d", j/60, j%60);
gametext_widenumber(18, 16, buf); gametext_widenumber(18, 16, buf);
rotatesprite(60<<16, 16<<16, 32768, 0, SLIDEBAR, 0, 0, 2+8+16+1024, 0, 0, (xdim*95)/320, ydim-1); rotatesprite(60<<16, 16<<16, 32768, 0, TILE_SLIDEBAR, 0, 0, 2+8+16+1024, 0, 0, (xdim*95)/320, ydim-1);
rotatesprite(90<<16, 16<<16, 32768, 0, SLIDEBAR, 0, 0, 2+8+16+1024, (xdim*95)/320, 0, (xdim*125)/320, ydim-1); rotatesprite(90<<16, 16<<16, 32768, 0, TILE_SLIDEBAR, 0, 0, 2+8+16+1024, (xdim*95)/320, 0, (xdim*125)/320, ydim-1);
rotatesprite(120<<16, 16<<16, 32768, 0, SLIDEBAR, 0, 0, 2+8+16+1024, (xdim*125)/320, 0, (xdim*155)/320, ydim-1); rotatesprite(120<<16, 16<<16, 32768, 0, TILE_SLIDEBAR, 0, 0, 2+8+16+1024, (xdim*125)/320, 0, (xdim*155)/320, ydim-1);
rotatesprite(150<<16, 16<<16, 32768, 0, SLIDEBAR, 0, 0, 2+8+16+1024, (xdim*155)/320, 0, xdim-1, ydim-1); rotatesprite(150<<16, 16<<16, 32768, 0, TILE_SLIDEBAR, 0, 0, 2+8+16+1024, (xdim*155)/320, 0, xdim-1, ydim-1);
j = (182<<16) - (tabledivide32_noinline((120*(g_demo_totalCnt-g_demo_cnt))<<4, g_demo_totalCnt)<<12); j = (182<<16) - (tabledivide32_noinline((120*(g_demo_totalCnt-g_demo_cnt))<<4, g_demo_totalCnt)<<12);
if (RR) if (RR)
rotatesprite_fs(j, (15<<16)+(1<<15), 16384, 0, BIGALPHANUM-9, 0, 0, 2+8+16+1024); rotatesprite_fs(j, (15<<16)+(1<<15), 16384, 0, TILE_BIGALPHANUM-9, 0, 0, 2+8+16+1024);
else else
rotatesprite_fs(j, (16<<16)+(1<<15), 32768, 0, SLIDEBAR+1, 0, 0, 2+8+16+1024); rotatesprite_fs(j, (16<<16)+(1<<15), 32768, 0, TILE_SLIDEBAR+1, 0, 0, 2+8+16+1024);
j=(g_demo_totalCnt-g_demo_cnt)/REALGAMETICSPERSEC; j=(g_demo_totalCnt-g_demo_cnt)/REALGAMETICSPERSEC;
Bsprintf(buf, "-%02d:%02d%s", j/60, j%60, g_demo_paused ? " ^15PAUSED" : ""); Bsprintf(buf, "-%02d:%02d%s", j/60, j%60, g_demo_paused ? " ^15PAUSED" : "");
@ -895,7 +895,7 @@ nextdemo_nomenu:
if (VOLUMEONE) if (VOLUMEONE)
{ {
if ((g_player[myconnectindex].ps->gm&MODE_MENU) == 0) if ((g_player[myconnectindex].ps->gm&MODE_MENU) == 0)
rotatesprite_fs((320-50)<<16, 9<<16, 65536L, 0, BETAVERSION, 0, 0, 2+8+16+128); rotatesprite_fs((320-50)<<16, 9<<16, 65536L, 0, TILE_BETAVERSION, 0, 0, 2+8+16+128);
} }
videoNextPage(); videoNextPage();

File diff suppressed because it is too large Load diff

View file

@ -267,7 +267,7 @@ int32_t A_GetFurthestAngle(int const spriteNum, int const angDiv)
{ {
uspritetype *const pSprite = (uspritetype *)&sprite[spriteNum]; uspritetype *const pSprite = (uspritetype *)&sprite[spriteNum];
if (pSprite->picnum != APLAYER && (AC_COUNT(actor[spriteNum].t_data)&63) > 2) if (pSprite->picnum != TILE_APLAYER && (AC_COUNT(actor[spriteNum].t_data)&63) > 2)
return pSprite->ang + 1024; return pSprite->ang + 1024;
int32_t furthestAngle = 0; int32_t furthestAngle = 0;
@ -357,13 +357,13 @@ void A_GetZLimits(int const spriteNum)
// If a non-projectile would fall onto non-frozen enemy OR an enemy onto a player... // If a non-projectile would fall onto non-frozen enemy OR an enemy onto a player...
if ((A_CheckEnemySprite(hitspr) && hitspr->pal != 1 && pSprite->statnum != STAT_PROJECTILE) if ((A_CheckEnemySprite(hitspr) && hitspr->pal != 1 && pSprite->statnum != STAT_PROJECTILE)
|| (hitspr->picnum == APLAYER && A_CheckEnemySprite(pSprite))) || (hitspr->picnum == TILE_APLAYER && A_CheckEnemySprite(pSprite)))
{ {
actor[spriteNum].flags |= SFLAG_NOFLOORSHADOW; // No shadows on actors actor[spriteNum].flags |= SFLAG_NOFLOORSHADOW; // No shadows on actors
pSprite->xvel = -256; // SLIDE_ABOVE_ENEMY pSprite->xvel = -256; // SLIDE_ABOVE_ENEMY
A_SetSprite(spriteNum, CLIPMASK0); A_SetSprite(spriteNum, CLIPMASK0);
} }
else if (pSprite->statnum == STAT_PROJECTILE && hitspr->picnum == APLAYER && pSprite->owner==florhit) else if (pSprite->statnum == STAT_PROJECTILE && hitspr->picnum == TILE_APLAYER && pSprite->owner==florhit)
{ {
actor[spriteNum].ceilingz = sector[pSprite->sectnum].ceilingz; actor[spriteNum].ceilingz = sector[pSprite->sectnum].ceilingz;
actor[spriteNum].floorz = sector[pSprite->sectnum].floorz; actor[spriteNum].floorz = sector[pSprite->sectnum].floorz;
@ -389,9 +389,9 @@ void A_Fall(int const spriteNum)
if (RRRA && spriteGravity == g_spriteGravity) if (RRRA && spriteGravity == g_spriteGravity)
{ {
if (pSprite->picnum == BIKERB || pSprite->picnum == CHEERB) if (pSprite->picnum == TILE_BIKERB || pSprite->picnum == TILE_CHEERB)
spriteGravity >>= 2; spriteGravity >>= 2;
else if (pSprite->picnum == BIKERBV2) else if (pSprite->picnum == TILE_BIKERBV2)
spriteGravity >>= 3; spriteGravity >>= 3;
} }
@ -491,11 +491,11 @@ GAMEEXEC_STATIC void VM_AlterAng(int32_t const moveFlags)
? holoDukeSprite ? holoDukeSprite
: vm.pPlayer->i; : vm.pPlayer->i;
int const goalAng = (sprite[vm.pSprite->owner].picnum == APLAYER) int const goalAng = (sprite[vm.pSprite->owner].picnum == TILE_APLAYER)
? getangle(vm.pActor->lastv.x - vm.pSprite->x, vm.pActor->lastv.y - vm.pSprite->y) ? getangle(vm.pActor->lastv.x - vm.pSprite->x, vm.pActor->lastv.y - vm.pSprite->y)
: getangle(sprite[vm.pSprite->owner].x - vm.pSprite->x, sprite[vm.pSprite->owner].y - vm.pSprite->y); : getangle(sprite[vm.pSprite->owner].x - vm.pSprite->x, sprite[vm.pSprite->owner].y - vm.pSprite->y);
if (vm.pSprite->xvel && vm.pSprite->picnum != DRONE) if (vm.pSprite->xvel && vm.pSprite->picnum != TILE_DRONE)
{ {
int const angDiff = G_GetAngleDelta(spriteAngle, goalAng); int const angDiff = G_GetAngleDelta(spriteAngle, goalAng);
@ -624,7 +624,7 @@ GAMEEXEC_STATIC void VM_Move(void)
if ((movflags&jumptoplayer_bits) == jumptoplayer_bits) if ((movflags&jumptoplayer_bits) == jumptoplayer_bits)
{ {
if (AC_COUNT(vm.pData) < 16) if (AC_COUNT(vm.pData) < 16)
vm.pSprite->zvel -= (!DEER && RRRA && vm.pSprite->picnum == CHEER) ? (sintable[(512+(AC_COUNT(vm.pData)<<4))&2047]/40) vm.pSprite->zvel -= (!DEER && RRRA && vm.pSprite->picnum == TILE_CHEER) ? (sintable[(512+(AC_COUNT(vm.pData)<<4))&2047]/40)
: (sintable[(512+(AC_COUNT(vm.pData)<<4))&2047]>>5); : (sintable[(512+(AC_COUNT(vm.pData)<<4))&2047]>>5);
} }
@ -634,17 +634,17 @@ GAMEEXEC_STATIC void VM_Move(void)
VM_AddAngle(2, getangle(vect.x - vm.pSprite->x, vect.y - vm.pSprite->y)); VM_AddAngle(2, getangle(vect.x - vm.pSprite->x, vect.y - vm.pSprite->y));
} }
if (RRRA && (vm.pSprite->picnum == RABBIT || vm.pSprite->picnum == MAMA)) if (RRRA && (vm.pSprite->picnum == TILE_RABBIT || vm.pSprite->picnum == TILE_MAMA))
{ {
if(movflags&jumptoplayer_only) if(movflags&jumptoplayer_only)
{ {
if (AC_COUNT(vm.pData) < 8) if (AC_COUNT(vm.pData) < 8)
vm.pSprite->zvel -= sintable[(512+(AC_COUNT(vm.pData)<<4))&2047]/(vm.pSprite->picnum == RABBIT ? 30 : 35); vm.pSprite->zvel -= sintable[(512+(AC_COUNT(vm.pData)<<4))&2047]/(vm.pSprite->picnum == TILE_RABBIT ? 30 : 35);
} }
if(movflags&justjump2) if(movflags&justjump2)
{ {
if (AC_COUNT(vm.pData) < 8) if (AC_COUNT(vm.pData) < 8)
vm.pSprite->zvel -= sintable[(512+(AC_COUNT(vm.pData)<<4))&2047]/(vm.pSprite->picnum == RABBIT ? 24 : 28); vm.pSprite->zvel -= sintable[(512+(AC_COUNT(vm.pData)<<4))&2047]/(vm.pSprite->picnum == TILE_RABBIT ? 24 : 28);
} }
} }
@ -687,7 +687,7 @@ GAMEEXEC_STATIC void VM_Move(void)
if (movflags&dodgebullet) if (movflags&dodgebullet)
A_Dodge(vm.pSprite); A_Dodge(vm.pSprite);
if (vm.pSprite->picnum != APLAYER) if (vm.pSprite->picnum != TILE_APLAYER)
VM_AlterAng(movflags); VM_AlterAng(movflags);
if (vm.pSprite->xvel > -6 && vm.pSprite->xvel < 6) if (vm.pSprite->xvel > -6 && vm.pSprite->xvel < 6)
@ -700,14 +700,14 @@ GAMEEXEC_STATIC void VM_Move(void)
int spriteXvel = vm.pSprite->xvel; int spriteXvel = vm.pSprite->xvel;
int angDiff = vm.pSprite->ang; int angDiff = vm.pSprite->ang;
if (badguyp && (vm.pSprite->picnum != ROTATEGUN || RR)) if (badguyp && (vm.pSprite->picnum != TILE_ROTATEGUN || RR))
{ {
if ((vm.pSprite->picnum == DRONE || (!RR && vm.pSprite->picnum == COMMANDER)) && vm.pSprite->extra > 0) if ((vm.pSprite->picnum == TILE_DRONE || (!RR && vm.pSprite->picnum == TILE_COMMANDER)) && vm.pSprite->extra > 0)
{ {
if (!RR && vm.pSprite->picnum == COMMANDER) if (!RR && vm.pSprite->picnum == TILE_COMMANDER)
{ {
int32_t nSectorZ; int32_t nSectorZ;
// NOTE: COMMANDER updates both actor[].floorz and // NOTE: TILE_COMMANDER updates both actor[].floorz and
// .ceilingz regardless of its zvel. // .ceilingz regardless of its zvel.
vm.pActor->floorz = nSectorZ = VM_GetFlorZOfSlope(); vm.pActor->floorz = nSectorZ = VM_GetFlorZOfSlope();
if (vm.pSprite->z > nSectorZ-ZOFFSET3) if (vm.pSprite->z > nSectorZ-ZOFFSET3)
@ -726,7 +726,7 @@ GAMEEXEC_STATIC void VM_Move(void)
else else
{ {
int32_t nSectorZ; int32_t nSectorZ;
// The DRONE updates either .floorz or .ceilingz, not both. // The TILE_DRONE updates either .floorz or .ceilingz, not both.
if (vm.pSprite->zvel > 0) if (vm.pSprite->zvel > 0)
{ {
vm.pActor->floorz = nSectorZ = VM_GetFlorZOfSlope(); vm.pActor->floorz = nSectorZ = VM_GetFlorZOfSlope();
@ -745,9 +745,9 @@ GAMEEXEC_STATIC void VM_Move(void)
} }
} }
} }
else if (vm.pSprite->picnum != ORGANTIC || RR) else if (vm.pSprite->picnum != TILE_ORGANTIC || RR)
{ {
// All other actors besides ORGANTIC don't update .floorz or // All other actors besides TILE_ORGANTIC don't update .floorz or
// .ceilingz here. // .ceilingz here.
if (vm.pSprite->zvel > 0) if (vm.pSprite->zvel > 0)
{ {
@ -783,10 +783,10 @@ GAMEEXEC_STATIC void VM_Move(void)
vm.pPlayer->vel.y = mulscale16(vm.pPlayer->vel.y, vm.pPlayer->runspeed - 0x2000); vm.pPlayer->vel.y = mulscale16(vm.pPlayer->vel.y, vm.pPlayer->runspeed - 0x2000);
} }
} }
else if (vm.pSprite->picnum != DRONE && vm.pSprite->picnum != SHARK else if (vm.pSprite->picnum != TILE_DRONE && vm.pSprite->picnum != TILE_SHARK
&& ((!RR && vm.pSprite->picnum != COMMANDER) && ((!RR && vm.pSprite->picnum != TILE_COMMANDER)
|| (RR && vm.pSprite->picnum != UFO1) || (RR && vm.pSprite->picnum != TILE_UFO1)
|| (RR && !RRRA && vm.pSprite->picnum != UFO2 && vm.pSprite->picnum != UFO3 && vm.pSprite->picnum != UFO4 && vm.pSprite->picnum != UFO5))) || (RR && !RRRA && vm.pSprite->picnum != TILE_UFO2 && vm.pSprite->picnum != TILE_UFO3 && vm.pSprite->picnum != TILE_UFO4 && vm.pSprite->picnum != TILE_UFO5)))
{ {
if (vm.pPlayer->actorsqu == vm.spriteNum) if (vm.pPlayer->actorsqu == vm.spriteNum)
return; return;
@ -803,7 +803,7 @@ GAMEEXEC_STATIC void VM_Move(void)
} }
} }
} }
else if (vm.pSprite->picnum == APLAYER) else if (vm.pSprite->picnum == TILE_APLAYER)
if (vm.pSprite->z < vm.pActor->ceilingz+ZOFFSET5) if (vm.pSprite->z < vm.pActor->ceilingz+ZOFFSET5)
vm.pSprite->z = vm.pActor->ceilingz+ZOFFSET5; vm.pSprite->z = vm.pActor->ceilingz+ZOFFSET5;
@ -837,7 +837,7 @@ GAMEEXEC_STATIC void VM_Move(void)
= { (spriteXvel * (sintable[(angDiff + 512) & 2047])) >> 14, (spriteXvel * (sintable[angDiff & 2047])) >> 14, vm.pSprite->zvel }; = { (spriteXvel * (sintable[(angDiff + 512) & 2047])) >> 14, (spriteXvel * (sintable[angDiff & 2047])) >> 14, vm.pSprite->zvel };
vm.pActor->movflag = A_MoveSprite(vm.spriteNum, &vect, CLIPMASK0); vm.pActor->movflag = A_MoveSprite(vm.spriteNum, &vect, CLIPMASK0);
if (DEER && vm.pSprite->picnum != DOGRUN) if (DEER && vm.pSprite->picnum != TILE_DOGRUN)
{ {
if ((vm.pActor->movflag & 49152) == 32768) if ((vm.pActor->movflag & 49152) == 32768)
{ {
@ -867,7 +867,7 @@ GAMEEXEC_STATIC void VM_Move(void)
vm.pSprite->shade += (sector[vm.pSprite->sectnum].ceilingstat & 1) ? ((g_shadedSector[vm.pSprite->sectnum] == 1 ? 16 : sector[vm.pSprite->sectnum].ceilingshade) - vm.pSprite->shade) >> 1 vm.pSprite->shade += (sector[vm.pSprite->sectnum].ceilingstat & 1) ? ((g_shadedSector[vm.pSprite->sectnum] == 1 ? 16 : sector[vm.pSprite->sectnum].ceilingshade) - vm.pSprite->shade) >> 1
: (sector[vm.pSprite->sectnum].floorshade - vm.pSprite->shade) >> 1; : (sector[vm.pSprite->sectnum].floorshade - vm.pSprite->shade) >> 1;
if (sector[vm.pSprite->sectnum].floorpicnum == MIRROR) if (sector[vm.pSprite->sectnum].floorpicnum == TILE_MIRROR)
A_DeleteSprite(vm.spriteNum); A_DeleteSprite(vm.spriteNum);
} }
@ -1004,25 +1004,25 @@ static void VM_Fall(int const spriteNum, spritetype * const pSprite)
{ {
if (sector[vm.pSprite->sectnum].lotag == 801) if (sector[vm.pSprite->sectnum].lotag == 801)
{ {
if (vm.pSprite->picnum == ROCK) if (vm.pSprite->picnum == TILE_ROCK)
{ {
A_Spawn(vm.spriteNum, ROCK2); A_Spawn(vm.spriteNum, TILE_ROCK2);
A_Spawn(vm.spriteNum, ROCK2); A_Spawn(vm.spriteNum, TILE_ROCK2);
vm.flags |= VM_SAFEDELETE; vm.flags |= VM_SAFEDELETE;
} }
} }
else if (sector[vm.pSprite->sectnum].lotag == 802) else if (sector[vm.pSprite->sectnum].lotag == 802)
{ {
if (vm.pSprite->picnum != APLAYER && A_CheckEnemySprite(vm.pSprite) && vm.pSprite->z == vm.pActor->floorz - ZOFFSET) if (vm.pSprite->picnum != TILE_APLAYER && A_CheckEnemySprite(vm.pSprite) && vm.pSprite->z == vm.pActor->floorz - ZOFFSET)
{ {
A_DoGuts(vm.spriteNum, JIBS6, 5); A_DoGuts(vm.spriteNum, TILE_JIBS6, 5);
A_PlaySound(SQUISHED, vm.spriteNum); A_PlaySound(SQUISHED, vm.spriteNum);
vm.flags |= VM_SAFEDELETE; vm.flags |= VM_SAFEDELETE;
} }
} }
else if (sector[vm.pSprite->sectnum].lotag == 803) else if (sector[vm.pSprite->sectnum].lotag == 803)
{ {
if (vm.pSprite->picnum == ROCK2) if (vm.pSprite->picnum == TILE_ROCK2)
{ {
vm.flags |= VM_SAFEDELETE; vm.flags |= VM_SAFEDELETE;
} }
@ -1030,12 +1030,12 @@ static void VM_Fall(int const spriteNum, spritetype * const pSprite)
} }
if (sector[vm.pSprite->sectnum].lotag == 800) if (sector[vm.pSprite->sectnum].lotag == 800)
{ {
if (vm.pSprite->picnum == AMMO) if (vm.pSprite->picnum == TILE_AMMO)
{ {
vm.flags |= VM_SAFEDELETE; vm.flags |= VM_SAFEDELETE;
return; return;
} }
if (vm.pSprite->picnum != APLAYER && (A_CheckEnemySprite(vm.pSprite) || vm.pSprite->picnum == COW) && g_spriteExtra[vm.spriteNum] < 128) if (vm.pSprite->picnum != TILE_APLAYER && (A_CheckEnemySprite(vm.pSprite) || vm.pSprite->picnum == TILE_COW) && g_spriteExtra[vm.spriteNum] < 128)
{ {
vm.pSprite->z = vm.pActor->floorz-ZOFFSET; vm.pSprite->z = vm.pActor->floorz-ZOFFSET;
vm.pSprite->zvel = 8000; vm.pSprite->zvel = 8000;
@ -1043,23 +1043,23 @@ static void VM_Fall(int const spriteNum, spritetype * const pSprite)
g_spriteExtra[vm.spriteNum]++; g_spriteExtra[vm.spriteNum]++;
hitSprite = 1; hitSprite = 1;
} }
else if (vm.pSprite->picnum != APLAYER) else if (vm.pSprite->picnum != TILE_APLAYER)
{ {
if (!g_spriteExtra[vm.spriteNum]) if (!g_spriteExtra[vm.spriteNum])
vm.flags |= VM_SAFEDELETE; vm.flags |= VM_SAFEDELETE;
return; return;
} }
vm.pActor->picnum = SHOTSPARK1; vm.pActor->picnum = TILE_SHOTSPARK1;
vm.pActor->extra = 1; vm.pActor->extra = 1;
} }
if (RRRA && EDUKE32_PREDICT_TRUE(sector[vm.pSprite->sectnum].lotag < 800 || sector[vm.pSprite->sectnum].lotag > 803) if (RRRA && EDUKE32_PREDICT_TRUE(sector[vm.pSprite->sectnum].lotag < 800 || sector[vm.pSprite->sectnum].lotag > 803)
&& (sector[vm.pSprite->sectnum].floorpicnum == RRTILE7820 || sector[vm.pSprite->sectnum].floorpicnum == RRTILE7768)) && (sector[vm.pSprite->sectnum].floorpicnum == TILE_RRTILE7820 || sector[vm.pSprite->sectnum].floorpicnum == TILE_RRTILE7768))
{ {
if (vm.pSprite->picnum != MINION && vm.pSprite->pal != 19) if (vm.pSprite->picnum != TILE_MINION && vm.pSprite->pal != 19)
{ {
if ((krand2()&3) == 1) if ((krand2()&3) == 1)
{ {
vm.pActor->picnum = SHOTSPARK1; vm.pActor->picnum = TILE_SHOTSPARK1;
vm.pActor->extra = 5; vm.pActor->extra = 5;
} }
} }
@ -1095,26 +1095,26 @@ static void VM_Fall(int const spriteNum, spritetype * const pSprite)
pSprite->z = actor[spriteNum].floorz - ZOFFSET; pSprite->z = actor[spriteNum].floorz - ZOFFSET;
if (A_CheckEnemySprite(pSprite) || (pSprite->picnum == APLAYER && pSprite->owner >= 0)) if (A_CheckEnemySprite(pSprite) || (pSprite->picnum == TILE_APLAYER && pSprite->owner >= 0))
{ {
if (pSprite->zvel > 3084 && pSprite->extra <= 1) if (pSprite->zvel > 3084 && pSprite->extra <= 1)
{ {
// I'm guessing this DRONE check is from a beta version of the game // I'm guessing this TILE_DRONE check is from a beta version of the game
// where they crashed into the ground when killed // where they crashed into the ground when killed
if (!(pSprite->picnum == APLAYER && pSprite->extra > 0) && pSprite->pal != 1 && pSprite->picnum != DRONE) if (!(pSprite->picnum == TILE_APLAYER && pSprite->extra > 0) && pSprite->pal != 1 && pSprite->picnum != TILE_DRONE)
{ {
A_PlaySound(SQUISHED,spriteNum); A_PlaySound(SQUISHED,spriteNum);
if (hitSprite) if (hitSprite)
{ {
A_DoGuts(spriteNum,JIBS6,5); A_DoGuts(spriteNum,TILE_JIBS6,5);
} }
else else
{ {
A_DoGuts(spriteNum,JIBS6,15); A_DoGuts(spriteNum,TILE_JIBS6,15);
A_Spawn(spriteNum,BLOODPOOL); A_Spawn(spriteNum,TILE_BLOODPOOL);
} }
} }
actor[spriteNum].picnum = SHOTSPARK1; actor[spriteNum].picnum = TILE_SHOTSPARK1;
actor[spriteNum].extra = 1; actor[spriteNum].extra = 1;
pSprite->zvel = 0; pSprite->zvel = 0;
} }
@ -1430,7 +1430,7 @@ GAMEEXEC_STATIC void VM_Execute(native_t loop)
case CON_IFSQUISHED: VM_CONDITIONAL(VM_CheckSquished()); continue; case CON_IFSQUISHED: VM_CONDITIONAL(VM_CheckSquished()); continue;
case CON_IFDEAD: VM_CONDITIONAL(vm.pSprite->extra - (vm.pSprite->picnum == APLAYER) < 0); continue; case CON_IFDEAD: VM_CONDITIONAL(vm.pSprite->extra - (vm.pSprite->picnum == TILE_APLAYER) < 0); continue;
case CON_AI: case CON_AI:
insptr++; insptr++;
@ -1492,16 +1492,16 @@ GAMEEXEC_STATIC void VM_Execute(native_t loop)
switch (++g_fakeBubbaCnt) switch (++g_fakeBubbaCnt)
{ {
case 1: case 1:
A_Spawn(vm.spriteNum, PIG); A_Spawn(vm.spriteNum, TILE_PIG);
break; break;
case 2: case 2:
A_Spawn(vm.spriteNum, MINION); A_Spawn(vm.spriteNum, TILE_MINION);
break; break;
case 3: case 3:
A_Spawn(vm.spriteNum, CHEER); A_Spawn(vm.spriteNum, TILE_CHEER);
break; break;
case 4: case 4:
A_Spawn(vm.spriteNum, VIXEN); A_Spawn(vm.spriteNum, TILE_VIXEN);
G_OperateActivators(666, vm.playerNum); G_OperateActivators(666, vm.playerNum);
break; break;
} }
@ -1523,7 +1523,7 @@ GAMEEXEC_STATIC void VM_Execute(native_t loop)
if (g_mamaSpawnCnt) if (g_mamaSpawnCnt)
{ {
g_mamaSpawnCnt--; g_mamaSpawnCnt--;
A_Spawn(vm.spriteNum, RABBIT); A_Spawn(vm.spriteNum, TILE_RABBIT);
} }
continue; continue;
@ -1589,7 +1589,7 @@ GAMEEXEC_STATIC void VM_Execute(native_t loop)
case CON_GETLASTPAL: case CON_GETLASTPAL:
insptr++; insptr++;
if (vm.pSprite->picnum == APLAYER) if (vm.pSprite->picnum == TILE_APLAYER)
vm.pSprite->pal = g_player[P_GetP(vm.pSprite)].ps->palookup; vm.pSprite->pal = g_player[P_GetP(vm.pSprite)].ps->palookup;
else else
vm.pSprite->pal = vm.pActor->tempang; vm.pSprite->pal = vm.pActor->tempang;
@ -1598,7 +1598,7 @@ GAMEEXEC_STATIC void VM_Execute(native_t loop)
case CON_TOSSWEAPON: case CON_TOSSWEAPON:
insptr++; insptr++;
// NOTE: assumes that current actor is APLAYER // NOTE: assumes that current actor is TILE_APLAYER
P_DropWeapon(P_GetP(vm.pSprite)); P_DropWeapon(P_GetP(vm.pSprite));
continue; continue;
@ -1616,12 +1616,12 @@ GAMEEXEC_STATIC void VM_Execute(native_t loop)
case CON_PKICK: case CON_PKICK:
insptr++; insptr++;
if ((g_netServer || ud.multimode > 1) && vm.pSprite->picnum == APLAYER) if ((g_netServer || ud.multimode > 1) && vm.pSprite->picnum == TILE_APLAYER)
{ {
if (g_player[otherp].ps->quick_kick == 0) if (g_player[otherp].ps->quick_kick == 0)
g_player[otherp].ps->quick_kick = 14; g_player[otherp].ps->quick_kick = 14;
} }
else if (vm.pSprite->picnum != APLAYER && pPlayer->quick_kick == 0) else if (vm.pSprite->picnum != TILE_APLAYER && pPlayer->quick_kick == 0)
pPlayer->quick_kick = 14; pPlayer->quick_kick = 14;
continue; continue;
@ -1631,7 +1631,7 @@ GAMEEXEC_STATIC void VM_Execute(native_t loop)
tw = (*insptr++ - vm.pSprite->xrepeat) << 1; tw = (*insptr++ - vm.pSprite->xrepeat) << 1;
vm.pSprite->xrepeat += ksgn(tw); vm.pSprite->xrepeat += ksgn(tw);
if ((vm.pSprite->picnum == APLAYER && vm.pSprite->yrepeat < 36) || *insptr < vm.pSprite->yrepeat if ((vm.pSprite->picnum == TILE_APLAYER && vm.pSprite->yrepeat < 36) || *insptr < vm.pSprite->yrepeat
|| ((vm.pSprite->yrepeat * (tilesiz[vm.pSprite->picnum].y + 8)) << 2) < (vm.pActor->floorz - vm.pActor->ceilingz)) || ((vm.pSprite->yrepeat * (tilesiz[vm.pSprite->picnum].y + 8)) << 2) < (vm.pActor->floorz - vm.pActor->ceilingz))
{ {
tw = ((*insptr) - vm.pSprite->yrepeat) << 1; tw = ((*insptr) - vm.pSprite->yrepeat) << 1;
@ -1812,9 +1812,9 @@ GAMEEXEC_STATIC void VM_Execute(native_t loop)
insptr++; insptr++;
for (bssize_t SPRITES_OF_SECT(vm.pSprite->sectnum, spriteNum)) for (bssize_t SPRITES_OF_SECT(vm.pSprite->sectnum, spriteNum))
{ {
if (sprite[spriteNum].picnum == DESTRUCTO) if (sprite[spriteNum].picnum == TILE_DESTRUCTO)
{ {
actor[spriteNum].picnum = SHOTSPARK1; actor[spriteNum].picnum = TILE_SHOTSPARK1;
actor[spriteNum].extra = 1; actor[spriteNum].extra = 1;
} }
} }
@ -1840,12 +1840,12 @@ GAMEEXEC_STATIC void VM_Execute(native_t loop)
case CON_MONEY: case CON_MONEY:
insptr++; insptr++;
A_SpawnMultiple(vm.spriteNum, MONEY, *insptr++); A_SpawnMultiple(vm.spriteNum, TILE_MONEY, *insptr++);
continue; continue;
case CON_MAIL: case CON_MAIL:
insptr++; insptr++;
A_SpawnMultiple(vm.spriteNum, RR ? MONEY : MAIL, *insptr++); A_SpawnMultiple(vm.spriteNum, RR ? TILE_MONEY : TILE_MAIL, *insptr++);
continue; continue;
case CON_SLEEPTIME: case CON_SLEEPTIME:
@ -1855,7 +1855,7 @@ GAMEEXEC_STATIC void VM_Execute(native_t loop)
case CON_PAPER: case CON_PAPER:
insptr++; insptr++;
A_SpawnMultiple(vm.spriteNum, RR ? MONEY : PAPER, *insptr++); A_SpawnMultiple(vm.spriteNum, RR ? TILE_MONEY : TILE_PAPER, *insptr++);
continue; continue;
case CON_ADDKILLS: case CON_ADDKILLS:
@ -1980,7 +1980,7 @@ GAMEEXEC_STATIC void VM_Execute(native_t loop)
hitag = 0; hitag = 0;
for (SPRITES_OF_SECT(vm.pSprite->sectnum,k)) for (SPRITES_OF_SECT(vm.pSprite->sectnum,k))
{ {
if (sprite[k].picnum == RRTILE63) if (sprite[k].picnum == TILE_RRTILE63)
{ {
lotag = sprite[k].lotag; lotag = sprite[k].lotag;
spr = k; spr = k;
@ -1995,9 +1995,9 @@ GAMEEXEC_STATIC void VM_Execute(native_t loop)
{ {
for (SPRITES_OF_SECT(js->sectnum,k)) for (SPRITES_OF_SECT(js->sectnum,k))
{ {
if (sprite[k].picnum == DESTRUCTO) if (sprite[k].picnum == TILE_DESTRUCTO)
{ {
actor[k].picnum = SHOTSPARK1; actor[k].picnum = TILE_SHOTSPARK1;
actor[k].extra = 1; actor[k].extra = 1;
} }
} }
@ -2079,7 +2079,7 @@ GAMEEXEC_STATIC void VM_Execute(native_t loop)
int newHealth = sprite[pPlayer->i].extra; int newHealth = sprite[pPlayer->i].extra;
if (vm.pSprite->picnum != ATOMICHEALTH) if (vm.pSprite->picnum != TILE_ATOMICHEALTH)
{ {
if (newHealth > pPlayer->max_player_health && *insptr > 0) if (newHealth > pPlayer->max_player_health && *insptr > 0)
{ {
@ -2130,7 +2130,7 @@ GAMEEXEC_STATIC void VM_Execute(native_t loop)
int newHealth = sprite[pPlayer->i].extra; int newHealth = sprite[pPlayer->i].extra;
if (vm.pSprite->picnum != ATOMICHEALTH) if (vm.pSprite->picnum != TILE_ATOMICHEALTH)
{ {
if (newHealth > pPlayer->max_player_health && *insptr > 0) if (newHealth > pPlayer->max_player_health && *insptr > 0)
{ {
@ -2226,7 +2226,7 @@ GAMEEXEC_STATIC void VM_Execute(native_t loop)
if ((unsigned)vm.pSprite->sectnum < MAXSECTORS) if ((unsigned)vm.pSprite->sectnum < MAXSECTORS)
for (native_t cnt = (*insptr) - 1; cnt >= 0; cnt--) for (native_t cnt = (*insptr) - 1; cnt >= 0; cnt--)
{ {
int const tileOffset = ((RR || vm.pSprite->picnum == BLIMP) && debrisTile == SCRAP1) ? 0 : (krand2() % 3); int const tileOffset = ((RR || vm.pSprite->picnum == TILE_BLIMP) && debrisTile == TILE_SCRAP1) ? 0 : (krand2() % 3);
int32_t const r1 = krand2(), r2 = krand2(), r3 = krand2(), r4 = krand2(), r5 = krand2(), r6 = krand2(), r7 = krand2(), r8 = krand2(); int32_t const r1 = krand2(), r2 = krand2(), r3 = krand2(), r4 = krand2(), r5 = krand2(), r6 = krand2(), r7 = krand2(), r8 = krand2();
int const spriteNum = A_InsertSprite(vm.pSprite->sectnum, vm.pSprite->x + (r8 & 255) - 128, int const spriteNum = A_InsertSprite(vm.pSprite->sectnum, vm.pSprite->x + (r8 & 255) - 128,
@ -2234,7 +2234,7 @@ GAMEEXEC_STATIC void VM_Execute(native_t loop)
debrisTile + tileOffset, vm.pSprite->shade, 32 + (r5 & 15), 32 + (r4 & 15), debrisTile + tileOffset, vm.pSprite->shade, 32 + (r5 & 15), 32 + (r4 & 15),
r3 & 2047, (r2 & 127) + 32, -(r1 & 2047), vm.spriteNum, 5); r3 & 2047, (r2 & 127) + 32, -(r1 & 2047), vm.spriteNum, 5);
sprite[spriteNum].yvel = ((RR || vm.pSprite->picnum == BLIMP) && debrisTile == SCRAP1) ? g_blimpSpawnItems[cnt % 14] : -1; sprite[spriteNum].yvel = ((RR || vm.pSprite->picnum == TILE_BLIMP) && debrisTile == TILE_SCRAP1) ? g_blimpSpawnItems[cnt % 14] : -1;
sprite[spriteNum].pal = vm.pSprite->pal; sprite[spriteNum].pal = vm.pSprite->pal;
} }
insptr++; insptr++;
@ -2281,7 +2281,7 @@ GAMEEXEC_STATIC void VM_Execute(native_t loop)
continue; continue;
case CON_IFONMUD: case CON_IFONMUD:
VM_CONDITIONAL(sector[vm.pSprite->sectnum].floorpicnum == RRTILE3073 VM_CONDITIONAL(sector[vm.pSprite->sectnum].floorpicnum == TILE_RRTILE3073
&& klabs(vm.pSprite->z - sector[vm.pSprite->sectnum].floorz) < ZOFFSET5); && klabs(vm.pSprite->z - sector[vm.pSprite->sectnum].floorz) < ZOFFSET5);
continue; continue;
@ -2388,7 +2388,7 @@ GAMEEXEC_STATIC void VM_Execute(native_t loop)
else if ((moveFlags & pfacing)) else if ((moveFlags & pfacing))
{ {
nResult nResult
= (vm.pSprite->picnum == APLAYER && (g_netServer || ud.multimode > 1)) = (vm.pSprite->picnum == TILE_APLAYER && (g_netServer || ud.multimode > 1))
? G_GetAngleDelta(fix16_to_int(g_player[otherp].ps->q16ang), ? G_GetAngleDelta(fix16_to_int(g_player[otherp].ps->q16ang),
getangle(pPlayer->pos.x - g_player[otherp].ps->pos.x, pPlayer->pos.y - g_player[otherp].ps->pos.y)) getangle(pPlayer->pos.x - g_player[otherp].ps->pos.x, pPlayer->pos.y - g_player[otherp].ps->pos.y))
: G_GetAngleDelta(fix16_to_int(pPlayer->q16ang), getangle(vm.pSprite->x - pPlayer->pos.x, vm.pSprite->y - pPlayer->pos.y)); : G_GetAngleDelta(fix16_to_int(pPlayer->q16ang), getangle(vm.pSprite->x - pPlayer->pos.x, vm.pSprite->y - pPlayer->pos.y));
@ -2464,7 +2464,7 @@ GAMEEXEC_STATIC void VM_Execute(native_t loop)
int32_t j; int32_t j;
for (SPRITES_OF_SECT(foundSect, j)) for (SPRITES_OF_SECT(foundSect, j))
if (sprite[j].picnum == ACTIVATOR) if (sprite[j].picnum == TILE_ACTIVATOR)
break; break;
if (j == -1) if (j == -1)
@ -2477,7 +2477,7 @@ GAMEEXEC_STATIC void VM_Execute(native_t loop)
case CON_SPRITEPAL: case CON_SPRITEPAL:
insptr++; insptr++;
if (vm.pSprite->picnum != APLAYER) if (vm.pSprite->picnum != TILE_APLAYER)
vm.pActor->tempang = vm.pSprite->pal; vm.pActor->tempang = vm.pSprite->pal;
vm.pSprite->pal = *insptr++; vm.pSprite->pal = *insptr++;
continue; continue;

View file

@ -617,18 +617,18 @@ static int32_t G_StaticToDynamicTile(int32_t const tile)
switch (tile) switch (tile)
{ {
#ifndef EDUKE32_STANDALONE #ifndef EDUKE32_STANDALONE
case CHAINGUN__STATIC: return CHAINGUN; case CHAINGUN__STATIC: return TILE_CHAINGUN;
case FREEZEBLAST__STATIC: return FREEZEBLAST; case FREEZEBLAST__STATIC: return TILE_FREEZEBLAST;
case GROWSPARK__STATIC: return GROWSPARK; case GROWSPARK__STATIC: return TILE_GROWSPARK;
case HANDHOLDINGLASER__STATIC: return HANDHOLDINGLASER; case HANDHOLDINGLASER__STATIC: return TILE_HANDHOLDINGLASER;
case HEAVYHBOMB__STATIC: return HEAVYHBOMB; case HEAVYHBOMB__STATIC: return TILE_HEAVYHBOMB;
case KNEE__STATIC: return KNEE; case KNEE__STATIC: return TILE_KNEE;
case RPG__STATIC: return RPG; case RPG__STATIC: return TILE_RPG;
case SHELL__STATIC: return SHELL; case SHELL__STATIC: return TILE_SHELL;
case SHOTGUNSHELL__STATIC: return SHOTGUNSHELL; case SHOTGUNSHELL__STATIC: return TILE_SHOTGUNSHELL;
case SHOTGUN__STATIC: return SHOTGUN; case SHOTGUN__STATIC: return TILE_SHOTGUN;
case SHOTSPARK1__STATIC: return SHOTSPARK1; case SHOTSPARK1__STATIC: return TILE_SHOTSPARK1;
case SHRINKER__STATIC: return SHRINKER; case SHRINKER__STATIC: return TILE_SHRINKER;
#endif #endif
default: return tile; default: return tile;
} }

View file

@ -41,7 +41,7 @@ static FORCE_INLINE int32_t krand2(void)
{ \ { \
int32_t const r1 = krand2(), r2 = krand2(), r3 = krand2(), r4 = krand2(), r5 = krand2(), r6 = krand2(), r7 = krand2(); \ int32_t const r1 = krand2(), r2 = krand2(), r3 = krand2(), r4 = krand2(), r5 = krand2(), r6 = krand2(), r7 = krand2(); \
A_InsertSprite(s->sectnum,s->x+(r7&255)-128,s->y+(r6&255)-128,s->z-ZOFFSET3-(r5&8191),\ A_InsertSprite(s->sectnum,s->x+(r7&255)-128,s->y+(r6&255)-128,s->z-ZOFFSET3-(r5&8191),\
SCRAP6+(r4&15),-8,RR?16:48,RR?16:48,r3&2047,(r2&63)+64,-512-(r1&2047),i,5); \ TILE_SCRAP6+(r4&15),-8,RR?16:48,RR?16:48,r3&2047,(r2&63)+64,-512-(r1&2047),i,5); \
} }
#define GTFLAGS(x) (g_gametypeFlags[ud.coop] & x) #define GTFLAGS(x) (g_gametypeFlags[ud.coop] & x)
@ -61,7 +61,7 @@ static FORCE_INLINE int32_t krand2(void)
#define TEST_SYNC_KEY(bits, sync_num) (!!TEST((bits), BIT(sync_num))) #define TEST_SYNC_KEY(bits, sync_num) (!!TEST((bits), BIT(sync_num)))
#define AFLAMABLE(X) (X==BOX||X==TREE1||X==TREE2||X==TIRE||X==CONE) #define AFLAMABLE(X) (X==TILE_BOX||X==TILE_TREE1||X==TILE_TREE2||X==TILE_TIRE||X==TILE_CONE)
#define rnd(X) ((krand2()>>8)>=(255-(X))) #define rnd(X) ((krand2()>>8)>=(255-(X)))
// //

File diff suppressed because it is too large Load diff

File diff suppressed because it is too large Load diff

View file

@ -132,12 +132,12 @@ void Net_SyncPlayer(ENetEvent *event)
static void display_betascreen(void) static void display_betascreen(void)
{ {
rotatesprite_fs(160<<16,100<<16,65536,0,BETASCREEN,0,0,2+8+64+BGSTRETCH, nullptr, TITLEPAL); rotatesprite_fs(160<<16,100<<16,65536,0,TILE_BETASCREEN,0,0,2+8+64+BGSTRETCH, nullptr, TITLEPAL);
rotatesprite_fs(160<<16,(104)<<16,60<<10,0,DUKENUKEM,0,0,2+8, nullptr, TITLEPAL); rotatesprite_fs(160<<16,(104)<<16,60<<10,0,TILE_DUKENUKEM,0,0,2+8, nullptr, TITLEPAL);
rotatesprite_fs(160<<16,(129)<<16,30<<11,0,THREEDEE,0,0,2+8, nullptr, TITLEPAL); rotatesprite_fs(160<<16,(129)<<16,30<<11,0,TILE_THREEDEE,0,0,2+8, nullptr, TITLEPAL);
if (PLUTOPAK) // JBF 20030804 if (PLUTOPAK) // JBF 20030804
rotatesprite_fs(160<<16,(151)<<16,30<<11,0,PLUTOPAKSPRITE+1,0,0,2+8, nullptr, TITLEPAL); rotatesprite_fs(160<<16,(151)<<16,30<<11,0,TILE_PLUTOPAKSPRITE+1,0,0,2+8, nullptr, TITLEPAL);
} }
void faketimerhandler(void) void faketimerhandler(void)
@ -647,14 +647,14 @@ void Net_DoPrediction(void)
while (spriteNum >= 0) while (spriteNum >= 0)
{ {
int const nextSprite = nextspritesect[spriteNum]; int const nextSprite = nextspritesect[spriteNum];
if (sprite[spriteNum].picnum == RRTILE380) if (sprite[spriteNum].picnum == TILE_RRTILE380)
if (sprite[spriteNum].z - ZOFFSET3 < mypos.z) if (sprite[spriteNum].z - ZOFFSET3 < mypos.z)
sectorLotag = 2; sectorLotag = 2;
spriteNum = nextSprite; spriteNum = nextSprite;
} }
} }
if (sectorLotag == 848 && sector[mycursectnum].floorpicnum == WATERTILE2) if (sectorLotag == 848 && sector[mycursectnum].floorpicnum == TILE_WATERTILE2)
sectorLotag = 1; sectorLotag = 1;
if (sectorLotag == 857) if (sectorLotag == 857)
@ -668,7 +668,7 @@ void Net_DoPrediction(void)
int stepHeight, centerHoriz; int stepHeight, centerHoriz;
int16_t ceilingBunch, floorBunch; int16_t ceilingBunch, floorBunch;
if (ud.clipping == 0 && (mycursectnum < 0 || mycursectnum >= MAXSECTORS || sector[mycursectnum].floorpicnum == MIRROR)) if (ud.clipping == 0 && (mycursectnum < 0 || mycursectnum >= MAXSECTORS || sector[mycursectnum].floorpicnum == TILE_MIRROR))
{ {
mypos.x = omypos.x; mypos.x = omypos.x;
mypos.y = omypos.y; mypos.y = omypos.y;
@ -742,7 +742,7 @@ void Net_DoPrediction(void)
} }
if (RR) if (RR)
{ {
if (sprite[highZhit].picnum == RRTILE3587) if (sprite[highZhit].picnum == TILE_RRTILE3587)
{ {
if (!my_stairs) if (!my_stairs)
{ {
@ -806,7 +806,7 @@ check_enemy_sprite:
} }
if (RR) if (RR)
{ {
if (sprite[spriteNum].picnum == RRTILE3587) if (sprite[spriteNum].picnum == TILE_RRTILE3587)
{ {
if (!my_stairs) if (!my_stairs)
{ {
@ -1114,12 +1114,12 @@ check_enemy_sprite:
{ {
if (RRRA) if (RRRA)
{ {
if (sector[mycursectnum].floorpicnum == RRTILE7888) if (sector[mycursectnum].floorpicnum == TILE_RRTILE7888)
{ {
if (pPlayer->on_motorcycle && myonground) if (pPlayer->on_motorcycle && myonground)
my_moto_on_oil = 1; my_moto_on_oil = 1;
} }
else if (sector[mycursectnum].floorpicnum == RRTILE7889) else if (sector[mycursectnum].floorpicnum == TILE_RRTILE7889)
{ {
if (pPlayer->on_motorcycle) if (pPlayer->on_motorcycle)
{ {
@ -1133,7 +1133,7 @@ check_enemy_sprite:
} }
} }
} }
if (sector[mycursectnum].floorpicnum == RRTILE3073 || sector[mycursectnum].floorpicnum == RRTILE2702) if (sector[mycursectnum].floorpicnum == TILE_RRTILE3073 || sector[mycursectnum].floorpicnum == TILE_RRTILE2702)
{ {
if (RRRA && pPlayer->on_motorcycle) if (RRRA && pPlayer->on_motorcycle)
{ {
@ -1244,7 +1244,7 @@ FAKEHORIZONLY:;
if (RRRA && pPlayer->on_motorcycle) if (RRRA && pPlayer->on_motorcycle)
{ {
if (A_CheckEnemySprite(&sprite[spriteNum]) || sprite[spriteNum].picnum == APLAYER) if (A_CheckEnemySprite(&sprite[spriteNum]) || sprite[spriteNum].picnum == TILE_APLAYER)
{ {
my_moto_speed -= my_moto_speed>>2; my_moto_speed -= my_moto_speed>>2;
my_moto_turb = 6; my_moto_turb = 6;
@ -1252,7 +1252,7 @@ FAKEHORIZONLY:;
} }
else if (RRRA && pPlayer->on_boat) else if (RRRA && pPlayer->on_boat)
{ {
if (A_CheckEnemySprite(&sprite[spriteNum]) || sprite[spriteNum].picnum == APLAYER) if (A_CheckEnemySprite(&sprite[spriteNum]) || sprite[spriteNum].picnum == TILE_APLAYER)
{ {
my_moto_speed -= my_moto_speed>>2; my_moto_speed -= my_moto_speed>>2;
my_moto_turb = 6; my_moto_turb = 6;

File diff suppressed because it is too large Load diff

View file

@ -357,7 +357,7 @@ int P_GetOverheadPal(const DukePlayer_t *pPlayer);
void P_MadeNoise(int playerNum); void P_MadeNoise(int playerNum);
int P_HasKey(int sectNum, int playerNum); int P_HasKey(int sectNum, int playerNum);
// Get the player index given an APLAYER sprite pointer. // Get the player index given an TILE_APLAYER sprite pointer.
static inline int P_GetP(const void *pSprite) static inline int P_GetP(const void *pSprite)
{ {
#if 0 // unprotected player index retrieval #if 0 // unprotected player index retrieval
@ -379,7 +379,7 @@ static inline int P_GetP(const void *pSprite)
#endif #endif
} }
// Get the player index given an APLAYER sprite index. // Get the player index given an TILE_APLAYER sprite index.
static inline int P_Get(int32_t spriteNum) { return P_GetP((const uspritetype *)&sprite[spriteNum]); } static inline int P_Get(int32_t spriteNum) { return P_GetP((const uspritetype *)&sprite[spriteNum]); }
END_DUKE_NS END_DUKE_NS

View file

@ -86,20 +86,20 @@ static void G_CacheSpriteNum(int32_t i)
switch (DYNAMICTILEMAP(PN(i))) switch (DYNAMICTILEMAP(PN(i)))
{ {
case HYDRENT__STATIC: case HYDRENT__STATIC:
tloadtile(BROKEFIREHYDRENT,1); tloadtile(TILE_BROKEFIREHYDRENT,1);
for (j = TOILETWATER; j < (TOILETWATER+4); j++) tloadtile(j,1); for (j = TILE_TOILETWATER; j < (TILE_TOILETWATER+4); j++) tloadtile(j,1);
break; break;
case RRTILE2121__STATICRR: case RRTILE2121__STATICRR:
case RRTILE2122__STATICRR: case RRTILE2122__STATICRR:
tloadtile(BROKEFIREHYDRENT, 1); tloadtile(TILE_BROKEFIREHYDRENT, 1);
break; break;
case TOILET__STATIC: case TOILET__STATIC:
tloadtile(TOILETBROKE,1); tloadtile(TILE_TOILETBROKE,1);
for (j = TOILETWATER; j < (TOILETWATER+4); j++) tloadtile(j,1); for (j = TILE_TOILETWATER; j < (TILE_TOILETWATER+4); j++) tloadtile(j,1);
break; break;
case STALL__STATIC: case STALL__STATIC:
tloadtile(STALLBROKE,1); tloadtile(TILE_STALLBROKE,1);
for (j = TOILETWATER; j < (TOILETWATER+4); j++) tloadtile(j,1); for (j = TILE_TOILETWATER; j < (TILE_TOILETWATER+4); j++) tloadtile(j,1);
break; break;
case FORCERIPPLE__STATIC: case FORCERIPPLE__STATIC:
if (!RR) break; if (!RR) break;
@ -112,28 +112,28 @@ static void G_CacheSpriteNum(int32_t i)
maxc = 4; maxc = 4;
break; break;
case BUBBASTAND__STATICRR: case BUBBASTAND__STATICRR:
for (j = BUBBASCRATCH; j < (BUBBASCRATCH+47); j++) tloadtile(j,1); for (j = TILE_BUBBASCRATCH; j < (TILE_BUBBASCRATCH+47); j++) tloadtile(j,1);
maxc = 0; maxc = 0;
break; break;
case SBSWIPE__STATICRR: case SBSWIPE__STATICRR:
if (!RRRA) break; if (!RRRA) break;
for (j = BUBBASCRATCH; j <= (SBSWIPE+47); j++) tloadtile(j,1); for (j = TILE_BUBBASCRATCH; j <= (TILE_SBSWIPE+47); j++) tloadtile(j,1);
maxc = 0; maxc = 0;
break; break;
case COOT__STATICRR: case COOT__STATICRR:
for(j = COOT; j <= (COOT+217); j++) tloadtile(j,1); for(j = TILE_COOT; j <= (TILE_COOT+217); j++) tloadtile(j,1);
for(j = COOTJIBA; j < COOTJIBC+4; j++) tloadtile(j,1); for(j = TILE_COOTJIBA; j < TILE_COOTJIBC+4; j++) tloadtile(j,1);
maxc = 0; maxc = 0;
break; break;
case LTH__STATICRR: case LTH__STATICRR:
maxc = 105; maxc = 105;
for (j = LTH; j < (LTH + maxc); j++) tloadtile(j,1); for (j = TILE_LTH; j < (TILE_LTH + maxc); j++) tloadtile(j,1);
maxc = 0; maxc = 0;
break; break;
case BILLYRAY__STATICRR: case BILLYRAY__STATICRR:
maxc = 144; maxc = 144;
for (j = BILLYWALK; j < (BILLYWALK + maxc); j++) tloadtile(j,1); for (j = TILE_BILLYWALK; j < (TILE_BILLYWALK + maxc); j++) tloadtile(j,1);
for (j = BILLYJIBA; j <= BILLYJIBB + 4; j++) tloadtile(j,1); for (j = TILE_BILLYJIBA; j <= TILE_BILLYJIBB + 4; j++) tloadtile(j,1);
maxc = 0; maxc = 0;
break; break;
case COW__STATICRR: case COW__STATICRR:
@ -142,71 +142,71 @@ static void G_CacheSpriteNum(int32_t i)
maxc = 0; maxc = 0;
break; break;
case DOGRUN__STATICRR: case DOGRUN__STATICRR:
for (j = DOGATTACK; j <= DOGATTACK + 35; j++) tloadtile(j,1); for (j = TILE_DOGATTACK; j <= TILE_DOGATTACK + 35; j++) tloadtile(j,1);
for (j = DOGRUN; j <= DOGRUN + 121; j++) tloadtile(j,1); for (j = TILE_DOGRUN; j <= TILE_DOGRUN + 121; j++) tloadtile(j,1);
maxc = 0; maxc = 0;
break; break;
case RABBIT__STATICRR: case RABBIT__STATICRR:
if (!RRRA) break; if (!RRRA) break;
for (j = RABBIT; j <= RABBIT + 54; j++) tloadtile(j,1); for (j = TILE_RABBIT; j <= TILE_RABBIT + 54; j++) tloadtile(j,1);
for (j = RABBIT + 56; j <= RABBIT + 56 + 49; j++) tloadtile(j,1); for (j = TILE_RABBIT + 56; j <= TILE_RABBIT + 56 + 49; j++) tloadtile(j,1);
for (j = RABBIT + 56; j <= RABBIT + 56 + 49; j++) tloadtile(j,1); for (j = TILE_RABBIT + 56; j <= TILE_RABBIT + 56 + 49; j++) tloadtile(j,1);
maxc = 0; maxc = 0;
break; break;
case BIKERB__STATICRR: case BIKERB__STATICRR:
case BIKERBV2__STATICRR: case BIKERBV2__STATICRR:
if (!RRRA) break; if (!RRRA) break;
for (j = BIKERB; j <= BIKERB + 104; j++) tloadtile(j,1); for (j = TILE_BIKERB; j <= TILE_BIKERB + 104; j++) tloadtile(j,1);
maxc = 0; maxc = 0;
break; break;
case BIKER__STATICRR: case BIKER__STATICRR:
if (!RRRA) break; if (!RRRA) break;
for (j = BIKER; j <= BIKER + 116; j++) tloadtile(j,1); for (j = TILE_BIKER; j <= TILE_BIKER + 116; j++) tloadtile(j,1);
for (j = BIKER + 150; j <= BIKER + 150 + 104; j++) tloadtile(j,1); for (j = TILE_BIKER + 150; j <= TILE_BIKER + 150 + 104; j++) tloadtile(j,1);
maxc = 0; maxc = 0;
break; break;
case CHEER__STATICRR: case CHEER__STATICRR:
if (!RRRA) break; if (!RRRA) break;
for (j = CHEER; j <= CHEER + 44; j++) tloadtile(j,1); for (j = TILE_CHEER; j <= TILE_CHEER + 44; j++) tloadtile(j,1);
for (j = CHEER + 47; j <= CHEER + 47 + 211; j++) tloadtile(j,1); for (j = TILE_CHEER + 47; j <= TILE_CHEER + 47 + 211; j++) tloadtile(j,1);
for (j = CHEER + 262; j <= CHEER + 262 + 72; j++) tloadtile(j,1); for (j = TILE_CHEER + 262; j <= TILE_CHEER + 262 + 72; j++) tloadtile(j,1);
maxc = 0; maxc = 0;
break; break;
case CHEERB__STATICRR: case CHEERB__STATICRR:
if (!RRRA) break; if (!RRRA) break;
for (j = CHEERB; j <= CHEERB + 157 + 83; j++) tloadtile(j,1); for (j = TILE_CHEERB; j <= TILE_CHEERB + 157 + 83; j++) tloadtile(j,1);
maxc = 0; maxc = 0;
break; break;
case MAMA__STATICRR: case MAMA__STATICRR:
if (!RRRA) break; if (!RRRA) break;
for (j = MAMA; j <= MAMA + 78; j++) tloadtile(j,1); for (j = TILE_MAMA; j <= TILE_MAMA + 78; j++) tloadtile(j,1);
for (j = MAMA + 80; j <= MAMA + 80 + 7; j++) tloadtile(j,1); for (j = TILE_MAMA + 80; j <= TILE_MAMA + 80 + 7; j++) tloadtile(j,1);
for (j = MAMA + 90; j <= MAMA + 90 + 94; j++) tloadtile(j,1); for (j = TILE_MAMA + 90; j <= TILE_MAMA + 90 + 94; j++) tloadtile(j,1);
maxc = 0; maxc = 0;
break; break;
case CHEERBOAT__STATICRR: case CHEERBOAT__STATICRR:
if (!RRRA) break; if (!RRRA) break;
tloadtile(CHEERBOAT,1); tloadtile(TILE_CHEERBOAT,1);
maxc = 0; maxc = 0;
break; break;
case HULKBOAT__STATICRR: case HULKBOAT__STATICRR:
if (!RRRA) break; if (!RRRA) break;
tloadtile(HULKBOAT,1); tloadtile(TILE_HULKBOAT,1);
maxc = 0; maxc = 0;
break; break;
case MINIONBOAT__STATICRR: case MINIONBOAT__STATICRR:
if (!RRRA) break; if (!RRRA) break;
tloadtile(MINIONBOAT,1); tloadtile(TILE_MINIONBOAT,1);
maxc = 0; maxc = 0;
break; break;
case BILLYPLAY__STATICRR: case BILLYPLAY__STATICRR:
if (!RRRA) break; if (!RRRA) break;
for (j = BILLYPLAY; j <= BILLYPLAY + 2; j++) tloadtile(j,1); for (j = TILE_BILLYPLAY; j <= TILE_BILLYPLAY + 2; j++) tloadtile(j,1);
maxc = 0; maxc = 0;
break; break;
case COOTPLAY__STATICRR: case COOTPLAY__STATICRR:
if (!RRRA) break; if (!RRRA) break;
for (j = COOTPLAY; j <= COOTPLAY + 4; j++) tloadtile(j,1); for (j = TILE_COOTPLAY; j <= TILE_COOTPLAY + 4; j++) tloadtile(j,1);
maxc = 0; maxc = 0;
break; break;
case PIG__STATICRR: case PIG__STATICRR:
@ -231,14 +231,14 @@ static void G_CacheSpriteNum(int32_t i)
case LIZTROOPONTOILET__STATIC: case LIZTROOPONTOILET__STATIC:
case LIZTROOPDUCKING__STATIC: case LIZTROOPDUCKING__STATIC:
if (RR) break; if (RR) break;
for (j = LIZTROOP; j < (LIZTROOP+72); j++) tloadtile(j,1); for (j = TILE_LIZTROOP; j < (TILE_LIZTROOP+72); j++) tloadtile(j,1);
for (j=HEADJIB1; j<LEGJIB1+3; j++) tloadtile(j,1); for (j=TILE_HEADJIB1; j<TILE_LEGJIB1+3; j++) tloadtile(j,1);
maxc = 0; maxc = 0;
break; break;
case WOODENHORSE__STATIC: case WOODENHORSE__STATIC:
if (RR) break; if (RR) break;
maxc = 5; maxc = 5;
for (j = HORSEONSIDE; j < (HORSEONSIDE+4); j++) tloadtile(j,1); for (j = TILE_HORSEONSIDE; j < (TILE_HORSEONSIDE+4); j++) tloadtile(j,1);
break; break;
case NEWBEAST__STATIC: case NEWBEAST__STATIC:
case NEWBEASTSTAYPUT__STATIC: case NEWBEASTSTAYPUT__STATIC:
@ -276,7 +276,7 @@ static void G_CacheSpriteNum(int32_t i)
case LIZMANFEEDING__STATIC: case LIZMANFEEDING__STATIC:
case LIZMANJUMP__STATIC: case LIZMANJUMP__STATIC:
if (RR) break; if (RR) break;
for (j=LIZMANHEAD1; j<LIZMANLEG1+3; j++) tloadtile(j,1); for (j=TILE_LIZMANHEAD1; j<TILE_LIZMANLEG1+3; j++) tloadtile(j,1);
maxc = 80; maxc = 80;
break; break;
case APLAYER__STATIC: case APLAYER__STATIC:
@ -286,8 +286,8 @@ static void G_CacheSpriteNum(int32_t i)
maxc = 5; maxc = 5;
if (RR) if (RR)
{ {
for (j = APLAYER; j < APLAYER+220; j++) tloadtile(j,1); for (j = TILE_APLAYER; j < TILE_APLAYER+220; j++) tloadtile(j,1);
for (j = DUKEGUN; j < DUKELEG+4; j++) tloadtile(j,1); for (j = TILE_DUKEGUN; j < TILE_DUKELEG+4; j++) tloadtile(j,1);
} }
else else
for (j = 1420; j < 1420+106; j++) tloadtile(j,1); for (j = 1420; j < 1420+106; j++) tloadtile(j,1);
@ -311,38 +311,38 @@ static void G_CacheSpriteNum(int32_t i)
// caching of HUD sprites for weapons that may be in the level // caching of HUD sprites for weapons that may be in the level
case CHAINGUNSPRITE__STATIC: case CHAINGUNSPRITE__STATIC:
if (RR) break; if (RR) break;
for (j=CHAINGUN; j<=CHAINGUN+7; j++) tloadtile(j,1); for (j=TILE_CHAINGUN; j<=TILE_CHAINGUN+7; j++) tloadtile(j,1);
break; break;
case RPGSPRITE__STATIC: case RPGSPRITE__STATIC:
if (RR) break; if (RR) break;
for (j=RPGGUN; j<=RPGGUN+2; j++) tloadtile(j,1); for (j=TILE_RPGGUN; j<=TILE_RPGGUN+2; j++) tloadtile(j,1);
break; break;
case FREEZESPRITE__STATIC: case FREEZESPRITE__STATIC:
if (RR) break; if (RR) break;
for (j=FREEZE; j<=FREEZE+5; j++) tloadtile(j,1); for (j=TILE_FREEZE; j<=TILE_FREEZE+5; j++) tloadtile(j,1);
break; break;
case GROWSPRITEICON__STATIC: case GROWSPRITEICON__STATIC:
case SHRINKERSPRITE__STATIC: case SHRINKERSPRITE__STATIC:
if (RR) break; if (RR) break;
for (j=SHRINKER-2; j<=SHRINKER+5; j++) tloadtile(j,1); for (j=TILE_SHRINKER-2; j<=TILE_SHRINKER+5; j++) tloadtile(j,1);
break; break;
case HBOMBAMMO__STATIC: case HBOMBAMMO__STATIC:
case HEAVYHBOMB__STATIC: case HEAVYHBOMB__STATIC:
if (RR) break; if (RR) break;
for (j=HANDREMOTE; j<=HANDREMOTE+5; j++) tloadtile(j,1); for (j=TILE_HANDREMOTE; j<=TILE_HANDREMOTE+5; j++) tloadtile(j,1);
break; break;
case TRIPBOMBSPRITE__STATIC: case TRIPBOMBSPRITE__STATIC:
if (RR) break; if (RR) break;
for (j=HANDHOLDINGLASER; j<=HANDHOLDINGLASER+4; j++) tloadtile(j,1); for (j=TILE_HANDHOLDINGLASER; j<=TILE_HANDHOLDINGLASER+4; j++) tloadtile(j,1);
break; break;
case SHOTGUNSPRITE__STATIC: case SHOTGUNSPRITE__STATIC:
if (RR) break; if (RR) break;
tloadtile(SHOTGUNSHELL,1); tloadtile(TILE_SHOTGUNSHELL,1);
for (j=SHOTGUN; j<=SHOTGUN+6; j++) tloadtile(j,1); for (j=TILE_SHOTGUN; j<=TILE_SHOTGUN+6; j++) tloadtile(j,1);
break; break;
case DEVISTATORSPRITE__STATIC: case DEVISTATORSPRITE__STATIC:
if (RR) break; if (RR) break;
for (j=DEVISTATOR; j<=DEVISTATOR+1; j++) tloadtile(j,1); for (j=TILE_DEVISTATOR; j<=TILE_DEVISTATOR+1; j++) tloadtile(j,1);
break; break;
case VIXEN__STATICRR: case VIXEN__STATICRR:
maxc = 214; maxc = 214;
@ -354,19 +354,19 @@ static void G_CacheSpriteNum(int32_t i)
maxc = 54; maxc = 54;
for (j = PN(i); j < PN(i) + maxc; j++) tloadtile(j,1); for (j = PN(i); j < PN(i) + maxc; j++) tloadtile(j,1);
maxc = 100; maxc = 100;
for (j = SBMOVE; j < SBMOVE + maxc; j++) tloadtile(j,1); for (j = TILE_SBMOVE; j < TILE_SBMOVE + maxc; j++) tloadtile(j,1);
maxc = 0; maxc = 0;
break; break;
case HULK__STATICRR: case HULK__STATICRR:
maxc = 40; maxc = 40;
for (j = PN(i) - 41; j < PN(i) + maxc - 41; j++) tloadtile(j,1); for (j = PN(i) - 41; j < PN(i) + maxc - 41; j++) tloadtile(j,1);
for (j = HULKJIBA; j <= HULKJIBC + 4; j++) tloadtile(j,1); for (j = TILE_HULKJIBA; j <= TILE_HULKJIBC + 4; j++) tloadtile(j,1);
maxc = 0; maxc = 0;
break; break;
case MINION__STATICRR: case MINION__STATICRR:
maxc = 141; maxc = 141;
for (j = PN(i); j < PN(i) + maxc; j++) tloadtile(j,1); for (j = PN(i); j < PN(i) + maxc; j++) tloadtile(j,1);
for (j = MINJIBA; j <= MINJIBC + 4; j++) tloadtile(j,1); for (j = TILE_MINJIBA; j <= TILE_MINJIBC + 4; j++) tloadtile(j,1);
maxc = 0; maxc = 0;
break; break;
@ -388,56 +388,56 @@ static void G_PrecacheSprites(void)
// for (j = i; j <= g_tile[i].cacherange; j++) // for (j = i; j <= g_tile[i].cacherange; j++)
// tloadtile(j,1); // tloadtile(j,1);
//} //}
tloadtile(BOTTOMSTATUSBAR,1); tloadtile(TILE_BOTTOMSTATUSBAR,1);
if ((g_netServer || ud.multimode > 1)) if ((g_netServer || ud.multimode > 1))
tloadtile(FRAGBAR,1); tloadtile(TILE_FRAGBAR,1);
tloadtile(VIEWSCREEN,1); tloadtile(TILE_VIEWSCREEN,1);
for (i=STARTALPHANUM; i<ENDALPHANUM+1; i++) tloadtile(i,1); for (i=TILE_STARTALPHANUM; i<TILE_ENDALPHANUM+1; i++) tloadtile(i,1);
for (i=BIGALPHANUM-11; i<BIGALPHANUM+82; i++) tloadtile(i,1); for (i=TILE_BIGALPHANUM-11; i<TILE_BIGALPHANUM+82; i++) tloadtile(i,1);
for (i=MINIFONT; i<MINIFONT+93; i++) tloadtile(i,1); for (i=TILE_MINIFONT; i<TILE_MINIFONT+93; i++) tloadtile(i,1);
for (i=FOOTPRINTS; i<FOOTPRINTS+3; i++) tloadtile(i,1); for (i=TILE_FOOTPRINTS; i<TILE_FOOTPRINTS+3; i++) tloadtile(i,1);
for (i = BURNING; i < BURNING+14; i++) tloadtile(i,1); for (i = TILE_BURNING; i < TILE_BURNING+14; i++) tloadtile(i,1);
for (i = FIRSTGUN; i < FIRSTGUN+(RR ? 10 : 3) ; i++) tloadtile(i,1); for (i = TILE_FIRSTGUN; i < TILE_FIRSTGUN+(RR ? 10 : 3) ; i++) tloadtile(i,1);
for (i = EXPLOSION2; i < EXPLOSION2+21 ; i++) tloadtile(i,1); for (i = TILE_EXPLOSION2; i < TILE_EXPLOSION2+21 ; i++) tloadtile(i,1);
for (i = COOLEXPLOSION1; i < COOLEXPLOSION1+21 ; i++) tloadtile(i,1); for (i = TILE_COOLEXPLOSION1; i < TILE_COOLEXPLOSION1+21 ; i++) tloadtile(i,1);
tloadtile(BULLETHOLE,1); tloadtile(TILE_BULLETHOLE,1);
tloadtile(BLOODPOOL,1); tloadtile(TILE_BLOODPOOL,1);
for (i = SMALLSMOKE; i < (SMALLSMOKE+4); i++) tloadtile(i,1); for (i = TILE_SMALLSMOKE; i < (TILE_SMALLSMOKE+4); i++) tloadtile(i,1);
for (i = SHOTSPARK1; i < (SHOTSPARK1+4); i++) tloadtile(i,1); for (i = TILE_SHOTSPARK1; i < (TILE_SHOTSPARK1+4); i++) tloadtile(i,1);
for (i = BLOOD; i < (BLOOD+4); i++) tloadtile(i,1); for (i = TILE_BLOOD; i < (TILE_BLOOD+4); i++) tloadtile(i,1);
for (i = JIBS1; i < (JIBS5+5); i++) tloadtile(i,1); for (i = TILE_JIBS1; i < (TILE_JIBS5+5); i++) tloadtile(i,1);
for (i = JIBS6; i < (JIBS6+8); i++) tloadtile(i,1); for (i = TILE_JIBS6; i < (TILE_JIBS6+8); i++) tloadtile(i,1);
for (i = SCRAP1; i < (SCRAP1+(RR? 19 : 29)); i++) tloadtile(i,1); for (i = TILE_SCRAP1; i < (TILE_SCRAP1+(RR? 19 : 29)); i++) tloadtile(i,1);
if (!RR) if (!RR)
{ {
for (i = BURNING2; i < BURNING2+14; i++) tloadtile(i,1); for (i = TILE_BURNING2; i < TILE_BURNING2+14; i++) tloadtile(i,1);
for (i = CRACKKNUCKLES; i < CRACKKNUCKLES+4; i++) tloadtile(i,1); for (i = TILE_CRACKKNUCKLES; i < TILE_CRACKKNUCKLES+4; i++) tloadtile(i,1);
for (i = FIRSTGUNRELOAD; i < FIRSTGUNRELOAD+8 ; i++) tloadtile(i,1); for (i = TILE_FIRSTGUNRELOAD; i < TILE_FIRSTGUNRELOAD+8 ; i++) tloadtile(i,1);
for (i = TRANSPORTERBEAM; i < (TRANSPORTERBEAM+6); i++) tloadtile(i,1); for (i = TILE_TRANSPORTERBEAM; i < (TILE_TRANSPORTERBEAM+6); i++) tloadtile(i,1);
tloadtile(FIRELASER,1); tloadtile(TILE_FIRELASER,1);
for (i=TRANSPORTERSTAR; i<TRANSPORTERSTAR+6; i++) tloadtile(i,1); for (i=TILE_TRANSPORTERSTAR; i<TILE_TRANSPORTERSTAR+6; i++) tloadtile(i,1);
for (i=FORCERIPPLE; i<(FORCERIPPLE+9); i++) tloadtile(i,1); for (i=TILE_FORCERIPPLE; i<(TILE_FORCERIPPLE+9); i++) tloadtile(i,1);
for (i=MENUSCREEN; i<DUKECAR; i++) tloadtile(i,1); for (i=TILE_MENUSCREEN; i<TILE_DUKECAR; i++) tloadtile(i,1);
for (i=RPG; i<RPG+7; i++) tloadtile(i,1); for (i=TILE_RPG; i<TILE_RPG+7; i++) tloadtile(i,1);
for (i=FREEZEBLAST; i<FREEZEBLAST+3; i++) tloadtile(i,1); for (i=TILE_FREEZEBLAST; i<TILE_FREEZEBLAST+3; i++) tloadtile(i,1);
for (i=SHRINKSPARK; i<SHRINKSPARK+4; i++) tloadtile(i,1); for (i=TILE_SHRINKSPARK; i<TILE_SHRINKSPARK+4; i++) tloadtile(i,1);
for (i=GROWSPARK; i<GROWSPARK+4; i++) tloadtile(i,1); for (i=TILE_GROWSPARK; i<TILE_GROWSPARK+4; i++) tloadtile(i,1);
for (i=SHRINKEREXPLOSION; i<SHRINKEREXPLOSION+4; i++) tloadtile(i,1); for (i=TILE_SHRINKEREXPLOSION; i<TILE_SHRINKEREXPLOSION+4; i++) tloadtile(i,1);
for (i=MORTER; i<MORTER+4; i++) tloadtile(i,1); for (i=TILE_MORTER; i<TILE_MORTER+4; i++) tloadtile(i,1);
for (i=0; i<=60; i++) tloadtile(i,1); for (i=0; i<=60; i++) tloadtile(i,1);
} }
else else
@ -445,32 +445,32 @@ static void G_PrecacheSprites(void)
if (RRRA) if (RRRA)
{ {
if (ud.volume_number == 0 && ud.level_number == 4) if (ud.volume_number == 0 && ud.level_number == 4)
tloadtile(RRTILE2577, 1); tloadtile(TILE_RRTILE2577, 1);
} }
else else
{ {
if (ud.volume_number == 1 && ud.level_number == 2) if (ud.volume_number == 1 && ud.level_number == 2)
{ {
tloadtile(RRTILE3190, 1); tloadtile(TILE_RRTILE3190, 1);
tloadtile(RRTILE3191, 1); tloadtile(TILE_RRTILE3191, 1);
tloadtile(RRTILE3192, 1); tloadtile(TILE_RRTILE3192, 1);
tloadtile(RRTILE3144, 1); tloadtile(TILE_RRTILE3144, 1);
tloadtile(RRTILE3139, 1); tloadtile(TILE_RRTILE3139, 1);
tloadtile(RRTILE3132, 1); tloadtile(TILE_RRTILE3132, 1);
tloadtile(RRTILE3120, 1); tloadtile(TILE_RRTILE3120, 1);
tloadtile(RRTILE3121, 1); tloadtile(TILE_RRTILE3121, 1);
tloadtile(RRTILE3122, 1); tloadtile(TILE_RRTILE3122, 1);
tloadtile(RRTILE3123, 1); tloadtile(TILE_RRTILE3123, 1);
tloadtile(RRTILE3124, 1); tloadtile(TILE_RRTILE3124, 1);
} }
} }
if (g_lastLevel) if (g_lastLevel)
{ {
tloadtile(UFO1, 1); tloadtile(TILE_UFO1, 1);
tloadtile(UFO2, 1); tloadtile(TILE_UFO2, 1);
tloadtile(UFO3, 1); tloadtile(TILE_UFO3, 1);
tloadtile(UFO4, 1); tloadtile(TILE_UFO4, 1);
tloadtile(UFO5, 1); tloadtile(TILE_UFO5, 1);
} }
} }
} }
@ -494,7 +494,7 @@ static void G_DoLoadScreen(const char *statustext, int32_t percent)
videoClearScreen(0); videoClearScreen(0);
int const loadScreenTile = VM_OnEventWithReturn(EVENT_GETLOADTILE, g_player[screenpeek].ps->i, screenpeek, DEER ? 7040 : LOADSCREEN); int const loadScreenTile = VM_OnEventWithReturn(EVENT_GETLOADTILE, g_player[screenpeek].ps->i, screenpeek, DEER ? 7040 : TILE_LOADSCREEN);
rotatesprite_fs(320<<15,200<<15,65536L,0,loadScreenTile,0,0,2+8+64+BGSTRETCH); rotatesprite_fs(320<<15,200<<15,65536L,0,loadScreenTile,0,0,2+8+64+BGSTRETCH);
@ -549,9 +549,9 @@ static void G_DoLoadScreen(const char *statustext, int32_t percent)
//G_FadePalette(0,0,0,0); //G_FadePalette(0,0,0,0);
P_SetGamePalette(g_player[myconnectindex].ps, BASEPAL, 0); // JBF 20040308 P_SetGamePalette(g_player[myconnectindex].ps, BASEPAL, 0); // JBF 20040308
} }
/*Gv_SetVar(g_iReturnVarID,LOADSCREEN, -1, -1);*/ /*Gv_SetVar(g_iReturnVarID,TILE_LOADSCREEN, -1, -1);*/
rotatesprite_fs(320<<15,200<<15,65536L, 0,LOADSCREEN,0,0,2+8+64+BGSTRETCH); rotatesprite_fs(320<<15,200<<15,65536L, 0,TILE_LOADSCREEN,0,0,2+8+64+BGSTRETCH);
menutext_center(RRRA?155:105,RR? GStrings("TXT_LOADIN") : GStrings("TXT_Loading...")); menutext_center(RRRA?155:105,RR? GStrings("TXT_LOADIN") : GStrings("TXT_Loading..."));
if (statustext) gametext_center_number(180, statustext); if (statustext) gametext_center_number(180, statustext);
@ -592,10 +592,10 @@ void G_CacheMapData(void)
{ {
tloadtile(sector[i].floorpicnum, 0); tloadtile(sector[i].floorpicnum, 0);
tloadtile(sector[i].ceilingpicnum, 0); tloadtile(sector[i].ceilingpicnum, 0);
if (sector[i].ceilingpicnum == LA) // JBF 20040509: if( w aloff[sector[i].ceilingpicnum] == LA) WTF?!?!?!? if (sector[i].ceilingpicnum == TILE_LA) // JBF 20040509: if( w aloff[sector[i].ceilingpicnum] == TILE_LA) WTF?!?!?!?
{ {
tloadtile(LA+1, 0); tloadtile(TILE_LA+1, 0);
tloadtile(LA+2, 0); tloadtile(TILE_LA+2, 0);
} }
for (SPRITES_OF_SECT(i, j)) for (SPRITES_OF_SECT(i, j))
@ -699,7 +699,7 @@ void G_UpdateScreenArea(void)
int32_t x1 = scale(ss,xdim,160); int32_t x1 = scale(ss,xdim,160);
int32_t x2 = xdim-x1; int32_t x2 = xdim-x1;
int32_t y1 = scale(ss,(200 * 100) - ((tilesiz[BOTTOMSTATUSBAR].y >> (RR ? 1 : 0)) * ud.statusbarscale),200 - tilesiz[BOTTOMSTATUSBAR].y); int32_t y1 = scale(ss,(200 * 100) - ((tilesiz[TILE_BOTTOMSTATUSBAR].y >> (RR ? 1 : 0)) * ud.statusbarscale),200 - tilesiz[TILE_BOTTOMSTATUSBAR].y);
int32_t y2 = 200*100-y1; int32_t y2 = 200*100-y1;
if (RR && ud.screen_size <= 12) if (RR && ud.screen_size <= 12)
@ -713,7 +713,7 @@ void G_UpdateScreenArea(void)
y1 += fragbarheight()*100; y1 += fragbarheight()*100;
if (ud.screen_size >= 8 && ud.statusbarmode==0) if (ud.screen_size >= 8 && ud.statusbarmode==0)
y2 -= (tilesiz[BOTTOMSTATUSBAR].y >> (RR ? 1 : 0))*ud.statusbarscale; y2 -= (tilesiz[TILE_BOTTOMSTATUSBAR].y >> (RR ? 1 : 0))*ud.statusbarscale;
y1 = scale(y1,ydim,200*100); y1 = scale(y1,ydim,200*100);
y2 = scale(y2,ydim,200*100); y2 = scale(y2,ydim,200*100);
@ -1236,7 +1236,7 @@ void G_InitRRRASkies(void)
for (bssize_t i = 0; i < MAXSECTORS; i++) for (bssize_t i = 0; i < MAXSECTORS; i++)
{ {
if (sector[i].ceilingpicnum != LA && sector[i].ceilingpicnum != MOONSKY1 && sector[i].ceilingpicnum != BIGORBIT1) if (sector[i].ceilingpicnum != TILE_LA && sector[i].ceilingpicnum != TILE_MOONSKY1 && sector[i].ceilingpicnum != TILE_BIGORBIT1)
{ {
int const picnum = sector[i].ceilingpicnum; int const picnum = sector[i].ceilingpicnum;
if (tileWidth(picnum) == 512) if (tileWidth(picnum) == 512)
@ -1352,7 +1352,7 @@ static void prelevel(char g)
if (!DEER) if (!DEER)
for (bssize_t i=0; i<numsectors; i++) for (bssize_t i=0; i<numsectors; i++)
{ {
if (RR && sector[i].ceilingpicnum == RRTILE2577) if (RR && sector[i].ceilingpicnum == TILE_RRTILE2577)
g_thunderOn = 1; g_thunderOn = 1;
sector[i].extra = 256; sector[i].extra = 256;
@ -1365,13 +1365,13 @@ static void prelevel(char g)
while (k != -1) while (k != -1)
{ {
int const nexti = nextspritesect[k]; int const nexti = nextspritesect[k];
if (sprite[k].picnum == RRTILE11) if (sprite[k].picnum == TILE_RRTILE11)
{ {
p1 = sprite[k].lotag << 4; p1 = sprite[k].lotag << 4;
p2 = sprite[k].hitag; p2 = sprite[k].hitag;
A_DeleteSprite(k); A_DeleteSprite(k);
} }
if (sprite[k].picnum == RRTILE38) if (sprite[k].picnum == TILE_RRTILE38)
{ {
p3 = sprite[k].lotag; p3 = sprite[k].lotag;
A_DeleteSprite(k); A_DeleteSprite(k);
@ -1404,13 +1404,13 @@ static void prelevel(char g)
while (k != -1) while (k != -1)
{ {
int const nexti = nextspritesect[k]; int const nexti = nextspritesect[k];
if (sprite[k].picnum == RRTILE64) if (sprite[k].picnum == TILE_RRTILE64)
{ {
p1 = sprite[k].lotag << 4; p1 = sprite[k].lotag << 4;
p2 = sprite[k].hitag; p2 = sprite[k].hitag;
for (bssize_t kk = 0; kk < MAXSPRITES; kk++) for (bssize_t kk = 0; kk < MAXSPRITES; kk++)
{ {
if (sprite[kk].picnum == RRTILE66) if (sprite[kk].picnum == TILE_RRTILE66)
if (sprite[kk].lotag == sprite[k].sectnum) if (sprite[kk].lotag == sprite[k].sectnum)
{ {
g_mineCartChildSect[g_mineCartCnt] = sprite[kk].sectnum; g_mineCartChildSect[g_mineCartCnt] = sprite[kk].sectnum;
@ -1419,7 +1419,7 @@ static void prelevel(char g)
} }
A_DeleteSprite(k); A_DeleteSprite(k);
} }
if (sprite[k].picnum == RRTILE65) if (sprite[k].picnum == TILE_RRTILE65)
{ {
p3 = sprite[k].lotag; p3 = sprite[k].lotag;
A_DeleteSprite(k); A_DeleteSprite(k);
@ -1449,12 +1449,12 @@ static void prelevel(char g)
{ {
if (tilePtr(sector[i].ceilingpicnum) == nullptr) if (tilePtr(sector[i].ceilingpicnum) == nullptr)
{ {
if (sector[i].ceilingpicnum == LA) if (sector[i].ceilingpicnum == TILE_LA)
for (bsize_t j = 0; j < 5; j++) for (bsize_t j = 0; j < 5; j++)
tloadtile(sector[i].ceilingpicnum + j, 0); tloadtile(sector[i].ceilingpicnum + j, 0);
} }
if (!RR && sector[i].ceilingpicnum == CLOUDYSKIES) if (!RR && sector[i].ceilingpicnum == TILE_CLOUDYSKIES)
{ {
if (g_cloudCnt < ARRAY_SSIZE(g_cloudSect)) if (g_cloudCnt < ARRAY_SSIZE(g_cloudSect))
g_cloudSect[g_cloudCnt++] = i; g_cloudSect[g_cloudCnt++] = i;
@ -1481,7 +1481,7 @@ static void prelevel(char g)
} }
if (missedCloudSectors > 0) if (missedCloudSectors > 0)
Printf(TEXTCOLOR_RED "Map warning: have %d unhandled CLOUDYSKIES ceilings.\n", missedCloudSectors); Printf(TEXTCOLOR_RED "Map warning: have %d unhandled TILE_CLOUDYSKIES ceilings.\n", missedCloudSectors);
// NOTE: must be safe loop because callbacks could delete sprites. // NOTE: must be safe loop because callbacks could delete sprites.
if (!DEER) if (!DEER)
@ -1579,7 +1579,7 @@ static void prelevel(char g)
{ {
for (bssize_t i = 0; i < MAXSPRITES; i++) for (bssize_t i = 0; i < MAXSPRITES; i++)
{ {
if (sprite[i].picnum == RRTILE19) if (sprite[i].picnum == TILE_RRTILE19)
{ {
if (sprite[i].hitag == 0) if (sprite[i].hitag == 0)
{ {
@ -1588,7 +1588,7 @@ static void prelevel(char g)
g_geoSector[g_geoSectorCnt] = sprite[i].sectnum; g_geoSector[g_geoSectorCnt] = sprite[i].sectnum;
for (bssize_t j = 0; j < MAXSPRITES; j++) for (bssize_t j = 0; j < MAXSPRITES; j++)
{ {
if (sprite[i].lotag == sprite[j].lotag && i != j && sprite[j].picnum == RRTILE19) if (sprite[i].lotag == sprite[j].lotag && i != j && sprite[j].picnum == TILE_RRTILE19)
{ {
if (sprite[j].hitag == 1) if (sprite[j].hitag == 1)
{ {
@ -1612,18 +1612,18 @@ static void prelevel(char g)
for (size_t i = 0; i < MAXSPRITES; i++) for (size_t i = 0; i < MAXSPRITES; i++)
{ {
if (sprite[i].statnum < MAXSTATUS && (DEER || PN(i) != SECTOREFFECTOR || SLT(i) != SE_14_SUBWAY_CAR)) if (sprite[i].statnum < MAXSTATUS && (DEER || PN(i) != TILE_SECTOREFFECTOR || SLT(i) != SE_14_SUBWAY_CAR))
A_Spawn(-1, i); A_Spawn(-1, i);
} }
if (!DEER) if (!DEER)
for (size_t i = 0; i < MAXSPRITES; i++) for (size_t i = 0; i < MAXSPRITES; i++)
{ {
if (sprite[i].statnum < MAXSTATUS && PN(i) == SECTOREFFECTOR && SLT(i) == SE_14_SUBWAY_CAR) if (sprite[i].statnum < MAXSTATUS && PN(i) == TILE_SECTOREFFECTOR && SLT(i) == SE_14_SUBWAY_CAR)
A_Spawn(-1, i); A_Spawn(-1, i);
if (RR && sprite[i].picnum == RRTILE19) if (RR && sprite[i].picnum == TILE_RRTILE19)
A_DeleteSprite(i); A_DeleteSprite(i);
if (RR && sprite[i].picnum == RRTILE34) if (RR && sprite[i].picnum == TILE_RRTILE34)
{ {
g_sectorExtra[sprite[i].sectnum] = sprite[i].lotag; g_sectorExtra[sprite[i].sectnum] = sprite[i].lotag;
A_DeleteSprite(i); A_DeleteSprite(i);
@ -1656,7 +1656,7 @@ static void prelevel(char g)
case LOCKSWITCH1__STATIC: case LOCKSWITCH1__STATIC:
case POWERSWITCH2__STATIC: case POWERSWITCH2__STATIC:
case RRTILE8464__STATICRR: case RRTILE8464__STATICRR:
if (RR && !RRRA && PN(i)-1+ii == (uint32_t)RRTILE8464) break; if (RR && !RRRA && PN(i)-1+ii == (uint32_t)TILE_RRTILE8464) break;
// the lower code only for the 'on' state (*) // the lower code only for the 'on' state (*)
if (ii==0) if (ii==0)
{ {
@ -1687,19 +1687,19 @@ static void prelevel(char g)
{ {
walltype * const pWall = &wall[i]; walltype * const pWall = &wall[i];
if (!DEER && pWall->overpicnum == MIRROR && (pWall->cstat&32) != 0) if (!DEER && pWall->overpicnum == TILE_MIRROR && (pWall->cstat&32) != 0)
{ {
int const nextSectnum = pWall->nextsector; int const nextSectnum = pWall->nextsector;
if ((nextSectnum >= 0) && sector[nextSectnum].ceilingpicnum != MIRROR) if ((nextSectnum >= 0) && sector[nextSectnum].ceilingpicnum != TILE_MIRROR)
{ {
if (g_mirrorCount > 63) if (g_mirrorCount > 63)
{ {
G_GameExit("\nToo many mirrors (64 max.)"); G_GameExit("\nToo many mirrors (64 max.)");
} }
sector[nextSectnum].ceilingpicnum = MIRROR; sector[nextSectnum].ceilingpicnum = TILE_MIRROR;
sector[nextSectnum].floorpicnum = MIRROR; sector[nextSectnum].floorpicnum = TILE_MIRROR;
g_mirrorWall[g_mirrorCount] = i; g_mirrorWall[g_mirrorCount] = i;
g_mirrorSector[g_mirrorCount] = nextSectnum; g_mirrorSector[g_mirrorCount] = nextSectnum;
g_mirrorCount++; g_mirrorCount++;
@ -1740,7 +1740,7 @@ static void prelevel(char g)
case W_FORCEFIELD__STATIC: case W_FORCEFIELD__STATIC:
if (RR) break; if (RR) break;
if (pWall->overpicnum == W_FORCEFIELD__STATIC) if (pWall->overpicnum == W_FORCEFIELD__STATIC)
for (bsize_t j = 0; j < 3; j++) tloadtile(W_FORCEFIELD + j, 0); for (bsize_t j = 0; j < 3; j++) tloadtile(TILE_W_FORCEFIELD + j, 0);
if (pWall->shade > 31) if (pWall->shade > 31)
pWall->cstat = 0; pWall->cstat = 0;
else else
@ -1805,7 +1805,7 @@ static void prelevel(char g)
case SCREENBREAK6__STATIC: case SCREENBREAK6__STATIC:
case SCREENBREAK7__STATIC: case SCREENBREAK7__STATIC:
case SCREENBREAK8__STATIC: case SCREENBREAK8__STATIC:
for (bssize_t j = SCREENBREAK6; j < SCREENBREAK9; j++) for (bssize_t j = TILE_SCREENBREAK6; j < TILE_SCREENBREAK9; j++)
tloadtile(j, 0); tloadtile(j, 0);
animwall[g_animWallCnt].wallnum = i; animwall[g_animWallCnt].wallnum = i;
@ -1821,7 +1821,7 @@ static void prelevel(char g)
animwall[g_animWallCnt].tag = -1; animwall[g_animWallCnt].tag = -1;
if (adult_lockout) if (adult_lockout)
pWall->picnum = (pWall->picnum == FEMPIC1) ? BLANKSCREEN : SCREENBREAK6; pWall->picnum = (pWall->picnum == TILE_FEMPIC1) ? TILE_BLANKSCREEN : TILE_SCREENBREAK6;
animwall[g_animWallCnt].wallnum = i; animwall[g_animWallCnt].wallnum = i;
animwall[g_animWallCnt].tag = pWall->picnum; animwall[g_animWallCnt].tag = pWall->picnum;
@ -1861,8 +1861,8 @@ static void prelevel(char g)
for (bssize_t j = startWall; j < endWall; j++) for (bssize_t j = startWall; j < endWall; j++)
{ {
wall[j].picnum = MIRROR; wall[j].picnum = TILE_MIRROR;
wall[j].overpicnum = MIRROR; wall[j].overpicnum = TILE_MIRROR;
} }
} }
@ -2000,7 +2000,7 @@ static void resetpspritevars(char gameMode)
if (g_player[0].ps->cursectnum >= 0) // < 0 may happen if we start a map in void space (e.g. testing it) if (g_player[0].ps->cursectnum >= 0) // < 0 may happen if we start a map in void space (e.g. testing it)
{ {
A_InsertSprite(g_player[0].ps->cursectnum,g_player[0].ps->pos.x,g_player[0].ps->pos.y,g_player[0].ps->pos.z, A_InsertSprite(g_player[0].ps->cursectnum,g_player[0].ps->pos.x,g_player[0].ps->pos.y,g_player[0].ps->pos.z,
APLAYER,0,0,0,fix16_to_int(g_player[0].ps->q16ang),0,0,0,10); TILE_APLAYER,0,0,0,fix16_to_int(g_player[0].ps->q16ang),0,0,0,10);
} }
if (ud.recstat != 2) if (ud.recstat != 2)

View file

@ -239,7 +239,7 @@ int ghcons_findnewspot(short a1)
vec3_t pos = { v20, v24, v18 }; vec3_t pos = { v20, v24, v18 };
setsprite(a1, &pos); setsprite(a1, &pos);
changespritesect(a1, v18); changespritesect(a1, v18);
if (spr->picnum == DOGRUN) if (spr->picnum == TILE_DOGRUN)
spr->z = -307200; spr->z = -307200;
else else
spr->z = sec->floorz; spr->z = sec->floorz;
@ -881,15 +881,15 @@ void sub_52BA8(void)
v1c++; v1c++;
} }
} }
ghprelvl_randkeep(PIG, 4); ghprelvl_randkeep(TILE_PIG, 4);
ghprelvl_randkeep(VIXEN, 4); ghprelvl_randkeep(TILE_VIXEN, 4);
ghprelvl_randkeep(DOGRUN, 4); ghprelvl_randkeep(TILE_DOGRUN, 4);
ghprelvl_randkeep(CHEER, 4); ghprelvl_randkeep(TILE_CHEER, 4);
ghprelvl_randkeep(7065, 64); ghprelvl_randkeep(7065, 64);
for (i = 0; i < MAXSPRITES; i++) for (i = 0; i < MAXSPRITES; i++)
{ {
if (sprite[i].picnum == PIG) if (sprite[i].picnum == TILE_PIG)
{ {
sprite[i].cstat = 257; sprite[i].cstat = 257;
changespritestat(i, 1); changespritestat(i, 1);
@ -897,7 +897,7 @@ void sub_52BA8(void)
sprite[i].yrepeat = 10 + sub_52AB8(5, 125); sprite[i].yrepeat = 10 + sub_52AB8(5, 125);
sprite[i].clipdist = mulscale7(sprite[i].xrepeat, tilesiz[sprite[i].picnum].x); sprite[i].clipdist = mulscale7(sprite[i].xrepeat, tilesiz[sprite[i].picnum].x);
} }
if (sprite[i].picnum == VIXEN) if (sprite[i].picnum == TILE_VIXEN)
{ {
sprite[i].cstat = 257; sprite[i].cstat = 257;
changespritestat(i, 1); changespritestat(i, 1);
@ -905,7 +905,7 @@ void sub_52BA8(void)
sprite[i].yrepeat = 14 + sub_52AB8(7, 100); sprite[i].yrepeat = 14 + sub_52AB8(7, 100);
sprite[i].clipdist = mulscale7(sprite[i].xrepeat, tilesiz[sprite[i].picnum].x); sprite[i].clipdist = mulscale7(sprite[i].xrepeat, tilesiz[sprite[i].picnum].x);
} }
if (sprite[i].picnum == DOGRUN) if (sprite[i].picnum == TILE_DOGRUN)
{ {
sprite[i].cstat = 257; sprite[i].cstat = 257;
changespritestat(i, 1); changespritestat(i, 1);
@ -913,7 +913,7 @@ void sub_52BA8(void)
sprite[i].yrepeat = 8 + sub_52AB8(4, 100); sprite[i].yrepeat = 8 + sub_52AB8(4, 100);
sprite[i].clipdist = mulscale7(sprite[i].xrepeat, tilesiz[sprite[i].picnum].x); sprite[i].clipdist = mulscale7(sprite[i].xrepeat, tilesiz[sprite[i].picnum].x);
} }
if (sprite[i].picnum == CHEER) if (sprite[i].picnum == TILE_CHEER)
{ {
sprite[i].cstat = 257; sprite[i].cstat = 257;
changespritestat(i, 1); changespritestat(i, 1);
@ -3556,12 +3556,12 @@ void sub_580C8(void)
{ {
int vsi = dword_AAAF0 % 10; int vsi = dword_AAAF0 % 10;
int vd = dword_AAAF0 / 10; int vd = dword_AAAF0 / 10;
rotatesprite(292<<16, 184<<16, 17408, 0, DIGITALNUM+vd, 0, 0, 128+10, 0, 0, xdim-1, ydim-1); rotatesprite(292<<16, 184<<16, 17408, 0, TILE_DIGITALNUM+vd, 0, 0, 128+10, 0, 0, xdim-1, ydim-1);
rotatesprite(296<<16, 184<<16, 17408, 0, DIGITALNUM+vsi, 0, 0, 128+10, 0, 0, xdim-1, ydim-1); rotatesprite(296<<16, 184<<16, 17408, 0, TILE_DIGITALNUM+vsi, 0, 0, 128+10, 0, 0, xdim-1, ydim-1);
vsi = dword_AAAF4 % 10; vsi = dword_AAAF4 % 10;
vd = dword_AAAF4 / 10; vd = dword_AAAF4 / 10;
rotatesprite(302<<16, 184<<16, 17408, 0, DIGITALNUM+vd, 0, 0, 128+10, 0, 0, xdim-1, ydim-1); rotatesprite(302<<16, 184<<16, 17408, 0, TILE_DIGITALNUM+vd, 0, 0, 128+10, 0, 0, xdim-1, ydim-1);
rotatesprite(306<<16, 184<<16, 17408, 0, DIGITALNUM+vsi, 0, 0, 128+10, 0, 0, xdim-1, ydim-1); rotatesprite(306<<16, 184<<16, 17408, 0, TILE_DIGITALNUM+vsi, 0, 0, 128+10, 0, 0, xdim-1, ydim-1);
} }
void ghtarget_move(void) void ghtarget_move(void)
@ -3877,11 +3877,11 @@ void sub_58A5C(unsigned int a1)
int t3 = (a1 % 1000) / 100; int t3 = (a1 % 1000) / 100;
int t4 = (a1 % 10000) / 1000; int t4 = (a1 % 10000) / 1000;
int t5 = (a1 % 100000) / 10000; int t5 = (a1 % 100000) / 10000;
rotatesprite(243<<16, 185<<16, 22528, 0, DIGITALNUM+t1, 0, 0, 128+64+10, 0, 0, xdim-1, ydim-1); rotatesprite(243<<16, 185<<16, 22528, 0, TILE_DIGITALNUM+t1, 0, 0, 128+64+10, 0, 0, xdim-1, ydim-1);
rotatesprite(235<<16, 185<<16, 22528, 0, DIGITALNUM+t2, 0, 0, 128+64+10, 0, 0, xdim-1, ydim-1); rotatesprite(235<<16, 185<<16, 22528, 0, TILE_DIGITALNUM+t2, 0, 0, 128+64+10, 0, 0, xdim-1, ydim-1);
rotatesprite(227<<16, 185<<16, 22528, 0, DIGITALNUM+t3, 0, 0, 128+64+10, 0, 0, xdim-1, ydim-1); rotatesprite(227<<16, 185<<16, 22528, 0, TILE_DIGITALNUM+t3, 0, 0, 128+64+10, 0, 0, xdim-1, ydim-1);
rotatesprite(219<<16, 185<<16, 22528, 0, DIGITALNUM+t4, 0, 0, 128+64+10, 0, 0, xdim-1, ydim-1); rotatesprite(219<<16, 185<<16, 22528, 0, TILE_DIGITALNUM+t4, 0, 0, 128+64+10, 0, 0, xdim-1, ydim-1);
rotatesprite(211<<16, 185<<16, 22528, 0, DIGITALNUM+t5, 0, 0, 128+64+10, 0, 0, xdim-1, ydim-1); rotatesprite(211<<16, 185<<16, 22528, 0, TILE_DIGITALNUM+t5, 0, 0, 128+64+10, 0, 0, xdim-1, ydim-1);
} }
short word_AAB10; short word_AAB10;
@ -3945,21 +3945,21 @@ void sub_58D14(void)
unsigned int t1 = dword_AAB14 % 10; unsigned int t1 = dword_AAB14 % 10;
unsigned int t2 = (dword_AAB14 % 100) / 10; unsigned int t2 = (dword_AAB14 % 100) / 10;
unsigned int t3 = (dword_AAB14 % 1000) / 100; unsigned int t3 = (dword_AAB14 % 1000) / 100;
rotatesprite(64<<16, 180<<16, 18432, 0, DIGITALNUM+t1, 0, 0, 128+64+10, 0, 0, xdim-1, ydim-1); rotatesprite(64<<16, 180<<16, 18432, 0, TILE_DIGITALNUM+t1, 0, 0, 128+64+10, 0, 0, xdim-1, ydim-1);
if (t3 || t2 > 0) if (t3 || t2 > 0)
{ {
rotatesprite(58<<16, 180<<16, 18432, 0, DIGITALNUM+t2, 0, 0, 128+64+10, 0, 0, xdim-1, ydim-1); rotatesprite(58<<16, 180<<16, 18432, 0, TILE_DIGITALNUM+t2, 0, 0, 128+64+10, 0, 0, xdim-1, ydim-1);
} }
if (t3 > 0) if (t3 > 0)
{ {
rotatesprite(52<<16, 180<<16, 18432, 0, DIGITALNUM+t3, 0, 0, 128+64+10, 0, 0, xdim-1, ydim-1); rotatesprite(52<<16, 180<<16, 18432, 0, TILE_DIGITALNUM+t3, 0, 0, 128+64+10, 0, 0, xdim-1, ydim-1);
} }
t1 = dword_AAB18 % 10; t1 = dword_AAB18 % 10;
t2 = (dword_AAB18 % 100) / 10; t2 = (dword_AAB18 % 100) / 10;
rotatesprite(64<<16, 190<<16, 18432, 0, DIGITALNUM+t1, 0, 0, 128+64+10, 0, 0, xdim-1, ydim-1); rotatesprite(64<<16, 190<<16, 18432, 0, TILE_DIGITALNUM+t1, 0, 0, 128+64+10, 0, 0, xdim-1, ydim-1);
if (t2 > 0) if (t2 > 0)
{ {
rotatesprite(58<<16, 190<<16, 18432, 0, DIGITALNUM+t2, 0, 0, 128+64+10, 0, 0, xdim-1, ydim-1); rotatesprite(58<<16, 190<<16, 18432, 0, TILE_DIGITALNUM+t2, 0, 0, 128+64+10, 0, 0, xdim-1, ydim-1);
} }
} }
} }

View file

@ -1538,7 +1538,7 @@ static void postloadplayer(int32_t savegamep)
if (savegamep) if (savegamep)
{ {
for (SPRITES_OF(STAT_FX, i)) for (SPRITES_OF(STAT_FX, i))
if (sprite[i].picnum == MUSICANDSFX) if (sprite[i].picnum == TILE_MUSICANDSFX)
{ {
T2(i) = SoundEnabled(); T2(i) = SoundEnabled();
T1(i) = 0; T1(i) = 0;
@ -1557,11 +1557,11 @@ static void postloadplayer(int32_t savegamep)
switch (DYNAMICTILEMAP(wall[animwall[i].wallnum].picnum)) switch (DYNAMICTILEMAP(wall[animwall[i].wallnum].picnum))
{ {
case FEMPIC1__STATIC: case FEMPIC1__STATIC:
wall[animwall[i].wallnum].picnum = BLANKSCREEN; wall[animwall[i].wallnum].picnum = TILE_BLANKSCREEN;
break; break;
case FEMPIC2__STATIC: case FEMPIC2__STATIC:
case FEMPIC3__STATIC: case FEMPIC3__STATIC:
wall[animwall[i].wallnum].picnum = SCREENBREAK6; wall[animwall[i].wallnum].picnum = TILE_SCREENBREAK6;
break; break;
} }
} }

View file

@ -27,8 +27,8 @@ Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
#include "compat.h" #include "compat.h"
#include "sbar.h" #include "sbar.h"
#include "statusbar.h" #include "statusbar.h"
#include "v_draw.h"
#include "texturemanager.h" #include "texturemanager.h"
BEGIN_DUKE_NS BEGIN_DUKE_NS
static FFont* IndexFont; static FFont* IndexFont;
@ -46,7 +46,7 @@ void InitFonts()
// Small font // Small font
for (int i = 0; i < 95; i++) for (int i = 0; i < 95; i++)
{ {
auto tile = tileGetTexture(STARTALPHANUM + i); auto tile = tileGetTexture(TILE_STARTALPHANUM + i);
if (tile && tile->GetTexelWidth() > 0 && tile->GetTexelHeight() > 0) if (tile && tile->GetTexelWidth() > 0 && tile->GetTexelHeight() > 0)
fontdata.Insert('!' + i, tile); fontdata.Insert('!' + i, tile);
} }
@ -56,29 +56,29 @@ void InitFonts()
// Big font // Big font
// This font is VERY messy... // This font is VERY messy...
fontdata.Insert('_', tileGetTexture(BIGALPHANUM - 11)); fontdata.Insert('_', tileGetTexture(TILE_BIGALPHANUM - 11));
fontdata.Insert('-', tileGetTexture(BIGALPHANUM - 11)); fontdata.Insert('-', tileGetTexture(TILE_BIGALPHANUM - 11));
for (int i = 0; i < 10; i++) fontdata.Insert('0' + i, tileGetTexture(BIGALPHANUM - 10 + i)); for (int i = 0; i < 10; i++) fontdata.Insert('0' + i, tileGetTexture(TILE_BIGALPHANUM - 10 + i));
for (int i = 0; i < 26; i++) fontdata.Insert('A' + i, tileGetTexture(BIGALPHANUM + i)); for (int i = 0; i < 26; i++) fontdata.Insert('A' + i, tileGetTexture(TILE_BIGALPHANUM + i));
fontdata.Insert('.', tileGetTexture(BIGPERIOD)); fontdata.Insert('.', tileGetTexture(TILE_BIGPERIOD));
fontdata.Insert(',', tileGetTexture(BIGCOMMA)); fontdata.Insert(',', tileGetTexture(TILE_BIGCOMMA));
fontdata.Insert('!', tileGetTexture(BIGX_)); fontdata.Insert('!', tileGetTexture(TILE_BIGX_));
fontdata.Insert('?', tileGetTexture(BIGQ)); fontdata.Insert('?', tileGetTexture(TILE_BIGQ));
fontdata.Insert(';', tileGetTexture(BIGSEMI)); fontdata.Insert(';', tileGetTexture(TILE_BIGSEMI));
fontdata.Insert(':', tileGetTexture(BIGCOLIN)); fontdata.Insert(':', tileGetTexture(TILE_BIGCOLIN));
fontdata.Insert('\\', tileGetTexture(BIGALPHANUM + 68)); fontdata.Insert('\\', tileGetTexture(TILE_BIGALPHANUM + 68));
fontdata.Insert('/', tileGetTexture(BIGALPHANUM + 68)); fontdata.Insert('/', tileGetTexture(TILE_BIGALPHANUM + 68));
fontdata.Insert('%', tileGetTexture(BIGALPHANUM + 69)); fontdata.Insert('%', tileGetTexture(TILE_BIGALPHANUM + 69));
fontdata.Insert('`', tileGetTexture(BIGAPPOS)); fontdata.Insert('`', tileGetTexture(TILE_BIGAPPOS));
fontdata.Insert('"', tileGetTexture(BIGAPPOS)); fontdata.Insert('"', tileGetTexture(TILE_BIGAPPOS));
fontdata.Insert('\'', tileGetTexture(BIGAPPOS)); fontdata.Insert('\'', tileGetTexture(TILE_BIGAPPOS));
BigFont = new ::FFont("BigFont", nullptr, "defbigfont", 0, 0, 0, -1, -1, false, false, false, &fontdata); BigFont = new ::FFont("BigFont", nullptr, "defbigfont", 0, 0, 0, -1, -1, false, false, false, &fontdata);
fontdata.Clear(); fontdata.Clear();
// Tiny font // Tiny font
for (int i = 0; i < 95; i++) for (int i = 0; i < 95; i++)
{ {
auto tile = tileGetTexture(MINIFONT + i); auto tile = tileGetTexture(TILE_MINIFONT + i);
if (tile && tile->GetTexelWidth() > 0 && tile->GetTexelHeight() > 0) if (tile && tile->GetTexelWidth() > 0 && tile->GetTexelHeight() > 0)
fontdata.Insert('!' + i, tile); fontdata.Insert('!' + i, tile);
} }
@ -87,17 +87,17 @@ void InitFonts()
fontdata.Clear(); fontdata.Clear();
// SBAR index font // SBAR index font
for (int i = 0; i < 10; i++) fontdata.Insert('0' + i, tileGetTexture(THREEBYFIVE + i)); for (int i = 0; i < 10; i++) fontdata.Insert('0' + i, tileGetTexture(TILE_THREEBYFIVE + i));
fontdata.Insert(':', tileGetTexture(THREEBYFIVE + 10)); fontdata.Insert(':', tileGetTexture(TILE_THREEBYFIVE + 10));
fontdata.Insert('/', tileGetTexture(THREEBYFIVE + 11)); fontdata.Insert('/', tileGetTexture(TILE_THREEBYFIVE + 11));
fontdata.Insert('%', tileGetTexture(MINIFONT + '%' - '!')); fontdata.Insert('%', tileGetTexture(TILE_MINIFONT + '%' - '!'));
fontdata.Insert(1, TexMan.FindGameTexture("TINYBLAK")); // this is only here to widen the color range of the font to produce a better translation. fontdata.Insert(1, TexMan.FindGameTexture("TINYBLAK")); // this is only here to widen the color range of the font to produce a better translation.
IndexFont = new ::FFont("IndexFont", nullptr, nullptr, 0, 0, 0, -1, -1, false, false, false, &fontdata); IndexFont = new ::FFont("IndexFont", nullptr, nullptr, 0, 0, 0, -1, -1, false, false, false, &fontdata);
fontdata.Clear(); fontdata.Clear();
// digital font // digital font
for (int i = 0; i < 10; i++) fontdata.Insert('0' + i, tileGetTexture(DIGITALNUM + i)); for (int i = 0; i < 10; i++) fontdata.Insert('0' + i, tileGetTexture(TILE_DIGITALNUM + i));
fontdata.Insert(1, TexMan.FindGameTexture("TINYBLAK")); // this is only here to widen the color range of the font to produce a better translation. fontdata.Insert(1, TexMan.FindGameTexture("TINYBLAK")); // this is only here to widen the color range of the font to produce a better translation.
DigiFont = new ::FFont("DigiFont", nullptr, nullptr, 0, 0, 0, -1, -1, false, false, false, &fontdata); DigiFont = new ::FFont("DigiFont", nullptr, nullptr, 0, 0, 0, -1, -1, false, false, false, &fontdata);
@ -173,7 +173,7 @@ class DukeStatusBar : public DBaseStatusBar
DHUDFont digiFont; DHUDFont digiFont;
double scale; double scale;
std::array<int, MAX_WEAPONS> ammo_sprites; std::array<int, MAX_WEAPONS> ammo_sprites;
std::array<int, 8> item_icons = { 0, FIRSTAID_ICON, STEROIDS_ICON, HOLODUKE_ICON, JETPACK_ICON, HEAT_ICON, AIRTANK_ICON, BOOT_ICON }; std::array<int, 8> item_icons = { 0, TILE_FIRSTAID_ICON, TILE_STEROIDS_ICON, TILE_HOLODUKE_ICON, TILE_JETPACK_ICON, TILE_HEAT_ICON, TILE_AIRTANK_ICON, TILE_BOOT_ICON };
public: public:
DukeStatusBar() DukeStatusBar()
@ -183,18 +183,18 @@ public:
digiFont(DigiFont, 1 , Off, 1, 1) digiFont(DigiFont, 1 , Off, 1, 1)
{ {
// optionally draw at the top of the screen. // optionally draw at the top of the screen.
SetSize(tilesiz[BOTTOMSTATUSBAR].y); SetSize(tilesiz[TILE_BOTTOMSTATUSBAR].y);
drawOffset.Y = hud_position ? -168 : 0; drawOffset.Y = hud_position ? -168 : 0;
scale = (g_gameType & GAMEFLAG_RRALL) ? 0.5 : 1; scale = (g_gameType & GAMEFLAG_RRALL) ? 0.5 : 1;
if (!(g_gameType & GAMEFLAG_RRALL)) if (!(g_gameType & GAMEFLAG_RRALL))
{ {
ammo_sprites = { -1, AMMO, SHOTGUNAMMO, BATTERYAMMO, RPGAMMO, HBOMBAMMO, CRYSTALAMMO, DEVISTATORAMMO, TRIPBOMBSPRITE, FREEZEAMMO + 1, HBOMBAMMO, GROWAMMO/*, FLAMETHROWERAMMO + 1*/ }; ammo_sprites = { -1, TILE_AMMO, TILE_SHOTGUNAMMO, TILE_BATTERYAMMO, TILE_RPGAMMO, TILE_HBOMBAMMO, TILE_CRYSTALAMMO, TILE_DEVISTATORAMMO, TILE_TRIPBOMBSPRITE, TILE_FREEZEAMMO + 1, TILE_HBOMBAMMO, TILE_GROWAMMO/*, FLAMETHROWERAMMO + 1*/ };
} }
else else
{ {
ammo_sprites = { -1, AMMO, SHOTGUNAMMO, BATTERYAMMO, HBOMBAMMO, HBOMBAMMO, RRTILE43, DEVISTATORAMMO, TRIPBOMBSPRITE, GROWSPRITEICON, HBOMBAMMO, -1, ammo_sprites = { -1, TILE_AMMO, TILE_SHOTGUNAMMO, TILE_BATTERYAMMO, TILE_HBOMBAMMO, TILE_HBOMBAMMO, TILE_RRTILE43, TILE_DEVISTATORAMMO, TILE_TRIPBOMBSPRITE, TILE_GROWSPRITEICON, TILE_HBOMBAMMO, -1,
BOWLINGBALLSPRITE, MOTOAMMO, BOATAMMO, -1, RPG2SPRITE }; TILE_BOWLINGBALLSPRITE, TILE_MOTOAMMO, TILE_BOATAMMO, -1, TILE_RPG2SPRITE };
} }
} }
@ -218,10 +218,10 @@ public:
for (i = connecthead; i >= 0; i = connectpoint2[i]) for (i = connecthead; i >= 0; i = connectpoint2[i])
if (i > j) j = i; if (i > j) j = i;
rotatesprite(0, 0, 65600L, 0, FRAGBAR, 0, 0, 2 + 8 + 16 + 64 + 128, 0, 0, xdim - 1, ydim - 1); rotatesprite(0, 0, 65600L, 0, TILE_FRAGBAR, 0, 0, 2 + 8 + 16 + 64 + 128, 0, 0, xdim - 1, ydim - 1);
if (j >= 4) rotatesprite(319, (8) << 16, 65600L, 0, FRAGBAR, 0, 0, 10 + 16 + 64 + 128, 0, 0, xdim - 1, ydim - 1); if (j >= 4) rotatesprite(319, (8) << 16, 65600L, 0, TILE_FRAGBAR, 0, 0, 10 + 16 + 64 + 128, 0, 0, xdim - 1, ydim - 1);
if (j >= 8) rotatesprite(319, (16) << 16, 65600L, 0, FRAGBAR, 0, 0, 10 + 16 + 64 + 128, 0, 0, xdim - 1, ydim - 1); if (j >= 8) rotatesprite(319, (16) << 16, 65600L, 0, TILE_FRAGBAR, 0, 0, 10 + 16 + 64 + 128, 0, 0, xdim - 1, ydim - 1);
if (j >= 12) rotatesprite(319, (24) << 16, 65600L, 0, FRAGBAR, 0, 0, 10 + 16 + 64 + 128, 0, 0, xdim - 1, ydim - 1); if (j >= 12) rotatesprite(319, (24) << 16, 65600L, 0, TILE_FRAGBAR, 0, 0, 10 + 16 + 64 + 128, 0, 0, xdim - 1, ydim - 1);
for (i = connecthead; i >= 0; i = connectpoint2[i]) for (i = connecthead; i >= 0; i = connectpoint2[i])
{ {
@ -287,28 +287,28 @@ public:
switch (i) switch (i)
{ {
case 1: case 1:
DrawGraphic(tileGetTexture(FIRSTAID_ICON), x, y, align, alpha, 0, 0, scale, scale); DrawGraphic(tileGetTexture(TILE_FIRSTAID_ICON), x, y, align, alpha, 0, 0, scale, scale);
break; break;
case 2: case 2:
DrawGraphic(tileGetTexture(STEROIDS_ICON), x, y, align, alpha, 0, 0, scale, scale); DrawGraphic(tileGetTexture(TILE_STEROIDS_ICON), x, y, align, alpha, 0, 0, scale, scale);
break; break;
case 4: case 4:
DrawGraphic(tileGetTexture(HOLODUKE_ICON), x, y, align, alpha, 0, 0, scale, scale); DrawGraphic(tileGetTexture(TILE_HOLODUKE_ICON), x, y, align, alpha, 0, 0, scale, scale);
break; break;
case 8: case 8:
DrawGraphic(tileGetTexture(JETPACK_ICON), x, y, align, alpha, 0, 0, scale, scale); DrawGraphic(tileGetTexture(TILE_JETPACK_ICON), x, y, align, alpha, 0, 0, scale, scale);
break; break;
case 16: case 16:
DrawGraphic(tileGetTexture(HEAT_ICON), x, y, align, alpha, 0, 0, scale, scale); DrawGraphic(tileGetTexture(TILE_HEAT_ICON), x, y, align, alpha, 0, 0, scale, scale);
break; break;
case 32: case 32:
DrawGraphic(tileGetTexture(AIRTANK_ICON), x, y, align, alpha, 0, 0, scale, scale); DrawGraphic(tileGetTexture(TILE_AIRTANK_ICON), x, y, align, alpha, 0, 0, scale, scale);
break; break;
case 64: case 64:
DrawGraphic(tileGetTexture(BOOT_ICON), x, y, align, alpha, 0, 0, scale, scale); DrawGraphic(tileGetTexture(TILE_BOOT_ICON), x, y, align, alpha, 0, 0, scale, scale);
break; break;
} }
if (select == i) DrawGraphic(tileGetTexture(ARROW), x, y, align, alpha, 0, 0, scale, scale); if (select == i) DrawGraphic(tileGetTexture(TILE_ARROW), x, y, align, alpha, 0, 0, scale, scale);
x += 22; x += 22;
} }
} }
@ -325,7 +325,7 @@ public:
// //
// Health // Health
// //
DrawGraphic(tileGetTexture(COLA), 2, -2, DI_ITEM_LEFT_BOTTOM, 1., -1, -1, 0.75, 0.75); DrawGraphic(tileGetTexture(TILE_COLA), 2, -2, DI_ITEM_LEFT_BOTTOM, 1., -1, -1, 0.75, 0.75);
FString format; FString format;
if (!althud_flashing || p->last_extra > (p->max_player_health >> 2) || ((int32_t)totalclock & 32) || (sprite[p->i].pal == 1 && p->last_extra < 2)) if (!althud_flashing || p->last_extra > (p->max_player_health >> 2) || ((int32_t)totalclock & 32) || (sprite[p->i].pal == 1 && p->last_extra < 2))
@ -342,7 +342,7 @@ public:
// //
// Armor // Armor
// //
DrawGraphic(tileGetTexture(SHIELD), 62, -2, DI_ITEM_LEFT_BOTTOM, 1., -1, -1, 0.75, 0.75); DrawGraphic(tileGetTexture(TILE_SHIELD), 62, -2, DI_ITEM_LEFT_BOTTOM, 1., -1, -1, 0.75, 0.75);
format.Format("%d", GetMoraleOrShield(p, snum)); format.Format("%d", GetMoraleOrShield(p, snum));
SBar_DrawString(this, &numberFont, format, 105, -numberFont.mFont->GetHeight() - 0.5, DI_TEXT_ALIGN_CENTER, CR_UNTRANSLATED, 1, 0, 0, 1, 1); SBar_DrawString(this, &numberFont, format, 105, -numberFont.mFont->GetHeight() - 0.5, DI_TEXT_ALIGN_CENTER, CR_UNTRANSLATED, 1, 0, 0, 1, 1);
@ -392,9 +392,9 @@ public:
// //
// keys // keys
// //
if (p->got_access & 1) DrawGraphic(tileGetTexture(ACCESSCARD), -29, -30, DI_ITEM_CENTER, 1, -1, -1, 0.5, 0.5, 0xffffffff, TRANSLATION(Translation_Remap, 0)); if (p->got_access & 1) DrawGraphic(tileGetTexture(TILE_ACCESSCARD), -29, -30, DI_ITEM_CENTER, 1, -1, -1, 0.5, 0.5, 0xffffffff, TRANSLATION(Translation_Remap, 0));
if (p->got_access & 4) DrawGraphic(tileGetTexture(ACCESSCARD), -24, -28, DI_ITEM_CENTER, 1, -1, -1, 0.5, 0.5, 0xffffffff, TRANSLATION(Translation_Remap, 23)); if (p->got_access & 4) DrawGraphic(tileGetTexture(TILE_ACCESSCARD), -24, -28, DI_ITEM_CENTER, 1, -1, -1, 0.5, 0.5, 0xffffffff, TRANSLATION(Translation_Remap, 23));
if (p->got_access & 2) DrawGraphic(tileGetTexture(ACCESSCARD), -19, -26, DI_ITEM_CENTER, 1, -1, -1, 0.5, 0.5, 0xffffffff, TRANSLATION(Translation_Remap, 21)); if (p->got_access & 2) DrawGraphic(tileGetTexture(TILE_ACCESSCARD), -19, -26, DI_ITEM_CENTER, 1, -1, -1, 0.5, 0.5, 0xffffffff, TRANSLATION(Translation_Remap, 21));
} }
@ -409,7 +409,7 @@ public:
// //
// health // health
// //
DrawGraphic(tileGetTexture(HEALTHBOX), 5, -2, DI_ITEM_LEFT_BOTTOM, 1, -1, -1, scale, scale); DrawGraphic(tileGetTexture(TILE_HEALTHBOX), 5, -2, DI_ITEM_LEFT_BOTTOM, 1, -1, -1, scale, scale);
int32_t health = (sprite[p->i].pal == 1 && p->last_extra < 2) ? 1 : p->last_extra; int32_t health = (sprite[p->i].pal == 1 && p->last_extra < 2) ? 1 : p->last_extra;
FStringf format("%d", health); FStringf format("%d", health);
SBar_DrawString(this, &digiFont, format, 19, -digiFont.mFont->GetHeight() * scale - 7, DI_TEXT_ALIGN_CENTER, CR_UNTRANSLATED, 1, 0, 0, scale, scale); SBar_DrawString(this, &digiFont, format, 19, -digiFont.mFont->GetHeight() * scale - 7, DI_TEXT_ALIGN_CENTER, CR_UNTRANSLATED, 1, 0, 0, scale, scale);
@ -417,7 +417,7 @@ public:
// //
// ammo // ammo
// //
DrawGraphic(tileGetTexture(AMMOBOX), 37, -2, DI_ITEM_LEFT_BOTTOM, 1, -1, -1, scale, scale); DrawGraphic(tileGetTexture(TILE_AMMOBOX), 37, -2, DI_ITEM_LEFT_BOTTOM, 1, -1, -1, scale, scale);
int wp = (p->curr_weapon == HANDREMOTE_WEAPON) ? HANDBOMB_WEAPON : p->curr_weapon; int wp = (p->curr_weapon == HANDREMOTE_WEAPON) ? HANDBOMB_WEAPON : p->curr_weapon;
format.Format("%d", p->ammo_amount[wp]); format.Format("%d", p->ammo_amount[wp]);
SBar_DrawString(this, &digiFont, format, 53, -digiFont.mFont->GetHeight() * scale - 7, DI_TEXT_ALIGN_CENTER, CR_UNTRANSLATED, 1, 0, 0, scale, scale); SBar_DrawString(this, &digiFont, format, 53, -digiFont.mFont->GetHeight() * scale - 7, DI_TEXT_ALIGN_CENTER, CR_UNTRANSLATED, 1, 0, 0, scale, scale);
@ -429,7 +429,7 @@ public:
if (icon > 0) if (icon > 0)
{ {
int x = 73; int x = 73;
DrawGraphic(tileGetTexture(INVENTORYBOX), 69, -2, DI_ITEM_LEFT_BOTTOM, 1, -1, -1, scale, scale); DrawGraphic(tileGetTexture(TILE_INVENTORYBOX), 69, -2, DI_ITEM_LEFT_BOTTOM, 1, -1, -1, scale, scale);
if (icon < ICON_MAX) if (icon < ICON_MAX)
DrawGraphic(tileGetTexture(item_icons[icon]), x, -14, DI_ITEM_LEFT|DI_ITEM_VCENTER, 1, -1, -1, scale, scale); DrawGraphic(tileGetTexture(item_icons[icon]), x, -14, DI_ITEM_LEFT|DI_ITEM_VCENTER, 1, -1, -1, scale, scale);
@ -457,7 +457,7 @@ public:
// Health // Health
// //
DrawGraphic(tileGetTexture(SPINNINGNUKEICON+1), 2, -2, DI_ITEM_LEFT_BOTTOM, 1, 0, 0, 10000. / 65536., 10000. / 65536.); DrawGraphic(tileGetTexture(TILE_SPINNINGNUKEICON+1), 2, -2, DI_ITEM_LEFT_BOTTOM, 1, 0, 0, 10000. / 65536., 10000. / 65536.);
FString format; FString format;
if (!althud_flashing || p->last_extra > (p->max_player_health >> 2) || ((int32_t)totalclock & 32) || (sprite[p->i].pal == 1 && p->last_extra < 2)) if (!althud_flashing || p->last_extra > (p->max_player_health >> 2) || ((int32_t)totalclock & 32) || (sprite[p->i].pal == 1 && p->last_extra < 2))
@ -474,14 +474,14 @@ public:
// //
// drink // drink
// //
DrawGraphic(tileGetTexture(COLA), 70, -2, DI_ITEM_LEFT_BOTTOM, 1, 0, 0, 10000. / 65536., 10000. / 65536.); DrawGraphic(tileGetTexture(TILE_COLA), 70, -2, DI_ITEM_LEFT_BOTTOM, 1, 0, 0, 10000. / 65536., 10000. / 65536.);
format.Format("%d", p->drink_amt); format.Format("%d", p->drink_amt);
SBar_DrawString(this, &numberFont, format, 98, -BigFont->GetHeight() * scale - 0.5, DI_TEXT_ALIGN_CENTER, CR_UNTRANSLATED, 1, 0, 0, scale, scale); SBar_DrawString(this, &numberFont, format, 98, -BigFont->GetHeight() * scale - 0.5, DI_TEXT_ALIGN_CENTER, CR_UNTRANSLATED, 1, 0, 0, scale, scale);
// //
// eat // eat
// //
DrawGraphic(tileGetTexture(JETPACK), 122, -2, DI_ITEM_LEFT_BOTTOM, 1, 0, 0, 20000. / 65536., 20000. / 65536.); DrawGraphic(tileGetTexture(TILE_JETPACK), 122, -2, DI_ITEM_LEFT_BOTTOM, 1, 0, 0, 20000. / 65536., 20000. / 65536.);
format.Format("%d", p->eat_amt); format.Format("%d", p->eat_amt);
SBar_DrawString(this, &numberFont, format, 175, -BigFont->GetHeight() * scale - 0.5, DI_TEXT_ALIGN_CENTER, CR_UNTRANSLATED, 1, 0, 0, scale, scale); SBar_DrawString(this, &numberFont, format, 175, -BigFont->GetHeight() * scale - 0.5, DI_TEXT_ALIGN_CENTER, CR_UNTRANSLATED, 1, 0, 0, scale, scale);
@ -525,9 +525,9 @@ public:
auto text = ontext(p); auto text = ontext(p);
if (text.first) SBar_DrawString(this, &miniFont, text.first, x + 35, -miniFont.mFont->GetHeight() * scale - 9.5, DI_TEXT_ALIGN_RIGHT, CR_UNTRANSLATED, 1, 0, 0, scale, scale); if (text.first) SBar_DrawString(this, &miniFont, text.first, x + 35, -miniFont.mFont->GetHeight() * scale - 9.5, DI_TEXT_ALIGN_RIGHT, CR_UNTRANSLATED, 1, 0, 0, scale, scale);
} }
if (p->keys[1]) DrawGraphic(tileGetTexture(ACCESSCARD), -29, -32, DI_ITEM_BOTTOM, 1, -1, -1, 0.5, 0.5, 0xffffffff, TRANSLATION(Translation_Remap, 0)); if (p->keys[1]) DrawGraphic(tileGetTexture(TILE_ACCESSCARD), -29, -32, DI_ITEM_BOTTOM, 1, -1, -1, 0.5, 0.5, 0xffffffff, TRANSLATION(Translation_Remap, 0));
if (p->keys[3]) DrawGraphic(tileGetTexture(ACCESSCARD), -24, -30, DI_ITEM_BOTTOM, 1, -1, -1, 0.5, 0.5, 0xffffffff, TRANSLATION(Translation_Remap, 23)); if (p->keys[3]) DrawGraphic(tileGetTexture(TILE_ACCESSCARD), -24, -30, DI_ITEM_BOTTOM, 1, -1, -1, 0.5, 0.5, 0xffffffff, TRANSLATION(Translation_Remap, 23));
if (p->keys[2]) DrawGraphic(tileGetTexture(ACCESSCARD), -19, -28, DI_ITEM_BOTTOM, 1, -1, -1, 0.5, 0.5, 0xffffffff, TRANSLATION(Translation_Remap, 21)); if (p->keys[2]) DrawGraphic(tileGetTexture(TILE_ACCESSCARD), -19, -28, DI_ITEM_BOTTOM, 1, -1, -1, 0.5, 0.5, 0xffffffff, TRANSLATION(Translation_Remap, 21));
} }
@ -542,7 +542,7 @@ public:
// //
// health // health
// //
DrawGraphic(tileGetTexture(HEALTHBOX), 2, -2, DI_ITEM_LEFT_BOTTOM, 1, -1, -1, scale, scale); DrawGraphic(tileGetTexture(TILE_HEALTHBOX), 2, -2, DI_ITEM_LEFT_BOTTOM, 1, -1, -1, scale, scale);
int32_t health = (sprite[p->i].pal == 1 && p->last_extra < 2) ? 1 : p->last_extra; int32_t health = (sprite[p->i].pal == 1 && p->last_extra < 2) ? 1 : p->last_extra;
FStringf format("%d", health); FStringf format("%d", health);
SBar_DrawString(this, &digiFont, format, 17, -digiFont.mFont->GetHeight() * scale - 7, DI_TEXT_ALIGN_CENTER, CR_UNTRANSLATED, 1, 0, 0, scale, scale); SBar_DrawString(this, &digiFont, format, 17, -digiFont.mFont->GetHeight() * scale - 7, DI_TEXT_ALIGN_CENTER, CR_UNTRANSLATED, 1, 0, 0, scale, scale);
@ -550,7 +550,7 @@ public:
// //
// ammo // ammo
// //
DrawGraphic(tileGetTexture(AMMOBOX), 41, -2, DI_ITEM_LEFT_BOTTOM, 1, -1, -1, scale, scale); DrawGraphic(tileGetTexture(TILE_AMMOBOX), 41, -2, DI_ITEM_LEFT_BOTTOM, 1, -1, -1, scale, scale);
int wp = (p->curr_weapon == HANDREMOTE_WEAPON) ? HANDBOMB_WEAPON : p->curr_weapon; int wp = (p->curr_weapon == HANDREMOTE_WEAPON) ? HANDBOMB_WEAPON : p->curr_weapon;
format.Format("%d", p->ammo_amount[wp]); format.Format("%d", p->ammo_amount[wp]);
SBar_DrawString(this, &digiFont, format, 57, -digiFont.mFont->GetHeight() * scale - 7, DI_TEXT_ALIGN_CENTER, CR_UNTRANSLATED, 1, 0, 0, scale, scale); SBar_DrawString(this, &digiFont, format, 57, -digiFont.mFont->GetHeight() * scale - 7, DI_TEXT_ALIGN_CENTER, CR_UNTRANSLATED, 1, 0, 0, scale, scale);
@ -562,7 +562,7 @@ public:
if (icon > 0) if (icon > 0)
{ {
int x = 81; int x = 81;
DrawGraphic(tileGetTexture(INVENTORYBOX), 77, -2, DI_ITEM_LEFT_BOTTOM, 1, -1, -1, scale, scale); DrawGraphic(tileGetTexture(TILE_INVENTORYBOX), 77, -2, DI_ITEM_LEFT_BOTTOM, 1, -1, -1, scale, scale);
if (icon < ICON_MAX) if (icon < ICON_MAX)
DrawGraphic(tileGetTexture(item_icons[icon]), x, -14, DI_ITEM_LEFT | DI_ITEM_VCENTER, 1, -1, -1, scale, scale); DrawGraphic(tileGetTexture(item_icons[icon]), x, -14, DI_ITEM_LEFT | DI_ITEM_VCENTER, 1, -1, -1, scale, scale);
@ -664,15 +664,15 @@ public:
format.Format("%3d/%d", num1, num2); format.Format("%3d/%d", num1, num2);
} }
y--; y--;
DrawGraphic(tileGetTexture(THREEBYFIVE + index), x - 7, y, DI_ITEM_LEFT|DI_ITEM_VCENTER, 1, 0, 0, 1, 1, LightForShade(shade - 10), TRANSLATION(Translation_Remap, 7)); DrawGraphic(tileGetTexture(TILE_THREEBYFIVE + index), x - 7, y, DI_ITEM_LEFT|DI_ITEM_VCENTER, 1, 0, 0, 1, 1, LightForShade(shade - 10), TRANSLATION(Translation_Remap, 7));
auto pe = LightForShade(shade); auto pe = LightForShade(shade);
DrawGraphic(tileGetTexture(THREEBYFIVE + 10), x - 3, y, DI_ITEM_LEFT | DI_ITEM_VCENTER, 1, 0, 0, 1, 1, pe); DrawGraphic(tileGetTexture(TILE_THREEBYFIVE + 10), x - 3, y, DI_ITEM_LEFT | DI_ITEM_VCENTER, 1, 0, 0, 1, 1, pe);
for (size_t i = 0; i < format.Len(); i++) for (size_t i = 0; i < format.Len(); i++)
{ {
if (format[i] != ' ') if (format[i] != ' ')
{ {
char c = format[i] == '/' ? 11 : format[i] - '0'; char c = format[i] == '/' ? 11 : format[i] - '0';
DrawGraphic(tileGetTexture(THREEBYFIVE + c), x + 4 * i, y, DI_ITEM_LEFT | DI_ITEM_VCENTER, 1, 0, 0, 1, 1, pe); DrawGraphic(tileGetTexture(TILE_THREEBYFIVE + c), x + 4 * i, y, DI_ITEM_LEFT | DI_ITEM_VCENTER, 1, 0, 0, 1, 1, pe);
} }
} }
} }
@ -716,23 +716,23 @@ public:
void Statusbar(int32_t snum) void Statusbar(int32_t snum)
{ {
auto p = g_player[snum].ps; auto p = g_player[snum].ps;
int h = tilesiz[BOTTOMSTATUSBAR].y; int h = tilesiz[TILE_BOTTOMSTATUSBAR].y;
int top = 200 - h; int top = 200 - h;
BeginStatusBar(320, 200, h, true); BeginStatusBar(320, 200, h, true);
DrawInventory(p, 160, 154, 0); DrawInventory(p, 160, 154, 0);
DrawGraphic(tileGetTexture(BOTTOMSTATUSBAR), 0, top, DI_ITEM_LEFT_TOP, 1, -1, -1, 1, 1); DrawGraphic(tileGetTexture(TILE_BOTTOMSTATUSBAR), 0, top, DI_ITEM_LEFT_TOP, 1, -1, -1, 1, 1);
FString format; FString format;
if ((g_netServer || ud.multimode > 1) && (g_gametypeFlags[ud.coop] & GAMETYPE_FRAGBAR)) if ((g_netServer || ud.multimode > 1) && (g_gametypeFlags[ud.coop] & GAMETYPE_FRAGBAR))
{ {
DrawGraphic(tileGetTexture(KILLSICON), 228, top + 8, DI_ITEM_OFFSETS, 1, 0, 0, 1, 1); DrawGraphic(tileGetTexture(TILE_KILLSICON), 228, top + 8, DI_ITEM_OFFSETS, 1, 0, 0, 1, 1);
format.Format("%d", max(p->frag - p->fraggedself, 0)); format.Format("%d", max(p->frag - p->fraggedself, 0));
SBar_DrawString(this, &digiFont, format, 287, top + 17, DI_TEXT_ALIGN_CENTER, CR_UNTRANSLATED, 1, 0, 0, 1, 1); SBar_DrawString(this, &digiFont, format, 287, top + 17, DI_TEXT_ALIGN_CENTER, CR_UNTRANSLATED, 1, 0, 0, 1, 1);
} }
else else
{ {
auto key = tileGetTexture(ACCESS_ICON); auto key = tileGetTexture(TILE_ACCESS_ICON);
if (p->got_access & 4) DrawGraphic(key, 275, top + 16, DI_ITEM_OFFSETS, 1, -1, -1, 1, 1, 0xffffffff, TRANSLATION(Translation_Remap, 23)); if (p->got_access & 4) DrawGraphic(key, 275, top + 16, DI_ITEM_OFFSETS, 1, -1, -1, 1, 1, 0xffffffff, TRANSLATION(Translation_Remap, 23));
if (p->got_access & 2) DrawGraphic(key, 288, top + 16, DI_ITEM_OFFSETS, 1, -1, -1, 1, 1, 0xffffffff, TRANSLATION(Translation_Remap, 21)); if (p->got_access & 2) DrawGraphic(key, 288, top + 16, DI_ITEM_OFFSETS, 1, -1, -1, 1, 1, 0xffffffff, TRANSLATION(Translation_Remap, 21));
if (p->got_access & 1) DrawGraphic(key, 281, top + 23, DI_ITEM_OFFSETS, 1, -1, -1, 1, 1, 0xffffffff, TRANSLATION(Translation_Remap, 0)); if (p->got_access & 1) DrawGraphic(key, 281, top + 23, DI_ITEM_OFFSETS, 1, -1, -1, 1, 1, 0xffffffff, TRANSLATION(Translation_Remap, 0));
@ -780,20 +780,20 @@ public:
{ {
double sbscale = 32800. / 65536.; double sbscale = 32800. / 65536.;
DrawGraphic(tileGetTexture(WEAPONBAR), 0, 158, DI_ITEM_OFFSETS, 1, 0, 0, sbscale, sbscale); DrawGraphic(tileGetTexture(TILE_WEAPONBAR), 0, 158, DI_ITEM_OFFSETS, 1, 0, 0, sbscale, sbscale);
FString format; FString format;
for (int i = 0; i < 9; i++) for (int i = 0; i < 9; i++)
{ {
if ((g_gameType & GAMEFLAG_RRRA) && i == 4 && p->curr_weapon == CHICKEN_WEAPON) if ((g_gameType & GAMEFLAG_RRRA) && i == 4 && p->curr_weapon == CHICKEN_WEAPON)
{ {
DrawGraphic(tileGetTexture(AMMO_ICON + 10), 18 + i * 32, top - 6, DI_ITEM_OFFSETS, 1, 0, 0, sbscale, sbscale); DrawGraphic(tileGetTexture(TILE_AMMO_ICON + 10), 18 + i * 32, top - 6, DI_ITEM_OFFSETS, 1, 0, 0, sbscale, sbscale);
format.Format("%d", p->ammo_amount[CHICKEN_WEAPON]); format.Format("%d", p->ammo_amount[CHICKEN_WEAPON]);
} }
else else
{ {
if (p->gotweapon & (1 << (i + 1))) { if (p->gotweapon & (1 << (i + 1))) {
DrawGraphic(tileGetTexture(AMMO_ICON + i), 18 + i * 32, top - 6, DI_ITEM_OFFSETS, 1, 0, 0, sbscale, sbscale); DrawGraphic(tileGetTexture(TILE_AMMO_ICON + i), 18 + i * 32, top - 6, DI_ITEM_OFFSETS, 1, 0, 0, sbscale, sbscale);
} }
format.Format("%d", p->ammo_amount[i+1]); format.Format("%d", p->ammo_amount[i+1]);
} }
@ -811,7 +811,7 @@ public:
void StatusbarRR(int32_t snum) void StatusbarRR(int32_t snum)
{ {
auto p = g_player[snum].ps; auto p = g_player[snum].ps;
double h = tilesiz[BOTTOMSTATUSBAR].y * scale; double h = tilesiz[TILE_BOTTOMSTATUSBAR].y * scale;
double top = 200 - h; double top = 200 - h;
BeginStatusBar(320, 200, h, true); BeginStatusBar(320, 200, h, true);
DrawInventory(p, 160, 154, 0); DrawInventory(p, 160, 154, 0);
@ -819,19 +819,19 @@ public:
if (ud.screen_size > 8) if (ud.screen_size > 8)
DrawWeaponBar(p, top); DrawWeaponBar(p, top);
DrawGraphic(tileGetTexture(BOTTOMSTATUSBAR), 0, top, DI_ITEM_LEFT_TOP, 1, -1, -1, scale, scale); DrawGraphic(tileGetTexture(TILE_BOTTOMSTATUSBAR), 0, top, DI_ITEM_LEFT_TOP, 1, -1, -1, scale, scale);
FString format; FString format;
if ((g_netServer || ud.multimode > 1) && (g_gametypeFlags[ud.coop] & GAMETYPE_FRAGBAR)) if ((g_netServer || ud.multimode > 1) && (g_gametypeFlags[ud.coop] & GAMETYPE_FRAGBAR))
{ {
DrawGraphic(tileGetTexture(KILLSICON), 228, top + 8, DI_ITEM_OFFSETS, 1, 0, 0, 1, 1); DrawGraphic(tileGetTexture(TILE_KILLSICON), 228, top + 8, DI_ITEM_OFFSETS, 1, 0, 0, 1, 1);
format.Format("%d", max(p->frag - p->fraggedself, 0)); format.Format("%d", max(p->frag - p->fraggedself, 0));
SBar_DrawString(this, &digiFont, format, 287, top + 17, DI_TEXT_ALIGN_CENTER, CR_UNTRANSLATED, 1, 0, 0, scale, scale); SBar_DrawString(this, &digiFont, format, 287, top + 17, DI_TEXT_ALIGN_CENTER, CR_UNTRANSLATED, 1, 0, 0, scale, scale);
} }
else else
{ {
auto key = tileGetTexture(ACCESS_ICON); auto key = tileGetTexture(TILE_ACCESS_ICON);
if (p->keys[3]) DrawGraphic(key, 140, top + 16, DI_ITEM_OFFSETS, 1, -1, -1, scale, scale, 0xffffffff, TRANSLATION(Translation_Remap, 23)); if (p->keys[3]) DrawGraphic(key, 140, top + 16, DI_ITEM_OFFSETS, 1, -1, -1, scale, scale, 0xffffffff, TRANSLATION(Translation_Remap, 23));
if (p->keys[2]) DrawGraphic(key, 153, top + 16, DI_ITEM_OFFSETS, 1, -1, -1, scale, scale, 0xffffffff, TRANSLATION(Translation_Remap, 21)); if (p->keys[2]) DrawGraphic(key, 153, top + 16, DI_ITEM_OFFSETS, 1, -1, -1, scale, scale, 0xffffffff, TRANSLATION(Translation_Remap, 21));
if (p->keys[1]) DrawGraphic(key, 146, top + 23, DI_ITEM_OFFSETS, 1, -1, -1, scale, scale, 0xffffffff, TRANSLATION(Translation_Remap, 0)); if (p->keys[1]) DrawGraphic(key, 146, top + 23, DI_ITEM_OFFSETS, 1, -1, -1, scale, scale, 0xffffffff, TRANSLATION(Translation_Remap, 0));
@ -870,41 +870,41 @@ public:
p->drink_amt = 100; p->drink_amt = 100;
p->drink_ang = 400; p->drink_ang = 400;
} }
DrawGraphic(tileGetTexture(GUTMETER), 257, top + 24, DI_ITEM_BOTTOM, 1, -1, -1, scale, scale, 0xffffffff, 0 /*, p->drink_ang * 360. / 2048 */ ); DrawGraphic(tileGetTexture(TILE_GUTMETER), 257, top + 24, DI_ITEM_BOTTOM, 1, -1, -1, scale, scale, 0xffffffff, 0 /*, p->drink_ang * 360. / 2048 */ );
DrawGraphic(tileGetTexture(GUTMETER), 293, top + 24, DI_ITEM_BOTTOM, 1, -1, -1, scale, scale, 0xffffffff, 0 /*, p->eat_ang * 360. / 2048 */); DrawGraphic(tileGetTexture(TILE_GUTMETER), 293, top + 24, DI_ITEM_BOTTOM, 1, -1, -1, scale, scale, 0xffffffff, 0 /*, p->eat_ang * 360. / 2048 */);
if (p->drink_amt >= 0 && p->drink_amt <= 30) if (p->drink_amt >= 0 && p->drink_amt <= 30)
{ {
DrawGraphic(tileGetTexture(GUTMETER_LIGHT1), 239, top + 24, DI_ITEM_OFFSETS, 1, -1, -1, scale, scale); DrawGraphic(tileGetTexture(TILE_GUTMETER_LIGHT1), 239, top + 24, DI_ITEM_OFFSETS, 1, -1, -1, scale, scale);
} }
else if (p->drink_amt >= 31 && p->drink_amt <= 65) else if (p->drink_amt >= 31 && p->drink_amt <= 65)
{ {
DrawGraphic(tileGetTexture(GUTMETER_LIGHT2), 248, top + 24, DI_ITEM_OFFSETS, 1, -1, -1, scale, scale); DrawGraphic(tileGetTexture(TILE_GUTMETER_LIGHT2), 248, top + 24, DI_ITEM_OFFSETS, 1, -1, -1, scale, scale);
} }
else if (p->drink_amt >= 66 && p->drink_amt <= 87) else if (p->drink_amt >= 66 && p->drink_amt <= 87)
{ {
DrawGraphic(tileGetTexture(GUTMETER_LIGHT3), 256, top + 24, DI_ITEM_OFFSETS, 1, -1, -1, scale, scale); DrawGraphic(tileGetTexture(TILE_GUTMETER_LIGHT3), 256, top + 24, DI_ITEM_OFFSETS, 1, -1, -1, scale, scale);
} }
else else
{ {
DrawGraphic(tileGetTexture(GUTMETER_LIGHT4), 265, top + 24, DI_ITEM_OFFSETS, 1, -1, -1, scale, scale); DrawGraphic(tileGetTexture(TILE_GUTMETER_LIGHT4), 265, top + 24, DI_ITEM_OFFSETS, 1, -1, -1, scale, scale);
} }
if (p->eat_amt >= 0 && p->eat_amt <= 30) if (p->eat_amt >= 0 && p->eat_amt <= 30)
{ {
DrawGraphic(tileGetTexture(GUTMETER_LIGHT1), 276, top + 24, DI_ITEM_OFFSETS, 1, -1, -1, scale, scale); DrawGraphic(tileGetTexture(TILE_GUTMETER_LIGHT1), 276, top + 24, DI_ITEM_OFFSETS, 1, -1, -1, scale, scale);
} }
else if (p->eat_amt >= 31 && p->eat_amt <= 65) else if (p->eat_amt >= 31 && p->eat_amt <= 65)
{ {
DrawGraphic(tileGetTexture(GUTMETER_LIGHT2), 285, top + 24, DI_ITEM_OFFSETS, 1, -1, -1, scale, scale); DrawGraphic(tileGetTexture(TILE_GUTMETER_LIGHT2), 285, top + 24, DI_ITEM_OFFSETS, 1, -1, -1, scale, scale);
} }
else if (p->eat_amt >= 66 && p->eat_amt <= 87) else if (p->eat_amt >= 66 && p->eat_amt <= 87)
{ {
DrawGraphic(tileGetTexture(GUTMETER_LIGHT3), 294, top + 24, DI_ITEM_OFFSETS, 1, -1, -1, scale, scale); DrawGraphic(tileGetTexture(TILE_GUTMETER_LIGHT3), 294, top + 24, DI_ITEM_OFFSETS, 1, -1, -1, scale, scale);
} }
else else
{ {
DrawGraphic(tileGetTexture(GUTMETER_LIGHT4), 302, top + 24, DI_ITEM_OFFSETS, 1, -1, -1, scale, scale); DrawGraphic(tileGetTexture(TILE_GUTMETER_LIGHT4), 302, top + 24, DI_ITEM_OFFSETS, 1, -1, -1, scale, scale);
} }
} }
@ -940,7 +940,7 @@ void G_DrawBackground(void)
if ((g_player[myconnectindex].ps->gm&MODE_GAME) == 0 && ud.recstat != 2) if ((g_player[myconnectindex].ps->gm&MODE_GAME) == 0 && ud.recstat != 2)
{ {
twod->ClearScreen(); twod->ClearScreen();
auto tex = tileGetTexture((g_gameType & GAMEFLAG_DEER) ? 7040 : MENUSCREEN); auto tex = tileGetTexture((g_gameType & GAMEFLAG_DEER) ? 7040 : TILE_MENUSCREEN);
PalEntry color = (g_gameType & GAMEFLAG_DEER) ? 0xffffffff : 0xff808080; PalEntry color = (g_gameType & GAMEFLAG_DEER) ? 0xffffffff : 0xff808080;
if (!hud_bgstretch) if (!hud_bgstretch)
DrawTexture(twod, tex, 0, 0, DTA_FullscreenEx, 3, DTA_Color, color, TAG_DONE); DrawTexture(twod, tex, 0, 0, DTA_FullscreenEx, 3, DTA_Color, color, TAG_DONE);
@ -949,7 +949,7 @@ void G_DrawBackground(void)
return; return;
} }
auto tex = tileGetTexture((g_gameType & GAMEFLAG_RRRA) ? RRTILE7629 : BIGHOLE); auto tex = tileGetTexture((g_gameType & GAMEFLAG_RRRA) ? TILE_RRTILE7629 : TILE_BIGHOLE);
if (tex != nullptr && tex->isValid()) if (tex != nullptr && tex->isValid())
{ {
if (windowxy1.y > 0) if (windowxy1.y > 0)
@ -968,8 +968,8 @@ void G_DrawBackground(void)
{ {
twod->AddFlatFill(windowxy2.x + 1, windowxy1.y, twod->GetWidth(), windowxy2.y + 1, tex, false, 1); twod->AddFlatFill(windowxy2.x + 1, windowxy1.y, twod->GetWidth(), windowxy2.y + 1, tex, false, 1);
} }
auto vb = tileGetTexture(VIEWBORDER); auto vb = tileGetTexture(TILE_VIEWBORDER);
auto ve = tileGetTexture(VIEWBORDER + 1); auto ve = tileGetTexture(TILE_VIEWBORDER + 1);
int x1 = windowxy1.x - 4; int x1 = windowxy1.x - 4;
int y1 = windowxy1.y - 4; int y1 = windowxy1.y - 4;
int x2 = windowxy2.x + 5; int x2 = windowxy2.x + 5;

View file

@ -192,13 +192,13 @@ static void G_DrawCameraText(int16_t i)
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, TILE_CAMCORNER, 0, 0, 2);
rotatesprite_win((320-26)<<16, 34<<16, 65536L, 0, CAMCORNER+1, 0, 0, 2); rotatesprite_win((320-26)<<16, 34<<16, 65536L, 0, TILE_CAMCORNER+1, 0, 0, 2);
rotatesprite_win(22<<16, 163<<16, 65536L, 512, CAMCORNER+1, 0, 0, 2+4); rotatesprite_win(22<<16, 163<<16, 65536L, 512, TILE_CAMCORNER+1, 0, 0, 2+4);
rotatesprite_win((310-10)<<16, 163<<16, 65536L, 512, CAMCORNER+1, 0, 0, 2); rotatesprite_win((310-10)<<16, 163<<16, 65536L, 512, TILE_CAMCORNER+1, 0, 0, 2);
if ((int32_t) totalclock&16) if ((int32_t) totalclock&16)
rotatesprite_win(46<<16, 32<<16, 65536L, 0, CAMLIGHT, 0, 0, 2); rotatesprite_win(46<<16, 32<<16, 65536L, 0, TILE_CAMLIGHT, 0, 0, 2);
} }
else else
{ {
@ -206,7 +206,7 @@ static void G_DrawCameraText(int16_t i)
for (bssize_t x=-64; x<394; x+=64) for (bssize_t x=-64; x<394; x+=64)
for (bssize_t y=0; y<200; y+=64) for (bssize_t y=0; y<200; y+=64)
rotatesprite_win(x<<16, y<<16, 65536L, 0, STATIC, 0, 0, 2+flipbits); rotatesprite_win(x<<16, y<<16, 65536L, 0, TILE_STATIC, 0, 0, 2+flipbits);
} }
} }
@ -332,7 +332,7 @@ static void G_DrawOverheadMap(int32_t cposx, int32_t cposy, int32_t czoom, int16
break; break;
case 16: case 16:
if (spr->picnum == LASERLINE) if (spr->picnum == TILE_LASERLINE)
{ {
x1 = sprx; x1 = sprx;
y1 = spry; y1 = spry;
@ -497,9 +497,9 @@ static void G_DrawOverheadMap(int32_t cposx, int32_t cposy, int32_t czoom, int16
if (p == screenpeek || GTFLAGS(GAMETYPE_OTHERPLAYERSINMAP)) if (p == screenpeek || GTFLAGS(GAMETYPE_OTHERPLAYERSINMAP))
{ {
if (pSprite->xvel > 16 && pPlayer->on_ground) if (pSprite->xvel > 16 && pPlayer->on_ground)
i = APLAYERTOP+(((int32_t) totalclock>>4)&3); i = TILE_APLAYERTOP+(((int32_t) totalclock>>4)&3);
else else
i = APLAYERTOP; i = TILE_APLAYERTOP;
//i = VM_OnEventWithReturn(EVENT_DISPLAYOVERHEADMAPPLAYER, pPlayer->i, p, i); //i = VM_OnEventWithReturn(EVENT_DISPLAYOVERHEADMAPPLAYER, pPlayer->i, p, i);
@ -842,10 +842,10 @@ 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 = TILE_CROSSHAIR;
//ud.returnvar[0] = (160<<16) - (g_player[myconnectindex].ps->look_ang<<15); //ud.returnvar[0] = (160<<16) - (g_player[myconnectindex].ps->look_ang<<15);
//ud.returnvar[1] = 100<<16; //ud.returnvar[1] = 100<<16;
//int32_t a = VM_OnEventWithReturn(EVENT_DISPLAYCROSSHAIR, g_player[screenpeek].ps->i, screenpeek, CROSSHAIR); //int32_t a = VM_OnEventWithReturn(EVENT_DISPLAYCROSSHAIR, g_player[screenpeek].ps->i, screenpeek, TILE_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 };
@ -885,14 +885,14 @@ void G_DisplayRest(int32_t smoothratio)
if (ud.screen_size == 4) if (ud.screen_size == 4)
{ {
if (ud.althud == 0 || hud_position == 0) if (ud.althud == 0 || hud_position == 0)
i -= sbarsc(ud.althud ? ((tilesiz[BIGALPHANUM].y<<sbarshift)+(8<<16)) : tilesiz[INVENTORYBOX].y<<sbarshift); i -= sbarsc(ud.althud ? ((tilesiz[TILE_BIGALPHANUM].y<<sbarshift)+(8<<16)) : tilesiz[TILE_INVENTORYBOX].y<<sbarshift);
} }
else if (RR && ud.screen_size == 12) else if (RR && ud.screen_size == 12)
{ {
i -= sbarsc((tilesiz[BOTTOMSTATUSBAR].y+tilesiz[WEAPONBAR].y)<<sbarshift); i -= sbarsc((tilesiz[TILE_BOTTOMSTATUSBAR].y+tilesiz[TILE_WEAPONBAR].y)<<sbarshift);
} }
else if (ud.screen_size > 2) else if (ud.screen_size > 2)
i -= sbarsc(tilesiz[BOTTOMSTATUSBAR].y<<sbarshift); i -= sbarsc(tilesiz[TILE_BOTTOMSTATUSBAR].y<<sbarshift);
int32_t const xbetween = (tilesiz[MF_Bluefont.tilenum + 'A' - '!'].x<<16) + MF_Bluefont.between.x; int32_t const xbetween = (tilesiz[MF_Bluefont.tilenum + 'A' - '!'].x<<16) + MF_Bluefont.between.x;
@ -939,7 +939,7 @@ void G_DisplayRest(int32_t smoothratio)
if (VOLUMEONE) if (VOLUMEONE)
{ {
if (g_showShareware > 0 && (g_player[myconnectindex].ps->gm&MODE_MENU) == 0) if (g_showShareware > 0 && (g_player[myconnectindex].ps->gm&MODE_MENU) == 0)
rotatesprite_fs((320-50)<<16, 9<<16, 65536L, 0, BETAVERSION, 0, 0, 2+8+16+128); rotatesprite_fs((320-50)<<16, 9<<16, 65536L, 0, TILE_BETAVERSION, 0, 0, 2+8+16+128);
} }
#endif #endif
@ -1071,12 +1071,12 @@ void G_DisplayExtraScreens(void)
fadepal(0, 0, 0, 0, 252, 28); fadepal(0, 0, 0, 0, 252, 28);
inputState.ClearAllInput(); inputState.ClearAllInput();
totalclock = 0; totalclock = 0;
rotatesprite_fs(160<<16, 100<<16, 65536L, 0, TENSCREEN, 0, 0, 2+8+64+BGSTRETCH); rotatesprite_fs(160<<16, 100<<16, 65536L, 0, TILE_TENSCREEN, 0, 0, 2+8+64+BGSTRETCH);
fadepaltile(0, 0, 0, 252, 0, -28, TENSCREEN, BASEPAL); fadepaltile(0, 0, 0, 252, 0, -28, TILE_TENSCREEN, BASEPAL);
while (!inputState.CheckAllInput() && totalclock < 2400) while (!inputState.CheckAllInput() && totalclock < 2400)
G_HandleAsync(); G_HandleAsync();
fadepaltile(0, 0, 0, 0, 252, 28, TENSCREEN, BASEPAL); fadepaltile(0, 0, 0, 0, 252, 28, TILE_TENSCREEN, BASEPAL);
inputState.ClearAllInput(); inputState.ClearAllInput();
} }
} }
@ -1286,9 +1286,9 @@ void G_DisplayLogo(void)
fadepal(0, 0, 0, 0, 252, 28); fadepal(0, 0, 0, 0, 252, 28);
renderFlushPerms(); renderFlushPerms();
rotatesprite_fs(160 << 16, 100 << 16, 65536L, 0, DREALMS, 0, 0, 2 + 8 + 64 + BGSTRETCH, nullptr, DREALMSPAL); rotatesprite_fs(160 << 16, 100 << 16, 65536L, 0, TILE_DREALMS, 0, 0, 2 + 8 + 64 + BGSTRETCH, nullptr, DREALMSPAL);
videoNextPage(); videoNextPage();
fadepaltile(0, 0, 0, 252, 0, -28, DREALMS, DREALMSPAL); fadepaltile(0, 0, 0, 252, 0, -28, TILE_DREALMS, DREALMSPAL);
totalclock = 0; totalclock = 0;
while (totalclock < (120 * 7) && !inputState.CheckAllInput()) while (totalclock < (120 * 7) && !inputState.CheckAllInput())
@ -1296,13 +1296,13 @@ void G_DisplayLogo(void)
if (G_FPSLimit()) if (G_FPSLimit())
{ {
videoClearScreen(0); videoClearScreen(0);
rotatesprite_fs(160 << 16, 100 << 16, 65536L, 0, DREALMS, 0, 0, 2 + 8 + 64 + BGSTRETCH, nullptr, DREALMSPAL); rotatesprite_fs(160 << 16, 100 << 16, 65536L, 0, TILE_DREALMS, 0, 0, 2 + 8 + 64 + BGSTRETCH, nullptr, DREALMSPAL);
G_HandleAsync(); G_HandleAsync();
videoNextPage(); videoNextPage();
} }
} }
fadepaltile(0, 0, 0, 0, 252, 28, DREALMS, DREALMSPAL); fadepaltile(0, 0, 0, 0, 252, 28, TILE_DREALMS, DREALMSPAL);
} }
} }
@ -1318,9 +1318,9 @@ void G_DisplayLogo(void)
//g_player[myconnectindex].ps->palette = titlepal; //g_player[myconnectindex].ps->palette = titlepal;
renderFlushPerms(); renderFlushPerms();
rotatesprite_fs(160<<16, 100<<16, 65536L, 0, BETASCREEN, 0, 0, 2+8+64+BGSTRETCH, nullptr, TITLEPAL); rotatesprite_fs(160<<16, 100<<16, 65536L, 0, TILE_BETASCREEN, 0, 0, 2+8+64+BGSTRETCH, nullptr, TITLEPAL);
inputState.keyFlushChars(); inputState.keyFlushChars();
fadepaltile(0, 0, 0, 252, 0, -28, BETASCREEN, TITLEPAL); fadepaltile(0, 0, 0, 252, 0, -28, TILE_BETASCREEN, TITLEPAL);
totalclock = 0; totalclock = 0;
while ( while (
@ -1330,7 +1330,7 @@ void G_DisplayLogo(void)
if (G_FPSLimit()) if (G_FPSLimit())
{ {
videoClearScreen(0); videoClearScreen(0);
rotatesprite_fs(160<<16, 100<<16, 65536L, 0, BETASCREEN, 0, 0, 2+8+64+BGSTRETCH, nullptr, TITLEPAL); rotatesprite_fs(160<<16, 100<<16, 65536L, 0, TILE_BETASCREEN, 0, 0, 2+8+64+BGSTRETCH, nullptr, TITLEPAL);
if (totalclock > 120 && totalclock < (120+60)) if (totalclock > 120 && totalclock < (120+60))
{ {
@ -1339,10 +1339,10 @@ void G_DisplayLogo(void)
soundanm++; soundanm++;
S_PlaySound(PIPEBOMB_EXPLODE, CHAN_AUTO, CHANF_UI); S_PlaySound(PIPEBOMB_EXPLODE, CHAN_AUTO, CHANF_UI);
} }
rotatesprite_fs(160<<16, 104<<16, ((int32_t) totalclock-120)<<10, 0, DUKENUKEM, 0, 0, 2+8, nullptr, TITLEPAL); rotatesprite_fs(160<<16, 104<<16, ((int32_t) totalclock-120)<<10, 0, TILE_DUKENUKEM, 0, 0, 2+8, nullptr, TITLEPAL);
} }
else if (totalclock >= (120+60)) else if (totalclock >= (120+60))
rotatesprite_fs(160<<16, (104)<<16, 60<<10, 0, DUKENUKEM, 0, 0, 2+8, nullptr, TITLEPAL); rotatesprite_fs(160<<16, (104)<<16, 60<<10, 0, TILE_DUKENUKEM, 0, 0, 2+8, nullptr, TITLEPAL);
if (totalclock > 220 && totalclock < (220+30)) if (totalclock > 220 && totalclock < (220+30))
{ {
@ -1352,18 +1352,18 @@ void G_DisplayLogo(void)
S_PlaySound(PIPEBOMB_EXPLODE, CHAN_AUTO, CHANF_UI); S_PlaySound(PIPEBOMB_EXPLODE, CHAN_AUTO, CHANF_UI);
} }
rotatesprite_fs(160<<16, (104)<<16, 60<<10, 0, DUKENUKEM, 0, 0, 2+8, nullptr, TITLEPAL); rotatesprite_fs(160<<16, (104)<<16, 60<<10, 0, TILE_DUKENUKEM, 0, 0, 2+8, nullptr, TITLEPAL);
rotatesprite_fs(160<<16, (129)<<16, ((int32_t) totalclock - 220)<<11, 0, THREEDEE, 0, 0, 2+8, nullptr, TITLEPAL); rotatesprite_fs(160<<16, (129)<<16, ((int32_t) totalclock - 220)<<11, 0, TILE_THREEDEE, 0, 0, 2+8, nullptr, TITLEPAL);
} }
else if (totalclock >= (220+30)) else if (totalclock >= (220+30))
rotatesprite_fs(160<<16, (129)<<16, 30<<11, 0, THREEDEE, 0, 0, 2+8, nullptr, TITLEPAL); rotatesprite_fs(160<<16, (129)<<16, 30<<11, 0, TILE_THREEDEE, 0, 0, 2+8, nullptr, TITLEPAL);
if (PLUTOPAK) if (PLUTOPAK)
{ {
// JBF 20030804 // JBF 20030804
if (totalclock >= 280 && totalclock < 395) if (totalclock >= 280 && totalclock < 395)
{ {
rotatesprite_fs(160<<16, (151)<<16, (410-(int32_t) totalclock)<<12, 0, PLUTOPAKSPRITE+1, (sintable[((int32_t) totalclock<<4)&2047]>>11), 0, 2+8, nullptr, TITLEPAL); rotatesprite_fs(160<<16, (151)<<16, (410-(int32_t) totalclock)<<12, 0, TILE_PLUTOPAKSPRITE+1, (sintable[((int32_t) totalclock<<4)&2047]>>11), 0, 2+8, nullptr, TITLEPAL);
if (soundanm == 2) if (soundanm == 2)
{ {
soundanm++; soundanm++;
@ -1377,7 +1377,7 @@ void G_DisplayLogo(void)
soundanm++; soundanm++;
S_PlaySound(PIPEBOMB_EXPLODE, CHAN_AUTO, CHANF_UI); S_PlaySound(PIPEBOMB_EXPLODE, CHAN_AUTO, CHANF_UI);
} }
rotatesprite_fs(160<<16, (151)<<16, 30<<11, 0, PLUTOPAKSPRITE+1, (sintable[((int32_t) totalclock<<4)&2047]>>11), 0, 2+8, nullptr, TITLEPAL); rotatesprite_fs(160<<16, (151)<<16, 30<<11, 0, TILE_PLUTOPAKSPRITE+1, (sintable[((int32_t) totalclock<<4)&2047]>>11), 0, 2+8, nullptr, TITLEPAL);
} }
} }
@ -1414,7 +1414,7 @@ void G_DoOrderScreen(void)
{ {
fadepal(0, 0, 0, 0, 252, 28); fadepal(0, 0, 0, 0, 252, 28);
inputState.ClearAllInput(); inputState.ClearAllInput();
rotatesprite_fs(160<<16, 100<<16, 65536L, 0, ORDERING+i, 0, 0, 2+8+64+BGSTRETCH); rotatesprite_fs(160<<16, 100<<16, 65536L, 0, TILE_ORDERING+i, 0, 0, 2+8+64+BGSTRETCH);
fadepal(0, 0, 0, 252, 0, -28); fadepal(0, 0, 0, 252, 0, -28);
while (!inputState.CheckAllInput()) while (!inputState.CheckAllInput())
G_HandleAsync(); G_HandleAsync();
@ -1449,7 +1449,7 @@ static void G_BonusCutscenes(void)
fadepal(0, 0, 0, 0, 252, 4); fadepal(0, 0, 0, 0, 252, 4);
inputState.ClearAllInput(); inputState.ClearAllInput();
P_SetGamePalette(g_player[myconnectindex].ps, BASEPAL, 0); P_SetGamePalette(g_player[myconnectindex].ps, BASEPAL, 0);
rotatesprite_fs(0, 0, 65536L, 0, TENSCREEN, 0, 0, 2+8+16+64+128+BGSTRETCH); rotatesprite_fs(0, 0, 65536L, 0, TILE_TENSCREEN, 0, 0, 2+8+16+64+128+BGSTRETCH);
videoNextPage(); videoNextPage();
fadepal(0, 0, 0, 252, 0, -4); fadepal(0, 0, 0, 252, 0, -4);
inputState.ClearAllInput(); inputState.ClearAllInput();
@ -1476,7 +1476,7 @@ static void G_BonusCutscenes(void)
videoSetViewableArea(0, 0, xdim-1, ydim-1); videoSetViewableArea(0, 0, xdim-1, ydim-1);
inputState.ClearAllInput(); inputState.ClearAllInput();
P_SetGamePalette(g_player[myconnectindex].ps, BASEPAL, 0); P_SetGamePalette(g_player[myconnectindex].ps, BASEPAL, 0);
rotatesprite_fs(0, 0, 65536L, 0, TENSCREEN, 0, 0, 2 + 8 + 16 + 64 + 128 + BGSTRETCH); rotatesprite_fs(0, 0, 65536L, 0, TILE_TENSCREEN, 0, 0, 2 + 8 + 16 + 64 + 128 + BGSTRETCH);
videoNextPage(); videoNextPage();
fadepal(0, 0, 0, 252, 0, -4); fadepal(0, 0, 0, 252, 0, -4);
inputState.ClearAllInput(); inputState.ClearAllInput();
@ -1497,17 +1497,17 @@ static void G_BonusCutscenes(void)
int32_t bonuscnt=0; int32_t bonuscnt=0;
int32_t const bossmove [] = int32_t const bossmove [] =
{ {
0, 120, VICTORY1+3, 86, 59, 0, 120, TILE_VICTORY1+3, 86, 59,
220, 260, VICTORY1+4, 86, 59, 220, 260, TILE_VICTORY1+4, 86, 59,
260, 290, VICTORY1+5, 86, 59, 260, 290, TILE_VICTORY1+5, 86, 59,
290, 320, VICTORY1+6, 86, 59, 290, 320, TILE_VICTORY1+6, 86, 59,
320, 350, VICTORY1+7, 86, 59, 320, 350, TILE_VICTORY1+7, 86, 59,
350, 380, VICTORY1+8, 86, 59, 350, 380, TILE_VICTORY1+8, 86, 59,
350, 380, VICTORY1+8, 86, 59 // duplicate row to alleviate overflow in the for loop below "boss" 350, 380, TILE_VICTORY1+8, 86, 59 // duplicate row to alleviate overflow in the for loop below "boss"
}; };
videoClearScreen(0L); videoClearScreen(0L);
rotatesprite_fs(0, 50<<16, 65536L, 0, VICTORY1, 0, 0, 2+8+16+64+128+BGSTRETCH, nullptr, ENDINGPAL); rotatesprite_fs(0, 50<<16, 65536L, 0, TILE_VICTORY1, 0, 0, 2+8+16+64+128+BGSTRETCH, nullptr, ENDINGPAL);
videoNextPage(); videoNextPage();
fadepal(0, 0, 0, 252, 0, -4); fadepal(0, 0, 0, 252, 0, -4);
@ -1519,7 +1519,7 @@ static void G_BonusCutscenes(void)
if (G_FPSLimit()) if (G_FPSLimit())
{ {
videoClearScreen(0L); videoClearScreen(0L);
rotatesprite_fs(0, 50 << 16, 65536L, 0, VICTORY1, 0, 0, 2 + 8 + 16 + 64 + 128 + BGSTRETCH, nullptr, ENDINGPAL); rotatesprite_fs(0, 50 << 16, 65536L, 0, TILE_VICTORY1, 0, 0, 2 + 8 + 16 + 64 + 128 + BGSTRETCH, nullptr, ENDINGPAL);
// boss // boss
if (totalclock > 390 && totalclock < 780) if (totalclock > 390 && totalclock < 780)
@ -1539,15 +1539,15 @@ static void G_BonusCutscenes(void)
{ {
int32_t const breathe [] = int32_t const breathe [] =
{ {
0, 30, VICTORY1+1, 176, 59, 0, 30, TILE_VICTORY1+1, 176, 59,
30, 60, VICTORY1+2, 176, 59, 30, 60, TILE_VICTORY1+2, 176, 59,
60, 90, VICTORY1+1, 176, 59, 60, 90, TILE_VICTORY1+1, 176, 59,
90, 120, 0, 176, 59 90, 120, 0, 176, 59
}; };
if (totalclock >= 750) if (totalclock >= 750)
{ {
rotatesprite_fs(86<<16, 59<<16, 65536L, 0, VICTORY1+8, 0, 0, 2+8+16+64+128+BGSTRETCH, nullptr, ENDINGPAL); rotatesprite_fs(86<<16, 59<<16, 65536L, 0, TILE_VICTORY1+8, 0, 0, 2+8+16+64+128+BGSTRETCH, nullptr, ENDINGPAL);
if (totalclock >= 750 && bonuscnt == 2) if (totalclock >= 750 && bonuscnt == 2)
{ {
S_PlaySound(DUKETALKTOBOSS, CHAN_AUTO, CHANF_UI); S_PlaySound(DUKETALKTOBOSS, CHAN_AUTO, CHANF_UI);
@ -1764,10 +1764,10 @@ static void G_DisplayMPResultsScreen(void)
{ {
int32_t i, y, t = 0; int32_t i, y, t = 0;
rotatesprite_fs(160<<16, 100<<16, 65536L, 0, MENUSCREEN, 16, 0, 2+8+64+BGSTRETCH); rotatesprite_fs(160<<16, 100<<16, 65536L, 0, TILE_MENUSCREEN, 16, 0, 2+8+64+BGSTRETCH);
rotatesprite_fs(160<<16, 34<<16, RR ? 23592L : 65536L, 0, INGAMEDUKETHREEDEE, 0, 0, 10); rotatesprite_fs(160<<16, 34<<16, RR ? 23592L : 65536L, 0, TILE_INGAMEDUKETHREEDEE, 0, 0, 10);
if (!RR && PLUTOPAK) // JBF 20030804 if (!RR && PLUTOPAK) // JBF 20030804
rotatesprite_fs((260)<<16, 36<<16, 65536L, 0, PLUTOPAKSPRITE+2, 0, 0, 2+8); rotatesprite_fs((260)<<16, 36<<16, 65536L, 0, TILE_PLUTOPAKSPRITE+2, 0, 0, 2+8);
gametext_center(58+(RR ? 0 : 2), GStrings("Multiplayer Totals")); gametext_center(58+(RR ? 0 : 2), GStrings("Multiplayer Totals"));
gametext_center(58+10, currentLevel->DisplayName()); gametext_center(58+10, currentLevel->DisplayName());
@ -1965,7 +1965,7 @@ void G_BonusScreen(int32_t bonusonly)
if (!RR) if (!RR)
{ {
gfx_offset = (ud.volume_number==1) ? 5 : 0; gfx_offset = (ud.volume_number==1) ? 5 : 0;
gfx_offset += BONUSSCREEN; gfx_offset += TILE_BONUSSCREEN;
rotatesprite_fs(160<<16, 100<<16, 65536L, 0, gfx_offset, 0, 0, 2+8+64+128+BGSTRETCH); rotatesprite_fs(160<<16, 100<<16, 65536L, 0, gfx_offset, 0, 0, 2+8+64+128+BGSTRETCH);
if (lastmapname) if (lastmapname)
@ -1978,14 +1978,14 @@ void G_BonusScreen(int32_t bonusonly)
} }
else else
{ {
gfx_offset = (ud.volume_number==0) ? RRTILE403 : RRTILE409; gfx_offset = (ud.volume_number==0) ? TILE_RRTILE403 : TILE_RRTILE409;
gfx_offset += ud.level_number-1; gfx_offset += ud.level_number-1;
if (g_lastLevel || g_vixenLevel) if (g_lastLevel || g_vixenLevel)
gfx_offset = RRTILE409+7; gfx_offset = TILE_RRTILE409+7;
if (boardfilename[0]) if (boardfilename[0])
gfx_offset = RRTILE403; gfx_offset = TILE_RRTILE403;
rotatesprite_fs(160<<16, 100<<16, 65536L, 0, gfx_offset, 0, 0, 2+8+64+128+BGSTRETCH); rotatesprite_fs(160<<16, 100<<16, 65536L, 0, gfx_offset, 0, 0, 2+8+64+128+BGSTRETCH);
if (lastmapname) if (lastmapname)
@ -2437,7 +2437,7 @@ void G_ShowMapFrame(void)
break; break;
} }
} }
rotatesprite_fs(160<<16,100<<16,65536L,0,RRTILE8624+frame,0,0,10+64+128); rotatesprite_fs(160<<16,100<<16,65536L,0,TILE_RRTILE8624+frame,0,0,10+64+128);
} }
void G_BonusScreenRRRA(int32_t bonusonly) void G_BonusScreenRRRA(int32_t bonusonly)
@ -2534,14 +2534,14 @@ void G_BonusScreenRRRA(int32_t bonusonly)
if (bonusonly || (g_netServer || ud.multimode > 1)) return; if (bonusonly || (g_netServer || ud.multimode > 1)) return;
gfx_offset = (ud.volume_number==0) ? RRTILE403 : RRTILE409; gfx_offset = (ud.volume_number==0) ? TILE_RRTILE403 : TILE_RRTILE409;
gfx_offset += ud.level_number-1; gfx_offset += ud.level_number-1;
if (g_lastLevel || g_vixenLevel) if (g_lastLevel || g_vixenLevel)
gfx_offset = RRTILE409+7; gfx_offset = TILE_RRTILE409+7;
if (boardfilename[0]) if (boardfilename[0])
gfx_offset = RRTILE403; gfx_offset = TILE_RRTILE403;
if (!showMap) if (!showMap)
rotatesprite_fs(160<<16, 100<<16, 65536L, 0, gfx_offset, 0, 0, 2+8+64+128+BGSTRETCH); rotatesprite_fs(160<<16, 100<<16, 65536L, 0, gfx_offset, 0, 0, 2+8+64+128+BGSTRETCH);
@ -2811,14 +2811,14 @@ void G_BonusScreenRRRA(int32_t bonusonly)
switch (((int32_t) totalclock >> 4) & 1) switch (((int32_t) totalclock >> 4) & 1)
{ {
case 0: case 0:
rotatesprite(0,0,65536,0,RRTILE8677,0,0,2+8+16+64+128,0,0,xdim-1,ydim-1); rotatesprite(0,0,65536,0,TILE_RRTILE8677,0,0,2+8+16+64+128,0,0,xdim-1,ydim-1);
videoNextPage(); videoNextPage();
G_FadePalette(0, 0, 0, 0); G_FadePalette(0, 0, 0, 0);
P_SetGamePalette(g_player[myconnectindex].ps, BASEPAL, 0); P_SetGamePalette(g_player[myconnectindex].ps, BASEPAL, 0);
Net_GetPackets(); Net_GetPackets();
break; break;
case 1: case 1:
rotatesprite(0,0,65536,0,RRTILE8677+1,0,0,2+8+16+64+128,0,0,xdim-1,ydim-1); rotatesprite(0,0,65536,0,TILE_RRTILE8677+1,0,0,2+8+16+64+128,0,0,xdim-1,ydim-1);
videoNextPage(); videoNextPage();
G_FadePalette(0, 0, 0, 0); G_FadePalette(0, 0, 0, 0);
P_SetGamePalette(g_player[myconnectindex].ps, BASEPAL, 0); P_SetGamePalette(g_player[myconnectindex].ps, BASEPAL, 0);

File diff suppressed because it is too large Load diff

View file

@ -140,12 +140,12 @@ void G_Thunder(void);
#define FORCEFIELD_CSTAT (64+16+4+1) #define FORCEFIELD_CSTAT (64+16+4+1)
// Returns W_FORCEFIELD if wall has a forcefield overpicnum, its overpicnum else. // Returns TILE_W_FORCEFIELD if wall has a forcefield overpicnum, its overpicnum else.
static inline int G_GetForcefieldPicnum(int wallNum) static inline int G_GetForcefieldPicnum(int wallNum)
{ {
int tileNum = wall[wallNum].overpicnum; int tileNum = wall[wallNum].overpicnum;
if (tileNum == W_FORCEFIELD + 1 || tileNum == W_FORCEFIELD + 2) if (tileNum == TILE_W_FORCEFIELD + 1 || tileNum == TILE_W_FORCEFIELD + 2)
tileNum = W_FORCEFIELD; tileNum = TILE_W_FORCEFIELD;
return tileNum; return tileNum;
} }

View file

@ -189,7 +189,7 @@ static int S_CalcDistAndAng(int spriteNum, int soundNum, int sectNum,
int userflags = snd ? snd[kFlags] : 0; int userflags = snd ? snd[kFlags] : 0;
int dist_adjust = snd ? snd[kVolAdjust] : 0; int dist_adjust = snd ? snd[kVolAdjust] : 0;
if (PN(spriteNum) != APLAYER || P_Get(spriteNum) != screenpeek) if (PN(spriteNum) != TILE_APLAYER || P_Get(spriteNum) != screenpeek)
{ {
orgsndist = sndist = FindDistance3D(cam->x - pos->x, cam->y - pos->y, (cam->z - pos->z)); orgsndist = sndist = FindDistance3D(cam->x - pos->x, cam->y - pos->y, (cam->z - pos->z));
@ -201,7 +201,7 @@ static int S_CalcDistAndAng(int spriteNum, int soundNum, int sectNum,
if (sndist < 0) if (sndist < 0)
sndist = 0; sndist = 0;
if (sectNum > -1 && sndist && PN(spriteNum) != MUSICANDSFX if (sectNum > -1 && sndist && PN(spriteNum) != TILE_MUSICANDSFX
&& !cansee(cam->x, cam->y, cam->z - (24 << 8), sectNum, SX(spriteNum), SY(spriteNum), SZ(spriteNum) - (24 << 8), SECT(spriteNum))) && !cansee(cam->x, cam->y, cam->z - (24 << 8), sectNum, SX(spriteNum), SY(spriteNum), SZ(spriteNum) - (24 << 8), SECT(spriteNum)))
sndist += sndist>>(RR?2:5); sndist += sndist>>(RR?2:5);
@ -377,7 +377,7 @@ int S_PlaySound3D(int sndnum, int spriteNum, const vec3_t* pos, int channel, ECh
// Duke talk // Duke talk
if (userflags & SF_TALK) if (userflags & SF_TALK)
{ {
if ((g_netServer || ud.multimode > 1) && PN(spriteNum) == APLAYER && P_Get(spriteNum) != screenpeek) // other player sound if ((g_netServer || ud.multimode > 1) && PN(spriteNum) == TILE_APLAYER && P_Get(spriteNum) != screenpeek) // other player sound
{ {
if ((snd_speech & 4) != 4) if ((snd_speech & 4) != 4)
return -1; return -1;
@ -425,7 +425,7 @@ int S_PlaySound3D(int sndnum, int spriteNum, const vec3_t* pos, int channel, ECh
} }
else else
{ {
if (sndist > 32767 && PN(spriteNum) != MUSICANDSFX && (userflags & (SF_LOOP | SF_MSFX)) == 0) if (sndist > 32767 && PN(spriteNum) != TILE_MUSICANDSFX && (userflags & (SF_LOOP | SF_MSFX)) == 0)
return -1; return -1;
if (pOther->cursectnum > -1 && sector[pOther->cursectnum].lotag == ST_2_UNDERWATER if (pOther->cursectnum > -1 && sector[pOther->cursectnum].lotag == ST_2_UNDERWATER
@ -434,7 +434,7 @@ int S_PlaySound3D(int sndnum, int spriteNum, const vec3_t* pos, int channel, ECh
} }
bool is_playing = soundEngine->GetSoundPlayingInfo(SOURCE_Any, nullptr, sndnum+1); bool is_playing = soundEngine->GetSoundPlayingInfo(SOURCE_Any, nullptr, sndnum+1);
if (is_playing && PN(spriteNum) != MUSICANDSFX) if (is_playing && PN(spriteNum) != TILE_MUSICANDSFX)
S_StopEnvSound(sndnum, spriteNum); S_StopEnvSound(sndnum, spriteNum);
int const repeatp = (userflags & SF_LOOP); int const repeatp = (userflags & SF_LOOP);

View file

@ -75,7 +75,7 @@ void S_PlayRRMusic(int newTrack = -1);
static inline bool S_IsAmbientSFX(int spriteNum) static inline bool S_IsAmbientSFX(int spriteNum)
{ {
return (sprite[spriteNum].picnum == MUSICANDSFX && sprite[spriteNum].lotag < 999); return (sprite[spriteNum].picnum == TILE_MUSICANDSFX && sprite[spriteNum].lotag < 999);
} }
END_DUKE_NS END_DUKE_NS

View file

@ -51,22 +51,22 @@ int GameInterface::GetStringTile(int font, const char* t, int f)
return font - (11 + offset); return font - (11 + offset);
break; break;
case '.': case '.':
return font + (BIGPERIOD - (BIGALPHANUM + offset)); return font + (TILE_BIGPERIOD - (TILE_BIGALPHANUM + offset));
break; break;
case ',': case ',':
return font + (BIGCOMMA - (BIGALPHANUM + offset)); return font + (TILE_BIGCOMMA - (TILE_BIGALPHANUM + offset));
break; break;
case '!': case '!':
return font + (BIGX_ - (BIGALPHANUM + offset)); return font + (TILE_BIGX_ - (TILE_BIGALPHANUM + offset));
break; break;
case '?': case '?':
return font + (BIGQ - (BIGALPHANUM + offset)); return font + (TILE_BIGQ - (TILE_BIGALPHANUM + offset));
break; break;
case ';': case ';':
return font + (BIGSEMI - (BIGALPHANUM + offset)); return font + (TILE_BIGSEMI - (TILE_BIGALPHANUM + offset));
break; break;
case ':': case ':':
return font + (BIGCOLIN - (BIGALPHANUM + offset)); return font + (TILE_BIGCOLIN - (TILE_BIGALPHANUM + offset));
break; break;
case '\\': case '\\':
case '/': case '/':
@ -78,7 +78,7 @@ int GameInterface::GetStringTile(int font, const char* t, int f)
case '`': case '`':
case '\"': // could be better hacked in case '\"': // could be better hacked in
case '\'': case '\'':
return font + (BIGAPPOS - (BIGALPHANUM + offset)); return font + (TILE_BIGAPPOS - (TILE_BIGALPHANUM + offset));
break; break;
default: // unknown character default: // unknown character
fallthrough__; fallthrough__;