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