diff --git a/Source/drlg_l3.cpp b/Source/drlg_l3.cpp index 6a6b380d348..d7b4f9e5138 100644 --- a/Source/drlg_l3.cpp +++ b/Source/drlg_l3.cpp @@ -2395,7 +2395,6 @@ static void DRLG_L3() if (warpPos.x < 0) { continue; } - pWarps[DWARP_ENTRY]._wx = warpPos.x; pWarps[DWARP_ENTRY]._wy = warpPos.y; pWarps[DWARP_ENTRY]._wx = 2 * pWarps[DWARP_ENTRY]._wx + DBORDERX + 1; diff --git a/Source/items.cpp b/Source/items.cpp index d70709beba9..ade59481004 100644 --- a/Source/items.cpp +++ b/Source/items.cpp @@ -600,7 +600,7 @@ void CalcPlrItemVals(int pnum, bool Loadgfx) bf = true; } #endif*/ - maxdam = plr._pMaxHP >> (2 - 1 + 1); // ~1/4 hp - halved by resists, doubled by MissToPlr + maxdam = plr._pMaxHP >> (2 + 1 - 1); // ~1/4 hp - halved by resists, doubled by MissToPlr if (wRight->_itype == ITYPE_SHIELD && wRight->_iStatFlag && (gfx == ANIM_ID_UNARMED || gfx == ANIM_ID_SWORD || gfx == ANIM_ID_MACE)) { tac += ((plr._pDexterity - (1 << 7)) * wRight->_iAC) >> 7; diff --git a/Source/monster.cpp b/Source/monster.cpp index 2bc3fc1145a..2fd694db676 100644 --- a/Source/monster.cpp +++ b/Source/monster.cpp @@ -483,7 +483,7 @@ void InitLvlMonsters() AddMonsterType(MT_GOLEM, FALSE); mapMonTypes[0].cmFlags |= MFLAG_NOCORPSE | MFLAG_NODROP; for (i = 0; i < MAX_MINIONS; i++) { - InitMonster(i, 0, 0, 0, 0); + InitMonster(i, DIR_S, 0, 0, 0); monsters[i]._mmode = MM_RESERVED; } } diff --git a/Source/platform/ctr/asio/sys/socket.c b/Source/platform/ctr/asio/sys/socket.c index c1dfaa492ef..9c348469943 100644 --- a/Source/platform/ctr/asio/sys/socket.c +++ b/Source/platform/ctr/asio/sys/socket.c @@ -107,4 +107,4 @@ int socketpair(int domain, int type, int protocol, int socket_vector[2]) { return ENOTSUP; } -#endif \ No newline at end of file +#endif // TCPIP \ No newline at end of file diff --git a/Source/platform/switch/asio/pause.c b/Source/platform/switch/asio/pause.c index d663ee7c09c..b216bc2d7ee 100644 --- a/Source/platform/switch/asio/pause.c +++ b/Source/platform/switch/asio/pause.c @@ -6,4 +6,4 @@ int pause(void) errno = ENOSYS; return -1; } -#endif \ No newline at end of file +#endif // TCPIP \ No newline at end of file diff --git a/Source/plrmsg.cpp b/Source/plrmsg.cpp index c267875793b..353cd978e5c 100644 --- a/Source/plrmsg.cpp +++ b/Source/plrmsg.cpp @@ -242,7 +242,7 @@ void DrawPlrMsg(bool onTop) int msgs[PLRMSG_COUNT], nummsgs, numlines; int i, idx, x, y, h, linelimit, top; const int width = PLRMSG_WIDTH; - Uint32 timeout; + uint32_t timeout; // collect the messages nummsgs = 0; diff --git a/structs.h b/structs.h index fe3747a3f7d..558de151d2b 100644 --- a/structs.h +++ b/structs.h @@ -428,8 +428,8 @@ typedef struct PlayerStruct { int _pMana; // the current mana of the player int _pMaxMana; // the maximum mana of the player BYTE _pSkillLvl[64]; // the skill levels of the player - uint64_t _pISpells; // Bitmask of skills available via equipped items (staff) - BYTE _pSkillFlags; // Bitmask of allowed skill-types (SFLAG_*) + uint64_t _pISpells; // Bitmask of skills available via equipped items (staff) + BYTE _pSkillFlags; // Bitmask of allowed skill-types (SFLAG_*) BOOLEAN _pInfraFlag; BYTE _pgfxnum; // Bitmask indicating what variant of the sprite the player is using. Lower byte define weapon (anim_weapon_id) and higher values define armour (starting with anim_armor_id) BOOLEAN _pHasUnidItem; // whether the player has an unidentified (magic) item equipped diff --git a/tools/patcher/drlp_l2.cpp b/tools/patcher/drlp_l2.cpp index 83c25fef5b0..5d66eaeb5f2 100644 --- a/tools/patcher/drlp_l2.cpp +++ b/tools/patcher/drlp_l2.cpp @@ -11,7 +11,7 @@ DEVILUTION_BEGIN_NAMESPACE BYTE* DRLP_L2_PatchDoors(BYTE* celBuf, size_t* celLen) { - const int frames[] = { 0, 1 }; + const int frames[] = { 0, 1 }; constexpr int FRAME_WIDTH = 64; constexpr int FRAME_HEIGHT = 128; diff --git a/tools/patcher/utils/md5.h b/tools/patcher/utils/md5.h index f7b1d052bb5..54bfc35c338 100644 --- a/tools/patcher/utils/md5.h +++ b/tools/patcher/utils/md5.h @@ -319,7 +319,7 @@ class MD5 printf("%s can't be opened\n", filename); else { - while ((len = fread(buffer, 1, 1024, file))) + while (len = fread(buffer, 1, 1024, file)) Update(buffer, len); Final();