aboutsummaryrefslogtreecommitdiff
path: root/engines/kyra/resource.cpp
diff options
context:
space:
mode:
authorJohannes Schickel2006-10-22 20:08:23 +0000
committerJohannes Schickel2006-10-22 20:08:23 +0000
commita853696a5e075442aa8b74b4e04d45129fda02b1 (patch)
tree7ee0f310e3e9ad2f44f3b5806d19307bbaa6a6d7 /engines/kyra/resource.cpp
parente58da07488a7067a6b0dc9351a1eac85345220fe (diff)
downloadscummvm-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/resource.cpp')
-rw-r--r--engines/kyra/resource.cpp6
1 files changed, 3 insertions, 3 deletions
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)