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