aboutsummaryrefslogtreecommitdiff
path: root/engines/kyra/resource.cpp
diff options
context:
space:
mode:
authorJohannes Schickel2007-04-01 13:10:50 +0000
committerJohannes Schickel2007-04-01 13:10:50 +0000
commit397c10f059308f575ea75ea767c87148a7406f33 (patch)
tree6853ed5dca76f46ad6e907aa9bdf5c2fe95c0c8c /engines/kyra/resource.cpp
parentb7e499b64a1b1dc88c375a6151b7789d1970f4d5 (diff)
downloadscummvm-rg350-397c10f059308f575ea75ea767c87148a7406f33.tar.gz
scummvm-rg350-397c10f059308f575ea75ea767c87148a7406f33.tar.bz2
scummvm-rg350-397c10f059308f575ea75ea767c87148a7406f33.zip
made _vm/_engine usage consistent. (_engine -> _vm all over the place now).
svn-id: r26342
Diffstat (limited to 'engines/kyra/resource.cpp')
-rw-r--r--engines/kyra/resource.cpp20
1 files changed, 10 insertions, 10 deletions
diff --git a/engines/kyra/resource.cpp b/engines/kyra/resource.cpp
index e8b6801bc2..193ce839c1 100644
--- a/engines/kyra/resource.cpp
+++ b/engines/kyra/resource.cpp
@@ -35,10 +35,10 @@
#include "kyra/screen.h"
namespace Kyra {
-Resource::Resource(KyraEngine *engine) {
- _engine = engine;
+Resource::Resource(KyraEngine *vm) {
+ _vm = vm;
- if (_engine->game() == GI_KYRA1) {
+ if (_vm->game() == GI_KYRA1) {
// we're loading KYRA.DAT here too (but just for Kyrandia 1)
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");
@@ -47,13 +47,13 @@ Resource::Resource(KyraEngine *engine) {
}
// We only need kyra.dat for the demo.
- if (_engine->gameFlags().isDemo)
+ if (_vm->gameFlags().isDemo)
return;
// only VRM file we need in the *whole* game for kyra1
- if (_engine->gameFlags().isTalkie)
+ if (_vm->gameFlags().isTalkie)
loadPakFile("CHAPTER1.VRM");
- } else if (_engine->game() == GI_KYRA3) {
+ } else if (_vm->game() == GI_KYRA3) {
// load the installation package file for kyra3
INSFile *insFile = new INSFile("WESTWOOD.001");
assert(insFile);
@@ -68,7 +68,7 @@ Resource::Resource(KyraEngine *engine) {
if (!dir.listDir(fslist, FilesystemNode::kListFilesOnly))
error("invalid game path '%s'", dir.path().c_str());
- if (_engine->game() == GI_KYRA1 && _engine->gameFlags().isTalkie) {
+ if (_vm->game() == GI_KYRA1 && _vm->gameFlags().isTalkie) {
static const char *list[] = {
"ADL.PAK", "CHAPTER1.VRM", "COL.PAK", "FINALE.PAK", "INTRO1.PAK", "INTRO2.PAK",
"INTRO3.PAK", "INTRO4.PAK", "MISC.PAK", "SND.PAK", "STARTUP.PAK", "XMI.PAK",
@@ -100,9 +100,9 @@ Resource::Resource(KyraEngine *engine) {
}
}
- if (_engine->gameFlags().platform == Common::kPlatformFMTowns) {
+ if (_vm->gameFlags().platform == Common::kPlatformFMTowns) {
Common::List<ResourceFile*>::iterator start = _pakfiles.begin();
- uint unloadHash = (_engine->gameFlags().lang == Common::EN_ANY) ? Common::hashit_lower("JMC.PAK") : Common::hashit_lower("EMC.PAK");
+ uint unloadHash = (_vm->gameFlags().lang == Common::EN_ANY) ? Common::hashit_lower("JMC.PAK") : Common::hashit_lower("EMC.PAK");
for (;start != _pakfiles.end(); ++start) {
if ((*start)->filename() == unloadHash) {
@@ -144,7 +144,7 @@ bool Resource::loadPakFile(const Common::String &filename, const bool forcePC) {
return false;
}
- PAKFile *file = new PAKFile(filename.c_str(), handle.name(), handle, (_engine->gameFlags().platform == Common::kPlatformAmiga) && !forcePC);
+ PAKFile *file = new PAKFile(filename.c_str(), handle.name(), handle, (_vm->gameFlags().platform == Common::kPlatformAmiga) && !forcePC);
handle.close();
if (!file)