ScummVM API documentation
All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Macros Modules Pages
game_forest.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_FOREST_H
25 #define MADS_GAME_FOREST_H
26 
27 #include "mads/game.h"
28 #include "mads/globals.h"
29 #include "mads/forest/globals_forest.h"
30 
31 namespace MADS {
32 
33 namespace Forest {
34 
35 // TODO: Adapt for Forest's difficulty setting
36 enum StoryMode { STORYMODE_NAUGHTY = 1, STORYMODE_NICE = 2 };
37 
38 enum InventoryObject {
39  OBJ_NONE = -1,
40  OBJ_GEARS = 0,
41  OBJ_RUBBER_BAND = 1,
42  OBJ_FEATHER = 2,
43  OBJ_NEEDLE = 3,
44  OBJ_LILY_PAD = 4,
45  OBJ_PEBBLES = 5,
46  OBJ_REEDS = 6,
47  OBJ_STICKS = 7,
48  OBJ_TWINE = 8,
49  OBJ_VINE_WEED = 9,
50  OBJ_WEB = 10,
51  OBJ_WOOD = 11,
52  OBJ_LEAVES = 12,
53  OBJ_WRENCH = 13,
54  OBJ_Y_STICK = 14,
55  OBJ_FORKED_STICK = 15
56 };
57 
58 class GameForest : public Game {
59  friend class Game;
60 protected:
61  GameForest(MADSEngine *vm);
62 
63  void startGame() override;
64 
65  void initializeGlobals() override;
66 
67  void setSectionHandler() override;
68 
69  void checkShowDialog() override;
70 public:
71  ForestGlobals _globals;
72  StoryMode _storyMode;
73 
74  Globals &globals() override { return _globals; }
75 
76  void doObjectAction() override;
77 
78  void unhandledAction() override;
79 
80  void step() override;
81 
82  void synchronize(Common::Serializer &s, bool phase1) override;
83 };
84 
85 
86 class Section1Handler : public SectionHandler {
87 public:
88  Section1Handler(MADSEngine *vm) : SectionHandler(vm) {}
89 
90  // TODO: Properly implement handler methods
91  void preLoadSection() override {}
92  void sectionPtr2() override {}
93  void postLoadSection() override {}
94 };
95 
96 // TODO: Properly implement handler classes
97 typedef Section1Handler Section2Handler;
98 typedef Section1Handler Section3Handler;
99 typedef Section1Handler Section4Handler;
100 typedef Section1Handler Section5Handler;
101 typedef Section1Handler Section6Handler;
102 typedef Section1Handler Section7Handler;
103 typedef Section1Handler Section8Handler;
104 
105 } // End of namespace Forest
106 
107 } // End of namespace MADS
108 
109 #endif /* MADS_GAME_FOREST_H */
110 
111 #endif
Definition: serializer.h:79
Definition: action.h:28