diff options
author | Strangerke | 2012-12-26 07:56:26 +0100 |
---|---|---|
committer | Strangerke | 2012-12-26 07:56:26 +0100 |
commit | c7b49ac8838cfe7931752ceb635f39fbf29c43ff (patch) | |
tree | a82f5d2e99613f67b332003728ee70a72ff9d2df /engines | |
parent | 1efe969b66392db757818d7cee13e7e47e67338f (diff) | |
download | scummvm-rg350-c7b49ac8838cfe7931752ceb635f39fbf29c43ff.tar.gz scummvm-rg350-c7b49ac8838cfe7931752ceb635f39fbf29c43ff.tar.bz2 scummvm-rg350-c7b49ac8838cfe7931752ceb635f39fbf29c43ff.zip |
HOPKINS: Renaming
Diffstat (limited to 'engines')
-rw-r--r-- | engines/hopkins/events.cpp | 7 | ||||
-rw-r--r-- | engines/hopkins/events.h | 1 | ||||
-rw-r--r-- | engines/hopkins/hopkins.cpp | 24 | ||||
-rw-r--r-- | engines/hopkins/hopkins.h | 2 | ||||
-rw-r--r-- | engines/hopkins/objects.cpp | 30 | ||||
-rw-r--r-- | engines/hopkins/objects.h | 6 | ||||
-rw-r--r-- | engines/hopkins/script.cpp | 15 | ||||
-rw-r--r-- | engines/hopkins/talk.cpp | 10 |
8 files changed, 50 insertions, 45 deletions
diff --git a/engines/hopkins/events.cpp b/engines/hopkins/events.cpp index 418f4de28e..b56ce17e18 100644 --- a/engines/hopkins/events.cpp +++ b/engines/hopkins/events.cpp @@ -88,6 +88,13 @@ void EventsManager::setMouseOn() { /** * Set Mouse position */ +void EventsManager::setMouseXY(Common::Point pos) { + g_system->warpMouse(pos.x, pos.y); +} + +/** + * Set Mouse position + */ void EventsManager::setMouseXY(int xp, int yp) { g_system->warpMouse(xp, yp); } diff --git a/engines/hopkins/events.h b/engines/hopkins/events.h index 530a3f8121..8aa9a862d3 100644 --- a/engines/hopkins/events.h +++ b/engines/hopkins/events.h @@ -72,6 +72,7 @@ public: ~EventsManager(); void setParent(HopkinsEngine *vm); void setMouseOn(); + void setMouseXY(Common::Point pos); void setMouseXY(int xp, int yp); int getMouseX(); int getMouseY(); diff --git a/engines/hopkins/hopkins.cpp b/engines/hopkins/hopkins.cpp index ea67f57f63..0e40572838 100644 --- a/engines/hopkins/hopkins.cpp +++ b/engines/hopkins/hopkins.cpp @@ -5646,7 +5646,7 @@ void HopkinsEngine::OCEAN_HOME() { _objectsManager.setSpriteIndex(0, 9); } -void HopkinsEngine::OCEAN(int16 a1, Common::String a2, Common::String a3, int16 a4, int16 exit1, int16 exit2, int16 exit3, int16 exit4, int16 a9) { +void HopkinsEngine::OCEAN(int16 a1, Common::String a2, Common::String a3, int16 a4, int16 exit1, int16 exit2, int16 exit3, int16 exit4, int16 soundId) { _globals.PLAN_FLAG = false; _graphicsManager.NOFADE = false; _globals.NOMARCHE = false; @@ -5654,7 +5654,7 @@ void HopkinsEngine::OCEAN(int16 a1, Common::String a2, Common::String a3, int16 _globals.AFFLI = false; _globals.AFFIVBL = true; _globals._disableInventFl = true; - _soundManager.WSOUND(a9); + _soundManager.WSOUND(soundId); _fileManager.constructFilename(_globals.HOPSYSTEM, "VAISSEAU.SPR"); _globals.PERSO = _fileManager.loadFile(_globals.NFICHIER); if (a2.size()) @@ -5670,32 +5670,32 @@ void HopkinsEngine::OCEAN(int16 a1, Common::String a2, Common::String a3, int16 _objectsManager.INILINK("IM91"); if (!exit1) - _objectsManager.ZONE_OFF(1); + _objectsManager.disableZone(1); if (!exit2) - _objectsManager.ZONE_OFF(2); + _objectsManager.disableZone(2); if (!exit3) - _objectsManager.ZONE_OFF(3); + _objectsManager.disableZone(3); if (!exit4) - _objectsManager.ZONE_OFF(4); + _objectsManager.disableZone(4); if (!_globals.OCEAN_SENS) _globals.OCEAN_SENS = a4; if (_globals.OCEAN_SENS == 5) { - _objectsManager.PERX = 236; + _objectsManager._characterPos.x = 236; _objectsManager.PERI = 9; } if (_globals.OCEAN_SENS == 1) { - _objectsManager.PERX = 236; + _objectsManager._characterPos.x = 236; _objectsManager.PERI = 27; } if (_globals.OCEAN_SENS == 7) { - _objectsManager.PERX = 415; + _objectsManager._characterPos.x = 415; _objectsManager.PERI = 18; } if (_globals.OCEAN_SENS == 3) { - _objectsManager.PERX = -20; + _objectsManager._characterPos.x = -20; _objectsManager.PERI = 0; } - _objectsManager.SPRITE(_globals.PERSO, Common::Point(_objectsManager.PERX, 110), 0, _objectsManager.PERI, 0, 0, 0, 0); + _objectsManager.SPRITE(_globals.PERSO, Common::Point(_objectsManager._characterPos.x, 110), 0, _objectsManager.PERI, 0, 0, 0, 0); _graphicsManager.SETCOLOR3(252, 100, 100, 100); _graphicsManager.SETCOLOR3(253, 100, 100, 100); _graphicsManager.SETCOLOR3(251, 100, 100, 100); @@ -5718,7 +5718,7 @@ void HopkinsEngine::OCEAN(int16 a1, Common::String a2, Common::String a3, int16 int mouseButton = _eventsManager.getMouseButton(); if (mouseButton && mouseButton == 1) BTOCEAN(); - _objectsManager.VERIFZONE(); + _objectsManager.checkZone(); OCEAN_HOME(); _eventsManager.VBL(); if (_globals._exitId) diff --git a/engines/hopkins/hopkins.h b/engines/hopkins/hopkins.h index ce73c6a0c2..0c3011d952 100644 --- a/engines/hopkins/hopkins.h +++ b/engines/hopkins/hopkins.h @@ -105,7 +105,7 @@ private: void BTOCEAN(); void OCEAN_HOME(); - void OCEAN(int16 a1, Common::String a2, Common::String a3, int16 a4, int16 exit1, int16 exit2, int16 exit3, int16 exit4, int16 a9); + void OCEAN(int16 a1, Common::String a2, Common::String a3, int16 a4, int16 exit1, int16 exit2, int16 exit3, int16 exit4, int16 soundId); void loadCredits(); void displayCredits(int startPosY, byte *buffer, char colour); void displayCredits(); diff --git a/engines/hopkins/objects.cpp b/engines/hopkins/objects.cpp index 9ef7b5dd76..6beccf4db9 100644 --- a/engines/hopkins/objects.cpp +++ b/engines/hopkins/objects.cpp @@ -79,7 +79,7 @@ ObjectsManager::ObjectsManager() { T_RECTIF = 0; _disableFl = false; _twoCharactersFl = false; - PERX = PERY = 0; + _characterPos = Common::Point(0, 0); PERI = 0; RECALL = 0; PTAILLE = 0; @@ -1535,7 +1535,7 @@ void ObjectsManager::setFlipSprite(int idx, bool flip) { } } -void ObjectsManager::VERIFZONE() { +void ObjectsManager::checkZone() { int v0; int v1; int v2; @@ -2521,7 +2521,7 @@ void ObjectsManager::PLAN_BETA() { handleLeftButton(); } - VERIFZONE(); + checkZone(); GOHOME2(); if (_vm->_globals.chemin == (int16 *)g_PTRNUL && _vm->_globals.GOACTION) @@ -2619,7 +2619,7 @@ void ObjectsManager::handleLeftButton() { if (_vm->_globals.PLAN_FLAG == true) { if (!_vm->_globals.GOACTION) goto LABEL_38; - VERIFZONE(); + checkZone(); if (NUMZONE <= 0) return; v2 = 0; @@ -2637,7 +2637,7 @@ void ObjectsManager::handleLeftButton() { v5[v2 + 3] = -1; } if (_vm->_globals.GOACTION) { - VERIFZONE(); + checkZone(); _vm->_globals.GOACTION = false; _vm->_globals._saveData->data[svField1] = 0; _vm->_globals._saveData->data[svField2] = 0; @@ -4085,7 +4085,7 @@ void ObjectsManager::SPECIAL_JEU() { SET_BOBPOSI(5, 0); setBobAnimation(6); _vm->_globals._saveData->data[svField261] = 2; - ZONE_OFF(15); + disableZone(15); _vm->_soundManager.playSound("SOUND75.WAV"); } if (_vm->_globals._saveData->data[svField261] == 2 && BOBPOSI(6) == 6) { @@ -4345,7 +4345,7 @@ void ObjectsManager::ZONE_ON(int idx) { } } -void ObjectsManager::ZONE_OFF(int idx) { +void ObjectsManager::disableZone(int idx) { if (_vm->_globals.BOBZONE[idx]) { _vm->_globals.BOBZONE_FLAG[idx] = false; } else { @@ -5303,7 +5303,7 @@ void ObjectsManager::PERSONAGE(const Common::String &backgroundFile, const Commo if (v9 == 2) handleRightButton(); _vm->_dialogsManager.testDialogOpening(); - VERIFZONE(); + checkZone(); if (_vm->_globals.GOACTION) PARADISE(); if (!_vm->_globals._exitId) { @@ -5388,12 +5388,12 @@ LABEL_70: } _vm->_globals.HOPKINS_DATA(); if (!_vm->_globals.PERSO_TYPE) - SPRITE(_vm->_globals.PERSO, Common::Point(PERX, PERY), 0, PERI, 0, 0, 34, 190); + SPRITE(_vm->_globals.PERSO, _characterPos, 0, PERI, 0, 0, 34, 190); if (_vm->_globals.PERSO_TYPE == 1) - SPRITE(_vm->_globals.PERSO, Common::Point(PERX, PERY), 0, PERI, 0, 0, 28, 155); + SPRITE(_vm->_globals.PERSO, _characterPos, 0, PERI, 0, 0, 28, 155); if (_vm->_globals.PERSO_TYPE == 2) - SPRITE(_vm->_globals.PERSO, Common::Point(PERX, PERY), 0, PERI, 0, 0, 20, 127); - _vm->_eventsManager.setMouseXY(PERX, PERY); + SPRITE(_vm->_globals.PERSO, _characterPos, 0, PERI, 0, 0, 20, 127); + _vm->_eventsManager.setMouseXY(_characterPos); if (_vm->_graphicsManager.DOUBLE_ECRAN) _vm->_graphicsManager.SCROLL = (int16)getSpriteX(0) - 320; VERIFTAILLE(); @@ -5403,8 +5403,8 @@ LABEL_70: VERIFTAILLE(); SPECIAL_INI(linkFile); _vm->_eventsManager._mouseSpriteId = 4; - g_old_x = PERX; - g_old_y = PERY; + g_old_x = _characterPos.x; + g_old_y = _characterPos.y; _vm->_globals.g_old_sens = -1; _vm->_globals.Compteur = 0; _vm->_globals.BPP_NOAFF = true; @@ -5450,7 +5450,7 @@ LABEL_70: } if (!_vm->_globals._exitId) { _vm->_dialogsManager.testDialogOpening(); - VERIFZONE(); + checkZone(); if (_vm->_globals.chemin == (int16 *)g_PTRNUL || (GOHOME(), _vm->_globals.chemin == (int16 *)g_PTRNUL)) { if (_vm->_globals.GOACTION) diff --git a/engines/hopkins/objects.h b/engines/hopkins/objects.h index 8ad87ede17..e4081d7eac 100644 --- a/engines/hopkins/objects.h +++ b/engines/hopkins/objects.h @@ -104,7 +104,7 @@ public: int T_RECTIF; bool _disableFl; bool _twoCharactersFl; - int PERX, PERY; + Common::Point _characterPos; int PERI; int RECALL; int PTAILLE; @@ -174,7 +174,7 @@ public: void SETTAILLESPR(int idx, int a2); void setFlipSprite(int idx, bool flip); - void VERIFZONE(); + void checkZone(); void GOHOME(); void GOHOME2(); void CHARGE_OBSTACLE(const Common::String &file); @@ -214,7 +214,7 @@ public: void ACTION_GAUCHE(int idx); void ZONE_ON(int idx); - void ZONE_OFF(int idx); + void disableZone(int idx); 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); diff --git a/engines/hopkins/script.cpp b/engines/hopkins/script.cpp index 89c6d531ac..a519f81bdc 100644 --- a/engines/hopkins/script.cpp +++ b/engines/hopkins/script.cpp @@ -200,30 +200,27 @@ LABEL_1141: _vm->_objectsManager._twoCharactersFl = false; int v5 = *(dataP + 5); int v6 = (int16)READ_LE_UINT16(dataP + 8); - _vm->_objectsManager.PERX = (int16)READ_LE_UINT16(dataP + 6); - _vm->_objectsManager.PERY = v6; + _vm->_objectsManager._characterPos.x = (int16)READ_LE_UINT16(dataP + 6); + _vm->_objectsManager._characterPos.y = v6; _vm->_objectsManager.PERI = v5; if (_vm->_objectsManager.CH_TETE == 1) { 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->_objectsManager.PERX = _vm->_globals._saveData->_cloneHopkins._pos.x; - _vm->_objectsManager.PERY = _vm->_globals._saveData->_cloneHopkins._pos.y; + _vm->_objectsManager._characterPos = _vm->_globals._saveData->_cloneHopkins._pos; _vm->_objectsManager.PERI = _vm->_globals._saveData->_cloneHopkins.field2; } 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->_objectsManager.PERX = _vm->_globals._saveData->_samantha._pos.x; - _vm->_objectsManager.PERY = _vm->_globals._saveData->_samantha._pos.y; + _vm->_objectsManager._characterPos = _vm->_globals._saveData->_samantha._pos; _vm->_objectsManager.PERI = _vm->_globals._saveData->_samantha.field2; } 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->_objectsManager.PERX = _vm->_globals._saveData->_realHopkins._pos.x; - _vm->_objectsManager.PERY = _vm->_globals._saveData->_realHopkins._pos.y; + _vm->_objectsManager._characterPos = _vm->_globals._saveData->_realHopkins._pos; _vm->_objectsManager.PERI = _vm->_globals._saveData->_realHopkins.field2; } } @@ -484,7 +481,7 @@ LABEL_1141: _vm->_objectsManager.ZONE_ON((int16)READ_LE_UINT16(dataP + 5)); opcodeType = 1; } else if (dataP[2] == 'Z' && dataP[3] == 'O' && dataP[4] == 'F') { - _vm->_objectsManager.ZONE_OFF((int16)READ_LE_UINT16(dataP + 5)); + _vm->_objectsManager.disableZone((int16)READ_LE_UINT16(dataP + 5)); opcodeType = 1; } else if (dataP[2] == 'E' && dataP[3] == 'X' && dataP[4] == 'I') { opcodeType = 5; diff --git a/engines/hopkins/talk.cpp b/engines/hopkins/talk.cpp index e15beb3306..6c63fc8015 100644 --- a/engines/hopkins/talk.cpp +++ b/engines/hopkins/talk.cpp @@ -1084,8 +1084,8 @@ void TalkManager::REPONSE2(int a1, int a2) { break; } _vm->_globals._saveData->data[indx] = 2; - _vm->_objectsManager.ZONE_OFF(22); - _vm->_objectsManager.ZONE_OFF(23); + _vm->_objectsManager.disableZone(22); + _vm->_objectsManager.disableZone(23); } else if (a1 == 20 || a1 == 21) { _vm->_objectsManager.setFlipSprite(0, true); _vm->_objectsManager.setSpriteIndex(0, 62); @@ -1131,8 +1131,8 @@ void TalkManager::REPONSE2(int a1, int a2) { break; } _vm->_globals._saveData->data[indx] = 2; - _vm->_objectsManager.ZONE_OFF(21); - _vm->_objectsManager.ZONE_OFF(20); + _vm->_objectsManager.disableZone(21); + _vm->_objectsManager.disableZone(20); } } } @@ -1224,7 +1224,7 @@ void TalkManager::OBJET_VIVANT(const Common::String &a2) { } if (v12 == 2) _vm->_objectsManager.handleRightButton(); - _vm->_objectsManager.VERIFZONE(); + _vm->_objectsManager.checkZone(); if (_vm->_globals.GOACTION) _vm->_objectsManager.PARADISE(); _vm->_eventsManager.VBL(); |