diff options
author | Johannes Schickel | 2006-10-22 20:08:23 +0000 |
---|---|---|
committer | Johannes Schickel | 2006-10-22 20:08:23 +0000 |
commit | a853696a5e075442aa8b74b4e04d45129fda02b1 (patch) | |
tree | 7ee0f310e3e9ad2f44f3b5806d19307bbaa6a6d7 /engines/kyra | |
parent | e58da07488a7067a6b0dc9351a1eac85345220fe (diff) | |
download | scummvm-rg350-a853696a5e075442aa8b74b4e04d45129fda02b1.tar.gz scummvm-rg350-a853696a5e075442aa8b74b4e04d45129fda02b1.tar.bz2 scummvm-rg350-a853696a5e075442aa8b74b4e04d45129fda02b1.zip |
Some AMIGA resource loading code (of course it's still not supported).
svn-id: r24461
Diffstat (limited to 'engines/kyra')
-rw-r--r-- | engines/kyra/plugin.cpp | 5 | ||||
-rw-r--r-- | engines/kyra/resource.cpp | 6 | ||||
-rw-r--r-- | engines/kyra/resource.h | 2 |
3 files changed, 9 insertions, 4 deletions
diff --git a/engines/kyra/plugin.cpp b/engines/kyra/plugin.cpp index 6ee4585788..aa33f88a1c 100644 --- a/engines/kyra/plugin.cpp +++ b/engines/kyra/plugin.cpp @@ -316,6 +316,11 @@ int KyraEngine_v1::setupGameFlags() { // because of limitations of the current detector code if (Common::parsePlatform(ConfMan.get("platform")) == Common::kPlatformMacintosh) { _flags.platform = Common::kPlatformMacintosh; + } else if (Common::parsePlatform(ConfMan.get("platform")) == Common::kPlatformAmiga) { + // it is possible to detect if the game is an amiga version, but since it's + // horrible broken at the time of adding this, we just set the amiga platform + // if the user want's to crash it's ScummVM + _flags.platform = Common::kPlatformAmiga; } return 0; diff --git a/engines/kyra/resource.cpp b/engines/kyra/resource.cpp index 4e09641d7e..f44c00bb6d 100644 --- a/engines/kyra/resource.cpp +++ b/engines/kyra/resource.cpp @@ -40,7 +40,7 @@ Resource::Resource(KyraEngine *engine) { if (_engine->game() == GI_KYRA1) { // we're loading KYRA.DAT here too (but just for Kyrandia 1) - if (!loadPakFile("KYRA.DAT") || !StaticResource::checkKyraDat()) { + if (!loadPakFile("KYRA.DAT", true) || !StaticResource::checkKyraDat()) { GUI::MessageDialog errorMsg("You're missing the 'KYRA.DAT' file or it got corrupted, (re)get it from the ScummVM website"); errorMsg.runModal(); error("You're missing the 'KYRA.DAT' file or it got corrupted, (re)get it from the ScummVM website"); @@ -102,7 +102,7 @@ Resource::~Resource() { } } -bool Resource::loadPakFile(const Common::String &filename) { +bool Resource::loadPakFile(const Common::String &filename, const bool forcePC) { Common::List<ResourceFile*>::iterator start = _pakfiles.begin(); uint hash = Common::hashit_lower(filename.c_str()); for (;start != _pakfiles.end(); ++start) { @@ -122,7 +122,7 @@ bool Resource::loadPakFile(const Common::String &filename) { PAKFile *file = 0; - file = new PAKFile(filename.c_str(), handle.name(), handle, (_engine->gameFlags().platform == Common::kPlatformAmiga)); + file = new PAKFile(filename.c_str(), handle.name(), handle, (_engine->gameFlags().platform == Common::kPlatformAmiga) && !forcePC); handle.close(); if (!file) diff --git a/engines/kyra/resource.h b/engines/kyra/resource.h index b7d9b3f5bc..34c9a16986 100644 --- a/engines/kyra/resource.h +++ b/engines/kyra/resource.h @@ -105,7 +105,7 @@ public: Resource(KyraEngine *engine); ~Resource(); - bool loadPakFile(const Common::String &filename); + bool loadPakFile(const Common::String &filename, const bool forcePC = false); void unloadPakFile(const Common::String &filename); bool isInPakList(const Common::String &filename); |