From 3f4a539bf7dcfd3203f01d521eb6bf0f68614d7d Mon Sep 17 00:00:00 2001 From: Robin Eklind Date: Wed, 17 Jul 2019 12:10:34 +0200 Subject: [PATCH] Make _pBlockFlag into a boolean. _pBlockFlag is only ever used in boolean contexts. --- Source/items.cpp | 6 +++--- structs.h | 2 +- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/Source/items.cpp b/Source/items.cpp index 605dc467b..d6958c1fa 100644 --- a/Source/items.cpp +++ b/Source/items.cpp @@ -515,7 +515,7 @@ void CalcPlrItemVals(int p, BOOL Loadgfx) plr[p]._pInfraFlag = 0; } - plr[p]._pBlockFlag = 0; + plr[p]._pBlockFlag = FALSE; plr[p]._pwtype = WT_MELEE; g = 0; @@ -552,11 +552,11 @@ void CalcPlrItemVals(int p, BOOL Loadgfx) } if (plr[p].InvBody[INVLOC_HAND_LEFT]._itype == ITYPE_SHIELD && plr[p].InvBody[INVLOC_HAND_LEFT]._iStatFlag) { - plr[p]._pBlockFlag = 1; + plr[p]._pBlockFlag = TRUE; g++; } if (plr[p].InvBody[INVLOC_HAND_RIGHT]._itype == ITYPE_SHIELD && plr[p].InvBody[INVLOC_HAND_RIGHT]._iStatFlag) { - plr[p]._pBlockFlag = 1; + plr[p]._pBlockFlag = TRUE; g++; } diff --git a/structs.h b/structs.h index dd100d914..6dab1427e 100644 --- a/structs.h +++ b/structs.h @@ -224,7 +224,7 @@ typedef struct PlayerStruct { int _pSplHotKey[4]; char _pSplTHotKey[4]; int _pwtype; - unsigned char _pBlockFlag; + BOOLEAN _pBlockFlag; unsigned char _pInvincible; char _pLightRad; unsigned char _pLvlChanging;