ScummVM API documentation
game_nebular.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_NEBULAR_H
23 #define MADS_GAME_NEBULAR_H
24 
25 #include "common/scummsys.h"
26 #include "mads/game.h"
27 #include "mads/globals.h"
28 #include "mads/nebular/globals_nebular.h"
29 
30 namespace MADS {
31 
32 namespace Nebular {
33 
34 enum StoryMode { STORYMODE_NAUGHTY = 1, STORYMODE_NICE = 2 };
35 
36 enum Difficulty {
37  DIFFICULTY_HARD = 1, DIFFICULTY_MEDIUM = 2, DIFFICULTY_EASY = 3
38 };
39 
40 
41 enum ProtectionResult {
42  PROTECTION_SUCCEED = 0, PROTECTION_FAIL = 1, PROTECTION_ESCAPE = 2
43 };
44 
45 enum InventoryObject {
46  OBJ_NONE = -1,
47  OBJ_BINOCULARS = 0,
48  OBJ_BURGER = 1,
49  OBJ_DEAD_FISH = 2,
50  OBJ_STUFFED_FISH = 3,
51  OBJ_REBREATHER = 4,
52  OBJ_TIMER_MODULE = 5,
53  OBJ_BIG_LEAVES = 6,
54  OBJ_POISON_DARTS = 7,
55  OBJ_PLANT_STALK = 8,
56  OBJ_BLOWGUN = 9,
57  OBJ_TWINKIFRUIT = 10,
58  OBJ_BONE = 11,
59  OBJ_CHICKEN = 12,
60  OBJ_SCALPEL = 13,
61  OBJ_AUDIO_TAPE = 14,
62  OBJ_CREDIT_CHIP = 15,
63  OBJ_SECURITY_CARD = 16,
64  OBJ_CHARGE_CASES = 17,
65  OBJ_ESTROTOXIN = 18,
66  OBJ_BOMB = 19,
67  OBJ_TIMEBOMB = 20,
68  OBJ_REPAIR_LIST = 21,
69  OBJ_ALIEN_LIQUOR = 22,
70  OBJ_TARGET_MODULE = 23,
71  OBJ_SHIELD_MODULATOR = 24,
72  OBJ_TAPE_PLAYER = 25,
73  OBJ_PHONE_CELLS = 26,
74  OBJ_PENLIGHT = 27,
75  OBJ_DURAFAIL_CELLS = 28,
76  OBJ_FAKE_ID = 29,
77  OBJ_ID_CARD = 30,
78  OBJ_POLYCEMENT = 31,
79  OBJ_FISHING_ROD = 32,
80  OBJ_FISHING_LINE = 33,
81  OBJ_PADLOCK_KEY = 34,
82  OBJ_DOOR_KEY = 35,
83  OBJ_REARVIEW_MIRROR = 36,
84  OBJ_COMPACT_CASE = 37,
85  OBJ_DETONATORS = 39,
86  OBJ_BOTTLE = 40,
87  OBJ_CHICKEN_BOMB = 41,
88  OBJ_VASE = 42,
89  OBJ_REMOTE = 43,
90  OBJ_COMPUTER_GAME = 44,
91  OBJ_PHONE_HANDSET = 45,
92  OBJ_BONES = 46,
93  OBJ_GUARDS_ARM = 47,
94  OBJ_LOG = 48,
95  OBJ_BOMBS = 49,
96  OBJ_NOTE = 50,
97  OBJ_COMBINATION = 51,
98  OBJ_FORMALDEHYDE = 52,
99  OBJ_PETROX = 53,
100  OBJ_LECITHIN = 54
101 };
102 
103 class GameNebular : public Game {
104  friend class Game;
105 private:
106  ProtectionResult checkCopyProtection();
107 protected:
108  GameNebular(MADSEngine *vm);
109 
110  void startGame() override;
111 
112  void initializeGlobals() override;
113 
114  void setSectionHandler() override;
115 
116  void checkShowDialog() override;
117 public:
118  NebularGlobals _globals;
119  StoryMode _storyMode;
120  Difficulty _difficulty;
121 
122  Globals &globals() override { return _globals; }
123 
124  void doObjectAction() override;
125 
126  void showRecipe();
127 
128  void unhandledAction() override;
129 
130  void step() override;
131 
132  void synchronize(Common::Serializer &s, bool phase1) override;
133 
134  void setNaughtyMode(bool naughtyMode) override { _storyMode = naughtyMode ? STORYMODE_NAUGHTY : STORYMODE_NICE; }
135  bool getNaughtyMode() const override { return _storyMode == STORYMODE_NAUGHTY; }
136 };
137 
138 // Section handlers aren't needed in ScummVM implementation
140 public:
142 
143  void preLoadSection() override {}
144  void sectionPtr2() override {}
145  void postLoadSection() override {}
146 };
147 
155 
156 } // End of namespace Nebular
157 
158 } // End of namespace MADS
159 
160 #endif /* MADS_GAME_NEBULAR_H */
void doObjectAction() override
void synchronize(Common::Serializer &s, bool phase1) override
void startGame() override
void unhandledAction() override
Definition: game_data.h:57
Definition: serializer.h:79
Definition: globals_nebular.h:292
Definition: globals.h:32
void checkShowDialog() override
Globals & globals() override
Definition: game_nebular.h:122
void initializeGlobals() override
Definition: game_nebular.h:139
Definition: mads.h:87
Definition: game.h:63
Definition: action.h:28
Definition: game_nebular.h:103
void setSectionHandler() override