ScummVM API documentation
gameevent.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_GAMEEVENT_H
32#define CRAB_GAMEEVENT_H
33
34#include "crab/event/effect.h"
35#include "crab/event/eventstore.h"
36#include "crab/people/person.h"
37#include "crab/event/triggerset.h"
38
39namespace Crab {
40
41// An uinteger is our event id format
42typedef uint EventID;
43
44// Just map loading function to number load
45#define LoadEventID loadNum
46
47namespace pyrodactyl {
48namespace event {
49enum EventType {
50 EVENT_DIALOG,
51 EVENT_REPLY,
52 EVENT_TEXT,
53 EVENT_ANIM,
54 EVENT_SILENT,
55 EVENT_SPLASH
56};
57
58struct GameEvent {
59 // The event identifier
60 EventID _id;
61
62 // The heading for the dialog spoken
63 Common::String _title;
64
65 // The dialog spoken in the event
66 Common::String _dialog;
67
68 // The state decides which animation is drawn in the dialog box
69 pyrodactyl::people::PersonState _state;
70
71 // Event type and related data index
72 EventType _type;
73 uint _special;
74
75 // The variables changed/added in the event
77
78 // The triggers for the event
79 TriggerSet _trig;
80
81 // The id of the next event
83
84 GameEvent();
85
86 GameEvent(rapidxml::xml_node<char> *node) : GameEvent() {
87 load(node);
88 }
89
90 ~GameEvent() {}
91
92 void load(rapidxml::xml_node<char> *node);
93};
94} // End of namespace event
95} // End of namespace pyrodactyl
96
97} // End of namespace Crab
98
99#endif // CRAB_GAMEEVENT_H
Definition: array.h:52
Definition: str.h:59
Definition: triggerset.h:40
EventType
Definition: events.h:49
Definition: gameevent.h:58