diff options
-rw-r--r-- | engines/toon/detection.cpp | 3 | ||||
-rw-r--r-- | engines/toon/toon.cpp | 11 |
2 files changed, 5 insertions, 9 deletions
diff --git a/engines/toon/detection.cpp b/engines/toon/detection.cpp index 7c6eae6c63..4f82514213 100644 --- a/engines/toon/detection.cpp +++ b/engines/toon/detection.cpp @@ -179,10 +179,9 @@ SaveStateList ToonMetaEngine::listSaves(const char *target) const { sort(filenames.begin(), filenames.end()); // Sort (hopefully ensuring we are sorted numerically..) SaveStateList saveList; - int slotNum = 0; for (Common::StringArray::const_iterator filename = filenames.begin(); filename != filenames.end(); ++filename) { // Obtain the last 3 digits of the filename, since they correspond to the save slot - slotNum = atoi(filename->c_str() + filename->size() - 3); + int slotNum = atoi(filename->c_str() + filename->size() - 3); if (slotNum >= 0 && slotNum <= 99) { Common::InSaveFile *file = saveFileMan->openForLoading(*filename); diff --git a/engines/toon/toon.cpp b/engines/toon/toon.cpp index 3671422a8e..14e7d104d2 100644 --- a/engines/toon/toon.cpp +++ b/engines/toon/toon.cpp @@ -634,7 +634,6 @@ bool ToonEngine::showMainmenu(bool &loadedGame) { bool doExit = false; bool exitGame = false; - int clickingOn, clickRelease; int menuMask = MAINMENUMASK_BASE; Common::SeekableReadStream *mainmenuMusicFile = NULL; AudioStreamInstance *mainmenuMusic = NULL; @@ -644,8 +643,8 @@ bool ToonEngine::showMainmenu(bool &loadedGame) { dirtyAllScreen(); while (!doExit) { - clickingOn = MAINMENUHOTSPOT_NONE; - clickRelease = false; + int clickingOn = MAINMENUHOTSPOT_NONE; + int clickRelease = false; if (!musicPlaying) { mainmenuMusicFile = resources()->openFile("BR091013.MUS"); @@ -4617,15 +4616,13 @@ void ToonEngine::unloadToonDat() { } char **ToonEngine::loadTextsVariants(Common::File &in) { - int numTexts; - int entryLen; int len; char **res = 0; char *pos = 0; for (int varnt = 0; varnt < _numVariant; varnt++) { - numTexts = in.readUint16BE(); - entryLen = in.readUint16BE(); + int numTexts = in.readUint16BE(); + int entryLen = in.readUint16BE(); pos = (char *)malloc(entryLen); if (varnt == _gameVariant) { res = (char **)malloc(sizeof(char *) * numTexts); |