ScummVM API documentation
vcruise.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 VCRUISE_H
23 #define VCRUISE_H
24 
25 #include "engines/engine.h"
26 #include "common/rect.h"
27 
28 #include "vcruise/runtime.h"
29 #include "vcruise/detection.h"
30 
40 namespace VCruise {
41 
42 class VCruiseEngine : public ::Engine {
43 protected:
44  // Engine APIs
45  Common::Error run() override;
46 
47 public:
48  VCruiseEngine(OSystem *syst, const VCruiseGameDescription *gameDesc);
49  ~VCruiseEngine() override;
50 
51  bool hasFeature(EngineFeature f) const override;
52  void syncSoundSettings() override;
53 
54  const VCruiseGameDescription *_gameDescription;
55 
56  Common::Error saveGameStream(Common::WriteStream *stream, bool isAutosave) override;
58 
59  bool canSaveAutosaveCurrently() override;
60  bool canSaveGameStateCurrently(Common::U32String *msg = nullptr) override;
61  bool canLoadGameStateCurrently(Common::U32String *msg = nullptr) override;
62 
63  void initializePath(const Common::FSNode &gamePath) override;
64 
65  bool hasDefaultSave();
66  bool hasAnySave();
67 
68  Common::Error loadMostRecentSave();
69 
70 protected:
71  void pauseEngineIntern(bool pause) override;
72 
73 private:
74  void handleEvents();
75  static void staticHandleMidiTimer(void *refCon);
76  void handleMidiTimer();
77 
78  Common::Rect _videoRect;
79  Common::Rect _menuBarRect;
80  Common::Rect _trayRect;
81  Common::Rect _subtitleRect;
82 
83  Common::FSNode _rootFSNode;
84 
86 };
87 
88 } // End of namespace VCruise
89 
90 #endif /* VCRUISE_H */
void pauseEngineIntern(bool pause) override
EngineFeature
Definition: engine.h:253
Definition: detection.h:49
Definition: stream.h:77
Definition: error.h:84
void initializePath(const Common::FSNode &gamePath) override
Common::Error run() override
bool canSaveGameStateCurrently(Common::U32String *msg=nullptr) override
Definition: rect.h:144
Definition: stream.h:745
bool canSaveAutosaveCurrently() override
Common::Error loadGameStream(Common::SeekableReadStream *stream) override
Definition: ad2044_items.h:27
Definition: ustr.h:57
void syncSoundSettings() override
bool canLoadGameStateCurrently(Common::U32String *msg=nullptr) override
Definition: fs.h:69
Definition: vcruise.h:42
bool hasFeature(EngineFeature f) const override
Definition: system.h:161
Definition: ptr.h:159
Common::Error saveGameStream(Common::WriteStream *stream, bool isAutosave) override
Definition: engine.h:144