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;
54
Common::Array<SpellEntry>
_spells;
55
59
SpellsDialog
(
XeenEngine
*vm) :
ButtonContainer
(vm) {}
60
64
Character
*execute(
ButtonContainer
*priorDialog,
Character
*c,
int
mode);
65
69
void
loadButtons();
70
74
const
char
*setSpellText(
Character
*c,
int
isCasting);
75
76
#ifdef USE_TTS
77
82
void
speakText(
const
Common::String
&text,
int
mode);
83
90
Common::String
resetButtonTexts(
const
Common::String
&text,
int
mode);
91
#endif
92
public
:
96
static
Character
*show(
XeenEngine
*vm,
ButtonContainer
*priorDialog,
97
Character
*c, SpellDialogMode mode);
98
};
99
100
class
CastSpell
:
public
ButtonContainer
{
101
private
:
102
SpriteResource
_iconSprites;
103
int
_oldMode;
104
private
:
105
CastSpell
(
XeenEngine
*vm);
106
~
CastSpell
()
override
;
107
108
int
execute(
Character
*&c);
109
110
void
loadButtons();
111
112
#ifdef USE_TTS
113
void
speakText(
const
Common::String
&text);
114
#endif
115
public
:
116
static
int
show(
XeenEngine
*vm);
117
};
118
119
class
SpellOnWho
:
public
ButtonContainer
{
120
private
:
121
SpellOnWho
(
XeenEngine
*vm) :
ButtonContainer
(vm) {}
122
123
int
execute(
int
spellId);
124
public
:
125
static
Character
*show(
XeenEngine
*vm,
int
spellId);
126
};
127
128
class
SelectElement
:
public
ButtonContainer
{
129
private
:
130
SpriteResource
_iconSprites;
131
132
SelectElement
(
XeenEngine
*vm) :
ButtonContainer
(vm) {}
133
134
int
execute(
int
spellId);
135
136
void
loadButtons();
137
138
#ifdef USE_TTS
139
void
speakText(
const
Common::String
&text);
140
#endif
141
public
:
142
static
int
show(
XeenEngine
*vm,
int
spellId);
143
};
144
145
class
NotWhileEngaged
:
public
ButtonContainer
{
146
private
:
147
NotWhileEngaged
(
XeenEngine
*vm) :
ButtonContainer
(vm) {}
148
149
void
execute(
int
spellId);
150
public
:
151
static
void
show(
XeenEngine
*vm,
int
spellId);
152
};
153
154
class
LloydsBeacon
:
public
ButtonContainer
{
155
private
:
156
SpriteResource
_iconSprites;
157
158
LloydsBeacon
(
XeenEngine
*vm) :
ButtonContainer
(vm) {}
159
160
bool
execute();
161
162
void
loadButtons();
163
164
#ifdef USE_TTS
165
void
speakText(
const
Common::String
&text);
166
#endif
167
public
:
168
static
bool
show(
XeenEngine
*vm);
169
};
170
171
class
Teleport
:
public
ButtonContainer
{
172
private
:
173
SpriteResource
_iconSprites;
174
175
Teleport
(
XeenEngine
*vm) :
ButtonContainer
(vm) {}
176
177
int
execute();
178
public
:
179
static
int
show(
XeenEngine
*vm);
180
};
181
182
class
TownPortal
:
public
ButtonContainer
{
183
private
:
184
TownPortal
(
XeenEngine
*vm) :
ButtonContainer
(vm) {}
185
186
int
execute();
187
public
:
188
static
int
show(
XeenEngine
*vm);
189
};
190
191
class
IdentifyMonster
:
public
ButtonContainer
{
192
private
:
193
IdentifyMonster
(
XeenEngine
*vm) :
ButtonContainer
(vm) {}
194
195
void
execute();
196
197
#ifdef USE_TTS
198
void
speakText(
const
Common::String
&text)
const
;
199
#endif
200
public
:
201
static
void
show(
XeenEngine
*vm);
202
};
203
204
class
DetectMonsters
:
public
ButtonContainer
{
205
private
:
206
DetectMonsters
(
XeenEngine
*vm) :
ButtonContainer
(vm) {}
207
208
void
execute();
209
public
:
210
static
void
show(
XeenEngine
*vm);
211
};
212
213
}
// End of namespace Xeen
214
}
// End of namespace MM
215
216
#endif
Common::String
Definition:
str.h:59
MM::Xeen::CastSpell
Definition:
dialogs_spells.h:100
MM::Xeen::DetectMonsters
Definition:
dialogs_spells.h:204
MM::Xeen::Teleport
Definition:
dialogs_spells.h:171
MM::Xeen::NotWhileEngaged
Definition:
dialogs_spells.h:145
Common::Array
Definition:
array.h:52
MM::Shared::Xeen::SpriteResource
Definition:
sprites.h:52
MM::Xeen::SpellsDialog
Definition:
dialogs_spells.h:50
MM::Xeen::XeenEngine
Definition:
xeen.h:107
MM::Xeen::IdentifyMonster
Definition:
dialogs_spells.h:191
MM::Xeen::Character
Definition:
character.h:106
MM
Definition:
detection.h:27
MM::Xeen::SelectElement
Definition:
dialogs_spells.h:128
MM::Xeen::ButtonContainer
Definition:
dialogs.h:88
MM::Xeen::SpellEntry
Definition:
dialogs_spells.h:36
MM::Xeen::SpellOnWho
Definition:
dialogs_spells.h:119
MM::Xeen::LloydsBeacon
Definition:
dialogs_spells.h:154
MM::Xeen::TownPortal
Definition:
dialogs_spells.h:182
engines
mm
xeen
dialogs
dialogs_spells.h
Generated on Wed Sep 3 2025 09:12:08 for ScummVM API documentation by
1.8.13