diff options
-rw-r--r-- | engines/hopkins/hopkins.cpp | 26 | ||||
-rw-r--r-- | engines/hopkins/objects.cpp | 114 | ||||
-rw-r--r-- | engines/hopkins/objects.h | 13 | ||||
-rw-r--r-- | engines/hopkins/script.cpp | 26 | ||||
-rw-r--r-- | engines/hopkins/talk.cpp | 8 |
5 files changed, 94 insertions, 93 deletions
diff --git a/engines/hopkins/hopkins.cpp b/engines/hopkins/hopkins.cpp index 0f52608afb..4072111bc7 100644 --- a/engines/hopkins/hopkins.cpp +++ b/engines/hopkins/hopkins.cpp @@ -2067,7 +2067,7 @@ void HopkinsEngine::playUnderwaterBaseCutscene() { _eventsManager->refreshScreenAndEvents(); _graphicsManager->fadeInLong(); - _objectsManager->enableHiding(); + _objectsManager->enableHidingBehavior(); do _eventsManager->refreshScreenAndEvents(); @@ -2570,13 +2570,13 @@ void HopkinsEngine::handleOceanMouseEvents() { case 1: switch (_globals->_oceanDirection) { case DIR_UP: - _objectsManager->SPACTION(_globals->_characterSpriteBuf, "27,26,25,24,23,22,21,20,19,18,-1,", 6, false); + _objectsManager->showSpecialActionAnimationWithFlip(_globals->_characterSpriteBuf, "27,26,25,24,23,22,21,20,19,18,-1,", 6, false); break; case DIR_RIGHT: - _objectsManager->SPACTION(_globals->_characterSpriteBuf, "0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,-1,", 6, false); + _objectsManager->showSpecialActionAnimationWithFlip(_globals->_characterSpriteBuf, "0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,-1,", 6, false); break; case DIR_DOWN: - _objectsManager->SPACTION(_globals->_characterSpriteBuf, "9,10,11,12,13,14,15,16,17,18,-1,", 6, false); + _objectsManager->showSpecialActionAnimationWithFlip(_globals->_characterSpriteBuf, "9,10,11,12,13,14,15,16,17,18,-1,", 6, false); break; default: break; @@ -2607,13 +2607,13 @@ void HopkinsEngine::handleOceanMouseEvents() { case 2: switch (_globals->_oceanDirection) { case DIR_UP: - _objectsManager->SPACTION(_globals->_characterSpriteBuf, "27,28,29,30,31,32,33,34,35,36,-1,", 6, false); + _objectsManager->showSpecialActionAnimationWithFlip(_globals->_characterSpriteBuf, "27,28,29,30,31,32,33,34,35,36,-1,", 6, false); break; case DIR_DOWN: - _objectsManager->SPACTION(_globals->_characterSpriteBuf, "9,8,7,6,5,4,3,2,1,0,-1,", 6, false); + _objectsManager->showSpecialActionAnimationWithFlip(_globals->_characterSpriteBuf, "9,8,7,6,5,4,3,2,1,0,-1,", 6, false); break; case DIR_LEFT: - _objectsManager->SPACTION(_globals->_characterSpriteBuf, "18,19,20,21,22,23,24,25,26,27,28,29,30,31,32,33,34,35,36,-1,", 6, false); + _objectsManager->showSpecialActionAnimationWithFlip(_globals->_characterSpriteBuf, "18,19,20,21,22,23,24,25,26,27,28,29,30,31,32,33,34,35,36,-1,", 6, false); break; default: break; @@ -2659,10 +2659,10 @@ void HopkinsEngine::handleOceanMouseEvents() { } } while (oldX <= 235); if (!displAnim) - _objectsManager->SPACTION(_globals->_characterSpriteBuf, "36,35,34,33,32,31,30,29,28,27,-1,", 6, false); + _objectsManager->showSpecialActionAnimationWithFlip(_globals->_characterSpriteBuf, "36,35,34,33,32,31,30,29,28,27,-1,", 6, false); break; case DIR_DOWN: - _objectsManager->SPACTION(_globals->_characterSpriteBuf, "9,10,11,12,13,14,15,16,17,18,19,20,21,22,23,24,25,26,27,-1,", 6, false); + _objectsManager->showSpecialActionAnimationWithFlip(_globals->_characterSpriteBuf, "9,10,11,12,13,14,15,16,17,18,19,20,21,22,23,24,25,26,27,-1,", 6, false); break; case DIR_LEFT: oldX = _objectsManager->getSpriteX(0); @@ -2682,7 +2682,7 @@ void HopkinsEngine::handleOceanMouseEvents() { } } while (oldX > 236); if (!displAnim) - _objectsManager->SPACTION(_globals->_characterSpriteBuf, "18,19,20,21,22,23,24,25,26,27,-1,", 6, false); + _objectsManager->showSpecialActionAnimationWithFlip(_globals->_characterSpriteBuf, "18,19,20,21,22,23,24,25,26,27,-1,", 6, false); break; default: break; @@ -2693,7 +2693,7 @@ void HopkinsEngine::handleOceanMouseEvents() { case 4: switch (_globals->_oceanDirection) { case DIR_UP: - _objectsManager->SPACTION(_globals->_characterSpriteBuf, "27,26,25,24,23,22,21,20,19,18,17,16,15,14,13,12,11,10,9,-1,", 6, false); + _objectsManager->showSpecialActionAnimationWithFlip(_globals->_characterSpriteBuf, "27,26,25,24,23,22,21,20,19,18,17,16,15,14,13,12,11,10,9,-1,", 6, false); break; case DIR_RIGHT: oldX = _objectsManager->getSpriteX(0); @@ -2713,7 +2713,7 @@ void HopkinsEngine::handleOceanMouseEvents() { } } while (oldX <= 235); if (!displAnim) - _objectsManager->SPACTION(_globals->_characterSpriteBuf, "0,1,2,3,4,5,6,7,8,9,-1,", 6, false); + _objectsManager->showSpecialActionAnimationWithFlip(_globals->_characterSpriteBuf, "0,1,2,3,4,5,6,7,8,9,-1,", 6, false); break; case DIR_LEFT: oldX = _objectsManager->getSpriteX(0); @@ -2732,7 +2732,7 @@ void HopkinsEngine::handleOceanMouseEvents() { if (oldX <= 236) { if (!displAnim) - _objectsManager->SPACTION(_globals->_characterSpriteBuf, "18,17,16,15,14,13,12,11,10,9,-1,", 6, false); + _objectsManager->showSpecialActionAnimationWithFlip(_globals->_characterSpriteBuf, "18,17,16,15,14,13,12,11,10,9,-1,", 6, false); break; } } diff --git a/engines/hopkins/objects.cpp b/engines/hopkins/objects.cpp index 4fe4f83fde..30c102f380 100644 --- a/engines/hopkins/objects.cpp +++ b/engines/hopkins/objects.cpp @@ -586,7 +586,7 @@ void ObjectsManager::resetBob(int idx) { bob._bobModeChange = 0; bob.field20 = 0; bob.field22 = 0; - bob.field34 = false; + bob._disableFl = false; bob._zoomFactor = 0; bob._flipFl = false; bob._oldX2 = 0; @@ -706,7 +706,7 @@ void ObjectsManager::computeHideCounter(int idx) { return; for (int i = 0; i <= 20; i++) { - if ((_bob[i]._bobMode) && (!_bob[i]._disabledAnimationFl) && (!_bob[i].field34) && (_bob[i]._frameIndex != 250)) { + if ((_bob[i]._bobMode) && (!_bob[i]._disabledAnimationFl) && (!_bob[i]._disableFl) && (_bob[i]._frameIndex != 250)) { int oldRight = _bob[i]._oldX + _bob[i]._oldWidth; int oldBottom = _bob[i]._oldY + _bob[i]._oldHeight; int hiddenRight = hid->_x + hid->_width; @@ -1810,10 +1810,10 @@ void ObjectsManager::handleCityMap() { _vm->_graphicsManager->displayAllBob(); _vm->_graphicsManager->initScreen("PLAN", 2, false); for (int i = 0; i <= 15; i++) - B_CACHE_OFF(i); - B_CACHE_OFF(19); - B_CACHE_OFF(20); - enableHiding(); + disableHidingItem(i); + disableHidingItem(19); + disableHidingItem(20); + enableHidingBehavior(); if (!_mapCarPosX && !_mapCarPosY) { _mapCarPosX = 900; @@ -2826,31 +2826,31 @@ void ObjectsManager::doActionBack(int idx) { showActionAnimation(_gestureBuf, "0,1,2,3,4,5,6,7,8,8,8,8,8,8,7,6,5,4,3,2,1,0,-1,", 8, false); break; case 2: - SPACTION(_gestureBuf, "0,1,2,3,4,5,6,7,8,9,10,11,12,13,-1,", 8, false); + showSpecialActionAnimationWithFlip(_gestureBuf, "0,1,2,3,4,5,6,7,8,9,10,11,12,13,-1,", 8, false); break; case 3: - SPACTION1(_gestureBuf, "12,11,10,9,8,7,6,5,4,3,2,1,0,-1,", 8); + showSpecialActionAnimation(_gestureBuf, "12,11,10,9,8,7,6,5,4,3,2,1,0,-1,", 8); break; case 4: showActionAnimation(_gestureBuf, "0,1,2,3,4,5,6,7,8,8,8,8,8,8,9,10,11,12,13,12,11,12,13,12,11,12,13,12,11,10,9,8,7,6,5,4,3,2,1,0,-1,", 8, false); break; case 5: - SPACTION(_gestureBuf, "15,16,17,18,19,20,21,-1,", 8, false); + showSpecialActionAnimationWithFlip(_gestureBuf, "15,16,17,18,19,20,21,-1,", 8, false); break; case 6: - SPACTION1(_gestureBuf, "20,19,18,17,16,15,-1,", 8); + showSpecialActionAnimation(_gestureBuf, "20,19,18,17,16,15,-1,", 8); break; case 7: - SPACTION(_gestureBuf, "15,16,17,18,19,20,21,22,23,24,-1,", 8, false); + showSpecialActionAnimationWithFlip(_gestureBuf, "15,16,17,18,19,20,21,22,23,24,-1,", 8, false); break; case 8: - SPACTION1(_gestureBuf, "23,22,21,20,19,18,17,16,15,-1,", 8); + showSpecialActionAnimation(_gestureBuf, "23,22,21,20,19,18,17,16,15,-1,", 8); break; case 9: - SPACTION(_gestureBuf, "15,16,17,18,19,20,21,22,23,24,-1,", 8, false); + showSpecialActionAnimationWithFlip(_gestureBuf, "15,16,17,18,19,20,21,22,23,24,-1,", 8, false); break; case 10: - SPACTION1(_gestureBuf, "23,22,21,20,19,18,17,16,15,-1,", 8); + showSpecialActionAnimation(_gestureBuf, "23,22,21,20,19,18,17,16,15,-1,", 8); break; } } @@ -2867,31 +2867,31 @@ void ObjectsManager::doActionRight(int idx) { showActionAnimation(_gestureBuf, "20,19,18,17,16,15,14,13,13,13,13,13,14,15,16,17,18,19,20,-1,", 8, false); break; case 2: - SPACTION(_gestureBuf, "1,2,3,4,5,6,7,8,-1,", 8, false); + showSpecialActionAnimationWithFlip(_gestureBuf, "1,2,3,4,5,6,7,8,-1,", 8, false); break; case 3: - SPACTION1(_gestureBuf, "9,10,11,12,13,14,15,16,17,18,19,20,-1,", 8); + showSpecialActionAnimation(_gestureBuf, "9,10,11,12,13,14,15,16,17,18,19,20,-1,", 8); break; case 4: showActionAnimation(_gestureBuf, "1,2,3,4,5,6,7,8,8,7,6,5,4,3,2,1,-1,", 8, false); break; case 5: - SPACTION(_gestureBuf, "23,24,25,-1,", 8, false); + showSpecialActionAnimationWithFlip(_gestureBuf, "23,24,25,-1,", 8, false); break; case 6: - SPACTION1(_gestureBuf, "24,,23,-1,", 8); + showSpecialActionAnimation(_gestureBuf, "24,,23,-1,", 8); break; case 7: - SPACTION(_gestureBuf, "23,24,25,26,27,-1,", 8, false); + showSpecialActionAnimationWithFlip(_gestureBuf, "23,24,25,26,27,-1,", 8, false); break; case 8: - SPACTION1(_gestureBuf, "26,25,24,23,-1,", 8); + showSpecialActionAnimation(_gestureBuf, "26,25,24,23,-1,", 8); break; case 9: - SPACTION(_gestureBuf, "23,24,25,26,27,28,29,-1,", 8, false); + showSpecialActionAnimationWithFlip(_gestureBuf, "23,24,25,26,27,28,29,-1,", 8, false); break; case 10: - SPACTION1(_gestureBuf, "28,27,26,25,24,23,-1,", 8); + showSpecialActionAnimation(_gestureBuf, "28,27,26,25,24,23,-1,", 8); break; } } @@ -2908,31 +2908,31 @@ void ObjectsManager::doActionDiagRight(int idx) { showActionAnimation(_gestureBuf, "0,1,2,3,4,5,6,7,8,8,8,8,8,7,6,5,4,3,2,1,0,-1,", 8, false); break; case 2: - SPACTION(_gestureBuf, "0,1,2,3,4,5,6,7,8,9,10,11,12,-1,", 8, false); + showSpecialActionAnimationWithFlip(_gestureBuf, "0,1,2,3,4,5,6,7,8,9,10,11,12,-1,", 8, false); break; case 3: - SPACTION1(_gestureBuf, "11,10,9,8,7,6,5,4,3,2,1,0,-1,", 8); + showSpecialActionAnimation(_gestureBuf, "11,10,9,8,7,6,5,4,3,2,1,0,-1,", 8); break; case 4: showActionAnimation(_gestureBuf, "0,1,2,3,4,5,6,7,8,9,10,11,12,11,12,11,12,11,12,11,10,9,8,7,6,5,4,3,2,1,0,-1,", 8, false); break; case 5: - SPACTION(_gestureBuf, "15,16,17,18,-1,", 8, false); + showSpecialActionAnimationWithFlip(_gestureBuf, "15,16,17,18,-1,", 8, false); break; case 6: - SPACTION1(_gestureBuf, "17,16,15,-1,", 8); + showSpecialActionAnimation(_gestureBuf, "17,16,15,-1,", 8); break; case 7: - SPACTION(_gestureBuf, "15,16,17,18,19,20-1,", 8, false); + showSpecialActionAnimationWithFlip(_gestureBuf, "15,16,17,18,19,20-1,", 8, false); break; case 8: - SPACTION1(_gestureBuf, "19,18,17,16,15,-1,", 8); + showSpecialActionAnimation(_gestureBuf, "19,18,17,16,15,-1,", 8); break; case 9: - SPACTION(_gestureBuf, "15,16,17,18,19,20,21,-1,", 8, false); + showSpecialActionAnimationWithFlip(_gestureBuf, "15,16,17,18,19,20,21,-1,", 8, false); break; case 10: - SPACTION1(_gestureBuf, "20,19,18,17,15,-1,", 8); + showSpecialActionAnimation(_gestureBuf, "20,19,18,17,15,-1,", 8); break; } } @@ -2949,10 +2949,10 @@ void ObjectsManager::doActionFront(int idx) { showActionAnimation(_gestureBuf, "0,1,2,3,4,5,6,7,9,9,9,9,9,9,7,6,5,4,3,2,1,0,-1,", 8, false); break; case 2: - SPACTION(_gestureBuf, "0,1,2,3,4,5,6,7,9,10,11,12,13,14,15,-1,", 8, false); + showSpecialActionAnimationWithFlip(_gestureBuf, "0,1,2,3,4,5,6,7,9,10,11,12,13,14,15,-1,", 8, false); break; case 3: - SPACTION1(_gestureBuf, "14,13,12,11,10,9,7,6,5,4,3,2,1,0,-1,", 8); + showSpecialActionAnimation(_gestureBuf, "14,13,12,11,10,9,7,6,5,4,3,2,1,0,-1,", 8); break; case 4: showActionAnimation(_gestureBuf, "0,1,2,3,4,5,6,7,9,10,11,12,13,14,13,12,11,10,9,7,6,5,4,3,2,1,0,-1,", 8, false); @@ -2972,31 +2972,31 @@ void ObjectsManager::doActionDiagLeft(int idx) { showActionAnimation(_gestureBuf, "0,1,2,3,4,5,6,7,8,8,8,8,8,7,6,5,4,3,2,1,0,-1,", 8, true); break; case 2: - SPACTION(_gestureBuf, "0,1,2,3,4,5,6,7,8,9,10,11,12,-1,", 8, true); + showSpecialActionAnimationWithFlip(_gestureBuf, "0,1,2,3,4,5,6,7,8,9,10,11,12,-1,", 8, true); break; case 3: - SPACTION1(_gestureBuf, "11,10,9,8,7,6,5,4,3,2,1,0,-1,", 8); + showSpecialActionAnimation(_gestureBuf, "11,10,9,8,7,6,5,4,3,2,1,0,-1,", 8); break; case 4: showActionAnimation(_gestureBuf, "0,1,2,3,4,5,6,7,8,9,10,11,12,11,12,11,12,11,12,11,10,9,8,7,6,5,4,3,2,1,0,-1,", 8, true); break; case 5: - SPACTION(_gestureBuf, "15,16,17,18,-1,", 8, true); + showSpecialActionAnimationWithFlip(_gestureBuf, "15,16,17,18,-1,", 8, true); break; case 6: - SPACTION1(_gestureBuf, "17,16,15,-1,", 8); + showSpecialActionAnimation(_gestureBuf, "17,16,15,-1,", 8); break; case 7: - SPACTION(_gestureBuf, "15,16,17,18,19,20,-1,", 8, true); + showSpecialActionAnimationWithFlip(_gestureBuf, "15,16,17,18,19,20,-1,", 8, true); break; case 8: - SPACTION1(_gestureBuf, "19,18,17,16,15,-1,", 8); + showSpecialActionAnimation(_gestureBuf, "19,18,17,16,15,-1,", 8); break; case 9: - SPACTION(_gestureBuf, "15,16,17,18,19,20,21,-1,", 8, true); + showSpecialActionAnimationWithFlip(_gestureBuf, "15,16,17,18,19,20,21,-1,", 8, true); break; case 10: - SPACTION1(_gestureBuf, "20,19,18,17,15,-1,", 8); + showSpecialActionAnimation(_gestureBuf, "20,19,18,17,15,-1,", 8); break; } } @@ -3013,31 +3013,31 @@ void ObjectsManager::doActionLeft(int idx) { showActionAnimation(_gestureBuf, "20,19,18,17,16,15,14,13,13,13,13,13,14,15,16,17,18,19,20,-1,", 8, true); break; case 2: - SPACTION(_gestureBuf, "1,2,3,4,5,6,7,8,-1,", 8, true); + showSpecialActionAnimationWithFlip(_gestureBuf, "1,2,3,4,5,6,7,8,-1,", 8, true); break; case 3: - SPACTION1(_gestureBuf, "9,10,11,12,13,14,15,16,17,18,19,20,-1,", 8); + showSpecialActionAnimation(_gestureBuf, "9,10,11,12,13,14,15,16,17,18,19,20,-1,", 8); break; case 4: showActionAnimation(_gestureBuf, "1,2,3,4,5,6,7,8,8,7,6,5,4,3,2,1,-1,", 8, true); break; case 5: - SPACTION(_gestureBuf, "23,24,25,-1,", 8, true); + showSpecialActionAnimationWithFlip(_gestureBuf, "23,24,25,-1,", 8, true); break; case 6: - SPACTION1(_gestureBuf, "24,,23,-1,", 8); + showSpecialActionAnimation(_gestureBuf, "24,,23,-1,", 8); break; case 7: - SPACTION(_gestureBuf, "23,24,25,26,27,-1,", 8, true); + showSpecialActionAnimationWithFlip(_gestureBuf, "23,24,25,26,27,-1,", 8, true); break; case 8: - SPACTION1(_gestureBuf, "26,25,24,23,-1,", 8); + showSpecialActionAnimation(_gestureBuf, "26,25,24,23,-1,", 8); break; case 9: - SPACTION(_gestureBuf, "23,24,25,26,27,28,29,-1,", 8, true); + showSpecialActionAnimationWithFlip(_gestureBuf, "23,24,25,26,27,28,29,-1,", 8, true); break; case 10: - SPACTION1(_gestureBuf, "28,27,26,25,24,23,-1,", 8); + showSpecialActionAnimation(_gestureBuf, "28,27,26,25,24,23,-1,", 8); break; } } @@ -3157,7 +3157,7 @@ void ObjectsManager::loadLinkFile(const Common::String &file) { curDataCacheId += 5; } - enableHiding(); + enableHidingBehavior(); } } @@ -3544,7 +3544,7 @@ void ObjectsManager::showActionAnimation(const byte *spriteData, const Common::S } } -void ObjectsManager::SPACTION(byte *spriteData, const Common::String &animationSeq, int speed, bool flipFl) { +void ObjectsManager::showSpecialActionAnimationWithFlip(byte *spriteData, const Common::String &animationSeq, int speed, bool flipFl) { Common::String tmpStr = ""; int realSpeed = speed; @@ -3586,7 +3586,7 @@ void ObjectsManager::SPACTION(byte *spriteData, const Common::String &animationS } while (spriteIndex != -1); } -void ObjectsManager::SPACTION1(byte *spriteData, const Common::String &animString, int speed) { +void ObjectsManager::showSpecialActionAnimation(byte *spriteData, const Common::String &animString, int speed) { Common::String tmpStr = ""; int realSpeed = speed; if (_vm->_globals->_speed == 2) @@ -3875,7 +3875,7 @@ void ObjectsManager::PERSONAGE2(const Common::String &backgroundFile, const Comm _vm->_graphicsManager->_scrollPosX = (int16)getSpriteX(0) - 320; computeAndSetSpriteSize(); animateSprite(0); - enableHiding(); + enableHidingBehavior(); _vm->_linesManager->_route = (RouteItem *)g_PTRNUL; computeAndSetSpriteSize(); sceneSpecialIni(); @@ -3997,7 +3997,7 @@ void ObjectsManager::loadHidingItems(const Common::String &file) { _hidingItem[i]._useCount = 0; curBufIdx += 5; } - enableHiding(); + enableHidingBehavior(); _vm->_globals->freeMemory(ptr); } @@ -4025,16 +4025,16 @@ void ObjectsManager::clearVBob() { } } -void ObjectsManager::B_CACHE_OFF(int idx) { +void ObjectsManager::disableHidingItem(int idx) { assert(idx < 36); - _bob[idx].field34 = true; + _bob[idx]._disableFl = true; } -void ObjectsManager::enableHiding() { +void ObjectsManager::enableHidingBehavior() { _hidingActiveFl = true; } -void ObjectsManager::disableHiding() { +void ObjectsManager::disableHidingBehavior() { _hidingActiveFl = false; } diff --git a/engines/hopkins/objects.h b/engines/hopkins/objects.h index 7002f7c709..671ba01974 100644 --- a/engines/hopkins/objects.h +++ b/engines/hopkins/objects.h @@ -77,7 +77,7 @@ struct BobItem { int _bobModeChange; int field20; int field22; - bool field34; // Set to true in B_CACHE_OFF() + bool _disableFl; // Set to true in B_CACHE_OFF() int _zoomFactor; bool _flipFl; bool _isSpriteFl; @@ -308,8 +308,8 @@ public: void resetHidingUseCount(int idx); void setHidingUseCount(int idx); void loadHidingItems(const Common::String &file); - void enableHiding(); - void disableHiding(); + void enableHidingBehavior(); + void disableHidingBehavior(); void resetHomeRateCounter() { _homeRateCounter = 0; } void resetOldFrameIndex() { _oldFrameIndex = -1; } @@ -317,12 +317,14 @@ public: int getObjectWidth() { return _objectWidth; } int getObjectHeight() { return _objectHeight; } + void showSpecialActionAnimationWithFlip(byte *spriteData, const Common::String &animationSeq, int speed, bool flipFl); + void showSpecialActionAnimation(byte *spriteData, const Common::String &animString, int speed); + void PERSONAGE(const Common::String &backgroundFile, const Common::String &linkFile, const Common::String &animFile, const Common::String &s4, int soundNum, bool initializeScreen); void PERSONAGE2(const Common::String &backgroundFile, const Common::String &linkFile, const Common::String &animFile, const Common::String &s4, int soundNum, bool initializeScreen); void OPTI_OBJET(); - void SPACTION(byte *spriteData, const Common::String &animationSeq, int speed, bool flipFl); void BOB_VIVANT(int idx); void VBOB(byte *src, int idx, int xp, int yp, int frameIndex); void VBOB_OFF(int idx); @@ -330,9 +332,8 @@ public: void SCI_OPTI_ONE(int idx, int animIdx, int animDataIdx, int a4); void GOHOME(); void OPTI_BOBON(int idx1, int idx2, int idx3, int anim1Idx, int anim2Idx, int anim3Idx); - void SPACTION1(byte *spriteData, const Common::String &animString, int speed); void PARADISE(); - void B_CACHE_OFF(int idx); + void disableHidingItem(int idx); }; } // End of namespace Hopkins diff --git a/engines/hopkins/script.cpp b/engines/hopkins/script.cpp index e34b690434..198376135b 100644 --- a/engines/hopkins/script.cpp +++ b/engines/hopkins/script.cpp @@ -498,7 +498,7 @@ int ScriptManager::handleOpcode(byte *dataP) { opcodeType = 5; break; case MKTAG24('B', 'C', 'A'): - _vm->_objectsManager->B_CACHE_OFF(READ_LE_INT16(dataP + 5)); + _vm->_objectsManager->disableHidingItem(READ_LE_INT16(dataP + 5)); opcodeType = 1; break; case MKTAG24('A', 'N', 'I'): { @@ -544,7 +544,7 @@ int ScriptManager::handleOpcode(byte *dataP) { _vm->_eventsManager->_mouseButton = _vm->_eventsManager->_curMouseButton; _vm->_globals->_disableInventFl = true; _vm->_graphicsManager->fadeOutLong(); - _vm->_objectsManager->disableHiding(); + _vm->_objectsManager->disableHidingBehavior(); _vm->_objectsManager->removeSprite(0); _vm->_fontManager->hideText(5); _vm->_fontManager->hideText(9); @@ -840,7 +840,7 @@ int ScriptManager::handleOpcode(byte *dataP) { break; case 49: { - _vm->_objectsManager->disableHiding(); + _vm->_objectsManager->disableHidingBehavior(); _vm->_objectsManager->removeSprite(0); _vm->_objectsManager->OPTI_BOBON(9, 10, -1, 0, 0, 0); @@ -888,7 +888,7 @@ int ScriptManager::handleOpcode(byte *dataP) { _vm->_objectsManager->animateSprite(0); _vm->_objectsManager->stopBobAnimation(9); } - _vm->_objectsManager->enableHiding(); + _vm->_objectsManager->enableHidingBehavior(); break; } @@ -899,7 +899,7 @@ int ScriptManager::handleOpcode(byte *dataP) { case 51: { _vm->_graphicsManager->fadeOutLong(); - _vm->_objectsManager->disableHiding(); + _vm->_objectsManager->disableHidingBehavior(); _vm->_objectsManager->removeSprite(0); _vm->_fontManager->hideText(5); _vm->_fontManager->hideText(9); @@ -1949,7 +1949,7 @@ int ScriptManager::handleOpcode(byte *dataP) { _vm->_objectsManager->OBSSEUL = true; _vm->_objectsManager->loadLinkFile("IM73a"); _vm->_objectsManager->OBSSEUL = false; - _vm->_objectsManager->enableHiding(); + _vm->_objectsManager->enableHidingBehavior(); _vm->_objectsManager->setHidingUseCount(0); _vm->_objectsManager->setHidingUseCount(1); _vm->_graphicsManager->SETCOLOR4(252, 100, 100, 100); @@ -1960,7 +1960,7 @@ int ScriptManager::handleOpcode(byte *dataP) { case 211: _vm->_objectsManager->removeSprite(0); - _vm->_objectsManager->disableHiding(); + _vm->_objectsManager->disableHidingBehavior(); _vm->_soundManager->_specialSoundNum = 211; _vm->_animationManager->playSequence("SECRET2.SEQ", 1, 12, 100, false, true); _vm->_soundManager->_specialSoundNum = 0; @@ -2003,7 +2003,7 @@ int ScriptManager::handleOpcode(byte *dataP) { _vm->_objectsManager->OBSSEUL = true; _vm->_objectsManager->loadLinkFile("IM93a"); _vm->_objectsManager->OBSSEUL = false; - _vm->_objectsManager->enableHiding(); + _vm->_objectsManager->enableHidingBehavior(); _vm->_globals->_checkDistanceFl = true; _vm->_objectsManager->_oldCharacterPosX = _vm->_objectsManager->getSpriteX(0); _vm->_objectsManager->resetOldDirection(); @@ -2040,12 +2040,12 @@ int ScriptManager::handleOpcode(byte *dataP) { _vm->_objectsManager->OBSSEUL = true; _vm->_objectsManager->loadLinkFile("IM93c"); _vm->_objectsManager->OBSSEUL = false; - _vm->_objectsManager->enableHiding(); + _vm->_objectsManager->enableHidingBehavior(); break; } case 231: - _vm->_objectsManager->disableHiding(); + _vm->_objectsManager->disableHidingBehavior(); _vm->_objectsManager->removeSprite(0); _vm->_objectsManager->setBobAnimation(12); do { @@ -2065,11 +2065,11 @@ int ScriptManager::handleOpcode(byte *dataP) { } while (_vm->_objectsManager->getBobAnimDataIdx(12) != 12); _vm->_objectsManager->animateSprite(0); _vm->_objectsManager->stopBobAnimation(12); - _vm->_objectsManager->enableHiding(); + _vm->_objectsManager->enableHidingBehavior(); break; case 233: { - _vm->_objectsManager->disableHiding(); + _vm->_objectsManager->disableHidingBehavior(); _vm->_objectsManager->removeSprite(0); _vm->_objectsManager->setBobAnimation(11); bool playFl = false; @@ -2082,7 +2082,7 @@ int ScriptManager::handleOpcode(byte *dataP) { playFl = true; } while (_vm->_objectsManager->getBobAnimDataIdx(11) != 13); _vm->_objectsManager->stopBobAnimation(11); - _vm->_objectsManager->enableHiding(); + _vm->_objectsManager->enableHidingBehavior(); _vm->_objectsManager->setBobAnimation(13); do { if (_vm->shouldQuit()) diff --git a/engines/hopkins/talk.cpp b/engines/hopkins/talk.cpp index 3404399014..2929a49244 100644 --- a/engines/hopkins/talk.cpp +++ b/engines/hopkins/talk.cpp @@ -865,7 +865,7 @@ void TalkManager::REPONSE2(int zone, int verb) { if (zone == 22 || zone == 23) { _vm->_objectsManager->setFlipSprite(0, false); _vm->_objectsManager->setSpriteIndex(0, 62); - _vm->_objectsManager->SPACTION(_vm->_objectsManager->_forestSprite, "2,3,4,5,6,7,8,9,10,11,12,-1,", 4, false); + _vm->_objectsManager->showSpecialActionAnimationWithFlip(_vm->_objectsManager->_forestSprite, "2,3,4,5,6,7,8,9,10,11,12,-1,", 4, false); if (zone == 22) { _vm->_objectsManager->lockAnimX(6, _vm->_objectsManager->getBobPosX(3)); _vm->_objectsManager->lockAnimX(8, _vm->_objectsManager->getBobPosX(3)); @@ -877,7 +877,7 @@ void TalkManager::REPONSE2(int zone, int verb) { _vm->_objectsManager->stopBobAnimation(4); _vm->_objectsManager->setBobAnimation(6); _vm->_soundManager->playSample(1); - _vm->_objectsManager->SPACTION1(_vm->_objectsManager->_forestSprite, "13,14,15,14,13,12,13,14,15,16,-1,", 4); + _vm->_objectsManager->showSpecialActionAnimation(_vm->_objectsManager->_forestSprite, "13,14,15,14,13,12,13,14,15,16,-1,", 4); do _vm->_eventsManager->refreshScreenAndEvents(); while (_vm->_objectsManager->getBobAnimDataIdx(6) < 12); @@ -913,7 +913,7 @@ void TalkManager::REPONSE2(int zone, int verb) { } else if (zone == 20 || zone == 21) { _vm->_objectsManager->setFlipSprite(0, true); _vm->_objectsManager->setSpriteIndex(0, 62); - _vm->_objectsManager->SPACTION(_vm->_objectsManager->_forestSprite, "2,3,4,5,6,7,8,9,10,11,12,-1,", 4, true); + _vm->_objectsManager->showSpecialActionAnimationWithFlip(_vm->_objectsManager->_forestSprite, "2,3,4,5,6,7,8,9,10,11,12,-1,", 4, true); if (zone == 20) { _vm->_objectsManager->lockAnimX(5, _vm->_objectsManager->getBobPosX(1)); _vm->_objectsManager->lockAnimX(7, _vm->_objectsManager->getBobPosX(1)); @@ -925,7 +925,7 @@ void TalkManager::REPONSE2(int zone, int verb) { _vm->_objectsManager->stopBobAnimation(2); _vm->_objectsManager->setBobAnimation(5); _vm->_soundManager->playSample(1); - _vm->_objectsManager->SPACTION1(_vm->_objectsManager->_forestSprite, "13,14,15,14,13,12,13,14,15,16,-1,", 4); + _vm->_objectsManager->showSpecialActionAnimation(_vm->_objectsManager->_forestSprite, "13,14,15,14,13,12,13,14,15,16,-1,", 4); do _vm->_eventsManager->refreshScreenAndEvents(); while (_vm->_objectsManager->getBobAnimDataIdx(5) < 12); |