diff options
-rw-r--r-- | engines/gob/game_v2.cpp | 3 | ||||
-rw-r--r-- | engines/gob/goblin_v2.cpp | 9 |
2 files changed, 7 insertions, 5 deletions
diff --git a/engines/gob/game_v2.cpp b/engines/gob/game_v2.cpp index b81819f3f2..31f2d43149 100644 --- a/engines/gob/game_v2.cpp +++ b/engines/gob/game_v2.cpp @@ -260,9 +260,10 @@ void Game_v2::playTot(int16 skipPlay) { strcpy(_curTotFile, _totToLoad); } } else { + _vm->_inter->initControlVars(0); _vm->_scenery->_pCaptureCounter = oldCaptureCounter; _vm->_global->_inter_execPtr = (char *)_totFileData; - _vm->_global->_inter_execPtr += READ_LE_UINT16(_totFileData + (skipPlay << 1) + 0x66); + _vm->_global->_inter_execPtr += (int16) READ_LE_UINT16(_totFileData + (skipPlay << 1) + 0x66); _vm->_inter->callSub(2); if (_vm->_inter->_terminate != 0) _vm->_inter->_terminate = 2; diff --git a/engines/gob/goblin_v2.cpp b/engines/gob/goblin_v2.cpp index d8f9ab4aa3..44d26c6bc9 100644 --- a/engines/gob/goblin_v2.cpp +++ b/engines/gob/goblin_v2.cpp @@ -140,6 +140,7 @@ void Goblin_v2::movePathFind(Mult::Mult_Object *obj, Gob_Object *gobDesc, int16 animData = obj->pAnimData; framesCount = _vm->_scenery->_animations[(int)animData->animation].layers[animData->layer].framesCount; + animData->newCycle = framesCount; gobX = obj->goblinX; gobY = obj->goblinY; animData->order = gobY; @@ -224,7 +225,7 @@ void Goblin_v2::movePathFind(Mult::Mult_Object *obj, Gob_Object *gobDesc, int16 break; case Map::kDirN: - animData->nextState = animData->curLookDir == 2 ? 2 : rotateState(2, animData->curLookDir); + animData->nextState = animData->curLookDir == 2 ? 2 : rotateState(animData->curLookDir, 2); if (_vm->_map->_screenWidth == 640) { if (_vm->_map->getPass(obj->goblinX, obj->goblinY) == 10) { if (_vm->_map->getPass(obj->goblinX - 1, obj->goblinY - 2) != 10) { @@ -252,11 +253,11 @@ void Goblin_v2::movePathFind(Mult::Mult_Object *obj, Gob_Object *gobDesc, int16 break; case Map::kDirW: - animData->nextState = rotateState(0, animData->curLookDir); + animData->nextState = rotateState(animData->curLookDir, 0); break; case Map::kDirE: - animData->nextState = rotateState(4, animData->curLookDir); + animData->nextState = rotateState(animData->curLookDir, 4); break; case Map::kDirSW: @@ -270,7 +271,7 @@ void Goblin_v2::movePathFind(Mult::Mult_Object *obj, Gob_Object *gobDesc, int16 break; case Map::kDirS: - animData->nextState = animData->curLookDir == 6 ? 6 : rotateState(6, animData->curLookDir); + animData->nextState = animData->curLookDir == 6 ? 6 : rotateState(animData->curLookDir, 6); if (_vm->_map->_screenWidth == 640) { if (_vm->_map->getPass(obj->goblinX, obj->goblinY) == 20) animData->nextState = 39; |