ScummVM API documentation
wintermute.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 WINTERMUTE_WINTERMUTE_H
23#define WINTERMUTE_WINTERMUTE_H
24
25#include "engines/engine.h"
26#include "gui/debugger.h"
27#include "common/fs.h"
28#include "wintermute/detection.h"
29
30namespace Wintermute {
31
32class Console;
33class BaseGame;
34class SystemClassRegistry;
35class DebuggerController;
36
37const int INT_MAX_VALUE = 0x7fffffff;
38const int INT_MIN_VALUE = -INT_MAX_VALUE - 1;
39const uint UINT_MAX_VALUE = 0xffffffff;
40
41// our engine debug channels
42enum {
43 kWintermuteDebugLog = 1, // The debug-logs from the original engine
44 kWintermuteDebugSaveGame,
45 kWintermuteDebugFont, // next new channel must be 1 << 2 (4)
46 kWintermuteDebugFileAccess, // the current limitation is 32 debug channels (1 << 31 is the last one)
47 kWintermuteDebugAudio,
48 kWintermuteDebugGeneral,
49};
50
51class WintermuteEngine : public Engine {
52public:
54 ~WintermuteEngine() override;
55
56 virtual Wintermute::Console *getConsole() { return _debugger; }
57
58 Common::Error run() override;
59 bool hasFeature(EngineFeature f) const override;
60 Common::SaveFileManager *getSaveFileMan() { return _saveFileMan; }
61 Common::Error loadGameState(int slot) override;
62 bool canLoadGameStateCurrently(Common::U32String *msg = nullptr) override;
63 Common::Error saveGameState(int slot, const Common::String &desc, bool isAutosave = false) override;
64 bool canSaveGameStateCurrently(Common::U32String *msg = nullptr) override;
65 bool canSaveAutosaveCurrently() override;
66 void savingEnable(bool enable);
67 // For detection-purposes:
68 static bool getGameInfo(const Common::FSList &fslist, Common::String &name, Common::String &caption);
69private:
70 int init();
71 void deinit();
72 int messageLoop();
73 Wintermute::Console *_debugger;
74 BaseGame *_game;
75 Wintermute::DebuggerController *_dbgController;
76 const WMEGameDescription *_gameDescription;
77 bool _savingEnabled{};
78
79 friend class Console;
80 friend class DebuggerController;
81};
82
83} // End of namespace Wintermute
84
85#endif
Definition: error.h:81
Definition: fs.h:57
Definition: savefile.h:142
Definition: str.h:59
Definition: ustr.h:57
Definition: engine.h:149
Common::SaveFileManager * _saveFileMan
Definition: engine.h:172
EngineFeature
Definition: engine.h:282
Definition: system.h:166
Definition: base_game.h:79
Definition: debugger.h:62
Definition: wintermute.h:51
Common::Error saveGameState(int slot, const Common::String &desc, bool isAutosave=false) override
Common::Error run() override
bool canLoadGameStateCurrently(Common::U32String *msg=nullptr) override
Common::Error loadGameState(int slot) override
bool hasFeature(EngineFeature f) const override
bool canSaveGameStateCurrently(Common::U32String *msg=nullptr) override
bool canSaveAutosaveCurrently() override
Definition: detection.h:131