aboutsummaryrefslogtreecommitdiff
path: root/engines/xeen/interface.h
diff options
context:
space:
mode:
authorPaul Gilbert2018-01-23 19:46:03 -0500
committerPaul Gilbert2018-01-23 19:46:03 -0500
commit534755fea1b3b887b85e4384cb224ad7658eda60 (patch)
tree9919ebbf6b8b5eb71bfe29c49dcc3efe57301a68 /engines/xeen/interface.h
parentc1accefe5c9f2bd183f3e1136a4c5a1162ad6939 (diff)
downloadscummvm-rg350-534755fea1b3b887b85e4384cb224ad7658eda60.tar.gz
scummvm-rg350-534755fea1b3b887b85e4384cb224ad7658eda60.tar.bz2
scummvm-rg350-534755fea1b3b887b85e4384cb224ad7658eda60.zip
XEEN: Fix drawing of combat icons during battle
This also refactors out the use of _mainList, which separately draws the icons. Since the data needed is already added to the _buttons array, I could dispense with _mainList and draw the buttons directly.
Diffstat (limited to 'engines/xeen/interface.h')
-rw-r--r--engines/xeen/interface.h17
1 files changed, 12 insertions, 5 deletions
diff --git a/engines/xeen/interface.h b/engines/xeen/interface.h
index a249e6f025..991b050bad 100644
--- a/engines/xeen/interface.h
+++ b/engines/xeen/interface.h
@@ -42,6 +42,11 @@ enum Obscurity {
OBSCURITY_NONE = 4
};
+enum IconsMode {
+ ICONS_STANDARD = 0,
+ ICONS_COMBAT = 1
+};
+
#define HILIGHT_CHAR_DISABLED -2
#define HILIGHT_CHAR_NONE -1
@@ -75,12 +80,12 @@ class Interface: public ButtonContainer, public InterfaceScene,
private:
XeenEngine *_vm;
SpriteResource _uiSprites;
- SpriteResource _iconSprites;
SpriteResource _borderSprites;
SpriteResource _spellFxSprites;
SpriteResource _fecpSprites;
SpriteResource _blessSprites;
- DrawStruct _mainList[16];
+ SpriteResource _stdIcons;
+ SpriteResource _combatIcons;
bool _buttonsLoaded;
int _steppingFX;
@@ -90,13 +95,14 @@ private:
int _heroismUIFrame;
int _flipUIFrame;
- void initDrawStructs();
-
void loadSprites();
void setupBackground();
- void setMainButtons(bool combatMode = false);
+ /**
+ * Sets the main user interface icons for either standard mode or combat mode
+ */
+ void setMainButtons(IconsMode mode = ICONS_STANDARD);
void chargeStep();
@@ -143,6 +149,7 @@ public:
Common::String _screenText;
byte _tillMove;
int _charFX[6];
+ IconsMode _iconsMode;
public:
Interface(XeenEngine *vm);