ScummVM API documentation
menu_phantom.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 MADS_MENU_PHANTOM_H
23
#define MADS_MENU_PHANTOM_H
24
25
#include "common/scummsys.h"
26
#include "mads/game.h"
27
#include "mads/menu_views.h"
28
#include "mads/msurface.h"
29
#include "mads/phantom/dialogs_phantom.h"
30
31
namespace
MADS
{
32
33
class
MADSEngine;
34
35
namespace
Phantom {
36
37
enum
MADSGameAction {
38
START_GAME, RESUME_GAME, RESTORE_GAME, SHOW_INTRO, EXIT, CREDITS
39
};
40
41
class
MainMenu
:
public
MenuView
{
42
struct
MenuItem {
43
SpriteAsset
*_sprites =
nullptr
;
44
int
_handle = -1;
45
bool
_active =
false
;
46
int
_status = 0;
47
};
48
private
:
49
MenuItem _menuItems[7];
50
int
_menuItemIndex = -1;
51
int
_frameIndex = -1;
52
uint32 _delayTimeout = 0;
53
bool
_skipFlag =
false
;
54
58
int
_highlightedIndex = -1;
59
63
bool
_buttonDown =
false
;
64
68
int
_selectedIndex = -1;
69
73
int
getHighlightedItem(
const
Common::Point
&pt);
74
78
void
unhighlightItem();
79
83
void
handleAction(MADSGameAction action);
84
88
void
addSpriteSlot();
89
90
protected
:
94
void
display
()
override
;
95
99
void
doFrame
()
override
;
100
104
bool
onEvent
(
Common::Event
&event)
override
;
105
public
:
106
MainMenu
(
MADSEngine
*vm);
107
108
~
MainMenu
()
override
;
109
};
110
111
class
AdvertView
:
public
EventTarget
{
112
private
:
116
MADSEngine
*
_vm
;
117
121
bool
_breakFlag;
122
protected
:
126
bool
onEvent
(
Common::Event
&event)
override
;
127
public
:
128
AdvertView
(
MADSEngine
*vm);
129
130
~
AdvertView
()
override
{}
131
135
void
show();
136
};
137
138
class
PhantomAnimationView
:
public
AnimationView
{
139
protected
:
140
void
scriptDone()
override
;
141
public
:
142
PhantomAnimationView
(
MADSEngine
*vm) :
AnimationView
(vm) {}
143
};
144
145
class
PhantomTextView
:
public
TextView
{
146
public
:
147
PhantomTextView
(
MADSEngine
*vm) :
TextView
(vm) {}
148
};
149
150
}
// namespace Phantom
151
}
// namespace MADS
152
153
#endif
MADS::EventTarget
Definition:
events.h:41
MADS::FullScreenDialog::_vm
MADSEngine * _vm
Definition:
dialogs.h:266
MADS::TextView
Definition:
menu_views.h:67
MADS::Phantom::MainMenu::display
void display() override
MADS::Phantom::MainMenu::doFrame
void doFrame() override
MADS::Phantom::PhantomTextView
Definition:
menu_phantom.h:145
Common::Event
Definition:
events.h:210
Common::Point
Definition:
rect.h:144
MADS::MADSEngine
Definition:
mads.h:79
MADS::SpriteAsset
Definition:
assets.h:61
MADS::MenuView
Definition:
menu_views.h:34
MADS
Definition:
action.h:28
MADS::Phantom::MainMenu::onEvent
bool onEvent(Common::Event &event) override
MADS::AnimationView
Definition:
menu_views.h:166
MADS::Phantom::PhantomAnimationView
Definition:
menu_phantom.h:138
MADS::Phantom::MainMenu
Definition:
menu_phantom.h:41
MADS::Phantom::AdvertView
Definition:
menu_phantom.h:111
engines
mads
phantom
menu_phantom.h
Generated on Tue Mar 10 2026 09:19:55 for ScummVM API documentation by
1.8.13