ScummVM API documentation
interface.h
1/* ScummVM - Graphic Adventure Engine
2 *
3 * ScummVM is the legal property of its developers, whose names
4 * are too numerous to list here. Please refer to the COPYRIGHT
5 * file distributed with this source distribution.
6 *
7 * This program is free software: you can redistribute it and/or modify
8 * it under the terms of the GNU General Public License as published by
9 * the Free Software Foundation, either version 3 of the License, or
10 * (at your option) any later version.
11 *
12 * This program is distributed in the hope that it will be useful,
13 * but WITHOUT ANY WARRANTY; without even the implied warranty of
14 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
15 * GNU General Public License for more details.
16 *
17 * You should have received a copy of the GNU General Public License
18 * along with this program. If not, see <http://www.gnu.org/licenses/>.
19 *
20 */
21
22#ifndef XEEN_INTERFACE_H
23#define XEEN_INTERFACE_H
24
25#include "common/scummsys.h"
26#include "mm/xeen/dialogs/dialogs.h"
27#include "mm/xeen/interface_minimap.h"
28#include "mm/xeen/interface_scene.h"
29#include "mm/xeen/party.h"
30#include "mm/xeen/window.h"
31
32namespace MM {
33namespace Xeen {
34
35class XeenEngine;
36
37enum Obscurity {
38 OBSCURITY_BLACK = 0,
39 OBSCURITY_3 = 1,
40 OBSCURITY_2 = 2,
41 OBSCURITY_1 = 3,
42 OBSCURITY_NONE = 4
43};
44
45enum IconsMode {
46 ICONS_STANDARD = 0,
47 ICONS_COMBAT = 1
48};
49
50enum FallState {
51 FALL_NONE = 0,
52 FALL_IN_PROGRESS = 1,
53 FALL_START = 2
54};
55
56#define HILIGHT_CHAR_DISABLED -2
57#define HILIGHT_CHAR_NONE -1
58
63private:
64 XeenEngine *_vm;
65 SpriteResource _dseFace;
66 SpriteResource _hpSprites;
67 SpriteResource _restoreSprites;
68 int _hiliteChar;
69public:
71
72 void drawParty(bool updateFlag);
73
78 void highlightChar(int charId);
79
84 void highlightChar(const Character *c);
85
86 void unhighlightChar();
87
88 void resetHighlight();
89
90private:
91 void drawHitPoints(int charIndex);
92};
93
98 public InterfaceMinimap, public PartyDrawer {
99private:
100 XeenEngine *_vm;
101 SpriteResource _uiSprites;
102 SpriteResource _borderSprites;
103 SpriteResource _spellFxSprites;
104 SpriteResource _fecpSprites;
105 SpriteResource _blessSprites;
106 SpriteResource _stdIcons;
107 SpriteResource _combatIcons;
108 Graphics::ManagedSurface _fallSurface;
109 bool _buttonsLoaded;
110 int _steppingFX;
111 int _blessedUIFrame;
112 int _powerShieldUIFrame;
113 int _holyBonusUIFrame;
114 int _heroismUIFrame;
115 int _flipUIFrame;
116
117 void loadSprites();
118
119 void setupBackground();
120
124 void setMainButtons(IconsMode mode = ICONS_STANDARD);
125
126 void chargeStep();
127
131 void stepTime();
132
133 void doStepCode();
134
138 bool checkMoveDirection(int key);
139
143 void handleFalling();
144
151 void setupFallSurface(bool isTop);
152
156 void fall(int yp);
157
162 void shake(int count);
163
167 void nextChar();
168public:
169 Obscurity _obscurity;
170 FallState _falling;
171 int _face1State, _face2State;
172 int _face1UIFrame, _face2UIFrame;
173 int _spotDoorsUIFrame;
174 int _dangerSenseUIFrame;
175 int _levitateUIFrame;
176 bool _upDoorText;
177 Common::String _screenText;
178 Common::String _ttsPreviousScreenText;
179 byte _tillMove;
180 int _charFX[6];
181 IconsMode _iconsMode;
182public:
184
185 ~Interface() override {}
186
187 void setup();
188
189 void manageCharacters(bool soundPlayed);
190
191 void startup();
192
193 void mainIconsPrint();
194
198 void startFalling(bool v);
199
204 void perform();
205
206 void rest();
207
211 void bash(const Common::Point &pt, Direction direction);
212
218 void draw3d(bool updateFlag, bool pauseFlag = true);
219
224
225 void doCombat();
226
227 void spellFX(Character *c);
228
232 void obscureScene(Obscurity obscurity);
233};
234
235} // End of namespace Xeen
236} // End of namespace MM
237
238#endif
Definition: str.h:59
Definition: managed_surface.h:51
Definition: sprites.h:52
Definition: dialogs.h:88
Definition: character.h:106
Definition: interface.h:98
void obscureScene(Obscurity obscurity)
void startFalling(bool v)
void bash(const Common::Point &pt, Direction direction)
void draw3d(bool updateFlag, bool pauseFlag=true)
Definition: interface_minimap.h:28
Definition: interface_scene.h:120
Definition: interface.h:62
void highlightChar(int charId)
void highlightChar(const Character *c)
Definition: xeen.h:107
Definition: detection.h:27
Definition: rect.h:144