ScummVM API documentation
gameeventmanager.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
/*
23
* This code is based on the CRAB engine
24
*
25
* Copyright (c) Arvind Raja Yadav
26
*
27
* Licensed under MIT
28
*
29
*/
30
31
#ifndef CRAB_GAMEEVENTMANAGER_H
32
#define CRAB_GAMEEVENTMANAGER_H
33
34
#include "crab/event/EventSeqGroup.h"
35
#include "crab/ui/ChapterIntro.h"
36
#include "crab/ui/hud.h"
37
#include "crab/ui/journal.h"
38
#include "crab/ui/PersonHandler.h"
39
#include "crab/ui/PersonScreen.h"
40
#include "crab/ui/ReplyMenu.h"
41
#include "crab/ui/textarea.h"
42
43
namespace
Crab
{
44
45
namespace
pyrodactyl {
46
namespace
event {
47
class
Manager
{
48
protected
:
49
// All the events in the game
50
Common::HashMap<Common::String, EventSeqGroup>
_eventMap;
51
52
// The currently happening or active sequence
53
uint _activeSeq;
54
55
// THIS IS NOT THE DEFINITIVE LIST OF ENDED SEQUENCES
56
// JUST A TEMPORARY LIST OF EVENT SEQUENCES TO PASS AROUND
57
Common::Array<EventSeqInfo>
_endSeq;
58
59
// The objects used to draw the dialog box and opinion bars
60
pyrodactyl::ui::PersonHandler
_oh;
61
62
// The _reply menu and the colors and font of the text
63
pyrodactyl::ui::ReplyMenu
_reply;
64
65
// The field for text input
66
pyrodactyl::ui::TextArea
_textin;
67
68
// The info for intro events
69
pyrodactyl::ui::ChapterIntro
_intro;
70
71
// Store the current event data temporarily
72
GameEvent
*_curEvent;
73
bool
_player;
74
pyrodactyl::anim::Sprite
*_curSp;
75
76
void
updateDialogBox(
Info
&info,
pyrodactyl::level::Level
&level);
77
78
public
:
79
// The object used to draw the character screen
80
pyrodactyl::ui::PersonScreen
_per;
81
82
// A flag used to stop drawing the game for a better fade in/fade out experience
83
bool
_drawGame;
84
85
Manager
() {
86
init();
87
}
88
89
~
Manager
() {}
90
91
void
init();
92
void
load(rapidxml::xml_node<char> *node,
pyrodactyl::ui::ParagraphData
&popup);
93
94
void
draw(
Info
&info,
pyrodactyl::ui::HUD
&hud,
pyrodactyl::level::Level
&level);
95
96
// cur_per is also updated here
97
void
internalEvents(
Info
&info,
pyrodactyl::level::Level
&level,
Common::Array<EventResult>
&result);
98
99
void
handleEvents(
Info
&info,
const
Common::String
&playerId,
Common::Event
&event,
100
pyrodactyl::ui::HUD
&hud,
pyrodactyl::level::Level
&level,
Common::Array<EventResult>
&result);
101
102
void
calcActiveSeq(
Info
&info,
pyrodactyl::level::Level
&level,
const
Rect
&camera);
103
104
void
endSequence(
const
Common::String
&curloc);
105
bool
eventInProgress();
106
107
void
saveState(rapidxml::xml_document<> &doc, rapidxml::xml_node<char> *root);
108
void
loadState(rapidxml::xml_node<char> *node);
109
110
void
setUI();
111
};
112
}
// End of namespace event
113
}
// End of namespace pyrodactyl
114
115
}
// End of namespace Crab
116
117
#endif // CRAB_GAMEEVENTMANAGER_H
Crab::pyrodactyl::event::Manager
Definition:
gameeventmanager.h:47
Crab::pyrodactyl::anim::Sprite
Definition:
sprite.h:49
Common::String
Definition:
str.h:59
Crab::pyrodactyl::ui::TextArea
Definition:
textarea.h:45
Crab::Rect
Definition:
Rectangle.h:42
Crab::pyrodactyl::ui::ParagraphData
Definition:
ParagraphData.h:40
Common::Array
Definition:
array.h:52
Crab::pyrodactyl::event::GameEvent
Definition:
gameevent.h:58
Crab::pyrodactyl::ui::ChapterIntro
Definition:
ChapterIntro.h:46
Crab::pyrodactyl::event::Info
Definition:
GameEventInfo.h:44
Crab::pyrodactyl::ui::HUD
Definition:
hud.h:59
Common::HashMap
Definition:
hashmap.h:85
Common::Event
Definition:
events.h:199
Crab
Definition:
moveeffect.h:37
Crab::pyrodactyl::ui::PersonScreen
Definition:
PersonScreen.h:48
Crab::pyrodactyl::level::Level
Definition:
level.h:45
Crab::pyrodactyl::ui::PersonHandler
Definition:
PersonHandler.h:48
Crab::pyrodactyl::ui::ReplyMenu
Definition:
ReplyMenu.h:47
engines
crab
event
gameeventmanager.h
Generated on Thu Dec 26 2024 09:11:43 for ScummVM API documentation by
1.8.13