diff options
author | Littleboy | 2012-08-21 22:53:33 -0400 |
---|---|---|
committer | Littleboy | 2012-08-27 21:49:37 -0400 |
commit | ab4c47c584b0451a30bc5239a66cc8649aa66682 (patch) | |
tree | d4f992de8aa54c092f891d5c97180af85de981a3 | |
parent | cec57e091834567552658aacfa6561fe80e1a6f8 (diff) | |
download | scummvm-rg350-ab4c47c584b0451a30bc5239a66cc8649aa66682.tar.gz scummvm-rg350-ab4c47c584b0451a30bc5239a66cc8649aa66682.tar.bz2 scummvm-rg350-ab4c47c584b0451a30bc5239a66cc8649aa66682.zip |
LASTEXPRESS: Update Debug::loadArchive() to reduce casts
-rw-r--r-- | engines/lastexpress/debug.cpp | 22 | ||||
-rw-r--r-- | engines/lastexpress/debug.h | 2 |
2 files changed, 12 insertions, 12 deletions
diff --git a/engines/lastexpress/debug.cpp b/engines/lastexpress/debug.cpp index 21bf0119c4..3994cb0bcb 100644 --- a/engines/lastexpress/debug.cpp +++ b/engines/lastexpress/debug.cpp @@ -155,16 +155,16 @@ void Debugger::callCommand() { (*_command)(_numParams, const_cast<const char **>(_commandParams)); } -bool Debugger::loadArchive(ArchiveIndex index) { +bool Debugger::loadArchive(int index) { if (index < 1 || index > 3) { DebugPrintf("Invalid cd number (was: %d, valid: [1-3])\n", index); return false; } - if (!_engine->getResourceManager()->loadArchive(index)) + if (!_engine->getResourceManager()->loadArchive((ArchiveIndex)index)) return false; - getScenes()->loadSceneDataFile(index); + getScenes()->loadSceneDataFile((ArchiveIndex)index); return true; } @@ -246,7 +246,7 @@ bool Debugger::cmdListFiles(int argc, const char **argv) { // Load the proper archive if (argc == 3) { - if (!loadArchive((ArchiveIndex)getNumber(argv[2]))) + if (!loadArchive(getNumber(argv[2]))) return true; } @@ -332,7 +332,7 @@ bool Debugger::cmdShowFrame(int argc, const char **argv) { filename += ".seq"; if (argc == 4) { - if (!loadArchive((ArchiveIndex)getNumber(argv[3]))) + if (!loadArchive(getNumber(argv[3]))) return true; } @@ -394,7 +394,7 @@ bool Debugger::cmdShowBg(int argc, const char **argv) { Common::String filename(const_cast<char *>(argv[1])); if (argc == 3) { - if (!loadArchive((ArchiveIndex)getNumber(argv[2]))) + if (!loadArchive(getNumber(argv[2]))) return true; } @@ -449,7 +449,7 @@ bool Debugger::cmdPlaySeq(int argc, const char **argv) { filename += ".seq"; if (argc == 3) { - if (!loadArchive((ArchiveIndex)getNumber(argv[2]))) + if (!loadArchive(getNumber(argv[2]))) return true; } @@ -526,7 +526,7 @@ bool Debugger::cmdPlaySnd(int argc, const char **argv) { if (argc == 2 || argc == 3) { if (argc == 3) { - if (!loadArchive((ArchiveIndex)getNumber(argv[2]))) + if (!loadArchive(getNumber(argv[2]))) return true; } @@ -565,7 +565,7 @@ bool Debugger::cmdPlaySbe(int argc, const char **argv) { Common::String filename(const_cast<char *>(argv[1])); if (argc == 3) { - if (!loadArchive((ArchiveIndex)getNumber(argv[2]))) + if (!loadArchive(getNumber(argv[2]))) return true; } @@ -630,7 +630,7 @@ bool Debugger::cmdPlayNis(int argc, const char **argv) { Common::String name(const_cast<char *>(argv[1])); if (argc == 3) { - if (!loadArchive((ArchiveIndex)getNumber(argv[2]))) + if (!loadArchive(getNumber(argv[2]))) return true; } @@ -689,7 +689,7 @@ bool Debugger::cmdLoadScene(int argc, const char **argv) { // Check args if (argc == 3) { - if (!loadArchive((ArchiveIndex)getNumber(argv[2]))) + if (!loadArchive(getNumber(argv[2]))) return true; } diff --git a/engines/lastexpress/debug.h b/engines/lastexpress/debug.h index 06534f4bc0..a9f0443af9 100644 --- a/engines/lastexpress/debug.h +++ b/engines/lastexpress/debug.h @@ -87,7 +87,7 @@ private: void copyCommand(int argc, const char **argv); int getNumber(const char *arg) const; - bool loadArchive(ArchiveIndex index); + bool loadArchive(int index); void restoreArchive() const; Debuglet *_command; |