diff options
author | Eugene Sandulenko | 2013-09-12 01:00:20 +0300 |
---|---|---|
committer | Eugene Sandulenko | 2013-09-12 01:00:20 +0300 |
commit | ad43f25c0ff435fc6a51ce4d9ef07d35a5ccef99 (patch) | |
tree | db782f4da2dceac63c700be7e0aab7657212d7a2 | |
parent | 5c6ee7573c0cf05bbbb154d4734e94e478f453e5 (diff) | |
download | scummvm-rg350-ad43f25c0ff435fc6a51ce4d9ef07d35a5ccef99.tar.gz scummvm-rg350-ad43f25c0ff435fc6a51ce4d9ef07d35a5ccef99.tar.bz2 scummvm-rg350-ad43f25c0ff435fc6a51ce4d9ef07d35a5ccef99.zip |
FULLPIPE: Fix debug scene
-rw-r--r-- | engines/fullpipe/gameloader.cpp | 16 | ||||
-rw-r--r-- | engines/fullpipe/gfx.cpp | 6 | ||||
-rw-r--r-- | engines/fullpipe/interaction.cpp | 3 |
3 files changed, 11 insertions, 14 deletions
diff --git a/engines/fullpipe/gameloader.cpp b/engines/fullpipe/gameloader.cpp index a44501b17d..142c278c56 100644 --- a/engines/fullpipe/gameloader.cpp +++ b/engines/fullpipe/gameloader.cpp @@ -163,7 +163,7 @@ bool CGameLoader::gotoScene(int sceneId, int entranceId) { return false; if (!_sc2array[sc2idx]._isLoaded) - return 0; + return false; if (_sc2array[sc2idx]._entranceDataCount < 1) { g_fullpipe->_currentScene = st->_scene; @@ -173,14 +173,12 @@ bool CGameLoader::gotoScene(int sceneId, int entranceId) { if (_sc2array[sc2idx]._entranceDataCount <= 0) return false; - if (sceneId == 726) - return true; - - int entranceIdx; - for (entranceIdx = 0; _sc2array[sc2idx]._entranceData[entranceIdx]->_field_4 != entranceId; entranceIdx++) { - if (entranceIdx >= _sc2array[sc2idx]._entranceDataCount) - return false; - } + int entranceIdx = 0; + if (sceneId != 726) // WORKAROUND + for (entranceIdx = 0; _sc2array[sc2idx]._entranceData[entranceIdx]->_field_4 != entranceId; entranceIdx++) { + if (entranceIdx >= _sc2array[sc2idx]._entranceDataCount) + return false; + } CGameVar *sg = _gameVar->getSubVarByName("OBJSTATES")->getSubVarByName("SAVEGAME"); diff --git a/engines/fullpipe/gfx.cpp b/engines/fullpipe/gfx.cpp index e16d56cd8d..2ab038b74d 100644 --- a/engines/fullpipe/gfx.cpp +++ b/engines/fullpipe/gfx.cpp @@ -794,8 +794,10 @@ bool Bitmap::putDibRB(int32 *palette, int pX, int pY) { uint16 *srcPtr2; uint16 *srcPtr; - if (!palette && pX == -1) - error("Bitmap::putDibRB(): Both global and local palettes are empty"); + if (!palette && pX == -1) { + warning("Bitmap::putDibRB(): Both global and local palettes are empty"); + return false; + } debug(8, "Bitmap::putDibRB()"); diff --git a/engines/fullpipe/interaction.cpp b/engines/fullpipe/interaction.cpp index f392a084dd..dcc7e90145 100644 --- a/engines/fullpipe/interaction.cpp +++ b/engines/fullpipe/interaction.cpp @@ -99,9 +99,6 @@ bool CInteractionController::handleInteraction(StaticANIObject *subj, GameObject if (subj) { if (!subj->isIdle() || (subj->_flags & 0x100)) return false; - } else { - error("CInteractionController::handleInteraction(): subj is null"); - return false; } if (!_interactions.size()) |