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
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
:
100
SpellOnWho
(
XeenEngine
*vm) :
ButtonContainer
(vm) {}
101
102
int
execute(
int
spellId);
103
public
:
104
static
Character
*show(
XeenEngine
*vm,
int
spellId);
105
};
106
107
class
SelectElement
:
public
ButtonContainer
{
108
private
:
109
SpriteResource
_iconSprites;
110
111
SelectElement
(
XeenEngine
*vm) :
ButtonContainer
(vm) {}
112
113
int
execute(
int
spellId);
114
115
void
loadButtons();
116
public
:
117
static
int
show(
XeenEngine
*vm,
int
spellId);
118
};
119
120
class
NotWhileEngaged
:
public
ButtonContainer
{
121
private
:
122
NotWhileEngaged
(
XeenEngine
*vm) :
ButtonContainer
(vm) {}
123
124
void
execute(
int
spellId);
125
public
:
126
static
void
show(
XeenEngine
*vm,
int
spellId);
127
};
128
129
class
LloydsBeacon
:
public
ButtonContainer
{
130
private
:
131
SpriteResource
_iconSprites;
132
133
LloydsBeacon
(
XeenEngine
*vm) :
ButtonContainer
(vm) {}
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
:
155
TownPortal
(
XeenEngine
*vm) :
ButtonContainer
(vm) {}
156
157
int
execute();
158
public
:
159
static
int
show(
XeenEngine
*vm);
160
};
161
162
class
IdentifyMonster
:
public
ButtonContainer
{
163
private
:
164
IdentifyMonster
(
XeenEngine
*vm) :
ButtonContainer
(vm) {}
165
166
void
execute();
167
public
:
168
static
void
show(
XeenEngine
*vm);
169
};
170
171
class
DetectMonsters
:
public
ButtonContainer
{
172
private
:
173
DetectMonsters
(
XeenEngine
*vm) :
ButtonContainer
(vm) {}
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
Common::String
Definition:
str.h:59
MM::Xeen::CastSpell
Definition:
dialogs_spells.h:83
MM::Xeen::DetectMonsters
Definition:
dialogs_spells.h:171
MM::Xeen::Teleport
Definition:
dialogs_spells.h:142
MM::Xeen::NotWhileEngaged
Definition:
dialogs_spells.h:120
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:93
MM::Xeen::IdentifyMonster
Definition:
dialogs_spells.h:162
MM::Xeen::Character
Definition:
character.h:106
MM
Definition:
detection.h:27
MM::Xeen::SelectElement
Definition:
dialogs_spells.h:107
MM::Xeen::ButtonContainer
Definition:
dialogs.h:74
MM::Xeen::SpellEntry
Definition:
dialogs_spells.h:36
MM::Xeen::SpellOnWho
Definition:
dialogs_spells.h:98
MM::Xeen::LloydsBeacon
Definition:
dialogs_spells.h:129
MM::Xeen::TownPortal
Definition:
dialogs_spells.h:153
engines
mm
xeen
dialogs
dialogs_spells.h
Generated on Fri Nov 22 2024 09:20:12 for ScummVM API documentation by
1.8.13