Browse Source

Correct BOOLS

pull/197/head
Anders Jenbo 7 years ago
parent
commit
9d3ce818f0
  1. 44
      Source/control.cpp
  2. 10
      Source/control.h
  3. 4
      Source/cursor.cpp
  4. 40
      Source/diablo.cpp
  5. 12
      Source/diablo.h
  6. 14
      Source/gendung.cpp
  7. 8
      Source/gendung.h
  8. 6
      Source/items.cpp
  9. 2
      Source/items.h
  10. 11
      Source/lighting.cpp
  11. 4
      Source/minitext.cpp
  12. 2
      Source/minitext.h
  13. 30
      Source/missiles.cpp
  14. 4
      Source/missiles.h
  15. 6
      Source/player.cpp
  16. 6
      Source/scrollrt.cpp
  17. 4
      Source/stores.cpp
  18. 14
      Source/towners.cpp

44
Source/control.cpp

@ -11,7 +11,7 @@ int chrbtn[4];
BYTE *pMultiBtns;
BYTE *pPanelButtons;
BYTE *pChrPanel;
int lvlbtndown;
BOOL lvlbtndown;
char sgszTalkSave[8][80];
int dropGoldValue;
BOOL drawmanaflag;
@ -38,17 +38,17 @@ int sbooktab;
int pSplType;
int frame;
int initialDropGoldIndex;
int talkflag;
BOOL talkflag;
BYTE *pSBkIconCels;
int sbookflag;
int chrflag;
BOOL sbookflag;
BOOL chrflag;
BOOL drawbtnflag;
BYTE *pSpellBkCel;
char infostr[MAX_PATH];
int numpanbtns;
BYTE *pStatusPanel;
char panelstr[256];
int panelflag;
BOOL panelflag;
BYTE SplTransTbl[256];
int initialDropGoldValue;
BYTE *pSpellCels;
@ -1131,7 +1131,7 @@ void InitControlPan()
CelDecodeRect(pLifeBuff, 0, 87, 88, pStatusPanel, 1, 88);
CelDecodeRect(pManaBuff, 0, 87, 88, pStatusPanel, 2, 88);
MemFreeDbg(pStatusPanel);
talkflag = 0;
talkflag = FALSE;
if (gbMaxPlayers != 1) {
pTalkPanel = LoadFileInMem("CtrlPan\\TalkPanl.CEL", NULL);
CelDecodeRect(pBtmBuff, 0, (PANEL_HEIGHT + 16) * 2 - 1, PANEL_WIDTH, pTalkPanel, 1, PANEL_WIDTH);
@ -1145,8 +1145,8 @@ void InitControlPan()
for (i = 0; i < sizeof(talkbtndown) / sizeof(talkbtndown[0]); i++)
talkbtndown[i] = FALSE;
}
panelflag = 0;
lvlbtndown = 0;
panelflag = FALSE;
lvlbtndown = FALSE;
pPanelButtons = LoadFileInMem("CtrlPan\\Panel8bu.CEL", NULL);
for (i = 0; i < sizeof(panbtn) / sizeof(panbtn[0]); i++)
panbtn[i] = 0;
@ -1164,13 +1164,13 @@ void InitControlPan()
ClearPanel();
drawhpflag = TRUE;
drawmanaflag = TRUE;
chrflag = 0;
chrflag = FALSE;
spselflag = 0;
pSpellBkCel = LoadFileInMem("Data\\SpellBk.CEL", NULL);
pSBkBtnCel = LoadFileInMem("Data\\SpellBkB.CEL", NULL);
pSBkIconCels = LoadFileInMem("Data\\SpellI2.CEL", NULL);
sbooktab = 0;
sbookflag = 0;
sbookflag = FALSE;
if (plr[myplr]._pClass == PC_WARRIOR) {
SpellPages[0][0] = SPL_REPAIR;
} else if (plr[myplr]._pClass == PC_ROGUE) {
@ -1323,7 +1323,7 @@ void CheckPanelInfo()
{
int i, c, v, s;
panelflag = 0;
panelflag = FALSE;
ClearPanel();
for (i = 0; i < numpanbtns; i++) {
if (MouseX >= PanBtnPos[i][0]
@ -1343,14 +1343,14 @@ void CheckPanelInfo()
AddPanelString(tempstr, TRUE);
}
infoclr = COL_WHITE;
panelflag = 1;
panelflag = TRUE;
pinfoflag = TRUE;
}
}
if (!spselflag && MouseX >= 565 && MouseX < 621 && MouseY >= 416 && MouseY < 472) {
strcpy(infostr, "Select current spell button");
infoclr = COL_WHITE;
panelflag = 1;
panelflag = TRUE;
pinfoflag = TRUE;
strcpy(tempstr, "Hotkey : 's'");
AddPanelString(tempstr, TRUE);
@ -1439,10 +1439,10 @@ void CheckBtnUp()
switch (i) {
case PANBTN_CHARINFO:
questlog = FALSE;
chrflag = chrflag == 0;
chrflag = !chrflag;
break;
case PANBTN_QLOG:
chrflag = 0;
chrflag = FALSE;
if (!questlog)
StartQuestlog();
else
@ -1457,7 +1457,7 @@ void CheckBtnUp()
gamemenuOff = 0;
break;
case PANBTN_INVENTORY:
sbookflag = 0;
sbookflag = FALSE;
invflag = invflag == 0;
if (dropGoldFlag) {
dropGoldFlag = FALSE;
@ -1470,7 +1470,7 @@ void CheckBtnUp()
dropGoldFlag = FALSE;
dropGoldValue = 0;
}
sbookflag = sbookflag == 0;
sbookflag = !sbookflag;
break;
case PANBTN_SENDMSG:
if (talkflag)
@ -1923,14 +1923,14 @@ void MY_PlrStringXY(int x, int y, int width, char *pszStr, char col, int base)
void CheckLvlBtn()
{
if (!lvlbtndown && MouseX >= 40 && MouseX <= 81 && MouseY >= 313 && MouseY <= 335)
lvlbtndown = 1;
lvlbtndown = TRUE;
}
void ReleaseLvlBtn()
{
if (MouseX >= 40 && MouseX <= 81 && MouseY >= 313 && MouseY <= 335)
chrflag = 1;
lvlbtndown = 0;
chrflag = TRUE;
lvlbtndown = FALSE;
}
void DrawLevelUpIcon()
@ -2549,7 +2549,7 @@ void control_type_message()
return;
}
talkflag = 1;
talkflag = TRUE;
sgszTalkMsg[0] = 0;
frame = 1;
for (i = 0; i < 3; i++) {
@ -2562,7 +2562,7 @@ void control_type_message()
void control_reset_talk()
{
talkflag = 0;
talkflag = FALSE;
sgbPlrTalkTbl = 0;
drawpanflag = 255;
}

10
Source/control.h

@ -11,7 +11,7 @@ extern int chrbtn[4];
extern BYTE *pMultiBtns;
extern BYTE *pPanelButtons;
extern BYTE *pChrPanel;
extern int lvlbtndown;
extern BOOL lvlbtndown;
extern int dropGoldValue;
extern BOOL drawmanaflag;
extern BOOL chrbtnactive;
@ -35,17 +35,17 @@ extern int sbooktab;
extern int pSplType;
extern int frame;
extern int initialDropGoldIndex;
extern int talkflag;
extern BOOL talkflag;
extern BYTE *pSBkIconCels;
extern int sbookflag;
extern int chrflag;
extern BOOL sbookflag;
extern BOOL chrflag;
extern BOOL drawbtnflag;
extern BYTE *pSpellBkCel;
extern char infostr[MAX_PATH];
extern int numpanbtns;
extern BYTE *pStatusPanel;
extern char panelstr[256];
extern int panelflag;
extern BOOL panelflag;
extern BYTE SplTransTbl[256];
extern int initialDropGoldValue;
extern BYTE *pSpellCels;

4
Source/cursor.cpp

@ -259,8 +259,8 @@ void CheckCursMove()
}
pcursinvitem = -1;
pcursplr = -1;
uitemflag = 0;
panelflag = 0;
uitemflag = FALSE;
panelflag = FALSE;
trigflag = FALSE;
if (plr[myplr]._pInvincible) {

40
Source/diablo.cpp

@ -19,14 +19,14 @@ int glEndSeed[NUMLEVELS];
BOOL gbLoadGame;
HINSTANCE ghInst;
int DebugMonsters[10];
char cineflag;
BOOLEAN cineflag;
int drawpanflag;
int visiondebug;
int scrollflag; /* unused */
BOOL visiondebug;
BOOL scrollflag; /* unused */
BOOL light4flag;
int leveldebug;
int monstdebug;
int trigdebug; /* unused */
BOOL leveldebug;
BOOL monstdebug;
BOOL trigdebug; /* unused */
int setseed;
int debugmonsttypes;
int PauseMode;
@ -370,7 +370,7 @@ void diablo_parse_flags(char *args)
break;
case 'l':
setlevel = FALSE;
leveldebug = 1;
leveldebug = TRUE;
while (isspace(*args)) {
args++;
}
@ -392,7 +392,7 @@ void diablo_parse_flags(char *args)
plr[0].plrlevel = i;
break;
case 'm':
monstdebug = 1;
monstdebug = TRUE;
while (isspace(*args)) {
args++;
}
@ -432,7 +432,7 @@ void diablo_parse_flags(char *args)
debug_mode_key_s = 1;
break;
case 't':
leveldebug = 1;
leveldebug = TRUE;
setlevel = TRUE;
while (isspace(*args)) {
args++;
@ -445,7 +445,7 @@ void diablo_parse_flags(char *args)
setlvlnum = i;
break;
case 'v':
visiondebug = 1;
visiondebug = TRUE;
break;
case 'w':
debug_mode_key_w = 1;
@ -1066,11 +1066,11 @@ void PressKey(int vkey)
track_repeat_walk(0);
} else {
invflag = 0;
chrflag = 0;
sbookflag = 0;
chrflag = FALSE;
sbookflag = FALSE;
spselflag = 0;
if (qtextflag && leveltype == DTYPE_TOWN) {
qtextflag = 0;
qtextflag = FALSE;
sfx_stop();
}
questlog = FALSE;
@ -1184,11 +1184,11 @@ void PressKey(int vkey)
}
helpflag = 0;
invflag = 0;
chrflag = 0;
sbookflag = 0;
chrflag = FALSE;
sbookflag = FALSE;
spselflag = 0;
if (qtextflag && leveltype == DTYPE_TOWN) {
qtextflag = 0;
qtextflag = FALSE;
sfx_stop();
}
questlog = FALSE;
@ -1247,7 +1247,7 @@ void PressChar(int vkey)
case 'I':
case 'i':
if (!stextflag) {
sbookflag = 0;
sbookflag = FALSE;
invflag = invflag == 0;
if (!invflag || chrflag) {
if (MouseX < 480 && MouseY < PANEL_TOP) {
@ -1264,7 +1264,7 @@ void PressChar(int vkey)
case 'c':
if (!stextflag) {
questlog = FALSE;
chrflag = chrflag == 0;
chrflag = !chrflag;
if (!chrflag || invflag) {
if (MouseX > 160 && MouseY < PANEL_TOP) {
SetCursorPos(MouseX - 160, MouseY);
@ -1279,7 +1279,7 @@ void PressChar(int vkey)
case 'Q':
case 'q':
if (!stextflag) {
chrflag = 0;
chrflag = FALSE;
if (!questlog) {
StartQuestlog();
} else {
@ -1307,7 +1307,7 @@ void PressChar(int vkey)
case 'b':
if (!stextflag) {
invflag = 0;
sbookflag = sbookflag == 0;
sbookflag = !sbookflag;
}
return;
case '+':

12
Source/diablo.h

@ -100,14 +100,14 @@ extern int glEndSeed[NUMLEVELS];
extern BOOL gbLoadGame;
extern HINSTANCE ghInst;
extern int DebugMonsters[10];
extern char cineflag;
extern BOOLEAN cineflag;
extern int drawpanflag;
extern int visiondebug;
extern int scrollflag; /* unused */
extern BOOL visiondebug;
extern BOOL scrollflag; /* unused */
extern BOOL light4flag;
extern int leveldebug;
extern int monstdebug;
extern int trigdebug; /* unused */
extern BOOL leveldebug;
extern BOOL monstdebug;
extern BOOL trigdebug; /* unused */
extern int setseed;
extern int debugmonsttypes;
extern int PauseMode;

14
Source/gendung.cpp

@ -2,7 +2,7 @@
WORD level_frame_types[MAXTILES];
int themeCount;
char nTransTable[2049];
BOOLEAN nTransTable[2049];
//int dword_52D204;
int dMonster[MAXDUNX][MAXDUNY];
BYTE dungeon[DMAXX][DMAXY];
@ -29,7 +29,7 @@ char dTransVal[MAXDUNX][MAXDUNY];
BOOLEAN nTrapTable[2049];
BYTE leveltype;
BYTE currlevel;
char TransList[256];
BOOLEAN TransList[256];
BOOLEAN nSolidTable[2049];
int level_frame_count[MAXTILES];
ScrollStruct ScrollInfo;
@ -42,13 +42,13 @@ int dword_5C2FFC;
int scr_pix_width;
int scr_pix_height;
char dArch[MAXDUNX][MAXDUNY];
char nBlockTable[2049];
BOOLEAN nBlockTable[2049];
BYTE *pSpecialCels;
char dFlags[MAXDUNX][MAXDUNY];
char dItem[MAXDUNX][MAXDUNY];
BYTE setlvlnum;
int level_frame_sizes[MAXTILES];
char nMissileTable[2049];
BOOLEAN nMissileTable[2049];
char *pSetPiece_2;
char setlvltype;
BOOLEAN setlevel;
@ -107,11 +107,11 @@ void FillSolidBlockTbls()
if (bv & 1)
nSolidTable[i] = 1;
if (bv & 2)
nBlockTable[i] = 1;
nBlockTable[i] = TRUE;
if (bv & 4)
nMissileTable[i] = 1;
nMissileTable[i] = TRUE;
if (bv & 8)
nTransTable[i] = 1;
nTransTable[i] = TRUE;
if (bv & 0x80)
nTrapTable[i] = 1;
block_lvid[i] = (bv & 0x70) >> 4; /* beta: (bv >> 4) & 7 */

8
Source/gendung.h

@ -4,7 +4,7 @@
extern WORD level_frame_types[MAXTILES];
extern int themeCount;
extern char nTransTable[2049];
extern BOOLEAN nTransTable[2049];
//int dword_52D204;
extern int dMonster[MAXDUNX][MAXDUNY];
extern BYTE dungeon[DMAXX][DMAXY];
@ -31,7 +31,7 @@ extern char dTransVal[MAXDUNX][MAXDUNY];
extern BOOLEAN nTrapTable[2049];
extern BYTE leveltype;
extern BYTE currlevel;
extern char TransList[256];
extern BOOLEAN TransList[256];
extern BOOLEAN nSolidTable[2049];
extern int level_frame_count[MAXTILES];
extern ScrollStruct ScrollInfo;
@ -44,13 +44,13 @@ extern int dword_5C2FFC;
extern int scr_pix_width;
extern int scr_pix_height;
extern char dArch[MAXDUNX][MAXDUNY];
extern char nBlockTable[2049];
extern BOOLEAN nBlockTable[2049];
extern BYTE *pSpecialCels;
extern char dFlags[MAXDUNX][MAXDUNY];
extern char dItem[MAXDUNX][MAXDUNY];
extern BYTE setlvlnum;
extern int level_frame_sizes[MAXTILES];
extern char nMissileTable[2049];
extern BOOLEAN nMissileTable[2049];
extern char *pSetPiece_2;
extern char setlvltype;
extern BOOLEAN setlevel;

6
Source/items.cpp

@ -1,7 +1,7 @@
#include "diablo.h"
int itemactive[MAXITEMS];
int uitemflag;
BOOL uitemflag;
int itemavail[MAXITEMS];
ItemStruct curruitem;
ItemGetRecordStruct itemrecord[MAXITEMS];
@ -282,7 +282,7 @@ void InitItems()
AddInitItems();
}
uitemflag = 0;
uitemflag = FALSE;
}
void CalcPlrItemVals(int p, BOOL Loadgfx)
@ -3054,7 +3054,7 @@ void PrintItemDetails(ItemStruct *x)
}
if (x->_iMagical == ITEM_QUALITY_UNIQUE) {
AddPanelString("unique item", TRUE);
uitemflag = 1;
uitemflag = TRUE;
curruitem = *x;
}
PrintItemMisc(x);

2
Source/items.h

@ -3,7 +3,7 @@
#define __ITEMS_H__
extern int itemactive[MAXITEMS];
extern int uitemflag;
extern BOOL uitemflag;
extern int itemavail[MAXITEMS];
extern ItemStruct curruitem;
extern ItemGetRecordStruct itemrecord[MAXITEMS];

11
Source/lighting.cpp

@ -663,7 +663,8 @@ void DoUnVision(int nXPos, int nYPos, int nRadius)
void DoVision(int nXPos, int nYPos, int nRadius, BOOL doautomap, BOOL visible)
{
int nCrawlX, nCrawlY, nLineLen, nBlockerFlag, nTrans;
BOOL nBlockerFlag;
int nCrawlX, nCrawlY, nLineLen, nTrans;
int j, k, v, x1adj, x2adj, y1adj, y2adj;
if (nXPos >= 0 && nXPos <= MAXDUNX && nYPos >= 0 && nYPos <= MAXDUNY) {
@ -723,7 +724,7 @@ void DoVision(int nXPos, int nYPos, int nRadius, BOOL doautomap, BOOL visible)
break;
}
if (nCrawlX >= 0 && nCrawlX <= MAXDUNX && nCrawlY >= 0 && nCrawlY <= MAXDUNY) {
nBlockerFlag = (BYTE)nBlockTable[dPiece[nCrawlX][nCrawlY]];
nBlockerFlag = nBlockTable[dPiece[nCrawlX][nCrawlY]];
if (!nBlockTable[dPiece[x1adj + nCrawlX][y1adj + nCrawlY]]
|| !nBlockTable[dPiece[x2adj + nCrawlX][y2adj + nCrawlY]]) {
if (doautomap) {
@ -739,7 +740,7 @@ void DoVision(int nXPos, int nYPos, int nRadius, BOOL doautomap, BOOL visible)
if (!nBlockerFlag) {
nTrans = dTransVal[nCrawlX][nCrawlY];
if (nTrans != 0) {
TransList[nTrans] = 1;
TransList[nTrans] = TRUE;
}
}
}
@ -1150,7 +1151,7 @@ void InitVision()
visionid = 1;
for (i = 0; i < TransVal; i++) {
TransList[i] = 0;
TransList[i] = FALSE;
}
}
@ -1223,7 +1224,7 @@ void ProcessVisionList()
}
}
for (i = 0; i < TransVal; i++) {
TransList[i] = 0;
TransList[i] = FALSE;
}
for (i = 0; i < numvision; i++) {
if (!VisionList[i]._ldel) {

4
Source/minitext.cpp

@ -3,7 +3,7 @@
int qtexty;
char *qtextptr;
int qtextSpd;
char qtextflag;
BOOLEAN qtextflag;
int scrolltexty;
int sgLastScroll;
BYTE *pMedTextCels;
@ -273,7 +273,7 @@ void DrawQText()
qtexty += 38;
qtextptr = pnl;
if (*pnl == '|') {
qtextflag = 0;
qtextflag = FALSE;
}
break;
}

2
Source/minitext.h

@ -5,7 +5,7 @@
extern int qtexty;
extern char *qtextptr;
extern int qtextSpd;
extern char qtextflag;
extern BOOLEAN qtextflag;
extern int scrolltexty;
extern BYTE *pMedTextCels;
extern BYTE *pTextBoxCels;

30
Source/missiles.cpp

@ -4,9 +4,9 @@ int missileactive[MAXMISSILES];
int missileavail[MAXMISSILES];
MissileStruct missile[MAXMISSILES];
int nummissiles;
int ManashieldFlag;
BOOL ManashieldFlag;
ChainStruct chain[MAXMISSILES];
int MissilePreFlag;
BOOL MissilePreFlag;
int numchains;
int XDirAdd[8] = { 1, 0, -1, -1, -1, 0, 1, 1 };
@ -390,7 +390,7 @@ void PutMissile(int i)
else
dMissile[x][y] = -1;
if (missile[i]._miPreFlag)
MissilePreFlag = 1;
MissilePreFlag = TRUE;
}
}
@ -1571,7 +1571,7 @@ void AddTown(int mi, int sx, int sy, int dx, int dy, int midir, char mienemy, in
tx = dx + CrawlTable[k - 1];
ty = dy + CrawlTable[k];
if (tx > 0 && tx < MAXDUNX && ty > 0 && ty < MAXDUNY) {
if (!(dObject[tx][ty] | dPlayer[tx][ty] | dMissile[tx][ty] | nSolidTable[dPiece[tx][ty]] | (BYTE)nMissileTable[dPiece[tx][ty]])) {
if (!(dObject[tx][ty] | dPlayer[tx][ty] | dMissile[tx][ty] | nSolidTable[dPiece[tx][ty]] | nMissileTable[dPiece[tx][ty]])) {
if (!CheckIfTrig(tx, ty)) {
missile[mi]._miDelFlag = FALSE;
missile[mi]._mix = tx;
@ -1703,7 +1703,7 @@ void AddGuardian(int mi, int sx, int sy, int dx, int dy, int midir, char mienemy
pn = dPiece[tx][ty];
if (tx > 0 && tx < MAXDUNX && ty > 0 && ty < MAXDUNY) {
if (LineClear(sx, sy, tx, ty)) {
if (!(dMonster[tx][ty] | dObject[tx][ty] | dMissile[tx][ty] | nSolidTable[pn] | (BYTE)nMissileTable[pn])) {
if (!(dMonster[tx][ty] | dObject[tx][ty] | dMissile[tx][ty] | nSolidTable[pn] | nMissileTable[pn])) {
missile[mi]._miDelFlag = FALSE;
missile[mi]._mix = tx;
missile[mi]._miy = ty;
@ -2093,7 +2093,7 @@ void AddIdentify(int mi, int sx, int sy, int dx, int dy, int midir, char mienemy
UseMana(id, SPL_IDENTIFY);
if (id == myplr) {
if (sbookflag)
sbookflag = 0;
sbookflag = FALSE;
if (!invflag)
invflag = 1;
SetCursor_(CURSOR_IDENTIFY);
@ -2189,7 +2189,7 @@ void AddRepair(int mi, int sx, int sy, int dx, int dy, int midir, char mienemy,
UseMana(id, SPL_REPAIR);
if (id == myplr) {
if (sbookflag)
sbookflag = 0;
sbookflag = FALSE;
if (!invflag)
invflag = 1;
SetCursor_(CURSOR_REPAIR);
@ -2202,7 +2202,7 @@ void AddRecharge(int mi, int sx, int sy, int dx, int dy, int midir, char mienemy
UseMana(id, SPL_RECHARGE);
if (id == myplr) {
if (sbookflag)
sbookflag = 0;
sbookflag = FALSE;
if (!invflag)
invflag = 1;
SetCursor_(CURSOR_RECHARGE);
@ -2539,7 +2539,7 @@ void MI_Golem(int i)
void MI_SetManashield(int i)
{
ManashieldFlag = 1;
ManashieldFlag = TRUE;
}
void MI_LArrow(int i)
@ -2930,13 +2930,13 @@ void MI_Lightctrl(int i)
/// ASSERT: assert((DWORD)pn <= MAXTILES);
if (missile[i]._misource == -1) {
if ((mx != missile[i]._misx || my != missile[i]._misy) && nMissileTable[pn] != 0) {
if ((mx != missile[i]._misx || my != missile[i]._misy) && nMissileTable[pn]) {
missile[i]._mirange = 0;
}
} else if (nMissileTable[pn] != 0) {
} else if (nMissileTable[pn]) {
missile[i]._mirange = 0;
}
if (nMissileTable[pn] == 0) {
if (!nMissileTable[pn]) {
if ((mx != missile[i]._miVar1 || my != missile[i]._miVar2) && mx > 0 && my > 0 && mx < MAXDUNX && my < MAXDUNY) {
if (missile[i]._misource != -1) {
if (missile[i]._micaster == 1
@ -3665,7 +3665,7 @@ void MI_Wave(int i)
nya = sy + YDirAdd[sd];
pn = dPiece[nxa][nya];
/// ASSERT: assert((DWORD)pn <= MAXTILES);
if (nMissileTable[pn] == 0) {
if (!nMissileTable[pn]) {
AddMissile(nxa, nya, nxa + XDirAdd[sd], nya + YDirAdd[sd], plr[id]._pdir, MIS_FIREMOVE, 0, id, 0, missile[i]._mispllvl);
nxa += XDirAdd[dira];
nya += YDirAdd[dira];
@ -4039,8 +4039,8 @@ void ProcessMissiles()
}
}
MissilePreFlag = 0;
ManashieldFlag = 0;
MissilePreFlag = FALSE;
ManashieldFlag = FALSE;
for (i = 0; i < nummissiles; i++) {
mi = missileactive[i];

4
Source/missiles.h

@ -6,9 +6,9 @@ extern int missileactive[MAXMISSILES];
extern int missileavail[MAXMISSILES];
extern MissileStruct missile[MAXMISSILES];
extern int nummissiles;
extern int ManashieldFlag;
extern BOOL ManashieldFlag;
extern ChainStruct chain[MAXMISSILES];
extern int MissilePreFlag;
extern BOOL MissilePreFlag;
extern int numchains;
void GetDamageAmt(int i, int *mind, int *maxd);

6
Source/player.cpp

@ -1017,7 +1017,7 @@ void PlrClrTrans(int x, int y)
for (i = y - 1; i <= y + 1; i++) {
for (j = x - 1; j <= x + 1; j++) {
TransList[dTransVal[j][i]] = 0;
TransList[dTransVal[j][i]] = FALSE;
}
}
}
@ -1027,12 +1027,12 @@ void PlrDoTrans(int x, int y)
int i, j;
if (leveltype != DTYPE_CATHEDRAL && leveltype != DTYPE_CATACOMBS) {
TransList[1] = 1;
TransList[1] = TRUE;
} else {
for (i = y - 1; i <= y + 1; i++) {
for (j = x - 1; j <= x + 1; j++) {
if (!nSolidTable[dPiece[j][i]] && dTransVal[j][i]) {
TransList[dTransVal[j][i]] = 1;
TransList[dTransVal[j][i]] = TRUE;
}
}
}

6
Source/scrollrt.cpp

@ -887,7 +887,7 @@ void scrollrt_draw_clipped_dungeon(BYTE *pBuff, int sx, int sy, int dx, int dy,
}
}
if (bArch != 0) {
cel_transparency_active = (BYTE)TransList[bMap];
cel_transparency_active = TransList[bMap];
Cel2DecodeLightTrans(pBuff, pSpecialCels, bArch, 64, 0, 8);
}
}
@ -1353,7 +1353,7 @@ void scrollrt_draw_clipped_dungeon_2(BYTE *pBuff, int sx, int sy, int skipChunks
}
}
if (bArch != 0) {
cel_transparency_active = (BYTE)TransList[bMap];
cel_transparency_active = TransList[bMap];
Cel2DecodeLightTrans(pBuff, pSpecialCels, bArch, 64, CelSkip, 8);
}
}
@ -1773,7 +1773,7 @@ void scrollrt_draw_dungeon(BYTE *pBuff, int sx, int sy, int capChunks, int CelCa
}
}
if (bArch != 0) {
cel_transparency_active = (BYTE)TransList[bMap];
cel_transparency_active = TransList[bMap];
CelDecodeHdrLightTrans(pBuff, pSpecialCels, bArch, 64, 0, CelCap);
}
}

4
Source/stores.cpp

@ -1432,9 +1432,9 @@ void StartStore(char s)
int i;
for (t = s;; t = STORE_SMITH) {
sbookflag = 0;
sbookflag = FALSE;
invflag = 0;
chrflag = 0;
chrflag = FALSE;
questlog = FALSE;
dropGoldFlag = FALSE;
ClearSText(0, 24);

14
Source/towners.cpp

@ -1,11 +1,11 @@
#include "diablo.h"
int storeflag;
BOOL storeflag;
int sgnCowMsg;
int numtowners;
DWORD sgdwCowClicks;
int bannerflag; // unused 0x6AAC28
int boyloadflag;
BOOL bannerflag; // unused 0x6AAC28
BOOL boyloadflag;
BYTE *pCowCels;
TownerStruct towner[16];
@ -210,7 +210,7 @@ void InitBarOwner()
{
int i;
bannerflag = 0; // unused
bannerflag = FALSE; // unused
InitTownerInfo(numtowners, 96, 1, TOWN_TAVERN, 55, 62, 3, 10);
InitQstSnds(numtowners);
towner[numtowners]._tNData = LoadFileInMem("Towners\\TwnF\\TwnFN.CEL", NULL);
@ -275,7 +275,7 @@ void InitBoy()
{
int i;
boyloadflag = 1;
boyloadflag = TRUE;
InitTownerInfo(numtowners, 96, 1, TOWN_PEGBOY, 11, 53, -1, 10);
InitQstSnds(numtowners);
towner[numtowners]._tNData = LoadFileInMem("Towners\\TownBoy\\PegKid1.CEL", NULL);
@ -373,7 +373,7 @@ void InitCows()
void InitTowners()
{
numtowners = 0;
boyloadflag = 0;
boyloadflag = FALSE;
InitSmith();
InitHealer();
if (quests[QTYPE_BUTCH]._qactive && quests[QTYPE_BUTCH]._qactive != 3)
@ -585,7 +585,7 @@ void TownerTalk(int first, int t)
{
sgdwCowClicks = 0;
sgnCowMsg = 0;
storeflag = 1;
storeflag = TRUE;
InitQTextMsg(first);
}

Loading…
Cancel
Save