diff options
author | Strangerke | 2012-12-20 08:35:11 +0100 |
---|---|---|
committer | Strangerke | 2012-12-20 08:35:11 +0100 |
commit | 664463d5d829d547a3f28ec40875dacecc78ca06 (patch) | |
tree | ba8695b0a28511ac77a62e96b50e34fb15607c28 | |
parent | 687b7f97df666c392af6f0f4ff3eca7832b1b313 (diff) | |
download | scummvm-rg350-664463d5d829d547a3f28ec40875dacecc78ca06.tar.gz scummvm-rg350-664463d5d829d547a3f28ec40875dacecc78ca06.tar.bz2 scummvm-rg350-664463d5d829d547a3f28ec40875dacecc78ca06.zip |
HOPKINS: Fix bug introduced in previous commit, more renaming
-rw-r--r-- | engines/hopkins/globals.cpp | 4 | ||||
-rw-r--r-- | engines/hopkins/globals.h | 4 | ||||
-rw-r--r-- | engines/hopkins/hopkins.cpp | 52 | ||||
-rw-r--r-- | engines/hopkins/objects.cpp | 348 | ||||
-rw-r--r-- | engines/hopkins/objects.h | 6 | ||||
-rw-r--r-- | engines/hopkins/script.cpp | 246 | ||||
-rw-r--r-- | engines/hopkins/talk.cpp | 110 |
7 files changed, 387 insertions, 383 deletions
diff --git a/engines/hopkins/globals.cpp b/engines/hopkins/globals.cpp index 6af81b819a..2650018c58 100644 --- a/engines/hopkins/globals.cpp +++ b/engines/hopkins/globals.cpp @@ -77,7 +77,7 @@ Globals::Globals() { for (int i = 0; i < 8; ++i) Common::fill((byte *)&Bank[i], (byte *)&Bank[i] + sizeof(BankItem), 0); for (int i = 0; i < 36; ++i) - Common::fill((byte *)&Bob[i], (byte *)&Bob[i] + sizeof(BobItem), 0); + Common::fill((byte *)&_bob[i], (byte *)&_bob[i] + sizeof(BobItem), 0); for (int i = 0; i < 6; ++i) Common::fill((byte *)&Liste[i], (byte *)&Liste[i] + sizeof(ListeItem), 0); for (int i = 0; i < 35; ++i) @@ -601,7 +601,7 @@ void Globals::loadCache(const Common::String &file) { } void Globals::B_CACHE_OFF(int idx) { - Bob[idx].field34 = true; + _bob[idx].field34 = true; } diff --git a/engines/hopkins/globals.h b/engines/hopkins/globals.h index db26cd8f4e..7817eced0b 100644 --- a/engines/hopkins/globals.h +++ b/engines/hopkins/globals.h @@ -99,7 +99,7 @@ struct BobItem { int field10; // BOBPOSI ? int field12; int field14; - bool field16; // set to true in BOBANIM_OFF() + bool _disabledAnimationFl; byte *_animData; bool field1C; int field1E; @@ -309,7 +309,7 @@ public: CarreZoneItem CarreZone[101]; BqeAnimItem Bqe_Anim[35]; BankItem Bank[8]; - BobItem Bob[36]; + BobItem _bob[36]; ListeItem Liste[6]; Liste2Item Liste2[35]; BlAnimItem BL_ANIM[30]; diff --git a/engines/hopkins/hopkins.cpp b/engines/hopkins/hopkins.cpp index 1792cf472a..68f0aa60a1 100644 --- a/engines/hopkins/hopkins.cpp +++ b/engines/hopkins/hopkins.cpp @@ -3591,8 +3591,8 @@ void HopkinsEngine::INTRORUN() { _animationManager.loadAnim("INTRO2"); _graphicsManager.VISU_ALL(); _soundManager.WSOUND(23); - _objectsManager.BOBANIM_OFF(3); - _objectsManager.BOBANIM_OFF(5); + _objectsManager.stopBobAnimation(3); + _objectsManager.stopBobAnimation(5); _graphicsManager.ofscroll = 0; _graphicsManager.SETCOLOR3(252, 100, 100, 100); _graphicsManager.SETCOLOR3(253, 100, 100, 100); @@ -3609,9 +3609,9 @@ void HopkinsEngine::INTRORUN() { for (uint i = 0; i < 200 / _globals._speed; ++i) _eventsManager.VBL(); - _objectsManager.BOBANIM_ON(3); + _objectsManager.setBobAnimation(3); _soundManager.VOICE_MIX(5, 3); - _objectsManager.BOBANIM_OFF(3); + _objectsManager.stopBobAnimation(3); _eventsManager.VBL(); memcpy(&paletteData2, _graphicsManager.Palette, 796); @@ -3638,9 +3638,9 @@ void HopkinsEngine::INTRORUN() { _animationManager.loadAnim("INTRO2"); _graphicsManager.VISU_ALL(); _soundManager.WSOUND(23); - _objectsManager.BOBANIM_OFF(3); - _objectsManager.BOBANIM_OFF(5); - _objectsManager.BOBANIM_OFF(1); + _objectsManager.stopBobAnimation(3); + _objectsManager.stopBobAnimation(5); + _objectsManager.stopBobAnimation(1); _graphicsManager.ofscroll = 0; _graphicsManager.SETCOLOR3(252, 100, 100, 100); _graphicsManager.SETCOLOR3(253, 100, 100, 100); @@ -3658,11 +3658,11 @@ void HopkinsEngine::INTRORUN() { int v9 = 0; while (!shouldQuit() && !_eventsManager._escKeyFl) { if (v9 == 12) { - _objectsManager.BOBANIM_ON(3); + _objectsManager.setBobAnimation(3); _eventsManager.VBL(); _soundManager.VOICE_MIX(6, 3); _eventsManager.VBL(); - _objectsManager.BOBANIM_OFF(3); + _objectsManager.stopBobAnimation(3); } Common::copy(&paletteData2[0], &paletteData2[PALETTE_BLOCK_SIZE], &_graphicsManager.Palette[0]); @@ -3694,13 +3694,13 @@ void HopkinsEngine::INTRORUN() { for (uint j = 1; j < 100 / _globals._speed; ++j) _eventsManager.VBL(); - _objectsManager.BOBANIM_ON(3); + _objectsManager.setBobAnimation(3); _soundManager.VOICE_MIX(7, 3); - _objectsManager.BOBANIM_OFF(3); + _objectsManager.stopBobAnimation(3); for (uint k = 1; k < 60 / _globals._speed; ++k) _eventsManager.VBL(); - _objectsManager.BOBANIM_ON(5); + _objectsManager.setBobAnimation(5); for (uint l = 0; l < 20 / _globals._speed; ++l) _eventsManager.VBL(); @@ -3709,9 +3709,9 @@ void HopkinsEngine::INTRORUN() { for (uint m = 0; m < 50 / _globals._speed; ++m) { if (m == 30 / _globals._speed) { - _objectsManager.BOBANIM_ON(3); + _objectsManager.setBobAnimation(3); _soundManager.VOICE_MIX(8, 3); - _objectsManager.BOBANIM_OFF(3); + _objectsManager.stopBobAnimation(3); } _eventsManager.VBL(); @@ -3818,7 +3818,7 @@ void HopkinsEngine::BOOM() { _graphicsManager.loadImage("IM15"); _animationManager.loadAnim("ANIM15"); _graphicsManager.VISU_ALL(); - _objectsManager.BOBANIM_OFF(7); + _objectsManager.stopBobAnimation(7); _globals.BPP_NOAFF = true; for (int idx = 0; idx < 5; ++idx) { @@ -3836,7 +3836,7 @@ void HopkinsEngine::BOOM() { _globals.NOPARLE = true; _talkManager.PARLER_PERSO2("vire.pe2"); _globals.NOPARLE = false; - _objectsManager.BOBANIM_ON(7); + _objectsManager.setBobAnimation(7); for (int idx = 0; idx < 100; ++idx) { _eventsManager.VBL(); @@ -4048,9 +4048,9 @@ void HopkinsEngine::JOUE_FIN() { _animationManager.loadAnim("ANIM100"); _graphicsManager.VISU_ALL(); _eventsManager.mouseOn(); - _objectsManager.BOBANIM_OFF(7); - _objectsManager.BOBANIM_OFF(8); - _objectsManager.BOBANIM_OFF(9); + _objectsManager.stopBobAnimation(7); + _objectsManager.stopBobAnimation(8); + _objectsManager.stopBobAnimation(9); _graphicsManager.SETCOLOR3(252, 100, 100, 100); _graphicsManager.SETCOLOR3(253, 100, 100, 100); _graphicsManager.SETCOLOR3(251, 100, 100, 100); @@ -4072,10 +4072,10 @@ void HopkinsEngine::JOUE_FIN() { _globals.NOPARLE = true; _talkManager.PARLER_PERSO("GM4.PE2"); _globals._disableInventFl = true; - _objectsManager.BOBANIM_OFF(6); - _objectsManager.BOBANIM_OFF(10); - _objectsManager.BOBANIM_ON(9); - _objectsManager.BOBANIM_ON(7); + _objectsManager.stopBobAnimation(6); + _objectsManager.stopBobAnimation(10); + _objectsManager.setBobAnimation(9); + _objectsManager.setBobAnimation(7); do _eventsManager.VBL(); @@ -4110,7 +4110,7 @@ void HopkinsEngine::JOUE_FIN() { _eventsManager.VBL(); while (_objectsManager.BOBPOSI(7) != 120); - _objectsManager.BOBANIM_OFF(7); + _objectsManager.stopBobAnimation(7); if (_globals.SAUVEGARDE->data[svField135] == 1) { _soundManager.SPECIAL_SOUND = 200; _soundManager.VBL_MERDE = true; @@ -4152,8 +4152,8 @@ void HopkinsEngine::JOUE_FIN() { _soundManager.SPECIAL_SOUND = 200; _soundManager.VBL_MERDE = true; _animationManager.playAnim2("BERM.ANM", 100, 24, 300); - _objectsManager.BOBANIM_OFF(7); - _objectsManager.BOBANIM_ON(8); + _objectsManager.stopBobAnimation(7); + _objectsManager.setBobAnimation(8); _globals.NOPARLE = true; _talkManager.PARLER_PERSO("GM5.PE2"); _globals._disableInventFl = true; diff --git a/engines/hopkins/objects.cpp b/engines/hopkins/objects.cpp index 5afd9fe922..42818b4e4a 100644 --- a/engines/hopkins/objects.cpp +++ b/engines/hopkins/objects.cpp @@ -558,7 +558,7 @@ void ObjectsManager::INIT_BOB() { } void ObjectsManager::BOB_ZERO(int idx) { - BobItem &bob = _vm->_globals.Bob[idx]; + BobItem &bob = _vm->_globals._bob[idx]; Liste2Item &item = _vm->_globals.Liste2[idx]; bob.field0 = 0; @@ -569,7 +569,7 @@ void ObjectsManager::BOB_ZERO(int idx) { bob.field10 = 0; bob.field12 = 0; bob.field14 = 0; - bob.field16 = false; + bob._disabledAnimationFl = false; bob._animData = g_PTRNUL; bob.field1C = false; bob.field1E = 0; @@ -590,25 +590,25 @@ void ObjectsManager::BOB_ZERO(int idx) { } void ObjectsManager::DEF_BOB(int idx) { - if (_vm->_globals.Bob[idx]._activeFl) { - int xp = _vm->_globals.Bob[idx]._oldX; - int yp = _vm->_globals.Bob[idx]._oldY; + if (_vm->_globals._bob[idx]._activeFl) { + int xp = _vm->_globals._bob[idx]._oldX; + int yp = _vm->_globals._bob[idx]._oldY; - if (_vm->_globals.Bob[idx]._isSpriteFl) - _vm->_graphicsManager.Sprite_Vesa(_vm->_graphicsManager._vesaBuffer, _vm->_globals.Bob[idx]._spriteData, - xp + 300, yp + 300, _vm->_globals.Bob[idx]._frameIndex); + if (_vm->_globals._bob[idx]._isSpriteFl) + _vm->_graphicsManager.Sprite_Vesa(_vm->_graphicsManager._vesaBuffer, _vm->_globals._bob[idx]._spriteData, + xp + 300, yp + 300, _vm->_globals._bob[idx]._frameIndex); else _vm->_graphicsManager.Affiche_Perfect(_vm->_graphicsManager._vesaBuffer, - _vm->_globals.Bob[idx]._spriteData, xp + 300, yp + 300, _vm->_globals.Bob[idx]._frameIndex, - _vm->_globals.Bob[idx].field4A, _vm->_globals.Bob[idx]._oldY2, - _vm->_globals.Bob[idx]._modeFlag); + _vm->_globals._bob[idx]._spriteData, xp + 300, yp + 300, _vm->_globals._bob[idx]._frameIndex, + _vm->_globals._bob[idx].field4A, _vm->_globals._bob[idx]._oldY2, + _vm->_globals._bob[idx]._modeFlag); _vm->_globals.Liste2[idx]._visibleFl = true; _vm->_globals.Liste2[idx]._xp = xp; _vm->_globals.Liste2[idx]._yp = yp; - _vm->_globals.Liste2[idx]._width = _vm->_globals.Bob[idx]._oldWidth; - _vm->_globals.Liste2[idx]._height = _vm->_globals.Bob[idx]._oldHeight; + _vm->_globals.Liste2[idx]._width = _vm->_globals._bob[idx]._oldWidth; + _vm->_globals.Liste2[idx]._height = _vm->_globals._bob[idx]._oldHeight; int v5 = _vm->_globals.Liste2[idx]._xp; if (v5 < _vm->_graphicsManager.min_x) { @@ -645,7 +645,7 @@ void ObjectsManager::DEF_BOB(int idx) { void ObjectsManager::BOB_VISU(int idx) { _priorityFl = true; - if (!_vm->_globals.Bob[idx].field0) { + if (!_vm->_globals._bob[idx].field0) { BOB_ZERO(idx); const byte *data = _vm->_globals.Bqe_Anim[idx]._data; @@ -662,22 +662,22 @@ void ObjectsManager::BOB_VISU(int idx) { v6 = -1; if ((int16)READ_LE_UINT16(data + 24)) { - _vm->_globals.Bob[idx]._isSpriteFl = false; + _vm->_globals._bob[idx]._isSpriteFl = false; if (_vm->_globals.Bank[v1]._fileHeader == 1) { - _vm->_globals.Bob[idx]._isSpriteFl = true; - _vm->_globals.Bob[idx].field36 = 0; - _vm->_globals.Bob[idx]._modeFlag = 0; + _vm->_globals._bob[idx]._isSpriteFl = true; + _vm->_globals._bob[idx].field36 = 0; + _vm->_globals._bob[idx]._modeFlag = 0; } - _vm->_globals.Bob[idx]._animData = _vm->_globals.Bqe_Anim[idx]._data; - _vm->_globals.Bob[idx].field0 = 10; - _vm->_globals.Bob[idx]._spriteData = _vm->_globals.Bank[v1]._data; + _vm->_globals._bob[idx]._animData = _vm->_globals.Bqe_Anim[idx]._data; + _vm->_globals._bob[idx].field0 = 10; + _vm->_globals._bob[idx]._spriteData = _vm->_globals.Bank[v1]._data; - _vm->_globals.Bob[idx].field1E = v9; - _vm->_globals.Bob[idx].field20 = v6; - _vm->_globals.Bob[idx].field22 = v8; - _vm->_globals.Bob[idx]._offsetY = offsetY; + _vm->_globals._bob[idx].field1E = v9; + _vm->_globals._bob[idx].field20 = v6; + _vm->_globals._bob[idx].field22 = v8; + _vm->_globals._bob[idx]._offsetY = offsetY; } } } @@ -685,22 +685,22 @@ void ObjectsManager::BOB_VISU(int idx) { } void ObjectsManager::BOB_OFF(int idx) { - if (_vm->_globals.Bob[idx].field0 == 3) - _vm->_globals.Bob[idx].field0 = 4; - else if (_vm->_globals.Bob[idx].field0 == 10) - _vm->_globals.Bob[idx].field0 = 11; + if (_vm->_globals._bob[idx].field0 == 3) + _vm->_globals._bob[idx].field0 = 4; + else if (_vm->_globals._bob[idx].field0 == 10) + _vm->_globals._bob[idx].field0 = 11; } void ObjectsManager::BOB_OFFSET(int idx, int v) { - _vm->_globals.Bob[idx]._oldX2 = v; + _vm->_globals._bob[idx]._oldX2 = v; } void ObjectsManager::BOB_ADJUST(int idx, int v) { - _vm->_globals.Bob[idx]._oldX2 = v; + _vm->_globals._bob[idx]._oldX2 = v; } void ObjectsManager::BOB_OFFSETY(int idx, int v) { - _vm->_globals.Bob[idx]._offsetY = v; + _vm->_globals._bob[idx]._offsetY = v; } void ObjectsManager::SCBOB(int idx) { @@ -708,10 +708,10 @@ void ObjectsManager::SCBOB(int idx) { return; for (int v8 = 0; v8 <= 20; v8++) { - if ((_vm->_globals.Bob[v8].field0) && (!_vm->_globals.Bob[v8].field16) && (!_vm->_globals.Bob[v8].field34) && (_vm->_globals.Bob[v8]._frameIndex != 250)) { - int v2 = _vm->_globals.Bob[v8]._oldWidth; - int v9 = _vm->_globals.Bob[v8]._oldX + _vm->_globals.Bob[v8]._oldWidth; - int v6 = _vm->_globals.Bob[v8]._oldY + _vm->_globals.Bob[v8]._oldHeight; + if ((_vm->_globals._bob[v8].field0) && (!_vm->_globals._bob[v8]._disabledAnimationFl) && (!_vm->_globals._bob[v8].field34) && (_vm->_globals._bob[v8]._frameIndex != 250)) { + int v2 = _vm->_globals._bob[v8]._oldWidth; + int v9 = _vm->_globals._bob[v8]._oldX + _vm->_globals._bob[v8]._oldWidth; + int v6 = _vm->_globals._bob[v8]._oldY + _vm->_globals._bob[v8]._oldHeight; int v3 =_vm->_globals.Cache[idx]._x; int v4 =_vm->_globals.Cache[idx]._y; int v7 =_vm->_globals.Cache[idx]._width + v3; @@ -749,28 +749,28 @@ void ObjectsManager::SCBOB(int idx) { } void ObjectsManager::CALCUL_BOB(int idx) { - _vm->_globals.Bob[idx]._activeFl = false; - if (_vm->_globals.Bob[idx]._isSpriteFl) { - _vm->_globals.Bob[idx]._modeFlag = 0; - _vm->_globals.Bob[idx].field36 = 0; + _vm->_globals._bob[idx]._activeFl = false; + if (_vm->_globals._bob[idx]._isSpriteFl) { + _vm->_globals._bob[idx]._modeFlag = 0; + _vm->_globals._bob[idx].field36 = 0; } - int result = _vm->_globals.Bob[idx]._frameIndex; + int result = _vm->_globals._bob[idx]._frameIndex; if (result != 250) { int v5, v15, v22; - if (_vm->_globals.Bob[idx]._modeFlag) { - v22 = v15 = get_offsetx(_vm->_globals.Bob[idx]._spriteData, result, 1); - v5 = get_offsety(_vm->_globals.Bob[idx]._spriteData, _vm->_globals.Bob[idx]._frameIndex, 1); + if (_vm->_globals._bob[idx]._modeFlag) { + v22 = v15 = get_offsetx(_vm->_globals._bob[idx]._spriteData, result, 1); + v5 = get_offsety(_vm->_globals._bob[idx]._spriteData, _vm->_globals._bob[idx]._frameIndex, 1); } else { - v22 = v15 = get_offsetx(_vm->_globals.Bob[idx]._spriteData, result, 0); - v5 = get_offsety(_vm->_globals.Bob[idx]._spriteData, _vm->_globals.Bob[idx]._frameIndex, 0); + v22 = v15 = get_offsetx(_vm->_globals._bob[idx]._spriteData, result, 0); + v5 = get_offsety(_vm->_globals._bob[idx]._spriteData, _vm->_globals._bob[idx]._frameIndex, 0); } int v17 = v5; int v6 = v5; int v21 = 0; int v20 = 0; - int v7 = _vm->_globals.Bob[idx].field36; + int v7 = _vm->_globals._bob[idx].field36; if (v7 < 0) { v7 = -v7; @@ -778,8 +778,8 @@ void ObjectsManager::CALCUL_BOB(int idx) { if (v7 > 95) v20 = 95; } - if (_vm->_globals.Bob[idx].field36 > 0) - v21 = _vm->_globals.Bob[idx].field36; + if (_vm->_globals._bob[idx].field36 > 0) + v21 = _vm->_globals._bob[idx].field36; if (v21) { if (v15 >= 0) { v22 = _vm->_graphicsManager.zoomIn(v15, v21); @@ -816,20 +816,20 @@ void ObjectsManager::CALCUL_BOB(int idx) { } } - int v13 = _vm->_globals.Bob[idx]._xp - v22; - int v14 = _vm->_globals.Bob[idx]._yp - v17; - _vm->_globals.Bob[idx]._activeFl = true; - _vm->_globals.Bob[idx]._oldX = v13; - _vm->_globals.Bob[idx]._oldY = v14; - _vm->_globals.Bob[idx]._oldY2 = v21; - _vm->_globals.Bob[idx].field4A = v20; + int v13 = _vm->_globals._bob[idx]._xp - v22; + int v14 = _vm->_globals._bob[idx]._yp - v17; + _vm->_globals._bob[idx]._activeFl = true; + _vm->_globals._bob[idx]._oldX = v13; + _vm->_globals._bob[idx]._oldY = v14; + _vm->_globals._bob[idx]._oldY2 = v21; + _vm->_globals._bob[idx].field4A = v20; _vm->_globals.Liste2[idx]._visibleFl = true; _vm->_globals.Liste2[idx]._xp = v13; _vm->_globals.Liste2[idx]._yp = v14; - int width = getWidth(_vm->_globals.Bob[idx]._spriteData, _vm->_globals.Bob[idx]._frameIndex); - int height = getHeight(_vm->_globals.Bob[idx]._spriteData, _vm->_globals.Bob[idx]._frameIndex); + int width = getWidth(_vm->_globals._bob[idx]._spriteData, _vm->_globals._bob[idx]._frameIndex); + int height = getHeight(_vm->_globals._bob[idx]._spriteData, _vm->_globals._bob[idx]._frameIndex); if (v21) { width = _vm->_graphicsManager.zoomIn(width, v21); @@ -842,8 +842,8 @@ void ObjectsManager::CALCUL_BOB(int idx) { _vm->_globals.Liste2[idx]._width = width; _vm->_globals.Liste2[idx]._height = height; - _vm->_globals.Bob[idx]._oldWidth = width; - _vm->_globals.Bob[idx]._oldHeight = height; + _vm->_globals._bob[idx]._oldWidth = width; + _vm->_globals._bob[idx]._oldHeight = height; } } @@ -1153,89 +1153,89 @@ void ObjectsManager::AFF_BOB_ANIM() { do { ++idx; if (idx <= 20 && PERSO_ON == true) { - _vm->_globals.Bob[idx].field1C = false; + _vm->_globals._bob[idx].field1C = false; continue; } - if (_vm->_globals.Bob[idx].field0 == 10) { - _vm->_globals.Bob[idx].field1C = false; - v1 = _vm->_globals.Bob[idx].field20; + if (_vm->_globals._bob[idx].field0 == 10) { + _vm->_globals._bob[idx].field1C = false; + v1 = _vm->_globals._bob[idx].field20; if (v1 == -1) v1 = 50; - if (_vm->_globals.Bob[idx]._animData == g_PTRNUL || _vm->_globals.Bob[idx].field16 || v1 <= 0) + if (_vm->_globals._bob[idx]._animData == g_PTRNUL || _vm->_globals._bob[idx]._disabledAnimationFl || v1 <= 0) goto LABEL_38; - if (_vm->_globals.Bob[idx].field12 == _vm->_globals.Bob[idx].field14) { - _vm->_globals.Bob[idx].field1C = true; + if (_vm->_globals._bob[idx].field12 == _vm->_globals._bob[idx].field14) { + _vm->_globals._bob[idx].field1C = true; } else { - _vm->_globals.Bob[idx].field14++; - _vm->_globals.Bob[idx].field1C = false; + _vm->_globals._bob[idx].field14++; + _vm->_globals._bob[idx].field1C = false; } - if (!_vm->_globals.Bob[idx].field1C) + if (!_vm->_globals._bob[idx].field1C) goto LABEL_38; - v20 = _vm->_globals.Bob[idx]._animData + 20; - v24 = _vm->_globals.Bob[idx].field10; - _vm->_globals.Bob[idx]._xp = (int16)READ_LE_UINT16(v20 + 2 * v24); + v20 = _vm->_globals._bob[idx]._animData + 20; + v24 = _vm->_globals._bob[idx].field10; + _vm->_globals._bob[idx]._xp = (int16)READ_LE_UINT16(v20 + 2 * v24); if (_vm->_globals.BL_ANIM[idx].v1 == 1) - _vm->_globals.Bob[idx]._xp = _vm->_globals.BL_ANIM[idx].v2; + _vm->_globals._bob[idx]._xp = _vm->_globals.BL_ANIM[idx].v2; if ( PERSO_ON == true && idx > 20 ) - _vm->_globals.Bob[idx]._xp += _vm->_eventsManager._startPos.x; + _vm->_globals._bob[idx]._xp += _vm->_eventsManager._startPos.x; - _vm->_globals.Bob[idx]._yp = (int16)READ_LE_UINT16(v20 + 2 * v24 + 2); - _vm->_globals.Bob[idx].field12 = (int16)READ_LE_UINT16(v20 + 2 * v24 + 4); - _vm->_globals.Bob[idx].field36 = (int16)READ_LE_UINT16(v20 + 2 * v24 + 6); - _vm->_globals.Bob[idx]._frameIndex = *(v20 + 2 * v24 + 8); - _vm->_globals.Bob[idx]._modeFlag = *(v20 + 2 * v24 + 9); - _vm->_globals.Bob[idx].field10 += 5; - v5 = _vm->_globals.Bob[idx].field12; + _vm->_globals._bob[idx]._yp = (int16)READ_LE_UINT16(v20 + 2 * v24 + 2); + _vm->_globals._bob[idx].field12 = (int16)READ_LE_UINT16(v20 + 2 * v24 + 4); + _vm->_globals._bob[idx].field36 = (int16)READ_LE_UINT16(v20 + 2 * v24 + 6); + _vm->_globals._bob[idx]._frameIndex = *(v20 + 2 * v24 + 8); + _vm->_globals._bob[idx]._modeFlag = *(v20 + 2 * v24 + 9); + _vm->_globals._bob[idx].field10 += 5; + v5 = _vm->_globals._bob[idx].field12; if (v5 > 0) { v6 = v5 / _vm->_globals._speed; - _vm->_globals.Bob[idx].field12 = v5 / _vm->_globals._speed; + _vm->_globals._bob[idx].field12 = v5 / _vm->_globals._speed; if (v6 > 0) { LABEL_37: - _vm->_globals.Bob[idx].field14 = 1; + _vm->_globals._bob[idx].field14 = 1; LABEL_38: v12 = idx; - if ((unsigned int)(_vm->_globals.Bob[v12].field1E - 1) <= 1u) - _vm->_globals.Bob[v12].field1C = true; + if ((unsigned int)(_vm->_globals._bob[v12].field1E - 1) <= 1u) + _vm->_globals._bob[v12].field1C = true; continue; } - _vm->_globals.Bob[idx].field12 = 1; + _vm->_globals._bob[idx].field12 = 1; } - if (!_vm->_globals.Bob[idx].field12) { - if (_vm->_globals.Bob[idx].field20 > 0) - _vm->_globals.Bob[idx].field20--; - if (_vm->_globals.Bob[idx].field20 != -1 && _vm->_globals.Bob[idx].field20 <= 0) { - _vm->_globals.Bob[idx].field0 = 11; + if (!_vm->_globals._bob[idx].field12) { + if (_vm->_globals._bob[idx].field20 > 0) + _vm->_globals._bob[idx].field20--; + if (_vm->_globals._bob[idx].field20 != -1 && _vm->_globals._bob[idx].field20 <= 0) { + _vm->_globals._bob[idx].field0 = 11; } else { - _vm->_globals.Bob[idx].field10 = 0; - v21 = _vm->_globals.Bob[idx]._animData + 20; - _vm->_globals.Bob[idx]._xp = (int16)READ_LE_UINT16(v21); + _vm->_globals._bob[idx].field10 = 0; + v21 = _vm->_globals._bob[idx]._animData + 20; + _vm->_globals._bob[idx]._xp = (int16)READ_LE_UINT16(v21); if (_vm->_globals.BL_ANIM[idx].v1 == 1) - _vm->_globals.Bob[idx]._xp = _vm->_globals.BL_ANIM[idx].v2; + _vm->_globals._bob[idx]._xp = _vm->_globals.BL_ANIM[idx].v2; if (PERSO_ON == true && idx > 20) - _vm->_globals.Bob[idx]._xp += _vm->_eventsManager._startPos.x; + _vm->_globals._bob[idx]._xp += _vm->_eventsManager._startPos.x; - _vm->_globals.Bob[idx]._yp = (int16)READ_LE_UINT16(v21 + 2); - _vm->_globals.Bob[idx].field12 = (int16)READ_LE_UINT16(v21 + 4); - _vm->_globals.Bob[idx].field36 = (int16)READ_LE_UINT16(v21 + 6); - _vm->_globals.Bob[idx]._frameIndex = v21[8]; - _vm->_globals.Bob[idx]._modeFlag = v21[9]; - _vm->_globals.Bob[idx].field10 += 5; - v10 = _vm->_globals.Bob[idx].field12; + _vm->_globals._bob[idx]._yp = (int16)READ_LE_UINT16(v21 + 2); + _vm->_globals._bob[idx].field12 = (int16)READ_LE_UINT16(v21 + 4); + _vm->_globals._bob[idx].field36 = (int16)READ_LE_UINT16(v21 + 6); + _vm->_globals._bob[idx]._frameIndex = v21[8]; + _vm->_globals._bob[idx]._modeFlag = v21[9]; + _vm->_globals._bob[idx].field10 += 5; + v10 = _vm->_globals._bob[idx].field12; if (v10 > 0) { v11 = v10 / _vm->_globals._speed; - _vm->_globals.Bob[idx].field12 = v10 / _vm->_globals._speed; + _vm->_globals._bob[idx].field12 = v10 / _vm->_globals._speed; // Original code. It can't be negative, so the check is on == 0 if (v11 <= 0) - _vm->_globals.Bob[idx].field12 = 1; + _vm->_globals._bob[idx].field12 = 1; } } } @@ -1246,8 +1246,8 @@ LABEL_38: if (!PERSO_ON && BOBTOUS == true) { for (int v26 = 0; v26 != 35; v26++) { - if (_vm->_globals.Bob[v26].field0 == 10 && !_vm->_globals.Bob[v26].field16) - _vm->_globals.Bob[v26].field1C = true; + if (_vm->_globals._bob[v26].field0 == 10 && !_vm->_globals._bob[v26]._disabledAnimationFl) + _vm->_globals._bob[v26].field1C = true; } } @@ -1255,8 +1255,8 @@ LABEL_38: for (int v27 = 1; v27 < 35; v27++) { if (v27 > 20 || PERSO_ON != true) { - if ((_vm->_globals.Bob[v27].field0 == 10) && (_vm->_globals.Bob[v27].field1C)) { - v14 = _vm->_globals.Bob[v27].field1E; + if ((_vm->_globals._bob[v27].field0 == 10) && (_vm->_globals._bob[v27].field1C)) { + v14 = _vm->_globals._bob[v27].field1E; if ((v14 != 2) && (v14 != 4)) { if (_vm->_globals.Liste2[v27]._visibleFl) { @@ -1270,7 +1270,7 @@ LABEL_38: } } - if (_vm->_globals.Bob[v27].field0 == 11) { + if (_vm->_globals._bob[v27].field0 == 11) { if (_vm->_globals.Liste2[v27]._visibleFl) { _vm->_graphicsManager.SCOPY(_vm->_graphicsManager._vesaScreen, _vm->_globals.Liste2[v27]._xp, _vm->_globals.Liste2[v27]._yp, @@ -1280,22 +1280,22 @@ LABEL_38: _vm->_globals.Liste2[v27]._visibleFl = false; } - _vm->_globals.Bob[v27].field0 = 0; + _vm->_globals._bob[v27].field0 = 0; } } } for (int v28 = 1; v28 < 25; v28++) { - _vm->_globals.Bob[v28]._oldY = 0; - if (_vm->_globals.Bob[v28].field0 == 10 && !_vm->_globals.Bob[v28].field16 && _vm->_globals.Bob[v28].field1C) { + _vm->_globals._bob[v28]._oldY = 0; + if (_vm->_globals._bob[v28].field0 == 10 && !_vm->_globals._bob[v28]._disabledAnimationFl && _vm->_globals._bob[v28].field1C) { CALCUL_BOB(v28); - int v = _vm->_globals.Bob[v28]._oldHeight + _vm->_globals.Bob[v28]._oldY; - v19 = _vm->_globals.Bob[v28]._oldX2 + v; + int v = _vm->_globals._bob[v28]._oldHeight + _vm->_globals._bob[v28]._oldY; + v19 = _vm->_globals._bob[v28]._oldX2 + v; if (v19 > 450) v19 = 600; - if (_vm->_globals.Bob[v28]._activeFl) + if (_vm->_globals._bob[v28]._activeFl) AvantTri(TRI_BOB, v28, v19); } } @@ -3710,15 +3710,15 @@ int ObjectsManager::MZONE() { if (_vm->_globals.BOBZONE_FLAG[v1]) { v3 = v2; v15 = v3; - if (_vm->_globals.Bob[v3].field0) { - if (_vm->_globals.Bob[v3]._frameIndex != 250) { - if (!_vm->_globals.Bob[v3].field16) { - v4 = _vm->_globals.Bob[v3]._oldX; + if (_vm->_globals._bob[v3].field0) { + if (_vm->_globals._bob[v3]._frameIndex != 250) { + if (!_vm->_globals._bob[v3]._disabledAnimationFl) { + v4 = _vm->_globals._bob[v3]._oldX; if (xp > v4) { - if (xp < _vm->_globals.Bob[v3]._oldWidth + v4) { - v5 = _vm->_globals.Bob[v3]._oldY; + if (xp < _vm->_globals._bob[v3]._oldWidth + v4) { + v5 = _vm->_globals._bob[v3]._oldY; if (yp > v5) { - if (yp < _vm->_globals.Bob[v3]._oldHeight + v5) { + if (yp < _vm->_globals._bob[v3]._oldHeight + v5) { v6 = v1; if (_vm->_globals.ZONEP[v1].field4 == -1) { _vm->_globals.ZONEP[v6]._destX = 0; @@ -3726,8 +3726,8 @@ int ObjectsManager::MZONE() { } if (!_vm->_globals.ZONEP[v6]._destX) { if (!_vm->_globals.ZONEP[v1]._destY) { - _vm->_globals.ZONEP[v6]._destX = _vm->_globals.Bob[v15]._oldWidth + _vm->_globals.Bob[v15]._oldX; - _vm->_globals.ZONEP[v1]._destY = _vm->_globals.Bob[v15]._oldHeight + _vm->_globals.Bob[v15]._oldY + 6; + _vm->_globals.ZONEP[v6]._destX = _vm->_globals._bob[v15]._oldWidth + _vm->_globals._bob[v15]._oldX; + _vm->_globals.ZONEP[v1]._destY = _vm->_globals._bob[v15]._oldHeight + _vm->_globals._bob[v15]._oldY + 6; _vm->_globals.ZONEP[v1].field4 = -1; } } @@ -4094,17 +4094,17 @@ void ObjectsManager::SPECIAL_JEU() { if (_vm->_globals.ECRAN == 57) { _vm->_globals._disableInventFl = true; if (_vm->_globals.SAUVEGARDE->data[svField261] == 1 && BOBPOSI(5) == 37) { - BOBANIM_OFF(5); + stopBobAnimation(5); SET_BOBPOSI(5, 0); - BOBANIM_ON(6); + setBobAnimation(6); _vm->_globals.SAUVEGARDE->data[svField261] = 2; ZONE_OFF(15); _vm->_soundManager.PLAY_SOUND("SOUND75.WAV"); } if (_vm->_globals.SAUVEGARDE->data[svField261] == 2 && BOBPOSI(6) == 6) { - BOBANIM_OFF(6); + stopBobAnimation(6); SET_BOBPOSI(6, 0); - BOBANIM_ON(7); + setBobAnimation(7); ZONE_ON(14); _vm->_globals.SAUVEGARDE->data[svField261] = 3; } @@ -4117,7 +4117,7 @@ void ObjectsManager::SPECIAL_JEU() { while (BOBPOSI(8) != 3); _vm->_globals.NOPARLE = true; _vm->_talkManager.PARLER_PERSO("GM3.PE2"); - BOBANIM_OFF(8); + stopBobAnimation(8); _vm->_globals.SAUVEGARDE->data[svField333] = 1; _vm->_globals._disableInventFl = false; } @@ -4367,22 +4367,24 @@ void ObjectsManager::ZONE_OFF(int idx) { } -void ObjectsManager::OPTI_ONE(int idx, int a2, int a3, int a4) { +void ObjectsManager::OPTI_ONE(int idx, int fromPosi, int destPosi, int a4) { + // Set Hopkins animation and position if (a4 != 3) { - BOBANIM_ON(idx); - SET_BOBPOSI(idx, a2); + setBobAnimation(idx); + SET_BOBPOSI(idx, fromPosi); } + // Make Hopkins walk to the expected place do { _vm->_eventsManager.VBL(); - } while (a3 != BOBPOSI(idx)); + } while (destPosi != BOBPOSI(idx)); if (!a4) - BOBANIM_OFF(idx); - if (a4 == 4) { - _vm->_graphicsManager.AFFICHE_SPEED(_vm->_globals.Bob[idx]._spriteData, - _vm->_globals.Bob[idx]._oldX, _vm->_globals.Bob[idx]._oldY, _vm->_globals.Bob[idx]._frameIndex); - BOBANIM_OFF(idx); + stopBobAnimation(idx); + else if (a4 == 4) { + _vm->_graphicsManager.AFFICHE_SPEED(_vm->_globals._bob[idx]._spriteData, + _vm->_globals._bob[idx]._oldX, _vm->_globals._bob[idx]._oldY, _vm->_globals._bob[idx]._frameIndex); + stopBobAnimation(idx); _vm->_eventsManager.VBL(); } } @@ -4396,40 +4398,48 @@ void ObjectsManager::AFFICHE_SPEED1(byte *speedData, int xp, int yp, int img) { } int ObjectsManager::BOBPOSI(int idx) { - return _vm->_globals.Bob[idx].field10 / 5; + return _vm->_globals._bob[idx].field10 / 5; } -void ObjectsManager::BOBANIM_ON(int idx) { - if (_vm->_globals.Bob[idx].field16) { - _vm->_globals.Bob[idx].field16 = false; - _vm->_globals.Bob[idx].field10 = 5; - _vm->_globals.Bob[idx]._frameIndex = 250; - _vm->_globals.Bob[idx].field12 = 0; - _vm->_globals.Bob[idx].field14 = 0; +/** + * Set Hopkins animation + */ +void ObjectsManager::setBobAnimation(int idx) { + if (_vm->_globals._bob[idx]._disabledAnimationFl) { + _vm->_globals._bob[idx]._disabledAnimationFl = false; + _vm->_globals._bob[idx].field10 = 5; + _vm->_globals._bob[idx]._frameIndex = 250; + _vm->_globals._bob[idx].field12 = 0; + _vm->_globals._bob[idx].field14 = 0; } } -void ObjectsManager::BOBANIM_OFF(int idx) { - _vm->_globals.Bob[idx].field16 = true; - +/** + * Stop Hopkins animation + */ +void ObjectsManager::stopBobAnimation(int idx) { + _vm->_globals._bob[idx]._disabledAnimationFl = true; } void ObjectsManager::SET_BOBPOSI(int idx, int a2) { - _vm->_globals.Bob[idx].field10 = 5 * a2; - _vm->_globals.Bob[idx].field12 = 0; - _vm->_globals.Bob[idx].field14 = 0; + _vm->_globals._bob[idx].field10 = 5 * a2; + _vm->_globals._bob[idx].field12 = 0; + _vm->_globals._bob[idx].field14 = 0; } -int ObjectsManager::BOBX(int idx) { - return _vm->_globals.Bob[idx]._xp; +/** + * Get X position + */ +int ObjectsManager::getBobPosX(int idx) { + return _vm->_globals._bob[idx]._xp; } int ObjectsManager::BOBY(int idx) { - return _vm->_globals.Bob[idx]._yp; + return _vm->_globals._bob[idx]._yp; } int ObjectsManager::BOBA(int idx) { - return _vm->_globals.Bob[idx]._frameIndex; + return _vm->_globals._bob[idx]._frameIndex; } void ObjectsManager::INILINK(const Common::String &file) { @@ -4664,7 +4674,7 @@ void ObjectsManager::SPECIAL_INI(const Common::String &a1) { } if (_vm->_globals.ECRAN == 93) { if (!_vm->_globals.SAUVEGARDE->data[svField333]) - BOBANIM_ON(8); + setBobAnimation(8); } if (_vm->_globals.ECRAN == 18 && _vm->_globals.OLD_ECRAN == 17) { _vm->_eventsManager._mouseSpriteId = 4; @@ -4722,11 +4732,11 @@ void ObjectsManager::SPECIAL_INI(const Common::String &a1) { void ObjectsManager::OPTI_BOBON(int a1, int a2, int a3, int a4, int a5, int a6, int a7) { if (a1 != -1) - BOBANIM_ON(a1); + setBobAnimation(a1); if (a2 != -1) - BOBANIM_ON(a2); + setBobAnimation(a2); if (a3 != -1) - BOBANIM_ON(a3); + setBobAnimation(a3); if (!a7) { if (a1 != -1) SET_BOBPOSI(a1, a4); @@ -4742,7 +4752,7 @@ void ObjectsManager::SCI_OPTI_ONE(int a1, int a2, int a3, int a4) { _vm->_eventsManager._mouseButton = 0; if (a4 != 3) { - BOBANIM_ON(a1); + setBobAnimation(a1); SET_BOBPOSI(a1, a2); } @@ -4752,7 +4762,7 @@ void ObjectsManager::SCI_OPTI_ONE(int a1, int a2, int a3, int a4) { break; } while (a3 != BOBPOSI(a1)); if (!a4) - BOBANIM_OFF(a1); + stopBobAnimation(a1); } void ObjectsManager::VERBE_OFF(int idx, int a2) { @@ -5218,13 +5228,13 @@ void ObjectsManager::TEST_FORET(int a1, int a2, int a3, int a4, int a5, int a6) && a4 < getSpriteY(0) && a5 > getSpriteY(0)) { if (a6 == 1) - BOBANIM_ON(1); + setBobAnimation(1); if (a6 == 2) - BOBANIM_ON(2); + setBobAnimation(2); if (a6 == 3) - BOBANIM_ON(3); + setBobAnimation(3); if (a6 == 4) - BOBANIM_ON(4); + setBobAnimation(4); _vm->_globals.SAUVEGARDE->data[v6] = 1; } } @@ -5288,7 +5298,7 @@ void ObjectsManager::PERSONAGE(const Common::String &backgroundFile, const Commo _vm->_graphicsManager.FADE_INW(); if (_vm->_globals.ECRAN == 61) { _vm->_animationManager.playSequence("OUVRE.SEQ", 10, 4, 10); - BOBANIM_OFF(3); + stopBobAnimation(3); _vm->_globals.NOT_VERIF = 1; g_old_x = getSpriteX(0); _vm->_globals.g_old_sens = -1; diff --git a/engines/hopkins/objects.h b/engines/hopkins/objects.h index 00eddfdd5e..623847124c 100644 --- a/engines/hopkins/objects.h +++ b/engines/hopkins/objects.h @@ -218,10 +218,10 @@ public: void OPTI_ONE(int a1, int a2, int a3, int a4); void AFFICHE_SPEED1(byte *speedData, int xp, int yp, int img); int BOBPOSI(int idx); - void BOBANIM_ON(int idx); - void BOBANIM_OFF(int idx); + void setBobAnimation(int idx); + void stopBobAnimation(int idx); void SET_BOBPOSI(int idx, int a2); - int BOBX(int idx); + int getBobPosX(int idx); int BOBY(int idx); int BOBA(int idx); diff --git a/engines/hopkins/script.cpp b/engines/hopkins/script.cpp index 1b6b1b89c0..1ec48259e8 100644 --- a/engines/hopkins/script.cpp +++ b/engines/hopkins/script.cpp @@ -525,9 +525,9 @@ LABEL_1141: if (*(a1 + 2) == 'A' && *(a1 + 3) == 'N' && *(a1 + 4) == 'I') { int v75 = (int16)READ_LE_UINT16(a1 + 5); if (v75 <= 100) - _vm->_objectsManager.BOBANIM_ON(v75); + _vm->_objectsManager.setBobAnimation(v75); else - _vm->_objectsManager.BOBANIM_OFF(v75 - 100); + _vm->_objectsManager.stopBobAnimation(v75 - 100); v1 = 1; } if (*(a1 + 2) == 'S' && *(a1 + 3) == 'P' && *(a1 + 4) == 'E') { @@ -646,36 +646,36 @@ LABEL_1141: _vm->_globals.NBBLOC = 0; } if (v76 == 608) { - _vm->_objectsManager.BOBANIM_OFF(2); - _vm->_objectsManager.BOBANIM_OFF(3); - _vm->_objectsManager.BOBANIM_OFF(4); - _vm->_objectsManager.BOBANIM_OFF(6); - _vm->_objectsManager.BOBANIM_OFF(11); - _vm->_objectsManager.BOBANIM_OFF(10); + _vm->_objectsManager.stopBobAnimation(2); + _vm->_objectsManager.stopBobAnimation(3); + _vm->_objectsManager.stopBobAnimation(4); + _vm->_objectsManager.stopBobAnimation(6); + _vm->_objectsManager.stopBobAnimation(11); + _vm->_objectsManager.stopBobAnimation(10); } if (v76 == 609) { - _vm->_objectsManager.BOBANIM_ON(2); - _vm->_objectsManager.BOBANIM_ON(3); - _vm->_objectsManager.BOBANIM_ON(4); - _vm->_objectsManager.BOBANIM_ON(6); - _vm->_objectsManager.BOBANIM_ON(11); - _vm->_objectsManager.BOBANIM_ON(10); + _vm->_objectsManager.setBobAnimation(2); + _vm->_objectsManager.setBobAnimation(3); + _vm->_objectsManager.setBobAnimation(4); + _vm->_objectsManager.setBobAnimation(6); + _vm->_objectsManager.setBobAnimation(11); + _vm->_objectsManager.setBobAnimation(10); } if (v76 == 611) { - _vm->_objectsManager.BOBANIM_ON(5); - _vm->_objectsManager.BOBANIM_ON(7); - _vm->_objectsManager.BOBANIM_ON(8); - _vm->_objectsManager.BOBANIM_ON(9); - _vm->_objectsManager.BOBANIM_ON(12); - _vm->_objectsManager.BOBANIM_ON(13); + _vm->_objectsManager.setBobAnimation(5); + _vm->_objectsManager.setBobAnimation(7); + _vm->_objectsManager.setBobAnimation(8); + _vm->_objectsManager.setBobAnimation(9); + _vm->_objectsManager.setBobAnimation(12); + _vm->_objectsManager.setBobAnimation(13); } if (v76 == 610) { - _vm->_objectsManager.BOBANIM_OFF(5); - _vm->_objectsManager.BOBANIM_OFF(7); - _vm->_objectsManager.BOBANIM_OFF(8); - _vm->_objectsManager.BOBANIM_OFF(9); - _vm->_objectsManager.BOBANIM_OFF(12); - _vm->_objectsManager.BOBANIM_OFF(13); + _vm->_objectsManager.stopBobAnimation(5); + _vm->_objectsManager.stopBobAnimation(7); + _vm->_objectsManager.stopBobAnimation(8); + _vm->_objectsManager.stopBobAnimation(9); + _vm->_objectsManager.stopBobAnimation(12); + _vm->_objectsManager.stopBobAnimation(13); } if (v76 == 10) _vm->_talkManager.PARLER_PERSO("bqeflic1.pe2"); @@ -893,8 +893,8 @@ LABEL_1141: _vm->_eventsManager.VBL(); } while (_vm->_objectsManager.BOBPOSI(9) != 36); _vm->_objectsManager.SPRITE_ON(0); - _vm->_objectsManager.BOBANIM_OFF(9); - _vm->_objectsManager.BOBANIM_OFF(10); + _vm->_objectsManager.stopBobAnimation(9); + _vm->_objectsManager.stopBobAnimation(10); _vm->_soundManager.DEL_SAMPLE(1); _vm->_soundManager.DEL_SAMPLE(2); } @@ -916,7 +916,7 @@ LABEL_1141: _vm->_eventsManager.VBL(); } while (_vm->_globals.chemin != (int16 *)g_PTRNUL); _vm->_objectsManager.removeSprite(0); - _vm->_objectsManager.BOBANIM_ON(7); + _vm->_objectsManager.setBobAnimation(7); _vm->_objectsManager.SET_BOBPOSI(7, 0); int v18 = 0; _vm->_soundManager.CHARGE_SAMPLE(1, "SOUND40.WAV"); @@ -937,15 +937,15 @@ LABEL_1141: if (_vm->_objectsManager.BOBPOSI(7) == 19) v18 = 0; if (_vm->_objectsManager.BOBPOSI(7) == 19) - _vm->_objectsManager.BOBANIM_ON(3); + _vm->_objectsManager.setBobAnimation(3); _vm->_eventsManager.VBL(); } while (_vm->_objectsManager.BOBPOSI(3) != 48); _vm->_soundManager.DEL_SAMPLE(1); _vm->_objectsManager.setSpriteIndex(0, 62); _vm->_objectsManager.SPRITE_ON(0); - _vm->_objectsManager.BOBANIM_ON(6); - _vm->_objectsManager.BOBANIM_OFF(7); - _vm->_objectsManager.BOBANIM_OFF(3); + _vm->_objectsManager.setBobAnimation(6); + _vm->_objectsManager.stopBobAnimation(7); + _vm->_objectsManager.stopBobAnimation(3); } if (v76 == 50) { _vm->_soundManager.PLAY_SOUND("SOUND46.WAv"); @@ -985,14 +985,14 @@ LABEL_1141: } while (_vm->_objectsManager.BOBPOSI(9) != v19); if (v19 == 12) { _vm->_objectsManager.SPRITE_ON(0); - _vm->_objectsManager.BOBANIM_OFF(9); + _vm->_objectsManager.stopBobAnimation(9); } _vm->_globals.CACHE_ON(); } if (v76 == 80) { _vm->_objectsManager.removeSprite(0); - _vm->_objectsManager.BOBANIM_ON(12); - _vm->_objectsManager.BOBANIM_ON(13); + _vm->_objectsManager.setBobAnimation(12); + _vm->_objectsManager.setBobAnimation(13); _vm->_objectsManager.SET_BOBPOSI(12, 0); _vm->_objectsManager.SET_BOBPOSI(13, 0); int v21 = 0; @@ -1015,16 +1015,16 @@ LABEL_1141: if (_vm->_objectsManager.BOBPOSI(4) == 6) v21 = 0; if (_vm->_objectsManager.BOBPOSI(13) == 8) { - _vm->_objectsManager.BOBANIM_OFF(13); - _vm->_objectsManager.BOBANIM_OFF(3); - _vm->_objectsManager.BOBANIM_ON(4); + _vm->_objectsManager.stopBobAnimation(13); + _vm->_objectsManager.stopBobAnimation(3); + _vm->_objectsManager.setBobAnimation(4); _vm->_objectsManager.SET_BOBPOSI(4, 0); _vm->_objectsManager.SET_BOBPOSI(13, 0); } _vm->_eventsManager.VBL(); } while (_vm->_objectsManager.BOBPOSI(4) != 16); - _vm->_objectsManager.BOBANIM_OFF(12); - _vm->_objectsManager.BOBANIM_OFF(4); + _vm->_objectsManager.stopBobAnimation(12); + _vm->_objectsManager.stopBobAnimation(4); _vm->_objectsManager.SPRITE_ON(0); _vm->_objectsManager.OBSSEUL = 1; _vm->_objectsManager.INILINK("IM27a"); @@ -1048,8 +1048,8 @@ LABEL_1141: _vm->_eventsManager.VBL(); } while (_vm->_globals.chemin != (int16 *)g_PTRNUL); _vm->_objectsManager.removeSprite(0); - _vm->_objectsManager.BOBANIM_ON(11); - _vm->_objectsManager.BOBANIM_ON(8); + _vm->_objectsManager.setBobAnimation(11); + _vm->_objectsManager.setBobAnimation(8); _vm->_objectsManager.SET_BOBPOSI(11, 0); _vm->_objectsManager.SET_BOBPOSI(8, 0); _vm->_soundManager.LOAD_WAV("SOUND44.WAV", 1); @@ -1076,10 +1076,10 @@ LABEL_1141: } while (_vm->_objectsManager.BOBPOSI(8) != 32); _vm->_graphicsManager.AFFICHE_SPEED(_vm->_globals.SPRITE_ECRAN, 201, 14, 1); _vm->_objectsManager.SPRITE_ON(0); - _vm->_objectsManager.BOBANIM_OFF(11); - _vm->_objectsManager.BOBANIM_OFF(8); - _vm->_objectsManager.BOBANIM_ON(5); - _vm->_objectsManager.BOBANIM_ON(6); + _vm->_objectsManager.stopBobAnimation(11); + _vm->_objectsManager.stopBobAnimation(8); + _vm->_objectsManager.setBobAnimation(5); + _vm->_objectsManager.setBobAnimation(6); _vm->_objectsManager.SET_BOBPOSI(5, 0); _vm->_objectsManager.SET_BOBPOSI(6, 0); _vm->_soundManager.PLAY_WAV(3); @@ -1089,15 +1089,15 @@ LABEL_1141: _vm->_eventsManager.VBL(); } while (_vm->_objectsManager.BOBPOSI(5) != 74); - _vm->_objectsManager.BOBANIM_OFF(5); - _vm->_objectsManager.BOBANIM_OFF(6); - _vm->_objectsManager.BOBANIM_ON(9); - _vm->_objectsManager.BOBANIM_ON(7); + _vm->_objectsManager.stopBobAnimation(5); + _vm->_objectsManager.stopBobAnimation(6); + _vm->_objectsManager.setBobAnimation(9); + _vm->_objectsManager.setBobAnimation(7); } if (v76 == 95) { - _vm->_objectsManager.BOBANIM_ON(9); - _vm->_objectsManager.BOBANIM_ON(10); - _vm->_objectsManager.BOBANIM_ON(12); + _vm->_objectsManager.setBobAnimation(9); + _vm->_objectsManager.setBobAnimation(10); + _vm->_objectsManager.setBobAnimation(12); _vm->_objectsManager.SET_BOBPOSI(9, 0); _vm->_objectsManager.SET_BOBPOSI(10, 0); _vm->_objectsManager.SET_BOBPOSI(12, 0); @@ -1108,7 +1108,7 @@ LABEL_1141: _vm->_eventsManager.VBL(); } while (_vm->_objectsManager.BOBPOSI(9) != 15); - _vm->_objectsManager.BOBANIM_OFF(9); + _vm->_objectsManager.stopBobAnimation(9); _vm->_objectsManager.SPRITE_ON(0); _vm->_soundManager.PLAY_SOUND("SOUND50.WAV"); do { @@ -1118,13 +1118,13 @@ LABEL_1141: _vm->_eventsManager.VBL(); } while (_vm->_objectsManager.BOBPOSI(12) != 117); _vm->_graphicsManager.AFFICHE_SPEED(_vm->_globals.SPRITE_ECRAN, 830, 122, 0); - _vm->_objectsManager.BOBANIM_OFF(12); - _vm->_objectsManager.BOBANIM_OFF(10); - _vm->_objectsManager.BOBANIM_ON(11); + _vm->_objectsManager.stopBobAnimation(12); + _vm->_objectsManager.stopBobAnimation(10); + _vm->_objectsManager.setBobAnimation(11); } if (v76 == 85) { - _vm->_objectsManager.BOBANIM_OFF(3); - _vm->_objectsManager.BOBANIM_ON(5); + _vm->_objectsManager.stopBobAnimation(3); + _vm->_objectsManager.setBobAnimation(5); _vm->_objectsManager.SET_BOBPOSI(5, 0); do { if (_vm->shouldQuit()) @@ -1132,8 +1132,8 @@ LABEL_1141: _vm->_eventsManager.VBL(); } while (_vm->_objectsManager.BOBPOSI(5) != 6); - _vm->_objectsManager.BOBANIM_OFF(5); - _vm->_objectsManager.BOBANIM_ON(6); + _vm->_objectsManager.stopBobAnimation(5); + _vm->_objectsManager.setBobAnimation(6); _vm->_objectsManager.OBSSEUL = 1; _vm->_objectsManager.INILINK("IM24a"); _vm->_objectsManager.OBSSEUL = 0; @@ -1142,8 +1142,8 @@ LABEL_1141: if (_vm->_globals.SAUVEGARDE->data[svField183] == 1) { _vm->_objectsManager.SET_BOBPOSI(1, 0); _vm->_objectsManager.SET_BOBPOSI(2, 0); - _vm->_objectsManager.BOBANIM_ON(1); - _vm->_objectsManager.BOBANIM_ON(2); + _vm->_objectsManager.setBobAnimation(1); + _vm->_objectsManager.setBobAnimation(2); _vm->_soundManager.CHARGE_SAMPLE(1, "SOUND40.WAV"); int v25 = 0; do { @@ -1176,16 +1176,16 @@ LABEL_1141: v25 = 0; _vm->_eventsManager.VBL(); } while (_vm->_objectsManager.BOBPOSI(1) != 9); - _vm->_objectsManager.BOBANIM_OFF(1); - _vm->_objectsManager.BOBANIM_OFF(2); + _vm->_objectsManager.stopBobAnimation(1); + _vm->_objectsManager.stopBobAnimation(2); _vm->_graphicsManager.AFFICHE_SPEED(_vm->_globals.SPRITE_ECRAN, 283, 160, 6); _vm->_soundManager.DEL_SAMPLE(1); } if (_vm->_globals.SAUVEGARDE->data[svField183] == 2) { _vm->_objectsManager.SET_BOBPOSI(1, 0); _vm->_objectsManager.SET_BOBPOSI(3, 0); - _vm->_objectsManager.BOBANIM_ON(1); - _vm->_objectsManager.BOBANIM_ON(3); + _vm->_objectsManager.setBobAnimation(1); + _vm->_objectsManager.setBobAnimation(3); _vm->_soundManager.CHARGE_SAMPLE(1, "SOUND40.WAV"); int v26 = 0; do { @@ -1218,8 +1218,8 @@ LABEL_1141: v26 = 0; _vm->_eventsManager.VBL(); } while (_vm->_objectsManager.BOBPOSI(1) != 9); - _vm->_objectsManager.BOBANIM_OFF(1); - _vm->_objectsManager.BOBANIM_OFF(3); + _vm->_objectsManager.stopBobAnimation(1); + _vm->_objectsManager.stopBobAnimation(3); _vm->_graphicsManager.AFFICHE_SPEED(_vm->_globals.SPRITE_ECRAN, 283, 161, 8); _vm->_soundManager.DEL_SAMPLE(1); } @@ -1309,7 +1309,7 @@ LABEL_1141: _vm->_objectsManager.setSpriteIndex(0, 60); _vm->_soundManager.CHARGE_SAMPLE(1, "SOUND63.WAV"); if (_vm->_globals.SAUVEGARDE->data[svField253] > 2) { - _vm->_objectsManager.BOBANIM_ON(4); + _vm->_objectsManager.setBobAnimation(4); int v33 = 0; do { if (_vm->shouldQuit()) @@ -1335,10 +1335,10 @@ LABEL_1141: v33 = 0; _vm->_eventsManager.VBL(); } while (_vm->_objectsManager.BOBPOSI(4) != 72); - _vm->_objectsManager.BOBANIM_OFF(4); + _vm->_objectsManager.stopBobAnimation(4); } if (_vm->_globals.SAUVEGARDE->data[svField253] == 1) { - _vm->_objectsManager.BOBANIM_ON(6); + _vm->_objectsManager.setBobAnimation(6); int v34 = 0; do { if (_vm->shouldQuit()) @@ -1364,10 +1364,10 @@ LABEL_1141: v34 = 0; _vm->_eventsManager.VBL(); } while (_vm->_objectsManager.BOBPOSI(6) != 72); - _vm->_objectsManager.BOBANIM_OFF(6); + _vm->_objectsManager.stopBobAnimation(6); } if (_vm->_globals.SAUVEGARDE->data[svField253] == 2) { - _vm->_objectsManager.BOBANIM_ON(5); + _vm->_objectsManager.setBobAnimation(5); int v35 = 0; do { if (_vm->shouldQuit()) @@ -1393,7 +1393,7 @@ LABEL_1141: v35 = 0; _vm->_eventsManager.VBL(); } while (_vm->_objectsManager.BOBPOSI(5) != 72); - _vm->_objectsManager.BOBANIM_OFF(5); + _vm->_objectsManager.stopBobAnimation(5); } _vm->_objectsManager.SPRITE_ON(0); _vm->_objectsManager.ACTION_DOS(1); @@ -1401,7 +1401,7 @@ LABEL_1141: } if (v76 == 106) { _vm->_objectsManager.removeSprite(0); - _vm->_objectsManager.BOBANIM_ON(4); + _vm->_objectsManager.setBobAnimation(4); _vm->_objectsManager.SET_BOBPOSI(4, 0); _vm->_soundManager.LOAD_WAV("SOUND61.WAV", 1); _vm->_soundManager.LOAD_WAV("SOUND62.WAV", 2); @@ -1433,12 +1433,12 @@ LABEL_1141: _vm->_eventsManager.VBL(); } while (_vm->_objectsManager.BOBPOSI(4) != 77); - _vm->_objectsManager.BOBANIM_OFF(4); + _vm->_objectsManager.stopBobAnimation(4); _vm->_objectsManager.SPRITE_ON(0); } if (v76 == 107) { _vm->_objectsManager.removeSprite(0); - _vm->_objectsManager.BOBANIM_ON(5); + _vm->_objectsManager.setBobAnimation(5); _vm->_objectsManager.SET_BOBPOSI(5, 0); _vm->_soundManager.LOAD_WAV("SOUND61.WAV", 1); _vm->_soundManager.LOAD_WAV("SOUND62.WAV", 2); @@ -1470,7 +1470,7 @@ LABEL_1141: _vm->_eventsManager.VBL(); } while (_vm->_objectsManager.BOBPOSI(5) != 53); - _vm->_objectsManager.BOBANIM_OFF(5); + _vm->_objectsManager.stopBobAnimation(5); _vm->_objectsManager.SPRITE_ON(0); } if (v76 == 210) { @@ -1479,7 +1479,7 @@ LABEL_1141: _vm->_animationManager.playSequence2("SECRET1.SEQ", 1, 12, 1); _vm->_soundManager.SPECIAL_SOUND = 0; _vm->_graphicsManager.AFFICHE_SPEED(_vm->_globals.SPRITE_ECRAN, 192, 152, 0); - _vm->_objectsManager.BOBANIM_ON(9); + _vm->_objectsManager.setBobAnimation(9); _vm->_objectsManager.OBSSEUL = 1; _vm->_objectsManager.INILINK("IM73a"); _vm->_objectsManager.OBSSEUL = 0; @@ -1549,15 +1549,15 @@ LABEL_1141: _vm->_objectsManager.SET_BOBPOSI(1, 0); _vm->_objectsManager.SET_BOBPOSI(2, 0); _vm->_objectsManager.setSpriteIndex(0, 60); - _vm->_objectsManager.BOBANIM_OFF(4); - _vm->_objectsManager.BOBANIM_ON(1); + _vm->_objectsManager.stopBobAnimation(4); + _vm->_objectsManager.setBobAnimation(1); do { if (_vm->shouldQuit()) return -1; // Exiting game _vm->_eventsManager.VBL(); } while (_vm->_objectsManager.BOBPOSI(1) != 9); - _vm->_objectsManager.BOBANIM_OFF(1); + _vm->_objectsManager.stopBobAnimation(1); _vm->_globals.NO_VISU = true; _vm->_globals.chemin = (int16 *)g_PTRNUL; _vm->_globals.NOT_VERIF = 1; @@ -1574,7 +1574,7 @@ LABEL_1141: _vm->_eventsManager.VBL(); } while (_vm->_globals.chemin != (int16 *)g_PTRNUL); _vm->_objectsManager.setSpriteIndex(0, 64); - _vm->_objectsManager.BOBANIM_ON(2); + _vm->_objectsManager.setBobAnimation(2); _vm->_soundManager.PLAY_SOUND("SOUND66.WAV"); do { if (_vm->shouldQuit()) @@ -1582,24 +1582,24 @@ LABEL_1141: _vm->_eventsManager.VBL(); } while (_vm->_objectsManager.BOBPOSI(2) != 10); - _vm->_objectsManager.BOBANIM_OFF(2); - _vm->_objectsManager.BOBANIM_ON(4); + _vm->_objectsManager.stopBobAnimation(2); + _vm->_objectsManager.setBobAnimation(4); } if (v76 == 201) { - _vm->_objectsManager.BOBANIM_ON(3); + _vm->_objectsManager.setBobAnimation(3); do { if (_vm->shouldQuit()) return -1; // Exiting game _vm->_eventsManager.VBL(); } while (_vm->_objectsManager.BOBPOSI(3) != 18); - _vm->_objectsManager.BOBANIM_OFF(3); - _vm->_objectsManager.BOBANIM_ON(4); + _vm->_objectsManager.stopBobAnimation(3); + _vm->_objectsManager.setBobAnimation(4); } if (v76 == 203) { _vm->_globals.NO_VISU = true; _vm->_objectsManager.removeSprite(0); - _vm->_objectsManager.BOBANIM_ON(4); + _vm->_objectsManager.setBobAnimation(4); do { if (_vm->shouldQuit()) return -1; // Exiting game @@ -1608,13 +1608,13 @@ LABEL_1141: if (_vm->_objectsManager.BOBPOSI(4) == 18) _vm->_graphicsManager.AFFICHE_SPEED(_vm->_globals.SPRITE_ECRAN, 18, 334, 0); } while (_vm->_objectsManager.BOBPOSI(4) != 26); - _vm->_objectsManager.BOBANIM_OFF(4); + _vm->_objectsManager.stopBobAnimation(4); _vm->_globals.NO_VISU = false; _vm->_objectsManager.SPRITE_ON(0); } if (v76 == 204) { _vm->_objectsManager.removeSprite(0); - _vm->_objectsManager.BOBANIM_ON(3); + _vm->_objectsManager.setBobAnimation(3); _vm->_soundManager.LOAD_WAV("SOUND67.WAV", 1); int v41 = 0; do { @@ -1629,12 +1629,12 @@ LABEL_1141: v41 = 0; _vm->_eventsManager.VBL(); } while (_vm->_objectsManager.BOBPOSI(3) != 50); - _vm->_objectsManager.BOBANIM_OFF(3); + _vm->_objectsManager.stopBobAnimation(3); _vm->_objectsManager.SPRITE_ON(0); } if (v76 == 205) { _vm->_objectsManager.removeSprite(0); - _vm->_objectsManager.BOBANIM_ON(4); + _vm->_objectsManager.setBobAnimation(4); _vm->_soundManager.LOAD_WAV("SOUND69.WAV", 1); int v42 = 0; do { @@ -1649,14 +1649,14 @@ LABEL_1141: v42 = 0; _vm->_eventsManager.VBL(); } while (_vm->_objectsManager.BOBPOSI(4) != 24); - _vm->_objectsManager.BOBANIM_OFF(4); + _vm->_objectsManager.stopBobAnimation(4); _vm->_objectsManager.SPRITE_ON(0); } if (v76 == 175) { _vm->_objectsManager.setSpriteIndex(0, 55); _vm->_objectsManager.removeSprite(0); - _vm->_objectsManager.BOBANIM_ON(9); - _vm->_objectsManager.BOBANIM_ON(10); + _vm->_objectsManager.setBobAnimation(9); + _vm->_objectsManager.setBobAnimation(10); _vm->_objectsManager.BOB_OFFSET(10, 300); _vm->_soundManager.PLAY_SOUND("SOUND44.WAV"); do { @@ -1665,8 +1665,8 @@ LABEL_1141: _vm->_eventsManager.VBL(); } while (_vm->_objectsManager.BOBPOSI(10) != 7); - _vm->_objectsManager.BOBANIM_ON(6); - _vm->_objectsManager.BOBANIM_OFF(3); + _vm->_objectsManager.setBobAnimation(6); + _vm->_objectsManager.stopBobAnimation(3); do { if (_vm->shouldQuit()) return -1; // Exiting game @@ -1674,16 +1674,16 @@ LABEL_1141: _vm->_eventsManager.VBL(); } while (_vm->_objectsManager.BOBPOSI(6) != 10); _vm->_soundManager.PLAY_SOUND("SOUND71.WAV"); - _vm->_objectsManager.BOBANIM_ON(7); - _vm->_objectsManager.BOBANIM_OFF(4); + _vm->_objectsManager.setBobAnimation(7); + _vm->_objectsManager.stopBobAnimation(4); do { if (_vm->shouldQuit()) return -1; // Exiting game _vm->_eventsManager.VBL(); } while (_vm->_objectsManager.BOBPOSI(7) != 15); - _vm->_objectsManager.BOBANIM_OFF(5); - _vm->_objectsManager.BOBANIM_ON(8); + _vm->_objectsManager.stopBobAnimation(5); + _vm->_objectsManager.setBobAnimation(8); _vm->_soundManager.PLAY_SOUND("SOUND70.WAV"); do { if (_vm->shouldQuit()) @@ -1691,11 +1691,11 @@ LABEL_1141: _vm->_eventsManager.VBL(); } while (_vm->_objectsManager.BOBPOSI(8) != 76); - _vm->_objectsManager.BOBANIM_OFF(6); - _vm->_objectsManager.BOBANIM_OFF(7); - _vm->_objectsManager.BOBANIM_OFF(8); - _vm->_objectsManager.BOBANIM_OFF(9); - _vm->_objectsManager.BOBANIM_OFF(10); + _vm->_objectsManager.stopBobAnimation(6); + _vm->_objectsManager.stopBobAnimation(7); + _vm->_objectsManager.stopBobAnimation(8); + _vm->_objectsManager.stopBobAnimation(9); + _vm->_objectsManager.stopBobAnimation(10); _vm->_objectsManager.SPRITE_ON(0); } if (v76 == 229) { @@ -1728,7 +1728,7 @@ LABEL_1141: } while (_vm->_globals.chemin != (int16 *)g_PTRNUL); _vm->_objectsManager.removeSprite(0); int v45 = 0; - _vm->_objectsManager.BOBANIM_ON(7); + _vm->_objectsManager.setBobAnimation(7); do { if (_vm->shouldQuit()) return -1; // Exiting game @@ -1739,7 +1739,7 @@ LABEL_1141: } _vm->_eventsManager.VBL(); } while (_vm->_objectsManager.BOBPOSI(7) != 15); - _vm->_objectsManager.BOBANIM_OFF(7); + _vm->_objectsManager.stopBobAnimation(7); _vm->_objectsManager.setSpriteX(0, 476); _vm->_objectsManager.setSpriteY(0, 278); _vm->_objectsManager.SPRITE_ON(0); @@ -1752,7 +1752,7 @@ LABEL_1141: if (v76 == 231) { _vm->_globals.CACHE_OFF(); _vm->_objectsManager.removeSprite(0); - _vm->_objectsManager.BOBANIM_ON(12); + _vm->_objectsManager.setBobAnimation(12); do { if (_vm->shouldQuit()) return -1; // Exiting game @@ -1769,13 +1769,13 @@ LABEL_1141: _vm->_eventsManager.VBL(); } while (_vm->_objectsManager.BOBPOSI(12) != 12); _vm->_objectsManager.SPRITE_ON(0); - _vm->_objectsManager.BOBANIM_OFF(12); + _vm->_objectsManager.stopBobAnimation(12); _vm->_globals.CACHE_ON(); } if (v76 == 233) { _vm->_globals.CACHE_OFF(); _vm->_objectsManager.removeSprite(0); - _vm->_objectsManager.BOBANIM_ON(11); + _vm->_objectsManager.setBobAnimation(11); int v46 = 0; do { if (_vm->shouldQuit()) @@ -1785,9 +1785,9 @@ LABEL_1141: if (_vm->_objectsManager.BOBPOSI(11) == 10 && !v46) v46 = 1; } while (_vm->_objectsManager.BOBPOSI(11) != 13); - _vm->_objectsManager.BOBANIM_OFF(11); + _vm->_objectsManager.stopBobAnimation(11); _vm->_globals.CACHE_ON(); - _vm->_objectsManager.BOBANIM_ON(13); + _vm->_objectsManager.setBobAnimation(13); do { if (_vm->shouldQuit()) return -1; // Exiting game @@ -1798,7 +1798,7 @@ LABEL_1141: _vm->_talkManager.PARLER_PERSO("HRADIO.PE2"); _vm->_globals.NOPARLE = false; _vm->_graphicsManager.FADE_OUTW(); - _vm->_objectsManager.BOBANIM_OFF(13); + _vm->_objectsManager.stopBobAnimation(13); _vm->_graphicsManager.NOFADE = true; _vm->_globals.SORTIE = 94; } @@ -1903,7 +1903,7 @@ LABEL_1141: _vm->_objectsManager.OPTI_ONE(16, 0, 10, 0); } if (v76 == 240) { - _vm->_objectsManager.BOBANIM_ON(1); + _vm->_objectsManager.setBobAnimation(1); bool soundFlag = false; do { if (_vm->shouldQuit()) @@ -1923,8 +1923,8 @@ LABEL_1141: if (_vm->_objectsManager.BOBPOSI(1) == 25) soundFlag = false; } while (_vm->_objectsManager.BOBPOSI(1) != 32); - _vm->_objectsManager.BOBANIM_OFF(1); - _vm->_objectsManager.BOBANIM_ON(2); + _vm->_objectsManager.stopBobAnimation(1); + _vm->_objectsManager.setBobAnimation(2); _vm->_fontManager.hideText(9); if (!_vm->_soundManager.TEXTOFF) { _vm->_fontManager.initTextBuffers(9, 617, _vm->_globals.FICH_TEXTE, 91, 41, 20, 25, 3, 30, 253); @@ -2011,7 +2011,7 @@ LABEL_1141: } _vm->_eventsManager.VBL(); } while (_vm->_objectsManager.BOBPOSI(12) != 34); - _vm->_objectsManager.BOBANIM_OFF(2); + _vm->_objectsManager.stopBobAnimation(2); _vm->_graphicsManager.FADE_OUTW(); _vm->_graphicsManager.NOFADE = true; _vm->_globals.SORTIE = 20; @@ -2208,9 +2208,9 @@ LABEL_1141: _vm->_globals.SORTIE = 100; } if (v76 == 55) { - _vm->_objectsManager.BOBANIM_OFF(1); + _vm->_objectsManager.stopBobAnimation(1); _vm->_objectsManager.OPTI_ONE(15, 0, 12, 0); - _vm->_objectsManager.BOBANIM_OFF(15); + _vm->_objectsManager.stopBobAnimation(15); _vm->_objectsManager.OBSSEUL = 1; _vm->_objectsManager.INILINK("IM19a"); _vm->_objectsManager.OBSSEUL = 0; diff --git a/engines/hopkins/talk.cpp b/engines/hopkins/talk.cpp index c339b0e1ad..8394865e76 100644 --- a/engines/hopkins/talk.cpp +++ b/engines/hopkins/talk.cpp @@ -281,15 +281,15 @@ int TalkManager::DIALOGUE() { v0 = _characterBuffer; v1 = (int16)READ_LE_UINT16((uint16 *)_characterBuffer + 48); if (v1) - _vm->_objectsManager.BOBANIM_ON(v1); + _vm->_objectsManager.setBobAnimation(v1); if ((int16)READ_LE_UINT16((uint16 *)v0 + 48) != 1) - _vm->_objectsManager.BOBANIM_ON((int16)READ_LE_UINT16((uint16 *)v0 + 49)); + _vm->_objectsManager.setBobAnimation((int16)READ_LE_UINT16((uint16 *)v0 + 49)); if ((int16)READ_LE_UINT16((uint16 *)v0 + 48) != 2) - _vm->_objectsManager.BOBANIM_ON((int16)READ_LE_UINT16((uint16 *)v0 + 50)); + _vm->_objectsManager.setBobAnimation((int16)READ_LE_UINT16((uint16 *)v0 + 50)); if ( (int16)READ_LE_UINT16((uint16 *)v0 + 48) != 3) - _vm->_objectsManager.BOBANIM_ON((int16)READ_LE_UINT16((uint16 *)v0 + 51)); + _vm->_objectsManager.setBobAnimation((int16)READ_LE_UINT16((uint16 *)v0 + 51)); if ((int16)READ_LE_UINT16((uint16 *)v0 + 48) != 4) - _vm->_objectsManager.BOBANIM_ON((int16)READ_LE_UINT16((uint16 *)v0 + 52)); + _vm->_objectsManager.setBobAnimation((int16)READ_LE_UINT16((uint16 *)v0 + 52)); } else { VISU_WAIT(); } @@ -354,19 +354,19 @@ int TalkManager::DIALOGUE() { v11 = _characterBuffer; v12 = (int16)READ_LE_UINT16((uint16 *)_characterBuffer + 48); if (v12) - _vm->_objectsManager.BOBANIM_OFF(v12); + _vm->_objectsManager.stopBobAnimation(v12); v13 = (int16)READ_LE_UINT16((uint16 *)v11 + 49); if (v13 != 1) - _vm->_objectsManager.BOBANIM_OFF(v13); + _vm->_objectsManager.stopBobAnimation(v13); v14 = (int16)READ_LE_UINT16((uint16 *)v11 + 50); if (v14 != 2) - _vm->_objectsManager.BOBANIM_OFF(v14); + _vm->_objectsManager.stopBobAnimation(v14); v15 = (int16)READ_LE_UINT16((uint16 *)v11 + 51); if (v15 != 3) - _vm->_objectsManager.BOBANIM_OFF(v15); + _vm->_objectsManager.stopBobAnimation(v15); v16 = (int16)READ_LE_UINT16((uint16 *)v11 + 52); if (v16 != 4) - _vm->_objectsManager.BOBANIM_OFF(v16); + _vm->_objectsManager.stopBobAnimation(v16); } else { FIN_VISU_WAIT(); } @@ -435,19 +435,19 @@ int TalkManager::DIALOGUE_REP(int idx) { v8 = _characterBuffer; v9 = (int16)READ_LE_UINT16((uint16 *)_characterBuffer + 43); if (v9) - _vm->_objectsManager.BOBANIM_ON(v9); + _vm->_objectsManager.setBobAnimation(v9); v10 = (int16)READ_LE_UINT16((uint16 *)v8 + 44); if (v10) - _vm->_objectsManager.BOBANIM_ON(v10); + _vm->_objectsManager.setBobAnimation(v10); v11 = (int16)READ_LE_UINT16((uint16 *)v8 + 45); if (v11) - _vm->_objectsManager.BOBANIM_ON(v11); + _vm->_objectsManager.setBobAnimation(v11); v12 = (int16)READ_LE_UINT16((uint16 *)v8 + 46); if (v12) - _vm->_objectsManager.BOBANIM_ON(v12); + _vm->_objectsManager.setBobAnimation(v12); v13 = (int16)READ_LE_UINT16((uint16 *)v8 + 47); if (v13) - _vm->_objectsManager.BOBANIM_ON(v13); + _vm->_objectsManager.setBobAnimation(v13); } else { VISU_PARLE(); } @@ -491,19 +491,19 @@ int TalkManager::DIALOGUE_REP(int idx) { v15 = _characterBuffer; v16 = (int16)READ_LE_UINT16((uint16 *)_characterBuffer + 43); if (v16) - _vm->_objectsManager.BOBANIM_OFF(v16); + _vm->_objectsManager.stopBobAnimation(v16); v17 = (int16)READ_LE_UINT16((uint16 *)v15 + 44); if (v17) - _vm->_objectsManager.BOBANIM_OFF(v17); + _vm->_objectsManager.stopBobAnimation(v17); v18 = (int16)READ_LE_UINT16((uint16 *)v15 + 45); if (v18) - _vm->_objectsManager.BOBANIM_OFF(v18); + _vm->_objectsManager.stopBobAnimation(v18); v19 = (int16)READ_LE_UINT16((uint16 *)v15 + 46); if (v19) - _vm->_objectsManager.BOBANIM_OFF(v19); + _vm->_objectsManager.stopBobAnimation(v19); v20 = (int16)READ_LE_UINT16((uint16 *)v15 + 47); if (v20) - _vm->_objectsManager.BOBANIM_OFF(v20); + _vm->_objectsManager.stopBobAnimation(v20); } else { FIN_VISU_PARLE(); } @@ -525,9 +525,7 @@ void TalkManager::CHERCHE_PAL(int a1, int a2) { v8 = 0; v4 = a1; for (;;) { - if ( *(_characterBuffer + v4) == 'P' - && *(_characterBuffer + v4 + 1) == 'A' - && *(_characterBuffer + v4 + 2) == 'L') { + if (_characterBuffer[v4] == 'P' && _characterBuffer[v4 + 1] == 'A' && _characterBuffer[v4 + 2] == 'L') { v8 = 1; v2 = v4; } @@ -724,24 +722,24 @@ void TalkManager::BOB_VISU_PARLE(int idx) { byte *v5; _vm->_objectsManager._priorityFl = true; - if (!_vm->_globals.Bob[idx].field0) { + if (!_vm->_globals._bob[idx].field0) { _vm->_objectsManager.BOB_ZERO(idx); v5 = _vm->_globals.Bqe_Anim[idx]._data; v4 = (int16)READ_LE_UINT16(v5 + 2); if (!v4) v4 = 1; if ((int16)READ_LE_UINT16(v5 + 24)) { - _vm->_globals.Bob[idx]._isSpriteFl = true; - _vm->_globals.Bob[idx].field36 = 0; - _vm->_globals.Bob[idx]._modeFlag = 0; - _vm->_globals.Bob[idx]._animData = _vm->_globals.Bqe_Anim[idx]._data; - _vm->_globals.Bob[idx].field0 = 10; + _vm->_globals._bob[idx]._isSpriteFl = true; + _vm->_globals._bob[idx].field36 = 0; + _vm->_globals._bob[idx]._modeFlag = 0; + _vm->_globals._bob[idx]._animData = _vm->_globals.Bqe_Anim[idx]._data; + _vm->_globals._bob[idx].field0 = 10; v5 = _characterSprite; - _vm->_globals.Bob[idx]._spriteData = _characterSprite; - _vm->_globals.Bob[idx].field1E = v4; - _vm->_globals.Bob[idx].field20 = -1; - _vm->_globals.Bob[idx].field22 = 0; - _vm->_globals.Bob[idx]._offsetY = 0; + _vm->_globals._bob[idx]._spriteData = _characterSprite; + _vm->_globals._bob[idx].field1E = v4; + _vm->_globals._bob[idx].field20 = -1; + _vm->_globals._bob[idx].field22 = 0; + _vm->_globals._bob[idx]._offsetY = 0; } } } @@ -760,11 +758,7 @@ void TalkManager::CHERCHE_ANIM0(int a1, int a2) { v3 = 0; v4 = a1; for (;;) { - if (*(_characterBuffer + v4) == 'A' - && *(_characterBuffer + v4 + 1) == 'N' - && *(_characterBuffer + v4 + 2) == 'I' - && *(_characterBuffer + v4 + 3) == 'M' - && *(_characterBuffer + v4 + 4) == 1) { + if (_characterBuffer[v4] == 'A' && _characterBuffer[v4 + 1] == 'N' && _characterBuffer[v4 + 2] == 'I' && _characterBuffer[v4 + 3] == 'M' && _characterBuffer[v4 + 4] == 1) { v3 = 1; v2 = v4; } @@ -990,7 +984,7 @@ LABEL_2: do { assert(v11 < 20); *(v11++ + v8) = v6[v7++]; - if (v6[v7] == 'F' && v6[v7] == 'F') { + if (v6[v7] == 'F' && v6[v7 + 1] == 'F') { v16 = 1; v8[v11] = 'F'; v8[v11 + 1] = 'F'; @@ -1049,22 +1043,22 @@ void TalkManager::REPONSE2(int a1, int a2) { _vm->_objectsManager.setSpriteIndex(0, 62); _vm->_objectsManager.SPACTION(_vm->_globals.FORETSPR, "2,3,4,5,6,7,8,9,10,11,12,-1,", 0, 0, 4, 0); if (a1 == 22) { - _vm->_objectsManager.BLOQUE_ANIMX(6, _vm->_objectsManager.BOBX(3)); - _vm->_objectsManager.BLOQUE_ANIMX(8, _vm->_objectsManager.BOBX(3)); + _vm->_objectsManager.BLOQUE_ANIMX(6, _vm->_objectsManager.getBobPosX(3)); + _vm->_objectsManager.BLOQUE_ANIMX(8, _vm->_objectsManager.getBobPosX(3)); } else { // a1 == 23 - _vm->_objectsManager.BLOQUE_ANIMX(6, _vm->_objectsManager.BOBX(4)); - _vm->_objectsManager.BLOQUE_ANIMX(8, _vm->_objectsManager.BOBX(4)); + _vm->_objectsManager.BLOQUE_ANIMX(6, _vm->_objectsManager.getBobPosX(4)); + _vm->_objectsManager.BLOQUE_ANIMX(8, _vm->_objectsManager.getBobPosX(4)); } - _vm->_objectsManager.BOBANIM_OFF(3); - _vm->_objectsManager.BOBANIM_OFF(4); - _vm->_objectsManager.BOBANIM_ON(6); + _vm->_objectsManager.stopBobAnimation(3); + _vm->_objectsManager.stopBobAnimation(4); + _vm->_objectsManager.setBobAnimation(6); _vm->_soundManager.PLAY_SAMPLE2(1); _vm->_objectsManager.SPACTION1(_vm->_globals.FORETSPR, "13,14,15,14,13,12,13,14,15,16,-1,", 0, 0, 4); do _vm->_eventsManager.VBL(); while (_vm->_objectsManager.BOBPOSI(6) < 12); - _vm->_objectsManager.BOBANIM_OFF(6); - _vm->_objectsManager.BOBANIM_ON(8); + _vm->_objectsManager.stopBobAnimation(6); + _vm->_objectsManager.setBobAnimation(8); switch (_vm->_globals.ECRAN) { case 35: @@ -1097,22 +1091,22 @@ void TalkManager::REPONSE2(int a1, int a2) { _vm->_objectsManager.setSpriteIndex(0, 62); _vm->_objectsManager.SPACTION(_vm->_globals.FORETSPR, "2,3,4,5,6,7,8,9,10,11,12,-1,", 0, 0, 4, 1); if (a1 == 20) { - _vm->_objectsManager.BLOQUE_ANIMX(5, _vm->_objectsManager.BOBX(1)); - _vm->_objectsManager.BLOQUE_ANIMX(7, _vm->_objectsManager.BOBX(1)); + _vm->_objectsManager.BLOQUE_ANIMX(5, _vm->_objectsManager.getBobPosX(1)); + _vm->_objectsManager.BLOQUE_ANIMX(7, _vm->_objectsManager.getBobPosX(1)); } else { // a1 == 21 - _vm->_objectsManager.BLOQUE_ANIMX(5, _vm->_objectsManager.BOBX(2)); - _vm->_objectsManager.BLOQUE_ANIMX(7, _vm->_objectsManager.BOBX(2)); + _vm->_objectsManager.BLOQUE_ANIMX(5, _vm->_objectsManager.getBobPosX(2)); + _vm->_objectsManager.BLOQUE_ANIMX(7, _vm->_objectsManager.getBobPosX(2)); } - _vm->_objectsManager.BOBANIM_OFF(1); - _vm->_objectsManager.BOBANIM_OFF(2); - _vm->_objectsManager.BOBANIM_ON(5); + _vm->_objectsManager.stopBobAnimation(1); + _vm->_objectsManager.stopBobAnimation(2); + _vm->_objectsManager.setBobAnimation(5); _vm->_soundManager.PLAY_SAMPLE2(1); _vm->_objectsManager.SPACTION1(_vm->_globals.FORETSPR, "13,14,15,14,13,12,13,14,15,16,-1,", 0, 0, 4); do _vm->_eventsManager.VBL(); while (_vm->_objectsManager.BOBPOSI(5) < 12); - _vm->_objectsManager.BOBANIM_OFF(5); - _vm->_objectsManager.BOBANIM_ON(7); + _vm->_objectsManager.stopBobAnimation(5); + _vm->_objectsManager.setBobAnimation(7); switch (_vm->_globals.ECRAN) { case 35: indx = 200; |