diff --git a/Source/control.cpp b/Source/control.cpp index 1290ccbd3..e7de4a6cd 100644 --- a/Source/control.cpp +++ b/Source/control.cpp @@ -561,7 +561,7 @@ void DrawSpellList() void SetSpell() { spselflag = 0; - if (pSpell != -1) { + if (pSpell != SPL_INVALID) { ClearPanel(); plr[myplr]._pRSpell = pSpell; plr[myplr]._pRSplType = pSplType; diff --git a/Source/cursor.cpp b/Source/cursor.cpp index 7ac04e506..9e5900809 100644 --- a/Source/cursor.cpp +++ b/Source/cursor.cpp @@ -206,7 +206,7 @@ void CheckCursMove() fx -= (plr[myplr]._pVar6 + plr[myplr]._pxvel) >> 8; fy -= (plr[myplr]._pVar7 + plr[myplr]._pyvel) >> 8; - if (ScrollInfo._sdir != 0) { + if (ScrollInfo._sdir != SDIR_NONE) { sx -= fx; sy -= fy; } diff --git a/Source/items.cpp b/Source/items.cpp index ffc156f7a..715e95e78 100644 --- a/Source/items.cpp +++ b/Source/items.cpp @@ -189,7 +189,7 @@ void InitItemGFX() int i; char arglist[64]; - for (i = 0; i < 35; i++) { + for (i = 0; i < ITEMTYPES; i++) { sprintf(arglist, "Items\\%s.CEL", ItemDropNames[i]); itemanims[i] = LoadFileInMem(arglist, NULL); } diff --git a/Source/items.h b/Source/items.h index 35114397a..4440b0e84 100644 --- a/Source/items.h +++ b/Source/items.h @@ -9,7 +9,7 @@ extern ItemStruct curruitem; extern ItemGetRecordStruct itemrecord[MAXITEMS]; extern ItemStruct item[MAXITEMS + 1]; extern BOOL itemhold[3][3]; -extern BYTE *itemanims[35]; +extern BYTE *itemanims[ITEMTYPES]; extern BOOL UniqueItemFlag[128]; extern int numitems; extern int gnNumGetRecords; @@ -129,10 +129,10 @@ void PutItemRecord(int nSeed, WORD wCI, int nIndex); /* data */ extern BYTE ItemCAnimTbl[169]; -extern char *ItemDropNames[35]; -extern BYTE ItemAnimLs[35]; -extern int ItemDropSnds[35]; -extern int ItemInvSnds[35]; +extern char *ItemDropNames[ITEMTYPES]; +extern BYTE ItemAnimLs[ITEMTYPES]; +extern int ItemDropSnds[ITEMTYPES]; +extern int ItemInvSnds[ITEMTYPES]; extern int idoppely; extern int premiumlvladd[6]; diff --git a/Source/missiles.cpp b/Source/missiles.cpp index 36b24193b..3bfba6fbb 100644 --- a/Source/missiles.cpp +++ b/Source/missiles.cpp @@ -962,7 +962,7 @@ void CheckMissileCol(int i, int mindam, int maxdam, BOOL shift, int mx, int my, } } else { if (dMonster[mx][my] < 0 - && monster[-(dMonster[mx][my] + 1)]._mmode == 15 + && monster[-(dMonster[mx][my] + 1)]._mmode == MM_STONE && MonsterMHit( missile[i]._misource, -(dMonster[mx][my] + 1), diff --git a/Source/monster.cpp b/Source/monster.cpp index cc4e88648..7a7862624 100644 --- a/Source/monster.cpp +++ b/Source/monster.cpp @@ -4056,7 +4056,7 @@ void MAI_Rhino(int i) Monst->_mgoalvar1 = 0; Monst->_mgoalvar2 = random_(133, 2); } - Monst->_mgoal = 4; + Monst->_mgoal = MGOAL_MOVE; if (abs(mx) > abs(my)) { dist = abs(mx); } else { diff --git a/Source/objects.cpp b/Source/objects.cpp index 4262843a9..1e1f6536f 100644 --- a/Source/objects.cpp +++ b/Source/objects.cpp @@ -1063,7 +1063,7 @@ void AddFlameTrap(int i) void AddFlameLvr(int i) { object[i]._oVar1 = trapid; - object[i]._oVar2 = 49; + object[i]._oVar2 = MIS_FLAMEC; } void AddTrap(int i, int ot)