ScummVM API documentation
gamemodule.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 NEVERHOOD_GAMEMODULE_H
23 #define NEVERHOOD_GAMEMODULE_H
24 
25 #include "neverhood/neverhood.h"
26 #include "neverhood/module.h"
27 
28 namespace Neverhood {
29 
30 class GameModule : public Module {
31 public:
33  ~GameModule() override;
34  void startup();
35  void requestRestoreGame();
36  void requestRestartGame(bool requestMainMenu);
37  void redrawPrevChildObject();
38  void checkRequests();
39  void handleMouseMove(int16 x, int16 y);
40  void handleMouseDown(int16 x, int16 y);
41  void handleMouseUp(int16 x, int16 y);
42  void handleWheelUp();
43  void handleWheelDown();
44  void handleSpaceKey();
45  void handleAsciiKey(char key);
46  void handleKeyDown(Common::KeyCode keyCode);
47  void handleEscapeKey();
48  void initKeySlotsPuzzle();
49  void initMemoryPuzzle();
50  void initWaterPipesPuzzle();
51  void initRadioPuzzle();
52  void initTestTubes1Puzzle();
53  void initTestTubes2Puzzle();
54  void initCannonSymbolsPuzzle();
55  void initCodeSymbolsPuzzle();
56  void initCubeSymbolsPuzzle();
57  void initCrystalColorsPuzzle();
58  uint32 getCurrRadioMusicFileHash();
59  int getCurrentModuleNum() { return _moduleNum; }
60  int getPreviousModuleNum() { return _moduleNum; }
61 
62  void createModule(int moduleNum, int which);
63  static byte parseCrystalColor(char colorLetter);
64 protected:
65  int _moduleNum;
66  Entity *_prevChildObject;
67  int _prevModuleNum;
68  bool _restoreGameRequested;
69  bool _restartGameRequested;
70  bool _canRequestMainMenu;
71  bool _mainMenuRequested;
72  Common::String _currentCheat;
73  uint32 handleMessage(int messageNum, const MessageParam &param, Entity *sender);
74  void createModuleByHash(uint32 nameHash);
75  void updateModule();
76  void openMainMenu();
77  void createMenuModule();
78  void updateMenuModule();
79 };
80 
82 public:
84  int getNumber();
85  void removeNumber(int number);
86 protected:
88 };
89 
90 } // End of namespace Neverhood
91 
92 #endif /* NEVERHOOD_MODULE_H */
Definition: background.h:30
Definition: str.h:59
Definition: neverhood.h:60
Definition: array.h:52
Definition: random.h:44
Definition: entity.h:42
Definition: entity.h:77
Definition: module.h:45
Definition: gamemodule.h:81
Definition: gamemodule.h:30