ScummVM API documentation
All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Macros Modules Pages
game_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 #ifdef ENABLE_MADSV2
23 
24 #ifndef MADS_GAME_PHANTOM_H
25 #define MADS_GAME_PHANTOM_H
26 
27 #include "mads/game.h"
28 #include "mads/globals.h"
29 #include "mads/phantom/globals_phantom.h"
30 
31 namespace MADS {
32 
33 namespace Phantom {
34 
35 enum Difficulty {
36  DIFFICULTY_HARD = 1, DIFFICULTY_MEDIUM = 2, DIFFICULTY_EASY = 3
37 };
38 
39 enum InventoryObject {
40  OBJ_NONE = -1,
41  OBJ_KEY = 0,
42  OBJ_LANTERN = 1,
43  OBJ_RED_FRAME = 2,
44  OBJ_SANDBAG = 3,
45  OBJ_YELLOW_FRAME = 4,
46  OBJ_FIRE_AXE = 5,
47  OBJ_SMALL_NOTE = 6,
48  OBJ_ROPE = 7,
49  OBJ_SWORD = 8,
50  OBJ_ENVELOPE = 9,
51  OBJ_TICKET = 10,
52  OBJ_PIECE_OF_PAPER = 11,
53  OBJ_PARCHMENT = 12,
54  OBJ_LETTER = 13,
55  OBJ_NOTICE = 14,
56  OBJ_BOOK = 15,
57  OBJ_CRUMPLED_NOTE = 16,
58  OBJ_BLUE_FRAME = 17,
59  OBJ_LARGE_NOTE = 18,
60  OBJ_GREEN_FRAME = 19,
61  OBJ_MUSIC_SCORE = 20,
62  OBJ_WEDDING_RING = 21,
63  OBJ_CABLE_HOOK = 22,
64  OBJ_ROPE_WITH_HOOK = 23,
65  OBJ_OAR = 24
66 };
67 
68 enum MazeEvent {
69  MAZE_EVENT_NONE = 0,
70  MAZE_EVENT_PUDDLE = 0x0001,
71  MAZE_EVENT_RAT_NEST = 0x0002,
72  MAZE_EVENT_SKULL = 0x0004,
73  MAZE_EVENT_POT = 0x0008,
74  MAZE_EVENT_BRICK = 0x0010,
75  MAZE_EVENT_HOLE = 0x0020,
76  MAZE_EVENT_WEB = 0x0040,
77  MAZE_EVENT_PLANK = 0x0080,
78  MAZE_EVENT_DRAIN = 0x0100,
79  MAZE_EVENT_STONE = 0x0200,
80  MAZE_EVENT_BLOCK = 0x0400,
81  MAZE_EVENT_FALLEN_BLOCK = 0x0800
82 };
83 
84 struct Catacombs {
85  int _sceneNum;
86  int _exit[4];
87  int _fromDirection[4];
88  int _flags;
89 };
90 
91 class GamePhantom : public Game {
92  friend class Game;
93 
94 private:
95  void genericObjectExamine();
96  void stopWalker();
97  void stopWalkerBasic();
98 
99  Catacombs *_catacombs;
100  int _catacombSize;
101 
102 protected:
103  GamePhantom(MADSEngine *vm);
104 
105  void startGame() override;
106 
107  void initializeGlobals() override;
108 
109  void setSectionHandler() override;
110 
111  void checkShowDialog() override;
112 public:
113  PhantomGlobals _globals;
114  Difficulty _difficulty;
115 
116 
117  Globals &globals() override { return _globals; }
118 
119  void doObjectAction() override;
120 
121  void unhandledAction() override;
122 
123  void step() override;
124 
125  void synchronize(Common::Serializer &s, bool phase1) override;
126 
127  void setupCatacombs();
128  void enterCatacombs(bool val);
129  void initCatacombs();
130  void moveCatacombs(int dir);
131  int exitCatacombs(int dir);
132  void newCatacombRoom(int fromRoom, int fromExit);
133 };
134 
135 // Section handlers aren't needed in ScummVM implementation
136 class Section1Handler : public SectionHandler {
137 public:
138  Section1Handler(MADSEngine *vm) : SectionHandler(vm) {}
139 
140  void preLoadSection() override {}
141  void sectionPtr2() override {}
142  void postLoadSection() override {}
143 };
144 
145 typedef Section1Handler Section2Handler;
146 typedef Section1Handler Section3Handler;
147 typedef Section1Handler Section4Handler;
148 typedef Section1Handler Section5Handler;
149 
150 } // End of namespace Nebular
151 
152 } // End of namespace MADS
153 
154 #endif /* MADS_GAME_PHANTOM_H */
155 
156 #endif
Definition: serializer.h:79
Definition: action.h:28