From ad43f25c0ff435fc6a51ce4d9ef07d35a5ccef99 Mon Sep 17 00:00:00 2001 From: Eugene Sandulenko Date: Thu, 12 Sep 2013 01:00:20 +0300 Subject: FULLPIPE: Fix debug scene --- engines/fullpipe/gameloader.cpp | 16 +++++++--------- engines/fullpipe/gfx.cpp | 6 ++++-- 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()) -- cgit v1.2.3