diff options
Diffstat (limited to 'engines/hopkins')
-rw-r--r-- | engines/hopkins/computer.cpp | 4 | ||||
-rw-r--r-- | engines/hopkins/dialogs.cpp | 10 | ||||
-rw-r--r-- | engines/hopkins/events.cpp | 2 | ||||
-rw-r--r-- | engines/hopkins/globals.h | 4 | ||||
-rw-r--r-- | engines/hopkins/graphics.cpp | 16 | ||||
-rw-r--r-- | engines/hopkins/graphics.h | 2 | ||||
-rw-r--r-- | engines/hopkins/hopkins.cpp | 34 | ||||
-rw-r--r-- | engines/hopkins/objects.cpp | 148 | ||||
-rw-r--r-- | engines/hopkins/objects.h | 12 | ||||
-rw-r--r-- | engines/hopkins/saveload.cpp | 2 | ||||
-rw-r--r-- | engines/hopkins/script.cpp | 24 | ||||
-rw-r--r-- | engines/hopkins/talk.cpp | 6 |
12 files changed, 131 insertions, 133 deletions
diff --git a/engines/hopkins/computer.cpp b/engines/hopkins/computer.cpp index 53c5809c36..8d9b108ce3 100644 --- a/engines/hopkins/computer.cpp +++ b/engines/hopkins/computer.cpp @@ -643,8 +643,8 @@ void ComputerManager::newLevel() { _breakoutLevel = (int16 *)_vm->_fileManager.loadFile(file); displayBricks(); - _vm->_objectsManager.addStaticSprite(_breakoutSpr, Common::Point(150, 192), 0, 13, 0, 0, 0, 0); - _vm->_objectsManager.addStaticSprite(_breakoutSpr, Common::Point(164, 187), 1, 14, 0, 0, 0, 0); + _vm->_objectsManager.addStaticSprite(_breakoutSpr, Common::Point(150, 192), 0, 13, 0, false, 0, 0); + _vm->_objectsManager.addStaticSprite(_breakoutSpr, Common::Point(164, 187), 1, 14, 0, false, 0, 0); _ballPosition = Common::Point(164, 187); _padPositionX = 150; _vm->_objectsManager.animateSprite(0); diff --git a/engines/hopkins/dialogs.cpp b/engines/hopkins/dialogs.cpp index 486d122c53..70b94088f1 100644 --- a/engines/hopkins/dialogs.cpp +++ b/engines/hopkins/dialogs.cpp @@ -349,7 +349,7 @@ LABEL_7: int v18 = _inventWidth = _vm->_objectsManager.getWidth(_vm->_dialogsManager._inventWin1, 0); int v17 = _inventHeight = _vm->_objectsManager.getHeight(_vm->_dialogsManager._inventWin1, 0); - _vm->_graphicsManager.Affiche_Perfect(_vm->_graphicsManager._vesaBuffer, _vm->_dialogsManager._inventWin1, _inventX + 300, 414, 0, 0, 0, 0); + _vm->_graphicsManager.Affiche_Perfect(_vm->_graphicsManager._vesaBuffer, _vm->_dialogsManager._inventWin1, _inventX + 300, 414, 0, 0, 0, false); int v15 = 0; int inventCount = 0; for (int inventLine = 1; inventLine <= 5; inventLine++) { @@ -485,19 +485,19 @@ void DialogsManager::inventAnim() { if (_vm->_globals._saveData->_data[svField357] == 1) { if (_vm->_globals._saveData->_data[svField353] == 1) - _vm->_graphicsManager.Affiche_Perfect(_vm->_graphicsManager._vesaBuffer, _vm->_globals.TETE, 832, 325, 0, 0, 0, 0); + _vm->_graphicsManager.Affiche_Perfect(_vm->_graphicsManager._vesaBuffer, _vm->_globals.TETE, 832, 325, 0, 0, 0, false); if (_vm->_globals._saveData->_data[svField355] == 1) - _vm->_graphicsManager.Affiche_Perfect(_vm->_graphicsManager._vesaBuffer, _vm->_globals.TETE, 866, 325, 1, 0, 0, 0); + _vm->_graphicsManager.Affiche_Perfect(_vm->_graphicsManager._vesaBuffer, _vm->_globals.TETE, 866, 325, 1, 0, 0, false); _vm->_graphicsManager.addVesaSegment(532, 25, 560, 60); _vm->_graphicsManager.addVesaSegment(566, 25, 594, 60); } if (_vm->_globals._saveData->_data[svField356] == 1) { - _vm->_graphicsManager.Affiche_Perfect(_vm->_graphicsManager._vesaBuffer, _vm->_globals.TETE, 832, 325, 0, 0, 0, 0); + _vm->_graphicsManager.Affiche_Perfect(_vm->_graphicsManager._vesaBuffer, _vm->_globals.TETE, 832, 325, 0, 0, 0, false); _vm->_graphicsManager.addVesaSegment(532, 25, 560, 60); } if (_vm->_globals._saveData->_data[svField354] == 1) { - _vm->_graphicsManager.Affiche_Perfect(_vm->_graphicsManager._vesaBuffer, _vm->_globals.TETE, 832, 325, 0, 0, 0, 0); + _vm->_graphicsManager.Affiche_Perfect(_vm->_graphicsManager._vesaBuffer, _vm->_globals.TETE, 832, 325, 0, 0, 0, false); _vm->_graphicsManager.addVesaSegment(532, 25, 560, 60); } } diff --git a/engines/hopkins/events.cpp b/engines/hopkins/events.cpp index 6fd46ec82d..448838bc2c 100644 --- a/engines/hopkins/events.cpp +++ b/engines/hopkins/events.cpp @@ -479,7 +479,7 @@ void EventsManager::updateCursor() { _vm->_graphicsManager.Sprite_Vesa(cursorSurface, _mouseCursor, 300, 300, _mouseSpriteId); } else { // Draw the active inventory object - _vm->_graphicsManager.Affiche_Perfect(cursorSurface, _objectBuf, 300, 300, 0, 0, 0, 0); + _vm->_graphicsManager.Affiche_Perfect(cursorSurface, _objectBuf, 300, 300, 0, 0, 0, false); } // Reset the clipping bounds diff --git a/engines/hopkins/globals.h b/engines/hopkins/globals.h index 5d8acda8e2..3fdf1d0930 100644 --- a/engines/hopkins/globals.h +++ b/engines/hopkins/globals.h @@ -97,7 +97,7 @@ struct BobItem { int _offsetY; // Unused variable? bool field34; // Set to true in B_CACHE_OFF() int field36; - int _modeFlag; + bool _flipFl; bool _isSpriteFl; bool _activeFl; int _oldX; @@ -185,7 +185,7 @@ struct HopkinsItem { struct CharacterLocation { Common::Point _pos; - int field2; + int _startSpriteIndex; int _location; int _zoomFactor; }; diff --git a/engines/hopkins/graphics.cpp b/engines/hopkins/graphics.cpp index 93f1d01998..bca38038c4 100644 --- a/engines/hopkins/graphics.cpp +++ b/engines/hopkins/graphics.cpp @@ -1181,8 +1181,8 @@ void GraphicsManager::AFFICHE_SPEEDVGA(const byte *objectData, int xp, int yp, i width = _vm->_objectsManager.getWidth(objectData, idx); height = _vm->_objectsManager.getHeight(objectData, idx); if (*objectData == 78) { - Affiche_Perfect(_vesaScreen, objectData, xp + 300, yp + 300, idx, 0, 0, 0); - Affiche_Perfect(_vesaBuffer, objectData, xp + 300, yp + 300, idx, 0, 0, 0); + Affiche_Perfect(_vesaScreen, objectData, xp + 300, yp + 300, idx, 0, 0, false); + Affiche_Perfect(_vesaBuffer, objectData, xp + 300, yp + 300, idx, 0, 0, false); } else { Sprite_Vesa(_vesaBuffer, objectData, xp + 300, yp + 300, idx); Sprite_Vesa(_vesaScreen, objectData, xp + 300, yp + 300, idx); @@ -1269,7 +1269,7 @@ int GraphicsManager::zoomOut(int v, int percentage) { } // Display 'Perfect?' -void GraphicsManager::Affiche_Perfect(byte *surface, const byte *srcData, int xp300, int yp300, int frameIndex, int zoom1, int zoom2, int modeFlag) { +void GraphicsManager::Affiche_Perfect(byte *surface, const byte *srcData, int xp300, int yp300, int frameIndex, int zoom1, int zoom2, bool flipFl) { const byte *spriteStartP; int i; const byte *spriteSizeP; @@ -1315,7 +1315,7 @@ void GraphicsManager::Affiche_Perfect(byte *surface, const byte *srcData, int xp _width = spriteWidth; int v20 = zoomIn(spriteWidth, zoom2); int v22 = zoomIn(spriteHeight1, zoom2); - if (modeFlag) { + if (flipFl) { v29 = v20 + dest1P; if (_posYClipped) { if ((uint16)_posYClipped >= v22) @@ -1472,7 +1472,7 @@ Aff_Zoom_Larg_Cont1: Red = zoom1; if (zoom1 < 100) { int v37 = zoomOut(spriteWidth, Red); - if (modeFlag) { + if (flipFl) { v40 = v37 + dest1P; do { int v65 = spriteHeight2; @@ -1535,7 +1535,7 @@ Aff_Zoom_Larg_Cont1: } } else { _width = spriteWidth; - if (modeFlag) { + if (flipFl) { dest2P = spriteWidth + dest1P; spec_largeur = spriteWidth; if (_posYClipped) { @@ -1622,8 +1622,8 @@ void GraphicsManager::fastDisplay(const byte *spriteData, int xp, int yp, int sp int height = _vm->_objectsManager.getHeight(spriteData, spriteIndex); if (*spriteData == 78) { - Affiche_Perfect(_vesaScreen, spriteData, xp + 300, yp + 300, spriteIndex, 0, 0, 0); - Affiche_Perfect(_vesaBuffer, spriteData, xp + 300, yp + 300, spriteIndex, 0, 0, 0); + Affiche_Perfect(_vesaScreen, spriteData, xp + 300, yp + 300, spriteIndex, 0, 0, false); + Affiche_Perfect(_vesaBuffer, spriteData, xp + 300, yp + 300, spriteIndex, 0, 0, false); } else { Sprite_Vesa(_vesaBuffer, spriteData, xp + 300, yp + 300, spriteIndex); Sprite_Vesa(_vesaScreen, spriteData, xp + 300, yp + 300, spriteIndex); diff --git a/engines/hopkins/graphics.h b/engines/hopkins/graphics.h index 2c601492e5..f43e35f710 100644 --- a/engines/hopkins/graphics.h +++ b/engines/hopkins/graphics.h @@ -156,7 +156,7 @@ public: void Restore_Mem(byte *destSurface, const byte *src, int xp, int yp, int width, int height); int zoomIn(int v, int percentage); int zoomOut(int v, int percentage); - void Affiche_Perfect(byte *surface, const byte *srcData, int xp300, int yp300, int frameIndex, int zoom1, int zoom2, int modeFlag); + void Affiche_Perfect(byte *surface, const byte *srcData, int xp300, int yp300, int frameIndex, int zoom1, int zoom2, bool flipFl); void fastDisplay(const byte *spriteData, int xp, int yp, int spriteIndex, bool addSegment = true); void SCOPY(const byte *surface, int x1, int y1, int width, int height, byte *destSurface, int destX, int destY); void Copy_Mem(const byte *srcSurface, int x1, int y1, unsigned int width, int height, byte *destSurface, int destX, int destY); diff --git a/engines/hopkins/hopkins.cpp b/engines/hopkins/hopkins.cpp index ad6a605f34..45039ede8f 100644 --- a/engines/hopkins/hopkins.cpp +++ b/engines/hopkins/hopkins.cpp @@ -2614,11 +2614,11 @@ void HopkinsEngine::BTOCEAN() { bool displAnim = false; if (_objectsManager._zoneNum == 1) { if (_globals._oceanDirection == 3) - _objectsManager.SPACTION(_globals.PERSO, "0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,-1,", 0, 0, 6, 0); + _objectsManager.SPACTION(_globals.PERSO, "0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,-1,", 0, 0, 6, false); else if (_globals._oceanDirection == 1) - _objectsManager.SPACTION(_globals.PERSO, "27,26,25,24,23,22,21,20,19,18,-1,", 0, 0, 6, 0); + _objectsManager.SPACTION(_globals.PERSO, "27,26,25,24,23,22,21,20,19,18,-1,", 0, 0, 6, false); else if (_globals._oceanDirection == 5) - _objectsManager.SPACTION(_globals.PERSO, "9,10,11,12,13,14,15,16,17,18,-1,", 0, 0, 6, 0); + _objectsManager.SPACTION(_globals.PERSO, "9,10,11,12,13,14,15,16,17,18,-1,", 0, 0, 6, false); _globals._oceanDirection = 7; _globals._exitId = 1; int oldX = _objectsManager.getSpriteX(0); @@ -2646,11 +2646,11 @@ void HopkinsEngine::BTOCEAN() { LABEL_22: if (_objectsManager._zoneNum == 2) { if (_globals._oceanDirection == 7) - _objectsManager.SPACTION(_globals.PERSO, "18,19,20,21,22,23,24,25,26,27,28,29,30,31,32,33,34,35,36,-1,", 0, 0, 6, 0); + _objectsManager.SPACTION(_globals.PERSO, "18,19,20,21,22,23,24,25,26,27,28,29,30,31,32,33,34,35,36,-1,", 0, 0, 6, false); else if (_globals._oceanDirection == 1) - _objectsManager.SPACTION(_globals.PERSO, "27,28,29,30,31,32,33,34,35,36,-1,", 0, 0, 6, 0); + _objectsManager.SPACTION(_globals.PERSO, "27,28,29,30,31,32,33,34,35,36,-1,", 0, 0, 6, false); else if (_globals._oceanDirection == 5) - _objectsManager.SPACTION(_globals.PERSO, "9,8,7,6,5,4,3,2,1,0,-1,", 0, 0, 6, 0); + _objectsManager.SPACTION(_globals.PERSO, "9,8,7,6,5,4,3,2,1,0,-1,", 0, 0, 6, false); _globals._oceanDirection = 3; _globals._exitId = 2; int oldX = _objectsManager.getSpriteX(0); @@ -2699,7 +2699,7 @@ LABEL_41: } } while (oldX <= 235); if (!displAnim) - _objectsManager.SPACTION(_globals.PERSO, "36,35,34,33,32,31,30,29,28,27,-1,", 0, 0, 6, 0); + _objectsManager.SPACTION(_globals.PERSO, "36,35,34,33,32,31,30,29,28,27,-1,", 0, 0, 6, false); } LABEL_57: if (_globals._oceanDirection == 7) { @@ -2724,11 +2724,11 @@ LABEL_57: } } while (oldX > 236); if (!displAnim) - _objectsManager.SPACTION(_globals.PERSO, "18,19,20,21,22,23,24,25,26,27,-1,", 0, 0, 6, 0); + _objectsManager.SPACTION(_globals.PERSO, "18,19,20,21,22,23,24,25,26,27,-1,", 0, 0, 6, false); } LABEL_72: if (_globals._oceanDirection == 5) - _objectsManager.SPACTION(_globals.PERSO, "9,10,11,12,13,14,15,16,17,18,19,20,21,22,23,24,25,26,27,-1,", 0, 0, 6, 0); + _objectsManager.SPACTION(_globals.PERSO, "9,10,11,12,13,14,15,16,17,18,19,20,21,22,23,24,25,26,27,-1,", 0, 0, 6, false); _globals._oceanDirection = 1; _globals._exitId = 3; } @@ -2755,7 +2755,7 @@ LABEL_72: } } while (oldX <= 235); if (!displAnim) - _objectsManager.SPACTION(_globals.PERSO, "0,1,2,3,4,5,6,7,8,9,-1,", 0, 0, 6, 0); + _objectsManager.SPACTION(_globals.PERSO, "0,1,2,3,4,5,6,7,8,9,-1,", 0, 0, 6, false); } LABEL_91: if (_globals._oceanDirection == 7) { @@ -2778,13 +2778,13 @@ LABEL_91: } if (oldX <= 236) { if (!displAnim) - _objectsManager.SPACTION(_globals.PERSO, "18,17,16,15,14,13,12,11,10,9,-1,", 0, 0, 6, 0); + _objectsManager.SPACTION(_globals.PERSO, "18,17,16,15,14,13,12,11,10,9,-1,", 0, 0, 6, false); break; } } } if (_globals._oceanDirection == 1) - _objectsManager.SPACTION(_globals.PERSO, "27,26,25,24,23,22,21,20,19,18,17,16,15,14,13,12,11,10,9,-1,", 0, 0, 6, 0); + _objectsManager.SPACTION(_globals.PERSO, "27,26,25,24,23,22,21,20,19,18,17,16,15,14,13,12,11,10,9,-1,", 0, 0, 6, false); _globals._oceanDirection = 5; _globals._exitId = 4; } @@ -2838,23 +2838,23 @@ void HopkinsEngine::OCEAN(int16 curExitId, Common::String backgroundFilename, in switch (_globals._oceanDirection) { case 1: _objectsManager._characterPos.x = 236; - _objectsManager.PERI = 27; + _objectsManager._startSpriteIndex = 27; break; case 3: _objectsManager._characterPos.x = -20; - _objectsManager.PERI = 0; + _objectsManager._startSpriteIndex = 0; break; case 5: _objectsManager._characterPos.x = 236; - _objectsManager.PERI = 9; + _objectsManager._startSpriteIndex = 9; break; case 7: _objectsManager._characterPos.x = 415; - _objectsManager.PERI = 18; + _objectsManager._startSpriteIndex = 18; break; } - _objectsManager.addStaticSprite(_globals.PERSO, Common::Point(_objectsManager._characterPos.x, 110), 0, _objectsManager.PERI, 0, 0, 0, 0); + _objectsManager.addStaticSprite(_globals.PERSO, Common::Point(_objectsManager._characterPos.x, 110), 0, _objectsManager._startSpriteIndex, 0, false, 0, 0); _graphicsManager.SETCOLOR3(252, 100, 100, 100); _graphicsManager.SETCOLOR3(253, 100, 100, 100); _graphicsManager.SETCOLOR3(251, 100, 100, 100); diff --git a/engines/hopkins/objects.cpp b/engines/hopkins/objects.cpp index 57cbb83c0b..26b0214535 100644 --- a/engines/hopkins/objects.cpp +++ b/engines/hopkins/objects.cpp @@ -65,12 +65,12 @@ ObjectsManager::ObjectsManager() { _disableFl = false; _twoCharactersFl = false; _characterPos = Common::Point(0, 0); - PERI = 0; + _startSpriteIndex = 0; OBSSEUL = false; _jumpVerb = 0; _jumpZone = 0; _oldSpriteIndex = 0; - S_old_ret = 0; + _oldFlipFl = false; } void ObjectsManager::setParent(HopkinsEngine *vm) { @@ -492,7 +492,7 @@ void ObjectsManager::BOB_ZERO(int idx) { bob._offsetY = 0; bob.field34 = false; bob.field36 = 0; - bob._modeFlag = 0; + bob._flipFl = false; bob._oldX2 = 0; item._visibleFl = false; @@ -516,7 +516,7 @@ void ObjectsManager::DEF_BOB(int idx) { _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]._flipFl); _vm->_globals.Liste2[idx]._visibleFl = true; _vm->_globals.Liste2[idx]._posX = xp; @@ -583,7 +583,7 @@ void ObjectsManager::BOB_VISU(int idx) { if (_vm->_globals.Bank[bankIdx]._fileHeader == 1) { _vm->_globals._bob[idx]._isSpriteFl = true; _vm->_globals._bob[idx].field36 = 0; - _vm->_globals._bob[idx]._modeFlag = 0; + _vm->_globals._bob[idx]._flipFl = false; } _vm->_globals._bob[idx]._animData = _vm->_globals.Bqe_Anim[idx]._data; @@ -638,7 +638,7 @@ 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]._flipFl = false; _vm->_globals._bob[idx].field36 = 0; } @@ -647,7 +647,7 @@ void ObjectsManager::CALCUL_BOB(int idx) { return; int deltaY, deltaX; - if (_vm->_globals._bob[idx]._modeFlag) { + if (_vm->_globals._bob[idx]._flipFl) { deltaX = getOffsetX(_vm->_globals._bob[idx]._spriteData, spriteIdx, true); deltaY = getOffsetY(_vm->_globals._bob[idx]._spriteData, _vm->_globals._bob[idx]._frameIndex, true); } else { @@ -768,7 +768,7 @@ void ObjectsManager::DEF_SPRITE(int idx) { _sprite[idx]._destX + 300, _sprite[idx]._destY + 300, _sprite[idx]._spriteIndex); else _vm->_graphicsManager.Affiche_Perfect(_vm->_graphicsManager._vesaBuffer, _sprite[idx]._spriteData, - _sprite[idx]._destX + 300, _sprite[idx]._destY + 300, _sprite[idx]._spriteIndex, _sprite[idx]._reducePct, _sprite[idx]._zoomPct, _sprite[idx].fieldE); + _sprite[idx]._destX + 300, _sprite[idx]._destY + 300, _sprite[idx]._spriteIndex, _sprite[idx]._reducePct, _sprite[idx]._zoomPct, _sprite[idx]._flipFl); _vm->_globals.Liste[idx]._width = _sprite[idx]._width; _vm->_globals.Liste[idx]._height = _sprite[idx]._height; @@ -815,7 +815,7 @@ void ObjectsManager::computeSprite(int idx) { int offX; int offY; - if (_sprite[idx].fieldE) { + if (_sprite[idx]._flipFl) { offX = getOffsetX(_sprite[idx]._spriteData, spriteIndex, true); offY = getOffsetY(_sprite[idx]._spriteData, _sprite[idx]._spriteIndex, true); } else { @@ -959,7 +959,7 @@ void ObjectsManager::displayBobAnim() { _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]._flipFl = (v20[2 * v24 + 9] != 0); _vm->_globals._bob[idx].field10 += 5; v5 = _vm->_globals._bob[idx].field12; @@ -994,7 +994,7 @@ void ObjectsManager::displayBobAnim() { _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]._flipFl = (v21[9] != 0); _vm->_globals._bob[idx].field10 += 5; v10 = _vm->_globals._bob[idx].field12; @@ -1148,14 +1148,12 @@ void ObjectsManager::displayVBob() { if (*v10 == 78) { _vm->_graphicsManager.Affiche_Perfect(_vm->_graphicsManager._vesaScreen, v10, _vm->_globals.VBob[idx]._xp + 300, _vm->_globals.VBob[idx]._yp + 300, - _vm->_globals.VBob[idx]._frameIndex, - 0, 0, 0); + _vm->_globals.VBob[idx]._frameIndex, 0, 0, false); _vm->_graphicsManager.Affiche_Perfect(_vm->_graphicsManager._vesaBuffer, _vm->_globals.VBob[idx]._spriteData, _vm->_globals.VBob[idx]._xp + 300, _vm->_globals.VBob[idx]._yp + 300, - _vm->_globals.VBob[idx]._frameIndex, - 0, 0, 0); + _vm->_globals.VBob[idx]._frameIndex, 0, 0, false); } else { _vm->_graphicsManager.Sprite_Vesa(_vm->_graphicsManager._vesaBuffer, v10, _vm->_globals.VBob[idx]._xp + 300, _vm->_globals.VBob[idx]._yp + 300, @@ -1213,13 +1211,13 @@ void ObjectsManager::animateSprite(int idx) { _sprite[idx]._animationType = 1; } -void ObjectsManager::addStaticSprite(const byte *spriteData, Common::Point pos, int idx, int spriteIndex, int zoomFactor, int a7, int a8, int a9) { +void ObjectsManager::addStaticSprite(const byte *spriteData, Common::Point pos, int idx, int spriteIndex, int zoomFactor, bool flipFl, int a8, int a9) { assert (idx <= MAX_SPRITE); _sprite[idx]._spriteData = spriteData; _sprite[idx]._spritePos = pos; _sprite[idx]._spriteIndex = spriteIndex; _sprite[idx]._zoomFactor = zoomFactor; - _sprite[idx].fieldE = a7; + _sprite[idx]._flipFl = flipFl; _sprite[idx].field12 = a8; _sprite[idx].field14 = a9; _sprite[idx]._animationType = 0; @@ -1227,7 +1225,7 @@ void ObjectsManager::addStaticSprite(const byte *spriteData, Common::Point pos, if (spriteData[0] == 'R' && spriteData[1] == 'L' && spriteData[2] == 'E') { _sprite[idx]._rleFl = true; _sprite[idx]._zoomFactor = 0; - _sprite[idx].fieldE = 0; + _sprite[idx]._flipFl = false; } else _sprite[idx]._rleFl = false; @@ -1272,10 +1270,10 @@ void ObjectsManager::setSpriteZoom(int idx, int zoomFactor) { _sprite[idx]._zoomFactor = zoomFactor; } -void ObjectsManager::setFlipSprite(int idx, bool flip) { +void ObjectsManager::setFlipSprite(int idx, bool flipFl) { assert (idx <= MAX_SPRITE); if (!_sprite[idx]._rleFl) - _sprite[idx].fieldE = flip; + _sprite[idx]._flipFl = flipFl; } void ObjectsManager::checkZone() { @@ -1956,7 +1954,7 @@ void ObjectsManager::PLAN_BETA() { _vm->_globals._mapCarPosX = 900; _vm->_globals._mapCarPosY = 319; } - addStaticSprite(_spritePtr, Common::Point(_vm->_globals._mapCarPosX, _vm->_globals._mapCarPosY), 0, 1, 0, 0, 5, 5); + addStaticSprite(_spritePtr, Common::Point(_vm->_globals._mapCarPosX, _vm->_globals._mapCarPosY), 0, 1, 0, false, 5, 5); _vm->_eventsManager.setMouseXY(_vm->_globals._mapCarPosX, _vm->_globals._mapCarPosY); my_anim = 0; _vm->_eventsManager.mouseOn(); @@ -2312,12 +2310,12 @@ void ObjectsManager::changeCharacterHead(PlayerCharacter oldCharacter, PlayerCha loc = &_vm->_globals._saveData->_samantha; loc->_pos.x = getSpriteX(0); loc->_pos.y = getSpriteY(0); - loc->field2 = 64; + loc->_startSpriteIndex = 64; loc->_location = _vm->_globals._screenId; loc->_zoomFactor = _sprite[0]._animationType; removeSprite(1); - addStaticSprite(_vm->_globals.TETE, loc->_pos, 1, 3, loc->_zoomFactor, 0, 20, 127); + addStaticSprite(_vm->_globals.TETE, loc->_pos, 1, 3, loc->_zoomFactor, false, 20, 127); animateSprite(1); removeSprite(0); @@ -2328,7 +2326,7 @@ void ObjectsManager::changeCharacterHead(PlayerCharacter oldCharacter, PlayerCha loc = &_vm->_globals._saveData->_realHopkins; _vm->_globals.PERSO = _vm->_fileManager.loadFile("PERSO.SPR"); _vm->_globals.PERSO_TYPE = 0; - addStaticSprite(_vm->_globals.PERSO, loc->_pos, 0, 64, loc->_zoomFactor, 0, 34, 190); + addStaticSprite(_vm->_globals.PERSO, loc->_pos, 0, 64, loc->_zoomFactor, false, 34, 190); animateSprite(0); _vm->_globals.loadCharacterData(); } else if (oldCharacter == CHARACTER_HOPKINS && newCharacter == CHARACTER_SAMANTHA @@ -2337,12 +2335,12 @@ void ObjectsManager::changeCharacterHead(PlayerCharacter oldCharacter, PlayerCha loc = &_vm->_globals._saveData->_realHopkins; loc->_pos.x = getSpriteX(0); loc->_pos.y = getSpriteY(0); - loc->field2 = 64; + loc->_startSpriteIndex = 64; loc->_location = _vm->_globals._screenId; loc->_zoomFactor = _sprite[0]._zoomFactor; removeSprite(1); - addStaticSprite(_vm->_globals.TETE, loc->_pos, 1, 2, loc->_zoomFactor, 0, 34, 190); + addStaticSprite(_vm->_globals.TETE, loc->_pos, 1, 2, loc->_zoomFactor, false, 34, 190); animateSprite(1); removeSprite(0); @@ -2353,7 +2351,7 @@ void ObjectsManager::changeCharacterHead(PlayerCharacter oldCharacter, PlayerCha loc = &_vm->_globals._saveData->_samantha; _vm->_globals.PERSO = _vm->_fileManager.loadFile("PSAMAN.SPR"); _vm->_globals.PERSO_TYPE = 2; - addStaticSprite(_vm->_globals.PERSO, loc->_pos, 0, 64, loc->_zoomFactor, 0, 20, 127); + addStaticSprite(_vm->_globals.PERSO, loc->_pos, 0, 64, loc->_zoomFactor, false, 20, 127); animateSprite(0); _vm->_globals.loadCharacterData(); } else { @@ -2362,7 +2360,7 @@ void ObjectsManager::changeCharacterHead(PlayerCharacter oldCharacter, PlayerCha loc = &_vm->_globals._saveData->_realHopkins; loc->_pos.x = getSpriteX(0); loc->_pos.y = getSpriteY(0); - loc->field2 = 64; + loc->_startSpriteIndex = 64; loc->_location = _vm->_globals._screenId; loc->_zoomFactor = _sprite[0]._zoomFactor; break; @@ -2370,7 +2368,7 @@ void ObjectsManager::changeCharacterHead(PlayerCharacter oldCharacter, PlayerCha loc = &_vm->_globals._saveData->_cloneHopkins; loc->_pos.x = getSpriteX(0); loc->_pos.y = getSpriteY(0); - loc->field2 = 64; + loc->_startSpriteIndex = 64; loc->_location = _vm->_globals._screenId; loc->_zoomFactor = _sprite[0]._zoomFactor; break; @@ -2378,7 +2376,7 @@ void ObjectsManager::changeCharacterHead(PlayerCharacter oldCharacter, PlayerCha loc = &_vm->_globals._saveData->_samantha; loc->_pos.x = getSpriteX(0); loc->_pos.y = getSpriteY(0); - loc->field2 = 64; + loc->_startSpriteIndex = 64; loc->_location = _vm->_globals._screenId; loc->_zoomFactor = _sprite[0]._zoomFactor; break; @@ -3358,23 +3356,23 @@ void ObjectsManager::ACTION_DOS(int idx) { _vm->_globals.GESTE = _vm->_fileManager.loadFile("DOS.SPR"); } if (idx == 1) - ACTION(_vm->_globals.GESTE, "0,1,2,3,4,5,6,7,8,8,8,8,8,8,7,6,5,4,3,2,1,0,-1,", 0, 0, 8, 0); + ACTION(_vm->_globals.GESTE, "0,1,2,3,4,5,6,7,8,8,8,8,8,8,7,6,5,4,3,2,1,0,-1,", 0, 0, 8, false); if (idx == 2) - SPACTION(_vm->_globals.GESTE, "0,1,2,3,4,5,6,7,8,9,10,11,12,13,-1,", 0, 0, 8, 0); + SPACTION(_vm->_globals.GESTE, "0,1,2,3,4,5,6,7,8,9,10,11,12,13,-1,", 0, 0, 8, false); if (idx == 3) SPACTION1(_vm->_globals.GESTE, "12,11,10,9,8,7,6,5,4,3,2,1,0,-1,", 0, 0, 8); if (idx == 4) - ACTION(_vm->_globals.GESTE, "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,", 0, 0, 8, 0); + ACTION(_vm->_globals.GESTE, "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,", 0, 0, 8, false); if (idx == 5) - SPACTION(_vm->_globals.GESTE, "15,16,17,18,19,20,21,-1,", 0, 0, 8, 0); + SPACTION(_vm->_globals.GESTE, "15,16,17,18,19,20,21,-1,", 0, 0, 8, false); if (idx == 6) SPACTION1(_vm->_globals.GESTE, "20,19,18,17,16,15,-1,", 0, 0, 8); if (idx == 7) - SPACTION(_vm->_globals.GESTE, "15,16,17,18,19,20,21,22,23,24,-1,", 0, 0, 8, 0); + SPACTION(_vm->_globals.GESTE, "15,16,17,18,19,20,21,22,23,24,-1,", 0, 0, 8, false); if (idx == 8) SPACTION1(_vm->_globals.GESTE, "23,22,21,20,19,18,17,16,15,-1,", 0, 0, 8); if (idx == 9) - SPACTION(_vm->_globals.GESTE, "15,16,17,18,19,20,21,22,23,24,-1,", 0, 0, 8, 0); + SPACTION(_vm->_globals.GESTE, "15,16,17,18,19,20,21,22,23,24,-1,", 0, 0, 8, false); if (idx == 10) SPACTION1(_vm->_globals.GESTE, "23,22,21,20,19,18,17,16,15,-1,", 0, 0, 8); } @@ -3386,23 +3384,23 @@ void ObjectsManager::ACTION_DROITE(int idx) { _vm->_globals.GESTE = _vm->_fileManager.loadFile("PROFIL.SPR"); } if (idx == 1) - ACTION(_vm->_globals.GESTE, "20,19,18,17,16,15,14,13,13,13,13,13,14,15,16,17,18,19,20,-1,", 0, 0, 8, 0); + ACTION(_vm->_globals.GESTE, "20,19,18,17,16,15,14,13,13,13,13,13,14,15,16,17,18,19,20,-1,", 0, 0, 8, false); if (idx == 2) - SPACTION(_vm->_globals.GESTE, "1,2,3,4,5,6,7,8,-1,", 0, 0, 8, 0); + SPACTION(_vm->_globals.GESTE, "1,2,3,4,5,6,7,8,-1,", 0, 0, 8, false); if (idx == 3) SPACTION1(_vm->_globals.GESTE, "9,10,11,12,13,14,15,16,17,18,19,20,-1,", 0, 0, 8); if (idx == 4) - ACTION(_vm->_globals.GESTE, "1,2,3,4,5,6,7,8,8,7,6,5,4,3,2,1,-1,", 0, 0, 8, 0); + ACTION(_vm->_globals.GESTE, "1,2,3,4,5,6,7,8,8,7,6,5,4,3,2,1,-1,", 0, 0, 8, false); if (idx == 5) - SPACTION(_vm->_globals.GESTE, "23,24,25,-1,", 0, 0, 8, 0); + SPACTION(_vm->_globals.GESTE, "23,24,25,-1,", 0, 0, 8, false); if (idx == 6) SPACTION1(_vm->_globals.GESTE, "24,,23,-1,", 0, 0, 8); if (idx == 7) - SPACTION(_vm->_globals.GESTE, "23,24,25,26,27,-1,", 0, 0, 8, 0); + SPACTION(_vm->_globals.GESTE, "23,24,25,26,27,-1,", 0, 0, 8, false); if (idx == 8) SPACTION1(_vm->_globals.GESTE, "26,25,24,23,-1,", 0, 0, 8); if (idx == 9) - SPACTION(_vm->_globals.GESTE, "23,24,25,26,27,28,29,-1,", 0, 0, 8, 0); + SPACTION(_vm->_globals.GESTE, "23,24,25,26,27,28,29,-1,", 0, 0, 8, false); if (idx == 10) SPACTION1(_vm->_globals.GESTE, "28,27,26,25,24,23,-1,", 0, 0, 8); } @@ -3414,23 +3412,23 @@ void ObjectsManager::Q_DROITE(int idx) { _vm->_globals.GESTE = _vm->_fileManager.loadFile("3Q.SPR"); } if (idx == 1) - ACTION(_vm->_globals.GESTE, "0,1,2,3,4,5,6,7,8,8,8,8,8,7,6,5,4,3,2,1,0,-1,", 0, 0, 8, 0); + ACTION(_vm->_globals.GESTE, "0,1,2,3,4,5,6,7,8,8,8,8,8,7,6,5,4,3,2,1,0,-1,", 0, 0, 8, false); if (idx == 2) - SPACTION(_vm->_globals.GESTE, "0,1,2,3,4,5,6,7,8,9,10,11,12,-1,", 0, 0, 8, 0); + SPACTION(_vm->_globals.GESTE, "0,1,2,3,4,5,6,7,8,9,10,11,12,-1,", 0, 0, 8, false); if (idx == 3) SPACTION1(_vm->_globals.GESTE, "11,10,9,8,7,6,5,4,3,2,1,0,-1,", 0, 0, 8); if (idx == 4) - ACTION(_vm->_globals.GESTE, "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,", 0, 0, 8, 0); + ACTION(_vm->_globals.GESTE, "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,", 0, 0, 8, false); if (idx == 5) - SPACTION(_vm->_globals.GESTE, "15,16,17,18,-1,", 0, 0, 8, 0); + SPACTION(_vm->_globals.GESTE, "15,16,17,18,-1,", 0, 0, 8, false); if (idx == 6) SPACTION1(_vm->_globals.GESTE, "17,16,15,-1,", 0, 0, 8); if (idx == 7) - SPACTION(_vm->_globals.GESTE, "15,16,17,18,19,20-1,", 0, 0, 8, 0); + SPACTION(_vm->_globals.GESTE, "15,16,17,18,19,20-1,", 0, 0, 8, false); if (idx == 8) SPACTION1(_vm->_globals.GESTE, "19,18,17,16,15,-1,", 0, 0, 8); if (idx == 9) - SPACTION(_vm->_globals.GESTE, "15,16,17,18,19,20,21,-1,", 0, 0, 8, 0); + SPACTION(_vm->_globals.GESTE, "15,16,17,18,19,20,21,-1,", 0, 0, 8, false); if (idx == 10) SPACTION1(_vm->_globals.GESTE, "20,19,18,17,15,-1,", 0, 0, 8); } @@ -3442,13 +3440,13 @@ void ObjectsManager::ACTION_FACE(int idx) { _vm->_globals.GESTE = _vm->_fileManager.loadFile("FACE.SPR"); } if (idx == 1) - ACTION(_vm->_globals.GESTE, "0,1,2,3,4,5,6,7,9,9,9,9,9,9,7,6,5,4,3,2,1,0,-1,", 0, 0, 8, 0); + ACTION(_vm->_globals.GESTE, "0,1,2,3,4,5,6,7,9,9,9,9,9,9,7,6,5,4,3,2,1,0,-1,", 0, 0, 8, false); if (idx == 2) - SPACTION(_vm->_globals.GESTE, "0,1,2,3,4,5,6,7,9,10,11,12,13,14,15,-1,", 0, 0, 8, 0); + SPACTION(_vm->_globals.GESTE, "0,1,2,3,4,5,6,7,9,10,11,12,13,14,15,-1,", 0, 0, 8, false); if (idx == 3) SPACTION1(_vm->_globals.GESTE, "14,13,12,11,10,9,7,6,5,4,3,2,1,0,-1,", 0, 0, 8); if (idx == 4) - ACTION(_vm->_globals.GESTE, "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,", 0, 0, 8, 0); + ACTION(_vm->_globals.GESTE, "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,", 0, 0, 8, false); } void ObjectsManager::Q_GAUCHE(int idx) { @@ -3458,23 +3456,23 @@ void ObjectsManager::Q_GAUCHE(int idx) { _vm->_globals.GESTE = _vm->_fileManager.loadFile("3Q.SPR"); } if (idx == 1) - ACTION(_vm->_globals.GESTE, "0,1,2,3,4,5,6,7,8,8,8,8,8,7,6,5,4,3,2,1,0,-1,", 0, 0, 8, 1); + ACTION(_vm->_globals.GESTE, "0,1,2,3,4,5,6,7,8,8,8,8,8,7,6,5,4,3,2,1,0,-1,", 0, 0, 8, true); if (idx == 2) - SPACTION(_vm->_globals.GESTE, "0,1,2,3,4,5,6,7,8,9,10,11,12,-1,", 0, 0, 8, 1); + SPACTION(_vm->_globals.GESTE, "0,1,2,3,4,5,6,7,8,9,10,11,12,-1,", 0, 0, 8, true); if (idx == 3) SPACTION1(_vm->_globals.GESTE, "11,10,9,8,7,6,5,4,3,2,1,0,-1,", 0, 0, 8); if (idx == 4) - ACTION(_vm->_globals.GESTE, "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,", 0, 0, 8, 1); + ACTION(_vm->_globals.GESTE, "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,", 0, 0, 8, true); if (idx == 5) - SPACTION(_vm->_globals.GESTE, "15,16,17,18,-1,", 0, 0, 8, 1); + SPACTION(_vm->_globals.GESTE, "15,16,17,18,-1,", 0, 0, 8, true); if (idx == 6) SPACTION1(_vm->_globals.GESTE, "17,16,15,-1,", 0, 0, 8); if (idx == 7) - SPACTION(_vm->_globals.GESTE, "15,16,17,18,19,20,-1,", 0, 0, 8, 1); + SPACTION(_vm->_globals.GESTE, "15,16,17,18,19,20,-1,", 0, 0, 8, true); if (idx == 8) SPACTION1(_vm->_globals.GESTE, "19,18,17,16,15,-1,", 0, 0, 8); if (idx == 9) - SPACTION(_vm->_globals.GESTE, "15,16,17,18,19,20,21,-1,", 0, 0, 8, 1); + SPACTION(_vm->_globals.GESTE, "15,16,17,18,19,20,21,-1,", 0, 0, 8, true); if (idx == 10) SPACTION1(_vm->_globals.GESTE, "20,19,18,17,15,-1,", 0, 0, 8); } @@ -3486,23 +3484,23 @@ void ObjectsManager::ACTION_GAUCHE(int idx) { _vm->_globals.GESTE = _vm->_fileManager.loadFile("PROFIL.SPR"); } if (idx == 1) - ACTION(_vm->_globals.GESTE, "20,19,18,17,16,15,14,13,13,13,13,13,14,15,16,17,18,19,20,-1,", 0, 0, 8, 1); + ACTION(_vm->_globals.GESTE, "20,19,18,17,16,15,14,13,13,13,13,13,14,15,16,17,18,19,20,-1,", 0, 0, 8, true); if (idx == 2) - SPACTION(_vm->_globals.GESTE, "1,2,3,4,5,6,7,8,-1,", 0, 0, 8, 1); + SPACTION(_vm->_globals.GESTE, "1,2,3,4,5,6,7,8,-1,", 0, 0, 8, true); if (idx == 3) SPACTION1(_vm->_globals.GESTE, "9,10,11,12,13,14,15,16,17,18,19,20,-1,", 0, 0, 8); if (idx == 4) - ACTION(_vm->_globals.GESTE, "1,2,3,4,5,6,7,8,8,7,6,5,4,3,2,1,-1,", 0, 0, 8, 1); + ACTION(_vm->_globals.GESTE, "1,2,3,4,5,6,7,8,8,7,6,5,4,3,2,1,-1,", 0, 0, 8, true); if (idx == 5) - SPACTION(_vm->_globals.GESTE, "23,24,25,-1,", 0, 0, 8, 1); + SPACTION(_vm->_globals.GESTE, "23,24,25,-1,", 0, 0, 8, true); if (idx == 6) SPACTION1(_vm->_globals.GESTE, "24,,23,-1,", 0, 0, 8); if (idx == 7) - SPACTION(_vm->_globals.GESTE, "23,24,25,26,27,-1,", 0, 0, 8, 1); + SPACTION(_vm->_globals.GESTE, "23,24,25,26,27,-1,", 0, 0, 8, true); if (idx == 8) SPACTION1(_vm->_globals.GESTE, "26,25,24,23,-1,", 0, 0, 8); if (idx == 9) - SPACTION(_vm->_globals.GESTE, "23,24,25,26,27,28,29,-1,", 0, 0, 8, 1); + SPACTION(_vm->_globals.GESTE, "23,24,25,26,27,28,29,-1,", 0, 0, 8, true); if (idx == 10) SPACTION1(_vm->_globals.GESTE, "28,27,26,25,24,23,-1,", 0, 0, 8); } @@ -4088,7 +4086,7 @@ int ObjectsManager::colision(int xp, int yp) { return -1; } -void ObjectsManager::ACTION(const byte *spriteData, const Common::String &a2, int a3, int a4, int speed, int a6) { +void ObjectsManager::ACTION(const byte *spriteData, const Common::String &a2, int a3, int a4, int speed, bool flipFl) { bool tokenCompleteFl; char curChar; int spriteIndex; @@ -4103,10 +4101,10 @@ void ObjectsManager::ACTION(const byte *spriteData, const Common::String &a2, in realSpeed = speed / 3; const byte *oldSpriteData = _sprite[0]._spriteData; spriteIndex = _sprite[0]._spriteIndex; - int oldFieldE = _sprite[0].fieldE; + bool oldFlipFl = _sprite[0]._flipFl; _sprite[0].field12 += a3; _sprite[0].field14 += a4; - _sprite[0].fieldE = a6; + _sprite[0]._flipFl = flipFl; for (;;) { tokenCompleteFl = false; @@ -4126,7 +4124,7 @@ void ObjectsManager::ACTION(const byte *spriteData, const Common::String &a2, in _sprite[0]._spriteIndex = spriteIndex; _sprite[0].field12 -= a3; _sprite[0].field14 -= a4; - _sprite[0].fieldE = oldFieldE; + _sprite[0]._flipFl = oldFlipFl; } else { _sprite[0]._spriteData = spriteData; _sprite[0]._spriteIndex = idx; @@ -4139,7 +4137,7 @@ void ObjectsManager::ACTION(const byte *spriteData, const Common::String &a2, in } } -void ObjectsManager::SPACTION(byte *a1, const Common::String &animationSeq, int a3, int a4, int speed, int a6) { +void ObjectsManager::SPACTION(byte *a1, const Common::String &animationSeq, int a3, int a4, int speed, bool flipFl) { int spriteIndex = 0; Common::String tmpStr = ""; @@ -4151,10 +4149,10 @@ void ObjectsManager::SPACTION(byte *a1, const Common::String &animationSeq, int S_old_spr = _sprite[0]._spriteData; _oldSpriteIndex = _sprite[0]._spriteIndex; - S_old_ret = _sprite[0].fieldE; + _oldFlipFl = _sprite[0]._flipFl; _sprite[0].field12 += a3; _sprite[0].field14 += a4; - _sprite[0].fieldE = a6; + _sprite[0]._flipFl = flipFl; uint strPos = 0; char nextChar; @@ -4217,7 +4215,7 @@ void ObjectsManager::SPACTION1(byte *spriteData, const Common::String &animStrin _sprite[0]._spriteIndex = _oldSpriteIndex; _sprite[0].field12 -= a3; _sprite[0].field14 -= a4; - _sprite[0].fieldE = S_old_ret; + _sprite[0]._flipFl = _oldFlipFl; } else { _sprite[0]._spriteData = spriteData; _sprite[0]._spriteIndex = spriteIndex; @@ -4349,7 +4347,7 @@ void ObjectsManager::PERSONAGE(const Common::String &backgroundFile, const Commo } _vm->_eventsManager.mouseOn(); if (_vm->_globals._screenId == 61) { - addStaticSprite(_vm->_globals.PERSO, Common::Point(330, 418), 0, 60, 0, 0, 34, 190); + addStaticSprite(_vm->_globals.PERSO, Common::Point(330, 418), 0, 60, 0, false, 34, 190); animateSprite(0); _vm->_globals.chemin = (int16 *)g_PTRNUL; computeAndSetSpriteSize(); @@ -4464,13 +4462,13 @@ void ObjectsManager::PERSONAGE2(const Common::String &backgroundFile, const Comm _vm->_globals.loadCharacterData(); switch (_vm->_globals.PERSO_TYPE) { case 0: - addStaticSprite(_vm->_globals.PERSO, _characterPos, 0, PERI, 0, 0, 34, 190); + addStaticSprite(_vm->_globals.PERSO, _characterPos, 0, _startSpriteIndex, 0, false, 34, 190); break; case 1: - addStaticSprite(_vm->_globals.PERSO, _characterPos, 0, PERI, 0, 0, 28, 155); + addStaticSprite(_vm->_globals.PERSO, _characterPos, 0, _startSpriteIndex, 0, false, 28, 155); break; case 2: - addStaticSprite(_vm->_globals.PERSO, _characterPos, 0, PERI, 0, 0, 20, 127); + addStaticSprite(_vm->_globals.PERSO, _characterPos, 0, _startSpriteIndex, 0, false, 20, 127); break; } _vm->_eventsManager.setMouseXY(_characterPos); diff --git a/engines/hopkins/objects.h b/engines/hopkins/objects.h index f45fc91eab..61e87bca88 100644 --- a/engines/hopkins/objects.h +++ b/engines/hopkins/objects.h @@ -36,7 +36,7 @@ struct SpriteItem { const byte *_spriteData; Common::Point _spritePos; int _zoomFactor; - int fieldE; + bool _flipFl; int _spriteIndex; int field12; int field14; @@ -85,12 +85,12 @@ public: bool _disableFl; bool _twoCharactersFl; Common::Point _characterPos; - int PERI; + int _startSpriteIndex; bool OBSSEUL; int _jumpVerb; int _jumpZone; int _oldSpriteIndex; - int S_old_ret; + bool _oldFlipFl; public: ObjectsManager(); void setParent(HopkinsEngine *vm); @@ -136,7 +136,7 @@ public: int getSpriteY(int idx); void clearSprite(); void animateSprite(int idx); - void addStaticSprite(const byte *spriteData, Common::Point pos, int idx, int spriteIndex, int zoomFactor, int a7, int a8, int a9); + void addStaticSprite(const byte *spriteData, Common::Point pos, int idx, int spriteIndex, int zoomFactor, bool flipFl, int a8, int a9); void removeSprite(int idx); void setSpriteX(int idx, int xp); void setSpriteIndex(int idx, int spriteIndex); @@ -203,8 +203,8 @@ public: int CALC_PROPRE(int idx); int colision(int xp, int yp); - void ACTION(const byte *spriteData, const Common::String &a2, int a3, int a4, int speed, int a6); - void SPACTION(byte *a1, const Common::String &animationSeq, int a3, int a4, int speed, int a6); + void ACTION(const byte *spriteData, const Common::String &a2, int a3, int a4, int speed, bool flipFl); + void SPACTION(byte *a1, const Common::String &animationSeq, int a3, int a4, int speed, bool flipFl); void SPACTION1(byte *spriteData, const Common::String &animString, int a3, int a4, int speed); void handleForest(int screenId, int minX, int maxX, int minY, int maxY, int idx); void lockAnimX(int idx, int a2); diff --git a/engines/hopkins/saveload.cpp b/engines/hopkins/saveload.cpp index b90a7a0436..e692aef81c 100644 --- a/engines/hopkins/saveload.cpp +++ b/engines/hopkins/saveload.cpp @@ -277,7 +277,7 @@ void SaveLoadManager::syncSavegameData(Common::Serializer &s, int version) { void SaveLoadManager::syncCharacterLocation(Common::Serializer &s, CharacterLocation &item) { s.syncAsSint16LE(item._pos.x); s.syncAsSint16LE(item._pos.y); - s.syncAsSint16LE(item.field2); + s.syncAsSint16LE(item._startSpriteIndex); s.syncAsSint16LE(item._location); s.syncAsSint16LE(item._zoomFactor); } diff --git a/engines/hopkins/script.cpp b/engines/hopkins/script.cpp index 1fc61f7ebe..cd871b59a8 100644 --- a/engines/hopkins/script.cpp +++ b/engines/hopkins/script.cpp @@ -196,26 +196,26 @@ int ScriptManager::handleOpcode(byte *dataP) { _vm->_objectsManager._twoCharactersFl = false; _vm->_objectsManager._characterPos.x = (int16)READ_LE_UINT16(dataP + 6); _vm->_objectsManager._characterPos.y = (int16)READ_LE_UINT16(dataP + 8); - _vm->_objectsManager.PERI = dataP[5]; + _vm->_objectsManager._startSpriteIndex = dataP[5]; if (_vm->_objectsManager._changeHeadFl) { if (_vm->_globals._saveData->_data[svField354] == 1 && _vm->_globals._saveData->_cloneHopkins._pos.x && _vm->_globals._saveData->_cloneHopkins._pos.y - && _vm->_globals._saveData->_cloneHopkins.field2 && _vm->_globals._saveData->_cloneHopkins._location) { + && _vm->_globals._saveData->_cloneHopkins._startSpriteIndex && _vm->_globals._saveData->_cloneHopkins._location) { _vm->_objectsManager._characterPos = _vm->_globals._saveData->_cloneHopkins._pos; - _vm->_objectsManager.PERI = _vm->_globals._saveData->_cloneHopkins.field2; + _vm->_objectsManager._startSpriteIndex = _vm->_globals._saveData->_cloneHopkins._startSpriteIndex; } if (_vm->_globals._saveData->_data[svField356] == 1 && _vm->_globals._saveData->_samantha._pos.x && _vm->_globals._saveData->_samantha._pos.y - && _vm->_globals._saveData->_samantha.field2 && _vm->_globals._saveData->_samantha._location) { + && _vm->_globals._saveData->_samantha._startSpriteIndex && _vm->_globals._saveData->_samantha._location) { _vm->_objectsManager._characterPos = _vm->_globals._saveData->_samantha._pos; - _vm->_objectsManager.PERI = _vm->_globals._saveData->_samantha.field2; + _vm->_objectsManager._startSpriteIndex = _vm->_globals._saveData->_samantha._startSpriteIndex; } if (_vm->_globals._saveData->_data[svField357] == 1 && _vm->_globals._saveData->_realHopkins._pos.x && _vm->_globals._saveData->_realHopkins._pos.y - && _vm->_globals._saveData->_realHopkins.field2 && _vm->_globals._saveData->_realHopkins._location) { + && _vm->_globals._saveData->_realHopkins._startSpriteIndex && _vm->_globals._saveData->_realHopkins._location) { _vm->_objectsManager._characterPos = _vm->_globals._saveData->_realHopkins._pos; - _vm->_objectsManager.PERI = _vm->_globals._saveData->_realHopkins.field2; + _vm->_objectsManager._startSpriteIndex = _vm->_globals._saveData->_realHopkins._startSpriteIndex; } } if (_vm->_globals._saveData->_data[svField356] == 1 @@ -226,7 +226,7 @@ int ScriptManager::handleOpcode(byte *dataP) { 1, 2, _vm->_globals._saveData->_realHopkins._zoomFactor, - 0, + false, 34, 190); _vm->_objectsManager.animateSprite(1); @@ -241,7 +241,7 @@ int ScriptManager::handleOpcode(byte *dataP) { 1, 3, _vm->_globals._saveData->_samantha._zoomFactor, - 0, + false, 20, 127); _vm->_objectsManager.animateSprite(1); @@ -2179,7 +2179,7 @@ int ScriptManager::handleOpcode(byte *dataP) { CharacterLocation *v51 = &_vm->_globals._saveData->_realHopkins; v51->_pos.x = _vm->_objectsManager.getSpriteX(0); v51->_pos.y = _vm->_objectsManager.getSpriteY(0); - v51->field2 = 57; + v51->_startSpriteIndex = 57; v51->_location = 97; _vm->_globals._saveData->_data[svField121] = 1; _vm->_globals._saveData->_data[svField352] = 1; @@ -2201,7 +2201,7 @@ int ScriptManager::handleOpcode(byte *dataP) { CharacterLocation *v53 = &_vm->_globals._saveData->_samantha; v53->_pos.x = 404; v53->_pos.y = 395; - v53->field2 = 64; + v53->_startSpriteIndex = 64; v53->_location = _vm->_globals._screenId; int v54 = _vm->_globals.STAILLE[790 / 2]; @@ -2214,7 +2214,7 @@ int ScriptManager::handleOpcode(byte *dataP) { _vm->_globals._saveData->_data[svField355] = 1; _vm->_objectsManager._twoCharactersFl = true; _vm->_graphicsManager.fastDisplay(_vm->_globals.SPRITE_ECRAN, 373, 191, 3); - _vm->_objectsManager.addStaticSprite(_vm->_globals.TETE, v53->_pos, 1, 3, v53->_zoomFactor, 0, 20, 127); + _vm->_objectsManager.addStaticSprite(_vm->_globals.TETE, v53->_pos, 1, 3, v53->_zoomFactor, false, 20, 127); _vm->_objectsManager.animateSprite(1); break; } diff --git a/engines/hopkins/talk.cpp b/engines/hopkins/talk.cpp index 23b9dcf0a2..39b4580fcf 100644 --- a/engines/hopkins/talk.cpp +++ b/engines/hopkins/talk.cpp @@ -626,7 +626,7 @@ void TalkManager::BOB_VISU_PARLE(int idx) { 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]._flipFl = false; _vm->_globals._bob[idx]._animData = _vm->_globals.Bqe_Anim[idx]._data; _vm->_globals._bob[idx].field0 = 10; v5 = _characterSprite; @@ -912,7 +912,7 @@ void TalkManager::REPONSE2(int a1, int a2) { if (a1 == 22 || a1 == 23) { _vm->_objectsManager.setFlipSprite(0, false); _vm->_objectsManager.setSpriteIndex(0, 62); - _vm->_objectsManager.SPACTION(_vm->_globals._forestSprite, "2,3,4,5,6,7,8,9,10,11,12,-1,", 0, 0, 4, 0); + _vm->_objectsManager.SPACTION(_vm->_globals._forestSprite, "2,3,4,5,6,7,8,9,10,11,12,-1,", 0, 0, 4, false); if (a1 == 22) { _vm->_objectsManager.lockAnimX(6, _vm->_objectsManager.getBobPosX(3)); _vm->_objectsManager.lockAnimX(8, _vm->_objectsManager.getBobPosX(3)); @@ -960,7 +960,7 @@ void TalkManager::REPONSE2(int a1, int a2) { } else if (a1 == 20 || a1 == 21) { _vm->_objectsManager.setFlipSprite(0, true); _vm->_objectsManager.setSpriteIndex(0, 62); - _vm->_objectsManager.SPACTION(_vm->_globals._forestSprite, "2,3,4,5,6,7,8,9,10,11,12,-1,", 0, 0, 4, 1); + _vm->_objectsManager.SPACTION(_vm->_globals._forestSprite, "2,3,4,5,6,7,8,9,10,11,12,-1,", 0, 0, 4, true); if (a1 == 20) { _vm->_objectsManager.lockAnimX(5, _vm->_objectsManager.getBobPosX(1)); _vm->_objectsManager.lockAnimX(7, _vm->_objectsManager.getBobPosX(1)); |