diff options
author | Eugene Sandulenko | 2003-12-25 00:18:41 +0000 |
---|---|---|
committer | Eugene Sandulenko | 2003-12-25 00:18:41 +0000 |
commit | d701edbb3171f7ce9c36783ea3a2c4c9755a9ee7 (patch) | |
tree | 26c1a991e60878cd80729c9f724adf981148d302 | |
parent | 3c53d00fe6b65157ad5b64048b1f506d1539d7eb (diff) | |
download | scummvm-rg350-d701edbb3171f7ce9c36783ea3a2c4c9755a9ee7.tar.gz scummvm-rg350-d701edbb3171f7ce9c36783ea3a2c4c9755a9ee7.tar.bz2 scummvm-rg350-d701edbb3171f7ce9c36783ea3a2c4c9755a9ee7.zip |
Fixed bug when Ben disappeared after some battles.
Fixed bug with correct scene ending behaviour, now FT Mac Demo is completable.
Fixed some bugs with cavefish actor.
Cleanup.
svn-id: r11897
-rw-r--r-- | scumm/smush/insane.cpp | 36 | ||||
-rw-r--r-- | scumm/smush/smush_player.cpp | 4 |
2 files changed, 14 insertions, 26 deletions
diff --git a/scumm/smush/insane.cpp b/scumm/smush/insane.cpp index b247dc4c79..315f74055d 100644 --- a/scumm/smush/insane.cpp +++ b/scumm/smush/insane.cpp @@ -40,21 +40,10 @@ #ifdef INSANE -// NOTE: -// san files with IACT chunks: -// minedriv.san -// minefite.san -// toranch.san -// tovista1.san -// tovista2.san - // TODO (in no particular order): +// o Cannot leave mines, problem with playing san from the middle // o Ben's velocity don't get zeroed after crash -// o After third crash Ben disappears -// o Check why ftmacdemo doesn't finish insane scene // o TRS file support. Everything is in place, I just need to figure out function parameters -// o FLU files support -// o IACT // o Code review/cleanup // o DOS demo INSANE @@ -2619,7 +2608,7 @@ void Insane::setupValues(void) { void Insane::setEnemyCostumes (void) { int i; - debug(0, "setEnemyCostumes()"); + debug(0, "setEnemyCostumes(%d)", _currEnemy); smlayer_setActorCostume(0, 2, readArray(_numberArray, 12)); smlayer_setActorCostume(0, 0, readArray(_numberArray, 14)); @@ -2801,7 +2790,7 @@ bool Insane::idx2Compare(void) { int32 Insane::idx1Tweak(void) { _objArray1Idx++; - if (_objArray1Idx > 100) + if (_objArray1Idx >= 100) _objArray1Idx = 0; return _objArray1[_objArray1Idx]; @@ -2813,7 +2802,7 @@ int32 Insane::idx2Tweak(void) { return false; _objArray2Idx++; - if (_objArray2Idx > 100) { + if (_objArray2Idx >= 100) { _idx2Exceeded = 0; _objArray2Idx = 0; } @@ -2865,16 +2854,19 @@ void Insane::switchSceneIfNeeded(void) { _currSceneId = _temp2SceneId; _needSceneSwitch = false; loadSceneData(_temp2SceneId, 0, 1); + if(loadSceneData(_temp2SceneId, 0, 2)) { setSceneCostumes(_temp2SceneId); _sceneData2Loaded = 0; _sceneData1Loaded = 0; return; } + _sceneData2Loaded = 1; if (_temp2SceneId == 13 || _temp2SceneId == 3) _isBenCut = 1; } + if (_sceneData2Loaded && !_sceneData1Loaded) { setSceneCostumes(_currSceneId); _sceneData2Loaded = 0; @@ -5851,7 +5843,7 @@ int Insane::smlayer_loadSound(int id, int flag, int phase) { if (phase == 1) { _objArray2Idx2++; _objArray2[_objArray2Idx2] = id; - if (_objArray2Idx2 > 100) { + if (_objArray2Idx2 >= 100) { _idx2Exceeded = 1; _objArray2Idx2 = 0; } @@ -6971,6 +6963,9 @@ void Insane::actor12Reaction(int32 buttons) { if (_currSceneId == 21) { queueSceneSwitch(22, 0, "rottflip.san", 64, 0, 0, 0); _actor[1].act[2].state = 38; + } else { + queueSceneSwitch(11, 0, _enemy[_currEnemy].filename, 64, 0, 0, 0); + _actor[1].act[2].state = 38; } break; case 102: @@ -6984,13 +6979,8 @@ void Insane::actor12Reaction(int32 buttons) { case 103: _actor[1].kicking = 0; - if (_actor[1].act[2].frame >= 18) { - if (_actor[1].x >= 50 && _actor[1].x <= 270) - break; - - if (_actor[1].act[2].frame < 9) - break; - + if (_actor[1].act[2].frame >= 18 || ((_actor[1].x < 50 || _actor[1].x > 270) && + _actor[1].act[2].frame >= 9)) { _enemy[EN_CAVEFISH].field_10 = 1; queueSceneSwitch(20, 0, "wr2_cvko.san", 64, 0, 0, 0); _actor[1].act[2].state = 38; diff --git a/scumm/smush/smush_player.cpp b/scumm/smush/smush_player.cpp index 9491f1e44c..5453081f38 100644 --- a/scumm/smush/smush_player.cpp +++ b/scumm/smush/smush_player.cpp @@ -742,7 +742,6 @@ void SmushPlayer::handleFrame(Chunk &b) { start_time = _scumm->_system->get_msecs(); #ifdef INSANE - // FIXME: Check either it is proper place for the call if (_insanity) { _scumm->_insane->procPreRendering(); } @@ -804,8 +803,7 @@ void SmushPlayer::handleFrame(Chunk &b) { } #ifdef INSANE - // FIXME: Check either it is proper place for the call - // Check either parameters are valid + // FIXME: Check either parameters are valid if (_insanity) { _scumm->_insane->procPostRendering(_dst, 0, 0, 0, _frame, _nbframes-1); } |