From 79c9078fa1fbd28ed1408ef2fa6238177ee30df8 Mon Sep 17 00:00:00 2001 From: Anders Jenbo Date: Thu, 24 Jun 2021 00:42:22 +0200 Subject: [PATCH] =?UTF-8?q?=E2=99=BB=EF=B8=8FClean=20up=20type=20sizes?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- Source/control.cpp | 6 ++---- Source/player.h | 2 +- 2 files changed, 3 insertions(+), 5 deletions(-) diff --git a/Source/control.cpp b/Source/control.cpp index e19a10c98..4d3cee1cd 100644 --- a/Source/control.cpp +++ b/Source/control.cpp @@ -315,11 +315,9 @@ static void DrawSpell(const CelOutputBuffer &out) if (currlevel == 0 && st != RSPLTYPE_INVALID && !spelldata[spl].sTownSpell) st = RSPLTYPE_INVALID; SetSpellTrans(st); + const int nCel = (spl != SPL_INVALID) ? SpellITbl[spl] : 27; const Point position { PANEL_X + 565, PANEL_Y + 119 }; - if (spl != SPL_INVALID) - DrawSpellCel(out, position, *pSpellCels, SpellITbl[spl]); - else - DrawSpellCel(out, position, *pSpellCels, 27); + DrawSpellCel(out, position, *pSpellCels, nCel); } static void PrintSBookHotkey(const CelOutputBuffer &out, Point position, const std::string &text) diff --git a/Source/player.h b/Source/player.h index 516321bbc..408a0788b 100644 --- a/Source/player.h +++ b/Source/player.h @@ -80,7 +80,7 @@ enum inv_body_loc : uint8_t { NUM_INVLOC, }; -enum class player_graphic : uint16_t { +enum class player_graphic : uint8_t { Stand, Walk, Attack,