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
40namespace VCruise {
41
42class VCruiseEngine : public ::Engine {
43protected:
44 // Engine APIs
45 Common::Error run() override;
46
47public:
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
70protected:
71 void pauseEngineIntern(bool pause) override;
72
73private:
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 */
Definition: error.h:81
Definition: fs.h:69
Definition: stream.h:745
Definition: ptr.h:159
Definition: ustr.h:57
Definition: stream.h:77
Definition: engine.h:149
EngineFeature
Definition: engine.h:282
Definition: system.h:166
Definition: vcruise.h:42
void syncSoundSettings() override
Common::Error saveGameStream(Common::WriteStream *stream, bool isAutosave) override
bool canSaveAutosaveCurrently() override
Common::Error run() override
bool canLoadGameStateCurrently(Common::U32String *msg=nullptr) override
bool canSaveGameStateCurrently(Common::U32String *msg=nullptr) override
Common::Error loadGameStream(Common::SeekableReadStream *stream) override
void initializePath(const Common::FSNode &gamePath) override
void pauseEngineIntern(bool pause) override
bool hasFeature(EngineFeature f) const override
Definition: ad2044_items.h:27
Definition: rect.h:536
Definition: detection.h:59