25 #include "common/system.h" 26 #include "common/error.h" 27 #include "common/fs.h" 28 #include "common/hash-str.h" 29 #include "common/random.h" 30 #include "common/serializer.h" 31 #include "common/util.h" 32 #include "engines/engine.h" 33 #include "engines/savestate.h" 34 #include "graphics/screen.h" 36 #include "alcachofa/detection.h" 37 #include "alcachofa/camera.h" 38 #include "alcachofa/input.h" 39 #include "alcachofa/sounds.h" 40 #include "alcachofa/player.h" 41 #include "alcachofa/scheduler.h" 42 #include "alcachofa/console.h" 43 #include "alcachofa/game.h" 55 struct AlcachofaGameDescription;
57 constexpr int16 kSmallThumbnailWidth = 160;
58 constexpr int16 kSmallThumbnailHeight = 120;
59 static constexpr int16 kBigThumbnailWidth = 341;
60 static constexpr int16 kBigThumbnailHeight = 256;
63 enum class SaveVersion : Common::Serializer::Version {
66 static constexpr SaveVersion kCurrentSaveVersion = SaveVersion::Initial;
73 assert(isLoading() && _loadStream !=
nullptr);
78 assert(isSaving() && _saveStream !=
nullptr);
87 inline bool &subtitles() {
return _subtitles; }
88 inline bool &highQuality() {
return _highQuality; }
89 inline bool &bits32() {
return _bits32; }
90 inline uint8 &musicVolume() {
return _musicVolume; }
91 inline uint8 &speechVolume() {
return _speechVolume; }
93 void loadFromScummVM();
114 inline const ADGameDescription &gameDescription()
const {
return *_gameDescription; }
115 inline IRenderer &renderer() {
return *_renderer; }
116 inline DrawQueue &drawQueue() {
return *_drawQueue; }
117 inline Camera &camera() {
return _camera; }
118 inline Input &input() {
return _input; }
119 inline Sounds &sounds() {
return _sounds; }
120 inline Player &player() {
return *_player; }
121 inline World &world() {
return *_world; }
122 inline Script &script() {
return *_script; }
123 inline GlobalUI &globalUI() {
return *_globalUI; }
124 inline Menu &menu() {
return *_menu; }
125 inline Scheduler &scheduler() {
return _scheduler; }
126 inline Console &console() {
return *_console; }
127 inline Game &game() {
return *_game; }
128 inline Config &config() {
return _config; }
129 inline bool isDebugModeActive()
const {
return _debugHandler !=
nullptr; }
131 uint32 getMillis()
const;
132 void setMillis(uint32 newMillis);
133 void pauseEngineIntern(
bool pause)
override;
134 void playVideo(int32 videoId);
136 void setDebugMode(DebugMode debugMode, int32 param);
138 uint32 getFeatures()
const;
143 (f == kSupportsLoadingDuringRuntime) ||
144 (f == kSupportsSavingDuringRuntime) ||
145 (f == kSupportsReturnToLauncher);
150 return canLoadGameStateCurrently(msg);
156 assert(stream !=
nullptr);
161 assert(stream !=
nullptr);
169 bool tryLoadFromLauncher();
189 uint32 _timeNegOffset = 0, _timePosOffset = 0;
190 uint32 _timeBeforePause = 0;
194 #define SHOULD_QUIT ::Alcachofa::g_engine->shouldQuit() 198 #endif // ALCACHOFA_H Definition: managed_surface.h:51
Definition: alcachofa.h:45
Definition: alcachofa.h:68
EngineFeature
Definition: engine.h:258
Definition: advancedDetector.h:164
Definition: alcachofa.h:106
bool canSaveGameStateCurrently(Common::U32String *msg=nullptr) override
Definition: alcachofa.h:149
Definition: serializer.h:79
Definition: graphics.h:74
Definition: global-ui.h:32
Common::Error saveGameStream(Common::WriteStream *stream, bool isAutosave=false) override
Definition: alcachofa.h:155
Definition: graphics.h:456
Provides functionality specific to a game title. Also includes all exemptions to inconsistencies in t...
Definition: game.h:44
bool hasFeature(EngineFeature f) const override
Definition: alcachofa.h:141
Common::Error loadGameStream(Common::SeekableReadStream *stream) override
Definition: alcachofa.h:160
Definition: scheduler.h:190
This fake semaphore does not work in multi-threaded scenarios It is used as a safer option for a simp...
Definition: common.h:84
Definition: alcachofa.h:83