aboutsummaryrefslogtreecommitdiff
path: root/engines/composer
diff options
context:
space:
mode:
authorupthorn2012-06-12 15:19:25 -0700
committerangstsmurf2016-10-18 02:10:11 +0200
commitc4c6cce78ea67f26b1c2017ebb15f00612c4d41b (patch)
tree7df5f90455635f46ea50839b56b0966fe7d4bfa6 /engines/composer
parent027bab88fba3187c2fcf2211d0aba5f6cec09a6c (diff)
downloadscummvm-rg350-c4c6cce78ea67f26b1c2017ebb15f00612c4d41b.tar.gz
scummvm-rg350-c4c6cce78ea67f26b1c2017ebb15f00612c4d41b.tar.bz2
scummvm-rg350-c4c6cce78ea67f26b1c2017ebb15f00612c4d41b.zip
COMPOSER: Completely removed unnecessary #ifdefs
Diffstat (limited to 'engines/composer')
-rw-r--r--engines/composer/composer.cpp4
-rw-r--r--engines/composer/composer.h6
-rw-r--r--engines/composer/detection.cpp16
-rw-r--r--engines/composer/graphics.cpp2
-rw-r--r--engines/composer/graphics.h2
-rw-r--r--engines/composer/resource.cpp6
-rw-r--r--engines/composer/resource.h6
-rw-r--r--engines/composer/saveload.cpp2
8 files changed, 3 insertions, 41 deletions
diff --git a/engines/composer/composer.cpp b/engines/composer/composer.cpp
index 2ef6acc305..e9a91b1a25 100644
--- a/engines/composer/composer.cpp
+++ b/engines/composer/composer.cpp
@@ -378,9 +378,7 @@ void ComposerEngine::loadLibrary(uint id) {
}
Common::String filename;
-#ifdef SAVING_ANYWHERE
Common::String oldGroup = _bookGroup;
-#endif
if (getGameType() == GType_ComposerV1) {
if (!id || _bookGroup.empty())
filename = getStringFromConfig("Common", "StartPage");
@@ -414,9 +412,7 @@ void ComposerEngine::loadLibrary(uint id) {
Library library;
library._id = id;
-#ifdef SAVING_ANYWHERE
library._group = oldGroup;
-#endif
library._archive = new ComposerArchive();
if (!library._archive->openFile(filename))
error("failed to open '%s'", filename.c_str());
diff --git a/engines/composer/composer.h b/engines/composer/composer.h
index 82457be37b..928072b687 100644
--- a/engines/composer/composer.h
+++ b/engines/composer/composer.h
@@ -114,9 +114,7 @@ struct Library {
uint _id;
Archive *_archive;
-#ifdef SAVING_ANYWHERE
Common::String _group;
-#endif
Common::List<Button> _buttons;
Common::List<KeyboardHandler> _keyboardHandlers;
};
@@ -153,12 +151,10 @@ class ComposerEngine : public Engine {
protected:
Common::Error run();
-#ifdef SAVING_ANYWHERE
bool canLoadGameStateCurrently() { return true; }
Common::Error loadGameState(int slot);
bool canSaveGameStateCurrently() { return true; }
Common::Error saveGameState(int slot, const Common::String &desc);
-#endif
public:
ComposerEngine(OSystem *syst, const ComposerGameDescription *gameDesc);
@@ -220,9 +216,7 @@ private:
uint16 _mouseSpriteId;
Common::Point _mouseOffset;
-#ifdef SAVING_ANYWHERE
Common::String makeSaveGameName(int slot);
-#endif
Common::String getStringFromConfig(const Common::String &section, const Common::String &key);
Common::String getFilename(const Common::String &section, uint id);
Common::String mangleFilename(Common::String filename);
diff --git a/engines/composer/detection.cpp b/engines/composer/detection.cpp
index 3a8fb0db0e..bd0c4323fe 100644
--- a/engines/composer/detection.cpp
+++ b/engines/composer/detection.cpp
@@ -21,11 +21,9 @@
*/
#include "base/plugins.h"
-#ifdef SAVING_ANYWHERE
#include "common/savefile.h"
#include "common/serializer.h"
#include "common/str-array.h"
-#endif // SAVING_ANYWHERE
#include "engines/advancedDetector.h"
#include "composer/composer.h"
@@ -466,14 +464,9 @@ bool ComposerMetaEngine::createInstance(OSystem *syst, Engine **engine, const AD
}
bool ComposerMetaEngine::hasFeature(MetaEngineFeature f) const {
-#ifdef SAVING_ANYWHERE
- return (f == kSupportsListSaves);
-#else
- return false;
-#endif // SAVING_ANYWHERE
+ return (f == kSupportsListSaves);
}
-#ifdef SAVING_ANYWHERE
Common::String getSaveName(Common::InSaveFile *in) {
Common::Serializer ser(in, NULL);
Common::String name;
@@ -512,14 +505,11 @@ SaveStateList ComposerMetaEngine::listSaves(const char *target) const {
return saveList;
}
-#endif // SAVING_ANYWHERE
bool Composer::ComposerEngine::hasFeature(EngineFeature f) const {
return (f == kSupportsRTL
-#ifdef SAVING_ANYWHERE
- || f == kSupportsSavingDuringRuntime || f == kSupportsLoadingDuringRuntime
-#endif // SAVING_ANYWHERE
- );
+ || f == kSupportsSavingDuringRuntime
+ || f == kSupportsLoadingDuringRuntime);
}
#if PLUGIN_ENABLED_DYNAMIC(COMPOSER)
diff --git a/engines/composer/graphics.cpp b/engines/composer/graphics.cpp
index 2c50cb11e7..312534fe5f 100644
--- a/engines/composer/graphics.cpp
+++ b/engines/composer/graphics.cpp
@@ -57,9 +57,7 @@ Animation::Animation(Common::SeekableReadStream *stream, uint16 id, Common::Poin
// probably total size?
uint32 unknown = _stream->readUint32LE();
-#ifdef SAVING_ANYWHERE
_size = unknown;
-#endif
debug(8, "anim: size %d, state %08x, unknown %08x", size, _state, unknown);
diff --git a/engines/composer/graphics.h b/engines/composer/graphics.h
index cfa581d75f..4805e5017d 100644
--- a/engines/composer/graphics.h
+++ b/engines/composer/graphics.h
@@ -59,9 +59,7 @@ struct Animation {
uint32 _eventParam;
uint32 _state;
-#ifdef SAVING_ANYWHERE
uint32 _size;
-#endif
Common::Array<AnimationEntry> _entries;
diff --git a/engines/composer/resource.cpp b/engines/composer/resource.cpp
index 8192da936b..fa1811c05a 100644
--- a/engines/composer/resource.cpp
+++ b/engines/composer/resource.cpp
@@ -252,9 +252,7 @@ Pipe::Pipe(Common::SeekableReadStream *stream, uint16 id) {
_offset = 0;
_stream = stream;
_anim = NULL;
-#ifdef SAVING_ANYWHERE
_pipeId = id;
-#endif
}
Pipe::~Pipe() {
@@ -317,13 +315,11 @@ Common::SeekableReadStream *Pipe::getResource(uint32 tag, uint16 id, bool buffer
res.entries[0].offset, res.entries[0].offset + res.entries[0].size);
if (buffering) {
_types[tag].erase(id);
-#ifdef SAVING_ANYWHERE
bool found = false;
for (Common::List<uint16>::const_iterator i = _bufferedResources[tag].begin(); !found && (i != _bufferedResources[tag].end()); i++)
if ((*i) == id) found = true;
if (!found)
_bufferedResources[tag].push_back(id);
-#endif
}
return stream;
}
@@ -343,13 +339,11 @@ Common::SeekableReadStream *Pipe::getResource(uint32 tag, uint16 id, bool buffer
}
if (buffering) {
_types[tag].erase(id);
-#ifdef SAVING_ANYWHERE
bool found = false;
for (Common::List<uint16>::const_iterator i = _bufferedResources[tag].begin(); !found && (i != _bufferedResources[tag].end()); i++)
if ((*i) == id) found = true;
if (!found)
_bufferedResources[tag].push_back(id);
-#endif
}
return new Common::MemoryReadStream(buffer, size, DisposeAfterUse::YES);
}
diff --git a/engines/composer/resource.h b/engines/composer/resource.h
index 9e297e132a..fc4e20a2cd 100644
--- a/engines/composer/resource.h
+++ b/engines/composer/resource.h
@@ -116,13 +116,11 @@ public:
Common::SeekableReadStream *getResource(uint32 tag, uint16 id, bool buffering);
virtual const Common::Array<uint16> *getScripts() { return NULL; }
-#ifdef SAVING_ANYWHERE
uint16 getPipeId() const { return _pipeId; }
virtual uint32 getOffset() const { return _offset; }
virtual void setOffset(uint32 offset) { while (_offset < offset) nextFrame(); }
typedef Common::HashMap<uint32, Common::List<uint16> > DelMap;
DelMap _bufferedResources;
-#endif
protected:
Common::SeekableReadStream *_stream;
@@ -130,9 +128,7 @@ protected:
typedef Common::HashMap<uint16, PipeResource> ResourceMap;
typedef Common::HashMap<uint32, ResourceMap> TypeMap;
TypeMap _types;
-#ifdef SAVING_ANYWHERE
uint16 _pipeId;
-#endif
uint32 _offset;
};
@@ -143,10 +139,8 @@ public:
void nextFrame();
const Common::Array<uint16> *getScripts() { return &_scripts; }
-#ifdef SAVING_ANYWHERE
uint32 getOffset() const { return _currFrame; }
void setOffset(uint32 offset) { while (_currFrame < offset) nextFrame(); }
-#endif
protected:
uint32 _currFrame, _numFrames;
diff --git a/engines/composer/saveload.cpp b/engines/composer/saveload.cpp
index ed26616f39..c56b95f1c0 100644
--- a/engines/composer/saveload.cpp
+++ b/engines/composer/saveload.cpp
@@ -20,7 +20,6 @@
*
*/
-#ifdef SAVING_ANYWHERE
#include "audio/audiostream.h"
#include "audio/decoders/raw.h"
#include "common/config-manager.h"
@@ -450,4 +449,3 @@ Common::Error ComposerEngine::saveGameState(int slot, const Common::String &desc
return Common::kNoError;
}
}
-#endif