ScummVM API documentation
mutationofjb.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 MUTATIONOFJB_MUTATIONOFJB_H
23 #define MUTATIONOFJB_MUTATIONOFJB_H
24 
25 #include "engines/engine.h"
26 #include "mutationofjb/script.h"
27 
28 struct ADGameDescription;
29 
30 namespace Common {
31 struct Event;
32 class Serializer;
33 }
34 
35 namespace Graphics {
36 class Screen;
37 }
38 
39 namespace MutationOfJB {
40 
41 class Console;
42 class Game;
43 class GuiScreen;
44 
45 struct SaveHeader {
46  bool sync(Common::Serializer &sz);
47 
48  Common::String _description;
49 };
50 
51 class MutationOfJBEngine : public Engine {
52 public:
53  enum CursorState {
54  CURSOR_OFF,
55  CURSOR_IDLE,
56  CURSOR_ACTIVE
57  };
58 
59  MutationOfJBEngine(OSystem *syst, const ADGameDescription *gameDesc);
60  ~MutationOfJBEngine() override;
61 
62  Common::Error run() override;
63  Graphics::Screen *getScreen() const;
64  Game &getGame();
65  void setCursorState(CursorState cursorState);
66 
67  bool hasFeature(EngineFeature f) const override;
68  bool canLoadGameStateCurrently(Common::U32String *msg = nullptr) override;
69  Common::Error loadGameState(int slot) override;
70  bool canSaveGameStateCurrently(Common::U32String *msg = nullptr) override;
71  Common::Error saveGameState(int slot, const Common::String &desc, bool isAutosave = false) override;
72 
73  const ADGameDescription *getGameDescription() const;
74 
75 private:
76  bool loadGameData(bool partB);
77  void setupCursor();
78  void updateCursorPalette();
79 
80  const ADGameDescription *_gameDesc;
81  Graphics::Screen *_screen;
82  Game *_game;
83  uint8 _mapObjectId;
84 
85  CursorState _cursorState;
86  GuiScreen *_currentScreen;
87 };
88 
89 }
90 
91 #endif
Definition: str.h:59
EngineFeature
Definition: engine.h:253
Definition: error.h:84
Definition: game.h:50
Definition: advancedDetector.h:163
Definition: atari-screen.h:60
Definition: screen.h:48
Definition: serializer.h:79
Definition: ustr.h:57
Definition: mutationofjb.h:51
Definition: animationdecoder.h:36
Definition: algorithm.h:29
Definition: formatinfo.h:28
Definition: mutationofjb.h:45
Definition: system.h:161
Definition: engine.h:144
Definition: guiscreen.h:45