ScummVM API documentation
dialogs_spells.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_DIALOGS_SPELLS_H
23 #define XEEN_DIALOGS_SPELLS_H
24 
25 #include "common/array.h"
26 #include "mm/xeen/dialogs/dialogs.h"
27 #include "mm/xeen/party.h"
28 
29 namespace MM {
30 namespace Xeen {
31 
32 enum SpellDialogMode {
33  SPELLS_DIALOG_BUY = 0, SPELLS_DIALOG_SELECT = 1, SPELLS_DIALOG_INFO = 0x80
34 };
35 
36 struct SpellEntry {
37  Common::String _name;
38  int _spellIndex;
39  int _spellId;
40  int _color;
41 
42  SpellEntry(const Common::String &name, int spellIndex, int spellId) :
43  _name(name), _spellIndex(spellIndex), _spellId(spellId), _color(9) {}
44 };
45 
50 class SpellsDialog : public ButtonContainer {
51 private:
52  SpriteResource _iconSprites;
53  SpriteResource _scrollSprites;
55 
60 
64  Character *execute(ButtonContainer *priorDialog, Character *c, int mode);
65 
69  void loadButtons();
70 
74  const char *setSpellText(Character *c, int isCasting);
75 public:
79  static Character *show(XeenEngine *vm, ButtonContainer *priorDialog,
80  Character *c, SpellDialogMode mode);
81 };
82 
83 class CastSpell : public ButtonContainer {
84 private:
85  SpriteResource _iconSprites;
86  int _oldMode;
87 private:
88  CastSpell(XeenEngine *vm);
89  ~CastSpell() override;
90 
91  int execute(Character *&c);
92 
93  void loadButtons();
94 public:
95  static int show(XeenEngine *vm);
96 };
97 
98 class SpellOnWho : public ButtonContainer {
99 private:
101 
102  int execute(int spellId);
103 public:
104  static Character *show(XeenEngine *vm, int spellId);
105 };
106 
108 private:
109  SpriteResource _iconSprites;
110 
112 
113  int execute(int spellId);
114 
115  void loadButtons();
116 public:
117  static int show(XeenEngine *vm, int spellId);
118 };
119 
121 private:
123 
124  void execute(int spellId);
125 public:
126  static void show(XeenEngine *vm, int spellId);
127 };
128 
130 private:
131  SpriteResource _iconSprites;
132 
134 
135  bool execute();
136 
137  void loadButtons();
138 public:
139  static bool show(XeenEngine *vm);
140 };
141 
142 class Teleport : public ButtonContainer {
143 private:
144  SpriteResource _iconSprites;
145 
146  Teleport(XeenEngine *vm) : ButtonContainer(vm) {}
147 
148  int execute();
149 public:
150  static int show(XeenEngine *vm);
151 };
152 
153 class TownPortal : public ButtonContainer {
154 private:
156 
157  int execute();
158 public:
159  static int show(XeenEngine *vm);
160 };
161 
163 private:
165 
166  void execute();
167 public:
168  static void show(XeenEngine *vm);
169 };
170 
172 private:
174 
175  void execute();
176 public:
177  static void show(XeenEngine *vm);
178 };
179 
180 } // End of namespace Xeen
181 } // End of namespace MM
182 
183 #endif
Definition: str.h:59
Definition: dialogs_spells.h:83
Definition: dialogs_spells.h:171
Definition: dialogs_spells.h:142
Definition: dialogs_spells.h:120
Definition: array.h:52
Definition: sprites.h:52
Definition: dialogs_spells.h:50
Definition: xeen.h:93
Definition: dialogs_spells.h:162
Definition: character.h:106
Definition: detection.h:27
Definition: dialogs_spells.h:107
Definition: dialogs.h:74
Definition: dialogs_spells.h:36
Definition: dialogs_spells.h:98
Definition: dialogs_spells.h:129
Definition: dialogs_spells.h:153