Browse Source

Adust dFlag enums

pull/124/head
Anders Jenbo 7 years ago
parent
commit
565bb5aa7d
  1. 2
      Source/automap.cpp
  2. 32
      Source/cursor.cpp
  3. 4
      Source/debug.cpp
  4. 4
      Source/diablo.cpp
  5. 4
      Source/drlg_l2.cpp
  6. 8
      Source/gendung.cpp
  7. 2
      Source/items.cpp
  8. 14
      Source/lighting.cpp
  9. 4
      Source/loadsave.cpp
  10. 8
      Source/missiles.cpp
  11. 46
      Source/monster.cpp
  12. 2
      Source/msg.cpp
  13. 2
      Source/multi.cpp
  14. 6
      Source/objects.cpp
  15. 20
      Source/player.cpp
  16. 2
      Source/portal.cpp
  17. 44
      Source/scrollrt.cpp
  18. 4
      Source/themes.cpp
  19. 24
      Source/town.cpp
  20. 2
      Source/trigs.cpp
  21. 16
      enums.h

2
Source/automap.cpp

@ -102,7 +102,7 @@ void InitAutomap()
for (y = 0; y < MAXDUNY; y++) {
for (x = 0; x < MAXDUNX; x++)
dFlags[x][y] &= ~DFLAG_EXPLORED;
dFlags[x][y] &= ~BFLAG_EXPLORED;
}
}

32
Source/cursor.cpp

