diff options
Diffstat (limited to 'engines/composer/composer.h')
-rw-r--r-- | engines/composer/composer.h | 24 |
1 files changed, 21 insertions, 3 deletions
diff --git a/engines/composer/composer.h b/engines/composer/composer.h index 47398fe36d..a4b421bfa0 100644 --- a/engines/composer/composer.h +++ b/engines/composer/composer.h @@ -20,14 +20,16 @@ * */ -#ifndef COMPOSER_H -#define COMPOSER_H +#ifndef COMPOSER_COMPOSER_H +#define COMPOSER_COMPOSER_H #include "common/ini-file.h" #include "common/random.h" #include "common/system.h" #include "common/debug.h" #include "common/debug-channels.h" +#include "common/error.h" +#include "common/serializer.h" #include "common/textconsole.h" #include "common/rect.h" @@ -113,6 +115,7 @@ struct Library { uint _id; Archive *_archive; + Common::String _group; Common::List<Button> _buttons; Common::List<KeyboardHandler> _keyboardHandlers; }; @@ -149,6 +152,19 @@ class ComposerEngine : public Engine { protected: Common::Error run(); + template <typename T> + void syncArray(Common::Serializer &ser, Common::Array<T> &data, Common::Serializer::Version minVersion = 0, Common::Serializer::Version maxVersion = Common::Serializer::kLastVersion); + template <typename T> + void syncList(Common::Serializer &ser, Common::List<T> &data, Common::Serializer::Version minVersion = 0, Common::Serializer::Version maxVersion = Common::Serializer::kLastVersion); + template <typename T> + void syncListReverse(Common::Serializer &ser, Common::List<T> &data, Common::Serializer::Version minVersion = 0, Common::Serializer::Version maxVersion = Common::Serializer::kLastVersion); + template <typename T> + void sync(Common::Serializer &ser, T &data, Common::Serializer::Version minVersion, Common::Serializer::Version maxVersion); + bool canLoadGameStateCurrently() { return true; } + Common::Error loadGameState(int slot); + bool canSaveGameStateCurrently() { return true; } + Common::Error saveGameState(int slot, const Common::String &desc); + public: ComposerEngine(OSystem *syst, const ComposerGameDescription *gameDesc); virtual ~ComposerEngine(); @@ -172,7 +188,7 @@ private: Audio::QueuingAudioStream *_audioStream; uint16 _currSoundPriority; - uint32 _currentTime, _lastTime; + uint32 _currentTime, _lastTime, _timeDelta, _lastSaveTime; bool _needsUpdate; Common::Array<Common::Rect> _dirtyRects; @@ -209,6 +225,7 @@ private: uint16 _mouseSpriteId; Common::Point _mouseOffset; + Common::String makeSaveGameName(int slot); Common::String getStringFromConfig(const Common::String §ion, const Common::String &key); Common::String getFilename(const Common::String §ion, uint id); Common::String mangleFilename(Common::String filename); @@ -230,6 +247,7 @@ private: void tickOldScripts(); bool tickOldScript(OldScript *script); + void loadAnimation(Animation *&anim, uint16 animId, int16 x, int16 y, int16 eventParam, int32 size = 0); void playAnimation(uint16 animId, int16 param1, int16 param2, int16 param3); void stopAnimation(Animation *anim, bool localOnly = false, bool pipesOnly = false); void playWaveForAnim(uint16 id, uint16 priority, bool bufferingOnly); |