From cff96b0a75c3d20a822409d50db356b6cd06f54b Mon Sep 17 00:00:00 2001 From: Sven Hesse Date: Fri, 14 Apr 2006 18:18:46 +0000 Subject: - Seems like I forget a branch in Mult_v2::animate() - sub_1A52B is Scenery::updateStatic() svn-id: r21889 --- engines/gob/inter.h | 1 + engines/gob/inter_v1.cpp | 7 ++++++- engines/gob/inter_v2.cpp | 11 ++++++++++- engines/gob/mult_v2.cpp | 21 ++++++++++++++++++++- engines/gob/scenery.cpp | 9 --------- engines/gob/scenery.h | 1 - 6 files changed, 37 insertions(+), 13 deletions(-) (limited to 'engines/gob') diff --git a/engines/gob/inter.h b/engines/gob/inter.h index e28bfb5e41..ce99528f6d 100644 --- a/engines/gob/inter.h +++ b/engines/gob/inter.h @@ -309,6 +309,7 @@ protected: void o2_totSub(void); void o2_stub0x56(void); void o2_stub0x80(void); + void o2_renderStatic(void); bool o2_evaluateStore(char &cmdCount, int16 &counter, int16 &retFlag); bool o2_palLoad(char &cmdCount, int16 &counter, int16 &retFlag); bool o2_loadTot(char &cmdCount, int16 &counter, int16 &retFlag); diff --git a/engines/gob/inter_v1.cpp b/engines/gob/inter_v1.cpp index 5aa91ba7b2..e009123fee 100644 --- a/engines/gob/inter_v1.cpp +++ b/engines/gob/inter_v1.cpp @@ -1585,7 +1585,12 @@ void Inter_v1::o1_freeStatic(void) { } void Inter_v1::o1_renderStatic(void) { - _vm->_scenery->interRenderStatic(); + int16 layer; + int16 index; + + _vm->_inter->evalExpr(&index); + _vm->_inter->evalExpr(&layer); + _vm->_scenery->renderStatic(index, layer); } void Inter_v1::o1_loadCurLayer(void) { diff --git a/engines/gob/inter_v2.cpp b/engines/gob/inter_v2.cpp index 5b2876d787..1d3b2d9244 100644 --- a/engines/gob/inter_v2.cpp +++ b/engines/gob/inter_v2.cpp @@ -158,7 +158,7 @@ void Inter_v2::setupOpcodes(void) { OPCODE(o1_loadStatic), OPCODE(o1_freeStatic), /* 1C */ - OPCODE(o1_renderStatic), + OPCODE(o2_renderStatic), OPCODE(o2_loadCurLayer), {NULL, ""}, {NULL, ""}, @@ -880,6 +880,15 @@ int16 Inter_v2::loadSound(int16 search) { _vm->_game->loadSound(slot, dataPtr);*/ } +void Inter_v2::o2_renderStatic(void) { + int16 layer; + int16 index; + + index = _vm->_parse->parseValExpr(); + layer = _vm->_parse->parseValExpr(); + _vm->_scenery->renderStatic(index, layer); +} + void Inter_v2::loadMult(void) { int16 val; int16 objIndex; diff --git a/engines/gob/mult_v2.cpp b/engines/gob/mult_v2.cpp index fa05f643da..f6ddf2abc0 100644 --- a/engines/gob/mult_v2.cpp +++ b/engines/gob/mult_v2.cpp @@ -1005,6 +1005,25 @@ void Mult_v2::animate(void) { animObj1 = _renderData2[orderArray[i]]; animData1 = animObj1->pAnimData; if (animObj1->someFlag == 0) { + if (animData1->isStatic == 0) { + for (j = 0; j < orderArrayPos; j++) { + animObj2 = _renderData2[orderArray[j]]; + if ((animObj2->someFlag != 0) && + (animObj1->somethingRight >= animObj2->somethingLeft) && + (animObj2->somethingRight >= animObj1->somethingLeft) && + (animObj1->somethingBottom >= animObj2->somethingTop) && + (animObj2->somethingBottom >= animObj1->somethingTop)) + { + _vm->_scenery->_toRedrawLeft = animObj2->somethingLeft; + _vm->_scenery->_toRedrawRight = animObj2->somethingRight; + _vm->_scenery->_toRedrawTop = animObj2->somethingTop; + _vm->_scenery->_toRedrawBottom = animObj2->somethingBottom; + _vm->_scenery->updateAnim(animData1->layer, animData1->frame, + animData1->animation, 12, *animObj1->pPosX, *animObj1->pPosY, 1); + _vm->_scenery->updateStatic(animObj1->pAnimData->order + 1); + } + } + } } else { if (animData1->isStatic == 0) { _vm->_scenery->updateAnim(animData1->layer, animData1->frame, @@ -1039,7 +1058,7 @@ void Mult_v2::animate(void) { _vm->_scenery->_toRedrawTop = animObj1->somethingTop; _vm->_scenery->_toRedrawBottom = animObj1->somethingBottom; } - warning("GOB2 Stub! sub_1A52B(animObj1->pAnimData->order);"); + _vm->_scenery->updateStatic(animObj1->pAnimData->order + 1); } } diff --git a/engines/gob/scenery.cpp b/engines/gob/scenery.cpp index 0e65f9799a..7079759a8e 100644 --- a/engines/gob/scenery.cpp +++ b/engines/gob/scenery.cpp @@ -285,15 +285,6 @@ void Scenery::renderStatic(int16 scenery, int16 layer) { } } -void Scenery::interRenderStatic(void) { - int16 layer; - int16 index; - - _vm->_inter->evalExpr(&index); - _vm->_inter->evalExpr(&layer); - renderStatic(index, layer); -} - void Scenery::updateStatic(int16 orderFrom) { StaticLayer *layerPtr; PieceDesc **pictPtr; diff --git a/engines/gob/scenery.h b/engines/gob/scenery.h index ce5a953399..d361d24eaa 100644 --- a/engines/gob/scenery.h +++ b/engines/gob/scenery.h @@ -127,7 +127,6 @@ public: int16 loadStatic(char search); void freeStatic(int16 index); void renderStatic(int16 scenery, int16 layer); - void interRenderStatic(void); void updateStatic(int16 orderFrom); int16 loadAnim(char search); void updateAnim(int16 layer, int16 frame, int16 animation, int16 flags, -- cgit v1.2.3