@ -291,7 +291,7 @@ void CheckCursMove()
if(leveltype != DTYPE_TOWN) {
if(pcurstemp != -1) {
if(!flipflag && dMonster[mx + 2][my + 1] != 0 && dFlags[mx + 2][my + 1] & DFLAG_LIT) {
if(!flipflag && dMonster[mx + 2][my + 1] != 0 && dFlags[mx + 2][my + 1] & BFLAG_LIT) {
mi = dMonster[mx + 2][my + 1] > 0 ? dMonster[mx + 2][my + 1] - 1 : -(dMonster[mx + 2][my + 1] + 1);
if(mi == pcurstemp && monster[mi]._mhitpoints >> 6 > 0 && monster[mi].MData->mSelFlag & 4) {
cursmx = mx + 1; /// BUGFIX: 'mx + 2'
@ -299,7 +299,7 @@ void CheckCursMove()
pcursmonst = mi;
}
}
if(flipflag && dMonster[mx + 1][my + 2] != 0 && dFlags[mx + 1][my + 2] & DFLAG_LIT) {
if(flipflag && dMonster[mx + 1][my + 2] != 0 && dFlags[mx + 1][my + 2] & BFLAG_LIT) {
mi = dMonster[mx + 1][my + 2] > 0 ? dMonster[mx + 1][my + 2] - 1 : -(dMonster[mx + 1][my + 2] + 1);
if(mi == pcurstemp && monster[mi]._mhitpoints >> 6 > 0 && monster[mi].MData->mSelFlag & 4) {
cursmx = mx + 1;
@ -307,7 +307,7 @@ void CheckCursMove()
pcursmonst = mi;
}
}
if(dMonster[mx + 2][my + 2] != 0 && dFlags[mx + 2][my + 2] & DFLAG_LIT) {
if(dMonster[mx + 2][my + 2] != 0 && dFlags[mx + 2][my + 2] & BFLAG_LIT) {
mi = dMonster[mx + 2][my + 2] > 0 ? dMonster[mx + 2][my + 2] - 1 : -(dMonster[mx + 2][my + 2] + 1);
if(mi == pcurstemp && monster[mi]._mhitpoints >> 6 > 0 && monster[mi].MData->mSelFlag & 4) {
cursmx = mx + 2;
@ -315,7 +315,7 @@ void CheckCursMove()
pcursmonst = mi;
}
}
if(!flipflag && dMonster[mx + 1][my] != 0 && dFlags[mx + 1][my] & DFLAG_LIT) {
if(!flipflag && dMonster[mx + 1][my] != 0 && dFlags[mx + 1][my] & BFLAG_LIT) {
mi = dMonster[mx + 1][my] > 0 ? dMonster[mx + 1][my] - 1 : -(dMonster[mx + 1][my] + 1);
if(mi == pcurstemp && monster[mi]._mhitpoints >> 6 > 0 && monster[mi].MData->mSelFlag & 2) {
cursmx = mx + 1;
@ -323,7 +323,7 @@ void CheckCursMove()
pcursmonst = mi;
}
}
if(flipflag && dMonster[mx][my + 1] != 0 && dFlags[mx][my + 1] & DFLAG_LIT) {
if(flipflag && dMonster[mx][my + 1] != 0 && dFlags[mx][my + 1] & BFLAG_LIT) {
mi = dMonster[mx][my + 1] > 0 ? dMonster[mx][my + 1] - 1 : -(dMonster[mx][my + 1] + 1);
if(mi == pcurstemp && monster[mi]._mhitpoints >> 6 > 0 && monster[mi].MData->mSelFlag & 2) {
cursmx = mx;
@ -331,7 +331,7 @@ void CheckCursMove()
pcursmonst = mi;
}
}
if(dMonster[mx][my] != 0 && dFlags[mx][my] & DFLAG_LIT) {
if(dMonster[mx][my] != 0 && dFlags[mx][my] & BFLAG_LIT) {
mi = dMonster[mx][my] > 0 ? dMonster[mx][my] - 1 : -(dMonster[mx][my] + 1);
if(mi == pcurstemp && monster[mi]._mhitpoints >> 6 > 0 && monster[mi].MData->mSelFlag & 1) {
cursmx = mx;
@ -339,7 +339,7 @@ void CheckCursMove()
pcursmonst = mi;
}
}
if(dMonster[mx + 1][my + 1] != 0 && dFlags[mx + 1][my + 1] & DFLAG_LIT) {
if(dMonster[mx + 1][my + 1] != 0 && dFlags[mx + 1][my + 1] & BFLAG_LIT) {
mi = dMonster[mx + 1][my + 1] > 0 ? dMonster[mx + 1][my + 1] - 1 : -(dMonster[mx + 1][my + 1] + 1);
if(mi == pcurstemp && monster[mi]._mhitpoints >> 6 > 0 && monster[mi].MData->mSelFlag & 2) {
cursmx = mx + 1;
@ -359,7 +359,7 @@ void CheckCursMove()
return;
}
}
if(!flipflag && dMonster[mx + 2][my + 1] != 0 && dFlags[mx + 2][my + 1] & DFLAG_LIT) {
if(!flipflag && dMonster[mx + 2][my + 1] != 0 && dFlags[mx + 2][my + 1] & BFLAG_LIT) {
mi = dMonster[mx + 2][my + 1] > 0 ? dMonster[mx + 2][my + 1] - 1 : -(dMonster[mx + 2][my + 1] + 1);
if(monster[mi]._mhitpoints >> 6 > 0 && monster[mi].MData->mSelFlag & 4) {
cursmx = mx + 2;
@ -367,7 +367,7 @@ void CheckCursMove()
pcursmonst = mi;
}
}
if(flipflag && dMonster[mx + 1][my + 2] != 0 && dFlags[mx + 1][my + 2] & DFLAG_LIT) {
if(flipflag && dMonster[mx + 1][my + 2] != 0 && dFlags[mx + 1][my + 2] & BFLAG_LIT) {
mi = dMonster[mx + 1][my + 2] > 0 ? dMonster[mx + 1][my + 2] - 1 : -(dMonster[mx + 1][my + 2] + 1);
if(monster[mi]._mhitpoints >> 6 > 0 && monster[mi].MData->mSelFlag & 4) {
cursmx = mx + 1;
@ -375,7 +375,7 @@ void CheckCursMove()
pcursmonst = mi;
}
}
if(dMonster[mx + 2][my + 2] != 0 && dFlags[mx + 2][my + 2] & DFLAG_LIT) {
if(dMonster[mx + 2][my + 2] != 0 && dFlags[mx + 2][my + 2] & BFLAG_LIT) {
mi = dMonster[mx + 2][my + 2] > 0 ? dMonster[mx + 2][my + 2] - 1 : -(dMonster[mx + 2][my + 2] + 1);
if(monster[mi]._mhitpoints >> 6 > 0 && monster[mi].MData->mSelFlag & 4) {
cursmx = mx + 2;
@ -383,7 +383,7 @@ void CheckCursMove()
pcursmonst = mi;
}
}
if(!flipflag && dMonster[mx + 1][my] != 0 && dFlags[mx + 1][my] & DFLAG_LIT) {
if(!flipflag && dMonster[mx + 1][my] != 0 && dFlags[mx + 1][my] & BFLAG_LIT) {
mi = dMonster[mx + 1][my] > 0 ? dMonster[mx + 1][my] - 1 : -(dMonster[mx + 1][my] + 1);
if(monster[mi]._mhitpoints >> 6 > 0 && monster[mi].MData->mSelFlag & 2) {
cursmx = mx + 1;
@ -391,7 +391,7 @@ void CheckCursMove()
pcursmonst = mi;
}
}
if(flipflag && dMonster[mx][my + 1] != 0 && dFlags[mx][my + 1] & DFLAG_LIT) {
if(flipflag && dMonster[mx][my + 1] != 0 && dFlags[mx][my + 1] & BFLAG_LIT) {
mi = dMonster[mx][my + 1] > 0 ? dMonster[mx][my + 1] - 1 : -(dMonster[mx][my + 1] + 1);
if(monster[mi]._mhitpoints >> 6 > 0 && monster[mi].MData->mSelFlag & 2) {
cursmx = mx;
@ -399,7 +399,7 @@ void CheckCursMove()
pcursmonst = mi;
}
}
if(dMonster[mx][my] != 0 && dFlags[mx][my] & DFLAG_LIT) {
if(dMonster[mx][my] != 0 && dFlags[mx][my] & BFLAG_LIT) {
mi = dMonster[mx][my] > 0 ? dMonster[mx][my] - 1 : -(dMonster[mx][my] + 1);
if(monster[mi]._mhitpoints >> 6 > 0 && monster[mi].MData->mSelFlag & 1) {
cursmx = mx;
@ -407,7 +407,7 @@ void CheckCursMove()
pcursmonst = mi;
}
}
if(dMonster[mx + 1][my + 1] != 0 && dFlags[mx + 1][my + 1] & DFLAG_LIT) {
if(dMonster[mx + 1][my + 1] != 0 && dFlags[mx + 1][my + 1] & BFLAG_LIT) {
mi = dMonster[mx + 1][my + 1] > 0 ? dMonster[mx + 1][my + 1] - 1 : -(dMonster[mx + 1][my + 1] + 1);
if(monster[mi]._mhitpoints >> 6 > 0 && monster[mi].MData->mSelFlag & 2) {
cursmx = mx + 1;
@ -474,7 +474,7 @@ void CheckCursMove()
pcursplr = bv;
}
}
if(dFlags[mx][my] & DFLAG_DEAD_PLAYER) {
if(dFlags[mx][my] & BFLAG_DEAD_PLAYER) {
for(i = 0; i < MAX_PLRS; i++) {
if(plr[i].WorldX == mx && plr[i].WorldY == my && i != myplr) {
cursmx = mx;
@ -486,7 +486,7 @@ void CheckCursMove()
if(pcurs == CURSOR_RESURRECT) {
for(xx = -1; xx < 2; xx++) {
for(yy = -1; yy < 2; yy++) {
if(dFlags[mx + xx][my + yy] & DFLAG_DEAD_PLAYER) {
if(dFlags[mx + xx][my + yy] & BFLAG_DEAD_PLAYER) {
for(i = 0; i < MAX_PLRS; i++) {
if(plr[i].WorldX == mx + xx && plr[i].WorldY == my + yy && i != myplr) {
cursmx = mx + xx;

4
Source/debug.cpp

@ -86,8 +86,8 @@ void CheckDungeonClear()
if (dPlayer[i][j])
app_fatal("Players not cleared");
dMonsDbg[currlevel][i][j] = dFlags[i][j] & DFLAG_VISIBLE;
dFlagDbg[currlevel][i][j] = dFlags[i][j] & DFLAG_POPULATED;
dMonsDbg[currlevel][i][j] = dFlags[i][j] & BFLAG_VISIBLE;
dFlagDbg[currlevel][i][j] = dFlags[i][j] & BFLAG_POPULATED;
}
}
}

4
Source/diablo.cpp

@ -1770,7 +1770,7 @@ void LoadGameLevel(BOOL firstflag, int lvldir)
} else {
for (i = 0; i < MAXDUNX; i++) {
for (j = 0; j < MAXDUNY; j++)
dFlags[i][j] |= DFLAG_LIT;
dFlags[i][j] |= BFLAG_LIT;
}
InitTowners();
@ -1836,7 +1836,7 @@ void LoadGameLevel(BOOL firstflag, int lvldir)
else
SyncInitPlrPos(i);
} else {
dFlags[plr[i].WorldX][plr[i].WorldY] |= DFLAG_DEAD_PLAYER;
dFlags[plr[i].WorldX][plr[i].WorldY] |= BFLAG_DEAD_PLAYER;
}
}
}

4
Source/drlg_l2.cpp

@ -353,7 +353,7 @@ void LoadL2Dungeon(char *sFileName, int vx, int vy)
for (i = 0; i < rw; i++) {
if (*lm != 0) {
dungeon[i][j] = *lm;
dflags[i][j] |= DFLAG_EXPLORED;
dflags[i][j] |= 0x80;
} else {
dungeon[i][j] = 3;
}
@ -528,7 +528,7 @@ void LoadPreL2Dungeon(char *sFileName, int vx, int vy)
for (i = 0; i < rw; i++) {
if (*lm != 0) {
dungeon[i][j] = *lm;
dflags[i][j] |= DFLAG_EXPLORED;
dflags[i][j] |= 0x80;
} else {
dungeon[i][j] = 3;
}

8
Source/gendung.cpp

@ -974,10 +974,10 @@ void DRLG_HoldThemeRooms()
for(x = themeLoc[i].x; x < themeLoc[i].x + themeLoc[i].width - 1; x++) {
xx = 2 * x + 16;
yy = 2 * y + 16;
dFlags[xx][yy] |= DFLAG_POPULATED;
dFlags[xx + 1][yy] |= DFLAG_POPULATED;
dFlags[xx][yy + 1] |= DFLAG_POPULATED;
dFlags[xx + 1][yy + 1] |= DFLAG_POPULATED;
dFlags[xx][yy] |= BFLAG_POPULATED;
dFlags[xx + 1][yy] |= BFLAG_POPULATED;
dFlags[xx][yy + 1] |= BFLAG_POPULATED;
dFlags[xx + 1][yy + 1] |= BFLAG_POPULATED;
}
}
}

2
Source/items.cpp

@ -206,7 +206,7 @@ BOOL ItemPlace(int xp, int yp)
return FALSE;
if (dObject[xp][yp])
return FALSE;
if (dFlags[xp][yp] & DFLAG_POPULATED)
if (dFlags[xp][yp] & BFLAG_POPULATED)
return FALSE;
if (nSolidTable[dPiece[xp][yp]])
return FALSE;

14
Source/lighting.cpp

@ -656,7 +656,7 @@ void DoUnVision(int nXPos, int nYPos, int nRadius)
for (i = x1; i < x2; i++) {
for (j = y1; j < y2; j++) {
dFlags[i][j] &= ~(DFLAG_VISIBLE | DFLAG_LIT);
dFlags[i][j] &= ~(BFLAG_VISIBLE | BFLAG_LIT);
}
}
}
@ -671,12 +671,12 @@ void DoVision(int nXPos, int nYPos, int nRadius, BOOL doautomap, BOOL visible)
if (dFlags[nXPos][nYPos] >= 0) {
SetAutomapView(nXPos, nXPos);
}
dFlags[nXPos][nYPos] |= DFLAG_EXPLORED;
dFlags[nXPos][nYPos] |= BFLAG_EXPLORED;
}
if (visible) {
dFlags[nXPos][nYPos] |= DFLAG_LIT;
dFlags[nXPos][nYPos] |= BFLAG_LIT;
}
dFlags[nXPos][nYPos] |= DFLAG_VISIBLE;
dFlags[nXPos][nYPos] |= BFLAG_VISIBLE;
}
for (v = 0; v < 4; v++) {
@ -730,12 +730,12 @@ void DoVision(int nXPos, int nYPos, int nRadius, BOOL doautomap, BOOL visible)
if (dFlags[nCrawlX][nCrawlY] >= 0) {
SetAutomapView(nCrawlX, nCrawlY);
}
dFlags[nCrawlX][nCrawlY] |= DFLAG_EXPLORED;
dFlags[nCrawlX][nCrawlY] |= BFLAG_EXPLORED;
}
if (visible) {
dFlags[nCrawlX][nCrawlY] |= DFLAG_LIT;
dFlags[nCrawlX][nCrawlY] |= BFLAG_LIT;
}
dFlags[nCrawlX][nCrawlY] |= DFLAG_VISIBLE;
dFlags[nCrawlX][nCrawlY] |= BFLAG_VISIBLE;
if (!nBlockerFlag) {
nTrans = dTransVal[nCrawlX][nCrawlY];
if (nTrans != 0) {

4
Source/loadsave.cpp

@ -356,7 +356,7 @@ void SaveGame()
}
for (j = 0; j < MAXDUNY; j++) {
for (i = 0; i < MAXDUNX; i++)
BSave(dFlags[i][j] & ~(DFLAG_MISSILE | DFLAG_VISIBLE | DFLAG_DEAD_PLAYER));
BSave(dFlags[i][j] & ~(BFLAG_MISSILE | BFLAG_VISIBLE | BFLAG_DEAD_PLAYER));
}
for (j = 0; j < MAXDUNY; j++) {
for (i = 0; i < MAXDUNX; i++)
@ -556,7 +556,7 @@ void SaveLevel()
for (j = 0; j < MAXDUNY; j++) {
for (i = 0; i < MAXDUNX; i++)
BSave(dFlags[i][j] & ~(DFLAG_MISSILE | DFLAG_VISIBLE | DFLAG_DEAD_PLAYER));
BSave(dFlags[i][j] & ~(BFLAG_MISSILE | BFLAG_VISIBLE | BFLAG_DEAD_PLAYER));
}
for (j = 0; j < MAXDUNY; j++) {
for (i = 0; i < MAXDUNX; i++)

8
Source/missiles.cpp

@ -384,7 +384,7 @@ void PutMissile(int i)
if (x <= 0 || y <= 0 || x >= MAXDUNX || y >= MAXDUNY)
missile[i]._miDelFlag = TRUE;
if (!missile[i]._miDelFlag) {
dFlags[x][y] |= DFLAG_MISSILE;
dFlags[x][y] |= BFLAG_MISSILE;
if (dMissile[x][y] == 0)
dMissile[x][y] = i + 1;
else
@ -1203,7 +1203,7 @@ void InitMissiles()
}
for (j = 0; j < MAXDUNY; j++) {
for (i = 0; i < MAXDUNX; i++) {
dFlags[i][j] &= ~DFLAG_MISSILE;
dFlags[i][j] &= ~BFLAG_MISSILE;
}
}
}
@ -4065,7 +4065,7 @@ void ProcessMissiles()
int i, mi;
for (i = 0; i < nummissiles; i++) {
dFlags[missile[missileactive[i]]._mix][missile[missileactive[i]]._miy] &= ~DFLAG_MISSILE;
dFlags[missile[missileactive[i]]._mix][missile[missileactive[i]]._miy] &= ~BFLAG_MISSILE;
dMissile[missile[missileactive[i]]._mix][missile[missileactive[i]]._miy] = 0;
}
@ -4146,6 +4146,6 @@ void missiles_process_charge()
void ClearMissileSpot(int mi)
{
dFlags[missile[mi]._mix][missile[mi]._miy] &= ~DFLAG_MISSILE;
dFlags[missile[mi]._mix][missile[mi]._miy] &= ~BFLAG_MISSILE;
dMissile[missile[mi]._mix][missile[mi]._miy] = 0;
}

46
Source/monster.cpp

@ -532,11 +532,11 @@ BOOL MonstPlace(int xp, int yp)
f = dFlags[xp][yp];
if (f & DFLAG_VISIBLE) {
if (f & BFLAG_VISIBLE) {
return FALSE;
}
if (f & DFLAG_POPULATED) {
if (f & BFLAG_POPULATED) {
return FALSE;
}
@ -1344,7 +1344,7 @@ void M_StartWalk3(int i, int xvel, int yvel, int xoff, int yoff, int xadd, int y
dMonster[fx][fy] = -(i + 1);
monster[i]._mVar4 = x;
monster[i]._mVar5 = y;
dFlags[x][y] |= DFLAG_MONSTER;
dFlags[x][y] |= BFLAG_MONSTLR;
monster[i]._moldx = monster[i]._mx;
monster[i]._moldy = monster[i]._my;
monster[i]._mfutx = fx;
@ -1462,9 +1462,9 @@ void M_ClearSquares(int i)
}
if (mx + 1 < MAXDUNX)
dFlags[mx + 1][my] &= ~DFLAG_MONSTER;
dFlags[mx + 1][my] &= ~BFLAG_MONSTLR;
if (my + 1 < MAXDUNY)
dFlags[mx][my + 1] &= ~DFLAG_MONSTER;
dFlags[mx][my + 1] &= ~BFLAG_MONSTLR;
}
void M_GetKnockback(int i)
@ -1965,7 +1965,7 @@ BOOL M_DoWalk3(int i)
dMonster[monster[i]._mx][monster[i]._my] = 0;
monster[i]._mx = monster[i]._mVar1;
monster[i]._my = monster[i]._mVar2;
dFlags[monster[i]._mVar4][monster[i]._mVar5] &= ~DFLAG_MONSTER;
dFlags[monster[i]._mVar4][monster[i]._mVar5] &= ~BFLAG_MONSTLR;
dMonster[monster[i]._mx][monster[i]._my] = i + 1;
if (monster[i]._uniqtype)
ChangeLightXY(monster[i].mlid, monster[i]._mx, monster[i]._my);
@ -2901,7 +2901,7 @@ void MAI_Zombie(int i)
mx = Monst->_mx;
my = Monst->_my;
if (!(dFlags[mx][my] & DFLAG_VISIBLE)) {
if (!(dFlags[mx][my] & BFLAG_VISIBLE)) {
return;
}
@ -4188,13 +4188,13 @@ void MAI_Garbud(int i)
if (Monst->mtalkmsg < QUEST_GARBUD4
&& Monst->mtalkmsg > QUEST_DOOM10
&& !(dFlags[_mx][_my] & DFLAG_VISIBLE)
&& !(dFlags[_mx][_my] & BFLAG_VISIBLE)
&& Monst->_mgoal == MGOAL_TALKING) {
Monst->_mgoal = MGOAL_INQUIRING;
Monst->mtalkmsg++;
}
if (dFlags[_mx][_my] & DFLAG_VISIBLE) {
if (dFlags[_mx][_my] & BFLAG_VISIBLE) {
if (Monst->mtalkmsg == QUEST_GARBUD4) {
if (!effect_is_playing(USFX_GARBUD4) && Monst->_mgoal == MGOAL_TALKING) {
Monst->_mgoal = MGOAL_NORMAL;
@ -4229,12 +4229,12 @@ void MAI_Zhar(int i)
my = Monst->_my;
mx = Monst->_mx;
md = M_GetDir(i);
if (Monst->mtalkmsg == QUEST_ZHAR1 && !(dFlags[mx][my] & DFLAG_VISIBLE) && Monst->_mgoal == MGOAL_TALKING) {
if (Monst->mtalkmsg == QUEST_ZHAR1 && !(dFlags[mx][my] & BFLAG_VISIBLE) && Monst->_mgoal == MGOAL_TALKING) {
Monst->mtalkmsg = QUEST_ZHAR2;
Monst->_mgoal = MGOAL_INQUIRING;
}
if (dFlags[mx][my] & DFLAG_VISIBLE) {
if (dFlags[mx][my] & BFLAG_VISIBLE) {
_mx = Monst->_mx - Monst->_menemyx;
_my = Monst->_my - Monst->_menemyy;
if (abs(_mx) > abs(_my))
@ -4276,7 +4276,7 @@ void MAI_SnotSpil(int i)
my = Monst->_my;
md = M_GetDir(i);
if (Monst->mtalkmsg == QUEST_BANNER10 && !(dFlags[mx][my] & DFLAG_VISIBLE) && Monst->_mgoal == MGOAL_TALKING) {
if (Monst->mtalkmsg == QUEST_BANNER10 && !(dFlags[mx][my] & BFLAG_VISIBLE) && Monst->_mgoal == MGOAL_TALKING) {
Monst->mtalkmsg = QUEST_BANNER11;
Monst->_mgoal = MGOAL_INQUIRING;
}
@ -4286,7 +4286,7 @@ void MAI_SnotSpil(int i)
Monst->_mgoal = MGOAL_NORMAL;
}
if (dFlags[mx][my] & DFLAG_VISIBLE) {
if (dFlags[mx][my] & BFLAG_VISIBLE) {
if (Monst->mtalkmsg == QUEST_BANNER12) {
if (!effect_is_playing(USFX_SNOT3) && Monst->_mgoal == MGOAL_TALKING) {
ObjChangeMap(setpc_x, setpc_y, setpc_x + setpc_w + 1, setpc_y + setpc_h + 1);
@ -4325,7 +4325,7 @@ void MAI_Lazurus(int i)
mx = Monst->_mx;
my = Monst->_my;
md = M_GetDir(i);
if (dFlags[mx][my] & DFLAG_VISIBLE) {
if (dFlags[mx][my] & BFLAG_VISIBLE) {
if (gbMaxPlayers == 1) {
if (Monst->mtalkmsg == QUEST_VILE13 && Monst->_mgoal == MGOAL_INQUIRING && plr[myplr].WorldX == QUEST_VILE13 && plr[myplr].WorldY == 46) {
PlayInGameMovie("gendata\\fprst3.smk");
@ -4375,7 +4375,7 @@ void MAI_Lazhelp(int i)
_my = Monst->_my;
md = M_GetDir(i);
if (dFlags[_mx][_my] & DFLAG_VISIBLE) {
if (dFlags[_mx][_my] & BFLAG_VISIBLE) {
if (gbMaxPlayers == 1) {
if (quests[QTYPE_VB]._qvar1 <= 5) {
Monst->_mgoal = MGOAL_INQUIRING;
@ -4409,12 +4409,12 @@ void MAI_Lachdanan(int i)
_mx = Monst->_mx;
_my = Monst->_my;
md = M_GetDir(i);
if (Monst->mtalkmsg == QUEST_VEIL9 && !(dFlags[_mx][_my] & DFLAG_VISIBLE) && monster[i]._mgoal == MGOAL_TALKING) {
if (Monst->mtalkmsg == QUEST_VEIL9 && !(dFlags[_mx][_my] & BFLAG_VISIBLE) && monster[i]._mgoal == MGOAL_TALKING) {
Monst->mtalkmsg = QUEST_VEIL10;
monster[i]._mgoal = MGOAL_INQUIRING;
}
if (dFlags[_mx][_my] & DFLAG_VISIBLE) {
if (dFlags[_mx][_my] & BFLAG_VISIBLE) {
if (Monst->mtalkmsg == QUEST_VEIL11) {
if (!effect_is_playing(USFX_LACH3) && Monst->_mgoal == MGOAL_TALKING) {
Monst->mtalkmsg = 0;
@ -4446,7 +4446,7 @@ void MAI_Warlord(int i)
mx = Monst->_mx;
my = Monst->_my;
md = M_GetDir(i);
if (dFlags[mx][my] & DFLAG_VISIBLE) {
if (dFlags[mx][my] & BFLAG_VISIBLE) {
if (Monst->mtalkmsg == QUEST_WARLRD9 && Monst->_mgoal == MGOAL_INQUIRING)
Monst->_mmode = MM_TALK;
if (Monst->mtalkmsg == QUEST_WARLRD9 && !effect_is_playing(USFX_WARLRD1) && Monst->_mgoal == MGOAL_TALKING) {
@ -4517,7 +4517,7 @@ void ProcessMonsters()
}
mx = Monst->_mx;
my = Monst->_my;
if(dFlags[mx][my] & DFLAG_VISIBLE && Monst->_msquelch == 0 && Monst->MType->mtype == MT_CLEAVER) {
if(dFlags[mx][my] & BFLAG_VISIBLE && Monst->_msquelch == 0 && Monst->MType->mtype == MT_CLEAVER) {
PlaySFX(USFX_CLEAVER);
}
if(Monst->_mFlags & MFLAG_TARGETS_MONSTER) {
@ -4536,7 +4536,7 @@ void ProcessMonsters()
}
Monst->_menemyx = plr[Monst->_menemy]._px;
Monst->_menemyy = plr[Monst->_menemy]._py;
if(dFlags[mx][my] & DFLAG_VISIBLE) {
if(dFlags[mx][my] & BFLAG_VISIBLE) {
Monst->_msquelch = 255;
Monst->_lastx = plr[Monst->_menemy]._px;
Monst->_lasty = plr[Monst->_menemy]._py;
@ -4662,11 +4662,11 @@ BOOL DirOK(int i, int mdir)
if (fy < 0 || fy >= MAXDUNY || fx < 0 || fx >= MAXDUNX || !PosOkMonst(i, fx, fy))
return FALSE;
if (mdir == DIR_E) {
if (SolidLoc(fx, fy + 1) || dFlags[fx][fy + 1] & DFLAG_MONSTER)
if (SolidLoc(fx, fy + 1) || dFlags[fx][fy + 1] & BFLAG_MONSTLR)
return FALSE;
}
if (mdir == DIR_W) {
if (SolidLoc(fx + 1, fy) || dFlags[fx + 1][fy] & DFLAG_MONSTER)
if (SolidLoc(fx + 1, fy) || dFlags[fx + 1][fy] & BFLAG_MONSTLR)
return FALSE;
}
if (mdir == DIR_N) {
@ -4706,7 +4706,7 @@ BOOL DirOK(int i, int mdir)
BOOL PosOkMissile(int x, int y)
{
return !nMissileTable[dPiece[x][y]] && !(dFlags[x][y] & DFLAG_MONSTER);
return !nMissileTable[dPiece[x][y]] && !(dFlags[x][y] & BFLAG_MONSTLR);
}
BOOL CheckNoSolid(int x, int y)

2
Source/msg.cpp

@ -2277,7 +2277,7 @@ int On_PLAYER_JOINLEVEL(TCmdLocParam1 *pCmd, int pnum)
NewPlrAnim(pnum, plr[pnum]._pDAnim[0], plr[pnum]._pDFrames, 1, plr[pnum]._pDWidth);
plr[pnum]._pAnimFrame = plr[pnum]._pAnimLen - 1;
plr[pnum]._pVar8 = plr[pnum]._pAnimLen << 1;
dFlags[plr[pnum].WorldX][plr[pnum].WorldY] |= DFLAG_DEAD_PLAYER;
dFlags[plr[pnum].WorldX][plr[pnum].WorldY] |= BFLAG_DEAD_PLAYER;
}
plr[pnum]._pvid = AddVision(plr[pnum].WorldX, plr[pnum].WorldY, plr[pnum]._pLightRad, pnum == myplr);

2
Source/multi.cpp

@ -955,7 +955,7 @@ void recv_plrinfo(int pnum, TCmdPlrInfoHdr *p, BOOL recv)
NewPlrAnim(pnum, plr[pnum]._pDAnim[0], plr[pnum]._pDFrames, 1, plr[pnum]._pDWidth);
plr[pnum]._pAnimFrame = plr[pnum]._pAnimLen - 1;
plr[pnum]._pVar8 = 2 * plr[pnum]._pAnimLen;
dFlags[plr[pnum].WorldX][plr[pnum].WorldY] |= DFLAG_DEAD_PLAYER;
dFlags[plr[pnum].WorldX][plr[pnum].WorldY] |= BFLAG_DEAD_PLAYER;
}
}
#ifdef _DEBUG

6
Source/objects.cpp

@ -130,7 +130,7 @@ BOOL RndLocOk(int xp, int yp)
return FALSE;
if (dObject[xp][yp])
return FALSE;
if (dFlags[xp][yp] & DFLAG_POPULATED)
if (dFlags[xp][yp] & BFLAG_POPULATED)
return FALSE;
if (nSolidTable[dPiece[xp][yp]])
return FALSE;
@ -419,7 +419,7 @@ void AddL3Objs(int x1, int y1, int x2, int y2)
BOOL WallTrapLocOk(int xp, int yp)
{
if (dFlags[xp][yp] & DFLAG_POPULATED)
if (dFlags[xp][yp] & BFLAG_POPULATED)
return FALSE;
return TRUE;
}
@ -451,7 +451,7 @@ void AddL2Torches()
BOOL TorchLocOK(int xp, int yp)
{
if (dFlags[xp][yp] & DFLAG_POPULATED)
if (dFlags[xp][yp] & BFLAG_POPULATED)
return FALSE;
return nTrapTable[dPiece[xp][yp]] != FALSE;

20
Source/player.cpp

@ -998,11 +998,11 @@ BOOL PlrDirOK(int pnum, int dir)
isOk = TRUE;
if (dir == DIR_E) {
isOk = !SolidLoc(px, py + 1) && !(dFlags[px][py + 1] & DFLAG_PLAYER);
isOk = !SolidLoc(px, py + 1) && !(dFlags[px][py + 1] & BFLAG_PLAYERLR);
}
if (isOk && dir == DIR_W) {
isOk = !SolidLoc(px + 1, py) && !(dFlags[px + 1][py] & DFLAG_PLAYER);
isOk = !SolidLoc(px + 1, py) && !(dFlags[px + 1][py] & BFLAG_PLAYERLR);
}
return isOk;
@ -1364,7 +1364,7 @@ void StartWalk3(int pnum, int xvel, int yvel, int xoff, int yoff, int xadd, int
dPlayer[px][py] = -1 - pnum;
plr[pnum]._pVar4 = x;
plr[pnum]._pVar5 = y;
dFlags[x][y] |= DFLAG_PLAYER;
dFlags[x][y] |= BFLAG_PLAYERLR;
plr[pnum]._pxoff = xoff;
plr[pnum]._pyoff = yoff;
@ -1544,8 +1544,8 @@ void FixPlrWalkTags(int pnum)
}
if (dx >= 0 && dx < MAXDUNX - 1 && dy >= 0 && dy < MAXDUNY - 1) {
dFlags[dx + 1][dy] &= ~DFLAG_PLAYER;
dFlags[dx][dy + 1] &= ~DFLAG_PLAYER;
dFlags[dx + 1][dy] &= ~BFLAG_PLAYERLR;
dFlags[dx][dy + 1] &= ~BFLAG_PLAYERLR;
}
}
@ -1560,8 +1560,8 @@ void RemovePlrFromMap(int pnum)
for (y = 1; y < MAXDUNY; y++)
for (x = 1; x < MAXDUNX; x++)
if (dPlayer[x][y - 1] == pn || dPlayer[x - 1][y] == pn)
if (dFlags[x][y] & DFLAG_PLAYER)
dFlags[x][y] &= ~DFLAG_PLAYER;
if (dFlags[x][y] & BFLAG_PLAYERLR)
dFlags[x][y] &= ~BFLAG_PLAYERLR;
for (y = 0; y < MAXDUNY; y++)
for (x = 0; x < MAXDUNX; x++)
@ -1692,7 +1692,7 @@ void StartPlayerKill(int pnum, int earflag)
if (plr[pnum].plrlevel == currlevel) {
FixPlayerLocation(pnum, plr[pnum]._pdir);
RemovePlrFromMap(pnum);
dFlags[plr[pnum].WorldX][plr[pnum].WorldY] |= DFLAG_DEAD_PLAYER;
dFlags[plr[pnum].WorldX][plr[pnum].WorldY] |= BFLAG_DEAD_PLAYER;
SetPlayerOld(pnum);
if (pnum == myplr) {
@ -2182,7 +2182,7 @@ BOOL PM_DoWalk3(int pnum)
if (plr[pnum]._pVar8 == vel) {
dPlayer[plr[pnum].WorldX][plr[pnum].WorldY] = 0;
dFlags[plr[pnum]._pVar4][plr[pnum]._pVar5] &= ~DFLAG_PLAYER;
dFlags[plr[pnum]._pVar4][plr[pnum]._pVar5] &= ~BFLAG_PLAYERLR;
plr[pnum].WorldX = plr[pnum]._pVar1;
plr[pnum].WorldY = plr[pnum]._pVar2;
dPlayer[plr[pnum]._pVar1][plr[pnum]._pVar2] = pnum + 1;
@ -2933,7 +2933,7 @@ BOOL PM_DoDeath(int pnum)
plr[pnum]._pAnimFrame = plr[pnum]._pAnimLen;
plr[pnum]._pAnimDelay = 10000;
dFlags[plr[pnum].WorldX][plr[pnum].WorldY] |= DFLAG_DEAD_PLAYER;
dFlags[plr[pnum].WorldX][plr[pnum].WorldY] |= BFLAG_DEAD_PLAYER;
}
if (plr[pnum]._pVar8 < 100) {

2
Source/portal.cpp

@ -102,7 +102,7 @@ void RemovePortalMissile(int id)
for (i = 0; i < nummissiles; i++) {
mi = missileactive[i];
if (missile[mi]._mitype == MIS_TOWN && missile[mi]._misource == id) {
dFlags[missile[mi]._mix][missile[mi]._miy] &= ~DFLAG_MISSILE;
dFlags[missile[mi]._mix][missile[mi]._miy] &= ~BFLAG_MISSILE;
dMissile[missile[mi]._mix][missile[mi]._miy] = 0;
if (portal[id].level)

44
Source/scrollrt.cpp

@ -200,7 +200,7 @@ void DrawDeadPlayer(int x, int y, int sx, int sy, int CelSkip, int CelCap, BOOL
else
DrawPlrProc = DrawPlayer;
dFlags[x][y] &= ~DFLAG_DEAD_PLAYER;
dFlags[x][y] &= ~BFLAG_DEAD_PLAYER;
for (i = 0; i < MAX_PLRS; i++) {
p = &plr[i];
@ -216,7 +216,7 @@ void DrawDeadPlayer(int x, int y, int sx, int sy, int CelSkip, int CelCap, BOOL
// app_fatal("Drawing dead player %d \"%s\": facing %d, frame %d of %d", i, p->_pName, p->_pdir, nCel, pFrameTable[0]);
break;
}
dFlags[x][y] |= DFLAG_DEAD_PLAYER;
dFlags[x][y] |= BFLAG_DEAD_PLAYER;
px = sx + p->_pxoff - p->_pAnimWidth2;
py = sy + p->_pyoff;
DrawPlrProc(i, x, y, px, py, p->_pAnimData, p->_pAnimFrame, p->_pAnimWidth, CelSkip, CelCap);
@ -229,7 +229,7 @@ void DrawPlayer(int pnum, int x, int y, int px, int py, BYTE *pCelBuff, int nCel
int l;
DWORD *pFrameTable;
if (dFlags[x][y] & DFLAG_LIT || plr[myplr]._pInfraFlag || !setlevel && !currlevel) {
if (dFlags[x][y] & BFLAG_LIT || plr[myplr]._pInfraFlag || !setlevel && !currlevel) {
if (!pCelBuff) {
// app_fatal("Drawing player %d \"%s\": NULL Cel Buffer", pnum, plr[pnum]._pName);
return;
@ -264,7 +264,7 @@ void DrawPlayer(int pnum, int x, int y, int px, int py, BYTE *pCelBuff, int nCel
misfiledata[MFILE_MANASHLD].mAnimWidth[0],
CelSkip,
CelCap);
} else if (!(dFlags[x][y] & DFLAG_LIT) || plr[myplr]._pInfraFlag && light_table_index > 8) {
} else if (!(dFlags[x][y] & BFLAG_LIT) || plr[myplr]._pInfraFlag && light_table_index > 8) {
Cl2DecodeFrm3(px, py, pCelBuff, nCel, nWidth, CelSkip, CelCap, 1);
if (plr[pnum].pManaShield)
Cl2DecodeFrm3(
@ -302,7 +302,7 @@ void DrawClippedPlayer(int pnum, int x, int y, int px, int py, BYTE *pCelBuff, i
int l;
DWORD *pFrameTable;
if (dFlags[x][y] & DFLAG_LIT || plr[myplr]._pInfraFlag) {
if (dFlags[x][y] & BFLAG_LIT || plr[myplr]._pInfraFlag) {
if (!pCelBuff) {
// app_fatal("Drawing player %d \"%s\" clipped: NULL Cel Buffer", pnum, plr[pnum]._pName);
return;
@ -337,7 +337,7 @@ void DrawClippedPlayer(int pnum, int x, int y, int px, int py, BYTE *pCelBuff, i
misfiledata[MFILE_MANASHLD].mAnimWidth[0],
CelSkip,
CelCap);
} else if (!(dFlags[x][y] & DFLAG_LIT) || plr[myplr]._pInfraFlag && light_table_index > 8) {
} else if (!(dFlags[x][y] & BFLAG_LIT) || plr[myplr]._pInfraFlag && light_table_index > 8) {
Cl2DecodeFrm5(px, py, pCelBuff, nCel, nWidth, CelSkip, CelCap, 1);
if (plr[pnum].pManaShield)
Cl2DecodeFrm5(
@ -704,10 +704,10 @@ void scrollrt_draw_clipped_dungeon(BYTE *pBuff, int sx, int sy, int dx, int dy,
negPlr = dPlayer[sx][sy - 1];
negMon = dMonster[sx][sy - 1];
if(visiondebug && bFlag & DFLAG_LIT) {
if(visiondebug && bFlag & BFLAG_LIT) {
Cel2DecodeHdrOnly(pBuff, (BYTE *)pSquareCel, 1, 64, 0, 8);
}
if(MissilePreFlag && bFlag & DFLAG_MISSILE) {
if(MissilePreFlag && bFlag & BFLAG_MISSILE) {
DrawClippedMissile(sx, sy, dx, dy, 0, 8, 1);
}
if(light_table_index < lightmax) {
@ -766,7 +766,7 @@ void scrollrt_draw_clipped_dungeon(BYTE *pBuff, int sx, int sy, int dx, int dy,
}
}
}
if(bFlag & DFLAG_PLAYER) {
if(bFlag & BFLAG_PLAYERLR) {
p = -(negPlr + 1);
if((DWORD)p < MAX_PLRS) {
pPlayer = &plr[p];
@ -783,7 +783,7 @@ void scrollrt_draw_clipped_dungeon(BYTE *pBuff, int sx, int sy, int dx, int dy,
// app_fatal("draw player clipped: tried to draw illegal player %d", p);
}
}
if(bFlag & DFLAG_MONSTER && (bFlag & DFLAG_LIT || plr[myplr]._pInfraFlag) && negMon < 0) {
if(bFlag & BFLAG_MONSTLR && (bFlag & BFLAG_LIT || plr[myplr]._pInfraFlag) && negMon < 0) {
draw_monster_num = -(negMon + 1);
if((DWORD)draw_monster_num < MAXMONSTERS) {
pMonster = &monster[draw_monster_num];
@ -806,7 +806,7 @@ void scrollrt_draw_clipped_dungeon(BYTE *pBuff, int sx, int sy, int dx, int dy,
// app_fatal("Draw Monster Clipped: tried to draw illegal monster %d", draw_monster_num);
}
}
if(bFlag & DFLAG_DEAD_PLAYER) {
if(bFlag & BFLAG_DEAD_PLAYER) {
DrawDeadPlayer(sx, sy, dx, dy, 0, 8, 1);
}
if(bPlr > 0) {
@ -826,7 +826,7 @@ void scrollrt_draw_clipped_dungeon(BYTE *pBuff, int sx, int sy, int dx, int dy,
// app_fatal("draw player clipped: tried to draw illegal player %d", p);
}
}
if(nMon > 0 && (bFlag & DFLAG_LIT || plr[myplr]._pInfraFlag)) {
if(nMon > 0 && (bFlag & BFLAG_LIT || plr[myplr]._pInfraFlag)) {
draw_monster_num = nMon - 1;
if((DWORD)draw_monster_num < MAXMONSTERS) {
pMonster = &monster[draw_monster_num];
@ -849,7 +849,7 @@ void scrollrt_draw_clipped_dungeon(BYTE *pBuff, int sx, int sy, int dx, int dy,
// app_fatal("Draw Monster Clipped: tried to draw illegal monster %d", draw_monster_num);
}
}
if(bFlag & DFLAG_MISSILE) {
if(bFlag & BFLAG_MISSILE) {
DrawClippedMissile(sx, sy, dx, dy, 0, 8, 0);
}
if(bObj != 0 && light_table_index < lightmax) {
@ -928,7 +928,7 @@ void DrawClippedMonster(int x, int y, int mx, int my, int m, int CelSkip, int Ce
return;
}
if (!(dFlags[x][y] & DFLAG_LIT)) {
if (!(dFlags[x][y] & BFLAG_LIT)) {
Cl2DecodeFrm5(mx, my, monster[m]._mAnimData, monster[m]._mAnimFrame, monster[m].MType->width, CelSkip, CelCap, 1);
} else {
trans = 0;
@ -1168,10 +1168,10 @@ void scrollrt_draw_clipped_dungeon_2(BYTE *pBuff, int sx, int sy, int skipChunks
negPlr = dPlayer[sx][sy - 1];
negMon = dMonster[sx][sy - 1];
if(visiondebug && bFlag & DFLAG_LIT) {
if(visiondebug && bFlag & BFLAG_LIT) {
Cel2DecodeHdrOnly(pBuff, (BYTE *)pSquareCel, 1, 64, CelSkip, 8);
}
if(MissilePreFlag && bFlag & DFLAG_MISSILE) {
if(MissilePreFlag && bFlag & BFLAG_MISSILE) {
DrawClippedMissile(sx, sy, dx, dy, CelSkip, 8, 1);
}
if(light_table_index < lightmax) {
@ -1230,7 +1230,7 @@ void scrollrt_draw_clipped_dungeon_2(BYTE *pBuff, int sx, int sy, int skipChunks
}
}
}
if(bFlag & DFLAG_PLAYER) {
if(bFlag & BFLAG_PLAYERLR) {
p = -(negPlr + 1);
if((DWORD)p < MAX_PLRS) {
pPlayer = &plr[p];
@ -1247,7 +1247,7 @@ void scrollrt_draw_clipped_dungeon_2(BYTE *pBuff, int sx, int sy, int skipChunks
// app_fatal("draw player clipped: tried to draw illegal player %d", p);
}
}
if(bFlag & DFLAG_MONSTER && (bFlag & DFLAG_LIT || plr[myplr]._pInfraFlag) && negMon < 0) {
if(bFlag & BFLAG_MONSTLR && (bFlag & BFLAG_LIT || plr[myplr]._pInfraFlag) && negMon < 0) {
draw_monster_num = -(negMon + 1);
if((DWORD)draw_monster_num < MAXMONSTERS) {
pMonster = &monster[draw_monster_num];
@ -1270,7 +1270,7 @@ void scrollrt_draw_clipped_dungeon_2(BYTE *pBuff, int sx, int sy, int skipChunks
// app_fatal("Draw Monster Clipped: tried to draw illegal monster %d", draw_monster_num);
}
}
if(bFlag & DFLAG_DEAD_PLAYER) {
if(bFlag & BFLAG_DEAD_PLAYER) {
DrawDeadPlayer(sx, sy, dx, dy, CelSkip, 8, 1);
}
if(bPlr > 0) {
@ -1290,7 +1290,7 @@ void scrollrt_draw_clipped_dungeon_2(BYTE *pBuff, int sx, int sy, int skipChunks
// app_fatal("draw player clipped: tried to draw illegal player %d", p);
}
}
if(nMon > 0 && (bFlag & DFLAG_LIT || plr[myplr]._pInfraFlag)) {
if(nMon > 0 && (bFlag & BFLAG_LIT || plr[myplr]._pInfraFlag)) {
draw_monster_num = nMon - 1;
if((DWORD)draw_monster_num < MAXMONSTERS) {
pMonster = &monster[draw_monster_num];
@ -1313,7 +1313,7 @@ void scrollrt_draw_clipped_dungeon_2(BYTE *pBuff, int sx, int sy, int skipChunks
// app_fatal("Draw Monster Clipped: tried to draw illegal monster %d", draw_monster_num);
}
}
if(bFlag & DFLAG_MISSILE) {
if(bFlag & BFLAG_MISSILE) {
DrawClippedMissile(sx, sy, dx, dy, CelSkip, 8, 0);
}
if(bObj != 0 && light_table_index < lightmax) {
@ -1806,7 +1806,7 @@ void DrawMonster(int x, int y, int mx, int my, int m, int CelSkip, int CelCap)
return;
}
if (!(dFlags[x][y] & DFLAG_LIT)) {
if (!(dFlags[x][y] & BFLAG_LIT)) {
Cl2DecodeFrm3(mx, my, monster[m]._mAnimData, monster[m]._mAnimFrame, monster[m].MType->width, CelSkip, CelCap, 1);
} else {
trans = 0;

4
Source/themes.cpp

@ -359,7 +359,7 @@ BOOL CheckThemeRoom(int tv)
for (i = 0; i < MAXDUNX; i++) {
if (dTransVal[i][j] != tv)
continue;
if (dFlags[i][j] & DFLAG_POPULATED)
if (dFlags[i][j] & BFLAG_POPULATED)
return FALSE;
tarea++;
@ -462,7 +462,7 @@ void HoldThemeRooms()
for (y = 0; y < MAXDUNY; y++) {
for (x = 0; x < MAXDUNX; x++) {
if (dTransVal[x][y] == (char)themes[i].ttval) {
dFlags[x][y] |= DFLAG_POPULATED;
dFlags[x][y] |= BFLAG_POPULATED;
}
}
}

24
Source/town.cpp

@ -403,7 +403,7 @@ void town_draw_clipped_town(BYTE *pBuff, int x, int y, int sx, int sy, BOOL some
}
Cel2DrawHdrOnly(px, sy, item[bv]._iAnimData, item[bv]._iAnimFrame, item[bv]._iAnimWidth, 0, 8);
}
if (dFlags[x][y] & DFLAG_MONSTER) {
if (dFlags[x][y] & BFLAG_MONSTLR) {
mi = -(dMonster[x][y - 1] + 1);
px = sx - towner[mi]._tAnimWidth2;
if (mi == pcursmonst) {
@ -419,7 +419,7 @@ void town_draw_clipped_town(BYTE *pBuff, int x, int y, int sx, int sy, BOOL some
}
Cel2DrawHdrOnly(px, sy, towner[mi]._tAnimData, towner[mi]._tAnimFrame, towner[mi]._tAnimWidth, 0, 8);
}
if (dFlags[x][y] & DFLAG_PLAYER) {
if (dFlags[x][y] & BFLAG_PLAYERLR) {
bv = -(dPlayer[x][y - 1] + 1);
px = sx + plr[bv]._pxoff - plr[bv]._pAnimWidth2;
py = sy + plr[bv]._pyoff;
@ -431,7 +431,7 @@ void town_draw_clipped_town(BYTE *pBuff, int x, int y, int sx, int sy, BOOL some
town_draw_clipped_e_flag(pBuff - 64, x - 1, y + 1, sx - 64, sy);
}
}
if (dFlags[x][y] & DFLAG_DEAD_PLAYER) {
if (dFlags[x][y] & BFLAG_DEAD_PLAYER) {
DrawDeadPlayer(x, y, sx, sy, 0, 8, 1);
}
if (dPlayer[x][y] > 0) {
@ -446,7 +446,7 @@ void town_draw_clipped_town(BYTE *pBuff, int x, int y, int sx, int sy, BOOL some
town_draw_clipped_e_flag(pBuff - 64, x - 1, y + 1, sx - 64, sy);
}
}
if (dFlags[x][y] & DFLAG_MISSILE) {
if (dFlags[x][y] & BFLAG_MISSILE) {
DrawClippedMissile(x, y, sx, sy, 0, 8, 0);
}
if(dArch[x][y] != 0) {
@ -585,7 +585,7 @@ void town_draw_clipped_town_2(BYTE *pBuff, int x, int y, int a4, int a5, int sx,
}
Cel2DrawHdrOnly(px, sy, item[bv]._iAnimData, item[bv]._iAnimFrame, item[bv]._iAnimWidth, a5, 8);
}
if (dFlags[x][y] & DFLAG_MONSTER) {
if (dFlags[x][y] & BFLAG_MONSTLR) {
mi = -(dMonster[x][y - 1] + 1);
px = sx - towner[mi]._tAnimWidth2;
if (mi == pcursmonst) {
@ -601,7 +601,7 @@ void town_draw_clipped_town_2(BYTE *pBuff, int x, int y, int a4, int a5, int sx,
}
Cel2DrawHdrOnly(px, sy, towner[mi]._tAnimData, towner[mi]._tAnimFrame, towner[mi]._tAnimWidth, a5, 8);
}
if (dFlags[x][y] & DFLAG_PLAYER) {
if (dFlags[x][y] & BFLAG_PLAYERLR) {
bv = -(dPlayer[x][y - 1] + 1);
px = sx + plr[bv]._pxoff - plr[bv]._pAnimWidth2;
py = sy + plr[bv]._pyoff;
@ -613,7 +613,7 @@ void town_draw_clipped_town_2(BYTE *pBuff, int x, int y, int a4, int a5, int sx,
town_draw_clipped_e_flag_2(pBuff - 64, x - 1, y + 1, a4, a5, sx - 64, sy);
}
}
if (dFlags[x][y] & DFLAG_DEAD_PLAYER) {
if (dFlags[x][y] & BFLAG_DEAD_PLAYER) {
DrawDeadPlayer(x, y, sx, sy, a5, 8, 1);
}
if (dPlayer[x][y] > 0) {
@ -628,7 +628,7 @@ void town_draw_clipped_town_2(BYTE *pBuff, int x, int y, int a4, int a5, int sx,
town_draw_clipped_e_flag_2(pBuff - 64, x - 1, y + 1, a4, a5, sx - 64, sy);
}
}
if (dFlags[x][y] & DFLAG_MISSILE) {
if (dFlags[x][y] & BFLAG_MISSILE) {
DrawClippedMissile(x, y, sx, sy, a5, 8, 0);
}
if(dArch[x][y] != 0) {
@ -775,7 +775,7 @@ void town_draw_town_all(BYTE *pBuff, int x, int y, int a4, int dir, int sx, int
/// ASSERT: assert(item[bv]._iAnimData);
CelDrawHdrOnly(px, sy, item[bv]._iAnimData, item[bv]._iAnimFrame, item[bv]._iAnimWidth, 0, dir);
}
if (dFlags[x][y] & DFLAG_MONSTER) {
if (dFlags[x][y] & BFLAG_MONSTLR) {
mi = -(dMonster[x][y - 1] + 1);
px = sx - towner[mi]._tAnimWidth2;
if (mi == pcursmonst) {
@ -793,7 +793,7 @@ void town_draw_town_all(BYTE *pBuff, int x, int y, int a4, int dir, int sx, int
/// ASSERT: assert(towner[mi]._tAnimData);
CelDrawHdrOnly(px, sy, towner[mi]._tAnimData, towner[mi]._tAnimFrame, towner[mi]._tAnimWidth, 0, dir);
}
if (dFlags[x][y] & DFLAG_PLAYER) {
if (dFlags[x][y] & BFLAG_PLAYERLR) {
bv = -(dPlayer[x][y - 1] + 1);
px = sx + plr[bv]._pxoff - plr[bv]._pAnimWidth2;
py = sy + plr[bv]._pyoff;
@ -806,7 +806,7 @@ void town_draw_town_all(BYTE *pBuff, int x, int y, int a4, int dir, int sx, int
town_draw_e_flag(pBuff - 64, x - 1, y + 1, a4, dir, sx - 64, sy);
}
}
if (dFlags[x][y] & DFLAG_DEAD_PLAYER) {
if (dFlags[x][y] & BFLAG_DEAD_PLAYER) {
DrawDeadPlayer(x, y, sx, sy, 0, dir, 0);
}
if (dPlayer[x][y] > 0) {
@ -822,7 +822,7 @@ void town_draw_town_all(BYTE *pBuff, int x, int y, int a4, int dir, int sx, int
town_draw_e_flag(pBuff - 64, x - 1, y + 1, a4, dir, sx - 64, sy);
}
}
if (dFlags[x][y] & DFLAG_MISSILE) {
if (dFlags[x][y] & BFLAG_MISSILE) {
DrawMissile(x, y, sx, sy, 0, dir, 0);
}
if(dArch[x][y] != 0) {

2
Source/trigs.cpp

@ -593,7 +593,7 @@ void Freeupstairs()
for (yy = 0; yy < MAXTRIGGERS; yy++) {
for (xx = 0; xx < MAXTRIGGERS; xx++) {
dFlags[tx - 2 + xx][ty - 2 + yy] |= DFLAG_POPULATED;
dFlags[tx - 2 + xx][ty - 2 + yy] |= BFLAG_POPULATED;
}
}
}

16
enums.h

@ -1840,14 +1840,14 @@ typedef enum dungeon_type {
} dungeon_type;
typedef enum dflag {
DFLAG_MISSILE = 0x01,
DFLAG_VISIBLE = 0x02,
DFLAG_DEAD_PLAYER = 0x04,
DFLAG_POPULATED = 0x08,
DFLAG_MONSTER = 0x10,
DFLAG_PLAYER = 0x20,
DFLAG_LIT = 0x40,
DFLAG_EXPLORED = 0x80,
BFLAG_MISSILE = 0x01,
BFLAG_VISIBLE = 0x02,
BFLAG_DEAD_PLAYER = 0x04,
BFLAG_POPULATED = 0x08,
BFLAG_MONSTLR = 0x10,
BFLAG_PLAYERLR = 0x20,
BFLAG_LIT = 0x40,
BFLAG_EXPLORED = 0x80,
} dflag;
typedef enum dungeon_message {

Loading…
Cancel
Save