diff options
author | Strangerke | 2016-03-14 07:40:03 +0100 |
---|---|---|
committer | Eugene Sandulenko | 2016-05-10 09:54:21 +0200 |
commit | 83bc85713bacd3a50daaace0411a3382c855797a (patch) | |
tree | b825953bb68b22f6fef096da65c2165dc6d3fb69 | |
parent | da2cb981d2d5a71fc9db04404569bfcc92fbfcf3 (diff) | |
download | scummvm-rg350-83bc85713bacd3a50daaace0411a3382c855797a.tar.gz scummvm-rg350-83bc85713bacd3a50daaace0411a3382c855797a.tar.bz2 scummvm-rg350-83bc85713bacd3a50daaace0411a3382c855797a.zip |
GNAP: More renaming. Remove unused variable in MouseButtonState and Hotspot
48 files changed, 468 insertions, 472 deletions
diff --git a/engines/gnap/gamesys.cpp b/engines/gnap/gamesys.cpp index 9909139ecf..1612ba2363 100644 --- a/engines/gnap/gamesys.cpp +++ b/engines/gnap/gamesys.cpp @@ -60,9 +60,9 @@ GameSys::GameSys(GnapEngine *vm) _backgroundSurface = 0; _frontSurface = 0; for (int i = 0; i < kMaxAnimations; ++i) { - _animations[i].sequenceId = -1; - _animations[i].id = 0; - _animations[i].status = 0; + _animations[i]._sequenceId = -1; + _animations[i]._id = 0; + _animations[i]._status = 0; } _screenRect = Common::Rect(0, 0, 800, 600); } @@ -330,16 +330,16 @@ void GameSys::fillSurface(Graphics::Surface *surface, int x, int y, int width, i void GameSys::setAnimation(int sequenceId, int id, int animationIndex) { if (animationIndex < kMaxAnimations) { - _animations[animationIndex].sequenceId = sequenceId; - _animations[animationIndex].id = id; - _animations[animationIndex].status = 0; + _animations[animationIndex]._sequenceId = sequenceId; + _animations[animationIndex]._id = id; + _animations[animationIndex]._status = 0; } } int GameSys::getAnimationStatus(int animationIndex) { int result = -1; if (animationIndex < kMaxAnimations) - result = _animations[animationIndex].status; + result = _animations[animationIndex]._status; return result; } @@ -505,8 +505,8 @@ void GameSys::seqInsertGfx(int index, int duration) { } for (int k = 0; k < kMaxAnimations; ++k) { - if (_animations[k].sequenceId != -1 && _animations[k].sequenceId == seqItem->_sequenceId && _animations[k].id == seqItem->_id) { - _animations[k].status = 1; + if (_animations[k]._sequenceId != -1 && _animations[k]._sequenceId == seqItem->_sequenceId && _animations[k]._id == seqItem->_id) { + _animations[k]._status = 1; break; } } @@ -572,7 +572,7 @@ void GameSys::updateAnimationsStatus(int sequenceId, int id) { Animation *foundAnimation = 0; for (int animationIndex = 0; animationIndex < kMaxAnimations; ++animationIndex) { Animation *animation = &_animations[animationIndex]; - if (animation->sequenceId != -1 && animation->sequenceId == sequenceId && animation->id == id) { + if (animation->_sequenceId != -1 && animation->_sequenceId == sequenceId && animation->_id == id) { foundAnimation = animation; break; } @@ -596,8 +596,8 @@ void GameSys::updateAnimationsStatus(int sequenceId, int id) { } if (foundSequence) { - foundAnimation->sequenceId = -1; - foundAnimation->status = 2; + foundAnimation->_sequenceId = -1; + foundAnimation->_status = 2; } } diff --git a/engines/gnap/gamesys.h b/engines/gnap/gamesys.h index cb6de0033b..043dec3c32 100644 --- a/engines/gnap/gamesys.h +++ b/engines/gnap/gamesys.h @@ -92,9 +92,9 @@ struct GfxItem { }; struct Animation { - int sequenceId; - int id; - int status; + int _sequenceId; + int _id; + int _status; }; class GameSys { @@ -135,8 +135,6 @@ public: SpriteDrawItem _newSpriteDrawItems[kMaxSpriteDrawItems]; int _newSpriteDrawItemsCount; - bool _spriteDrawItems1Changed; - RemoveSequenceItem _removeSequenceItems[kMaxSequenceItems]; int _removeSequenceItemsCount; @@ -166,7 +164,7 @@ public: int _backgroundImageValue3, _backgroundImageValue1; int _backgroundImageValue4, _backgroundImageValue2; - bool _backgroundImageError; + bool _backgroundImageError; // CHECKME: Unused int32 _gameSysClock, _lastUpdateClock; diff --git a/engines/gnap/gnap.cpp b/engines/gnap/gnap.cpp index a46b4c6cce..08861f4398 100644 --- a/engines/gnap/gnap.cpp +++ b/engines/gnap/gnap.cpp @@ -246,20 +246,20 @@ void GnapEngine::updateEvents() { _mouseY = event.mouse.y; break; case Common::EVENT_LBUTTONUP: - _mouseButtonState.left = false; + _mouseButtonState._left = false; break; case Common::EVENT_LBUTTONDOWN: _leftClickMouseX = event.mouse.x; _leftClickMouseY = event.mouse.y; - _mouseButtonState.left = true; - _mouseClickState.left = true; + _mouseButtonState._left = true; + _mouseClickState._left = true; break; case Common::EVENT_RBUTTONUP: - _mouseButtonState.right = false; + _mouseButtonState._right = false; break; case Common::EVENT_RBUTTONDOWN: - _mouseButtonState.right = true; - _mouseClickState.right = true; + _mouseButtonState._right = true; + _mouseClickState._right = true; break; case Common::EVENT_QUIT: quitGame(); @@ -331,8 +331,8 @@ void GnapEngine::resumeGame() { // TODO stopMidi(); _isPaused = false; clearAllKeyStatus1(); - _mouseClickState.left = false; - _mouseClickState.right = false; + _mouseClickState._left = false; + _mouseClickState._right = false; showCursor(); _gameSys->_gameSysClock = 0; _gameSys->_lastUpdateClock = 0; @@ -375,12 +375,12 @@ void GnapEngine::delayTicksCursor(int a1) { void GnapEngine::setHotspot(int index, int16 x1, int16 y1, int16 x2, int16 y2, uint16 flags, int16 walkX, int16 walkY) { - _hotspots[index].x1 = x1; - _hotspots[index].y1 = y1; - _hotspots[index].x2 = x2; - _hotspots[index].y2 = y2; - _hotspots[index].flags = flags; - _hotspots[index].id = index; + _hotspots[index]._x1 = x1; + _hotspots[index]._y1 = y1; + _hotspots[index]._x2 = x2; + _hotspots[index]._y2 = y2; + _hotspots[index]._flags = flags; + _hotspots[index]._id = index; _hotspotsWalkPos[index].x = walkX; _hotspotsWalkPos[index].y = walkY; } @@ -406,44 +406,44 @@ void GnapEngine::updateCursorByHotspot() { if (hotspotIndex < 0) setCursor(kDisabledCursors[_verbCursor]); - else if (_hotspots[hotspotIndex].flags & SF_EXIT_L_CURSOR) + else if (_hotspots[hotspotIndex]._flags & SF_EXIT_L_CURSOR) setCursor(EXIT_L_CURSOR); - else if (_hotspots[hotspotIndex].flags & SF_EXIT_R_CURSOR) + else if (_hotspots[hotspotIndex]._flags & SF_EXIT_R_CURSOR) setCursor(EXIT_R_CURSOR); - else if (_hotspots[hotspotIndex].flags & SF_EXIT_U_CURSOR) + else if (_hotspots[hotspotIndex]._flags & SF_EXIT_U_CURSOR) setCursor(EXIT_U_CURSOR); - else if (_hotspots[hotspotIndex].flags & SF_EXIT_D_CURSOR) + else if (_hotspots[hotspotIndex]._flags & SF_EXIT_D_CURSOR) setCursor(EXIT_D_CURSOR); - else if (_hotspots[hotspotIndex].flags & SF_EXIT_NE_CURSOR) + else if (_hotspots[hotspotIndex]._flags & SF_EXIT_NE_CURSOR) setCursor(EXIT_NE_CURSOR); - else if (_hotspots[hotspotIndex].flags & SF_EXIT_NW_CURSOR) + else if (_hotspots[hotspotIndex]._flags & SF_EXIT_NW_CURSOR) setCursor(EXIT_NW_CURSOR); - else if (_hotspots[hotspotIndex].flags & SF_EXIT_SE_CURSOR) + else if (_hotspots[hotspotIndex]._flags & SF_EXIT_SE_CURSOR) setCursor(EXIT_SE_CURSOR); - else if (_hotspots[hotspotIndex].flags & SF_EXIT_SW_CURSOR) + else if (_hotspots[hotspotIndex]._flags & SF_EXIT_SW_CURSOR) setCursor(EXIT_SW_CURSOR); - else if (_hotspots[hotspotIndex].flags & (1 << _verbCursor)) + else if (_hotspots[hotspotIndex]._flags & (1 << _verbCursor)) setCursor(kCursors[_verbCursor]); else setCursor(kDisabledCursors[_verbCursor]); } // Update platypus hotspot - _hotspots[0].x1 = _gridMinX + 75 * _platX - 30; - _hotspots[0].y1 = _gridMinY + 48 * _platY - 100; - _hotspots[0].x2 = _gridMinX + 75 * _platX + 30; - _hotspots[0].y2 = _gridMinY + 48 * _platY; + _hotspots[0]._x1 = _gridMinX + 75 * _platX - 30; + _hotspots[0]._y1 = _gridMinY + 48 * _platY - 100; + _hotspots[0]._x2 = _gridMinX + 75 * _platX + 30; + _hotspots[0]._y2 = _gridMinY + 48 * _platY; } int GnapEngine::getClickedHotspotId() { int result = -1; if (_isWaiting) - _mouseClickState.left = false; - else if (_mouseClickState.left) { + _mouseClickState._left = false; + else if (_mouseClickState._left) { int hotspotIndex = getHotspotIndexAtPos(_leftClickMouseX, _leftClickMouseY); if (hotspotIndex >= 0) { - _mouseClickState.left = false; + _mouseClickState._left = false; _timers[3] = 300; - result = _hotspots[hotspotIndex].id; + result = _hotspots[hotspotIndex]._id; } } return result; @@ -454,9 +454,9 @@ int GnapEngine::getInventoryItemSpriteNum(int index) { } void GnapEngine::updateMouseCursor() { - if (_mouseClickState.right) { + if (_mouseClickState._right) { // Switch through the verb cursors - _mouseClickState.right = false; + _mouseClickState._right = false; _timers[3] = 300; _verbCursor = (_verbCursor + 1) % 4; if (!isFlag(0) && _verbCursor == PLAT_CURSOR && _cursorValue == 1) @@ -592,11 +592,11 @@ void GnapEngine::showFullScreenSprite(int resourceId) { hideCursor(); setGrabCursorSprite(-1); addFullScreenSprite(resourceId, 256); - while (!_mouseClickState.left && !isKeyStatus1(Common::KEYCODE_ESCAPE) && + while (!_mouseClickState._left && !isKeyStatus1(Common::KEYCODE_ESCAPE) && !isKeyStatus1(Common::KEYCODE_SPACE) && !isKeyStatus1(29)) { gameUpdateTick(); } - _mouseClickState.left = false; + _mouseClickState._left = false; clearKeyStatus1(Common::KEYCODE_ESCAPE); clearKeyStatus1(29); clearKeyStatus1(Common::KEYCODE_SPACE); @@ -629,12 +629,12 @@ void GnapEngine::setDeviceHotspot(int hotspotIndex, int x1, int y1, int x2, int _deviceY1 = 14; if (y2 == -1) _deviceY2 = 79; - _hotspots[hotspotIndex].x1 = _deviceX1; - _hotspots[hotspotIndex].y1 = _deviceY1; - _hotspots[hotspotIndex].x2 = _deviceX2; - _hotspots[hotspotIndex].y2 = _deviceY2; - _hotspots[hotspotIndex].flags = SF_TALK_CURSOR | SF_GRAB_CURSOR | SF_LOOK_CURSOR; - _hotspots[hotspotIndex].id = hotspotIndex; + _hotspots[hotspotIndex]._x1 = _deviceX1; + _hotspots[hotspotIndex]._y1 = _deviceY1; + _hotspots[hotspotIndex]._x2 = _deviceX2; + _hotspots[hotspotIndex]._y2 = _deviceY2; + _hotspots[hotspotIndex]._flags = SF_TALK_CURSOR | SF_GRAB_CURSOR | SF_LOOK_CURSOR; + _hotspots[hotspotIndex]._id = hotspotIndex; } int GnapEngine::getSequenceTotalDuration(int resourceId) { @@ -819,8 +819,8 @@ void GnapEngine::initScene() { gnapInitBrainPulseRndValue(); hideCursor(); clearAllKeyStatus1(); - _mouseClickState.left = false; - _mouseClickState.right = false; + _mouseClickState._left = false; + _mouseClickState._right = false; _sceneClickedHotspot = -1; datFilename = Common::String::format("%s_n.dat", kSceneNames[_currentSceneNum]); @@ -886,8 +886,8 @@ void GnapEngine::afterScene() { clearKeyStatus1(Common::KEYCODE_p); - _mouseClickState.left = false; - _mouseClickState.right = false; + _mouseClickState._left = false; + _mouseClickState._right = false; } @@ -1720,14 +1720,14 @@ void GnapEngine::updateGnapIdleSequence2() { } bool GnapEngine::testWalk(int animationIndex, int someStatus, int gridX1, int gridY1, int gridX2, int gridY2) { - if (_mouseClickState.left && someStatus == _gnapActionStatus) { + if (_mouseClickState._left && someStatus == _gnapActionStatus) { _isLeavingScene = false; _gameSys->setAnimation(0, 0, animationIndex); _gnapActionStatus = -1; _beaverActionStatus = -1; gnapWalkTo(gridX1, gridY1, -1, -1, 1); platypusWalkTo(gridX2, gridY2, -1, -1, 1); - _mouseClickState.left = false; + _mouseClickState._left = false; return true; } return false; @@ -2358,7 +2358,7 @@ void GnapEngine::cutscene_run() { clearKeyStatus1(Common::KEYCODE_SPACE); clearKeyStatus1(29); - _mouseClickState.left = false; + _mouseClickState._left = false; int v1 = 0; while (!_sceneDone) { diff --git a/engines/gnap/gnap.h b/engines/gnap/gnap.h index 6b532a0141..7894ebd209 100644 --- a/engines/gnap/gnap.h +++ b/engines/gnap/gnap.h @@ -50,24 +50,21 @@ class GameSys; class SoundMan; struct MouseButtonState { - bool left; - bool right; - bool middle; - MouseButtonState() : left(false), right(false), middle(false) { + bool _left; + bool _right; + MouseButtonState() : _left(false), _right(false) { } }; struct Hotspot { - int16 x1, y1, x2, y2; - int16 field_10; - int16 field_12; - uint16 flags; - int id; + int16 _x1, _y1, _x2, _y2; + uint16 _flags; + int _id; bool isPointInside(int16 x, int16 y) const { - return x >= x1 && x <= x2 && y >= y1 && y <= y2; + return x >= _x1 && x <= _x2 && y >= _y1 && y <= _y2; } bool isFlag(uint16 flag) const { - return (flags & flag) != 0; + return (_flags & flag) != 0; } }; @@ -82,6 +79,7 @@ const int kMaxGridStructs = 30; const int kMaxTimers = 10; enum { + SF_NONE = 0x0000, SF_LOOK_CURSOR = 0x0001, SF_GRAB_CURSOR = 0x0002, SF_TALK_CURSOR = 0x0004, diff --git a/engines/gnap/grid.cpp b/engines/gnap/grid.cpp index 522c72c491..baf1a67f93 100644 --- a/engines/gnap/grid.cpp +++ b/engines/gnap/grid.cpp @@ -80,9 +80,9 @@ bool GnapEngine::isPointBlocked(int gridX, int gridY) { const int y = _gridMinY + 48 * gridY; for (int i = 0; i < _hotspotsCount; ++i) { - if (x >= _hotspots[i].x1 && x <= _hotspots[i].x2 && - y >= _hotspots[i].y1 && y <= _hotspots[i].y2 && - !(_hotspots[i].flags & SF_WALKABLE)) + if (x >= _hotspots[i]._x1 && x <= _hotspots[i]._x2 && + y >= _hotspots[i]._y1 && y <= _hotspots[i]._y2 && + !(_hotspots[i]._flags & SF_WALKABLE)) return true; } diff --git a/engines/gnap/menu.cpp b/engines/gnap/menu.cpp index 0b63ce110e..1a618fdc35 100644 --- a/engines/gnap/menu.cpp +++ b/engines/gnap/menu.cpp @@ -44,39 +44,39 @@ void GnapEngine::initMenuHotspots1() { for (int i = 0; i < 3; ++i) { int v1 = 0; while (v1 < 3) { - _hotspots[v2].x1 = 87 * v1 + 262; - _hotspots[v2].y1 = 74 * i + 69; - _hotspots[v2].x2 = _hotspots[v2].x1 + 79; - _hotspots[v2].y2 = _hotspots[v2].y1 + 66; - _hotspots[v2].flags = 0; - _hotspots[v2].id = v2; + _hotspots[v2]._x1 = 87 * v1 + 262; + _hotspots[v2]._y1 = 74 * i + 69; + _hotspots[v2]._x2 = _hotspots[v2]._x1 + 79; + _hotspots[v2]._y2 = _hotspots[v2]._y1 + 66; + _hotspots[v2]._flags = SF_NONE; + _hotspots[v2]._id = v2; ++v1; ++v2; } } - _hotspots[v2].x1 = 330; - _hotspots[v2].y1 = 350; - _hotspots[v2].x2 = 430; - _hotspots[v2].y2 = 460; - _hotspots[v2].flags = 2; - _hotspots[v2].id = v2; + _hotspots[v2]._x1 = 330; + _hotspots[v2]._y1 = 350; + _hotspots[v2]._x2 = 430; + _hotspots[v2]._y2 = 460; + _hotspots[v2]._flags = SF_GRAB_CURSOR; + _hotspots[v2]._id = v2; v0 = v2 + 1; - _hotspots[v0].x1 = 180; - _hotspots[v0].y1 = 15; - _hotspots[v0].x2 = 620; - _hotspots[v0].y2 = 580; - _hotspots[v0].flags = 0; - _hotspots[v0].id = v0; + _hotspots[v0]._x1 = 180; + _hotspots[v0]._y1 = 15; + _hotspots[v0]._x2 = 620; + _hotspots[v0]._y2 = 580; + _hotspots[v0]._flags = SF_NONE; + _hotspots[v0]._id = v0; ++v0; - _hotspots[v0].x1 = 0; - _hotspots[v0].y1 = 0; - _hotspots[v0].x2 = 799; - _hotspots[v0].y2 = 599; - _hotspots[v0].flags = 0; - _hotspots[v0].id = v0; + _hotspots[v0]._x1 = 0; + _hotspots[v0]._y1 = 0; + _hotspots[v0]._x2 = 799; + _hotspots[v0]._y2 = 599; + _hotspots[v0]._flags = SF_NONE; + _hotspots[v0]._id = v0; _hotspotsCount = v0 + 1; } @@ -85,129 +85,129 @@ void GnapEngine::initMenuHotspots2() { int i, v0; for (i = 0; i < 4; ++i) { - _hotspots[i].x1 = 312; - _hotspots[i].y1 = 48 * i + 85; - _hotspots[i].x2 = _hotspots[i].x1 + 153; - _hotspots[i].y2 = _hotspots[i].y1 + 37; - _hotspots[i].flags = SF_GRAB_CURSOR; - _hotspots[i].id = i; - } - _hotspots[i].x1 = 500; - _hotspots[i].y1 = 72; - _hotspots[i].x2 = 527; - _hotspots[i].y2 = 99; - _hotspots[i].flags = SF_DISABLED; - _hotspots[i].id = i; + _hotspots[i]._x1 = 312; + _hotspots[i]._y1 = 48 * i + 85; + _hotspots[i]._x2 = _hotspots[i]._x1 + 153; + _hotspots[i]._y2 = _hotspots[i]._y1 + 37; + _hotspots[i]._flags = SF_GRAB_CURSOR; + _hotspots[i]._id = i; + } + _hotspots[i]._x1 = 500; + _hotspots[i]._y1 = 72; + _hotspots[i]._x2 = 527; + _hotspots[i]._y2 = 99; + _hotspots[i]._flags = SF_DISABLED; + _hotspots[i]._id = i; v0 = i + 1; - _hotspots[v0].x1 = 330; - _hotspots[v0].y1 = 350; - _hotspots[v0].x2 = 430; - _hotspots[v0].y2 = 460; - _hotspots[v0].flags = SF_GRAB_CURSOR; - _hotspots[v0].id = v0; + _hotspots[v0]._x1 = 330; + _hotspots[v0]._y1 = 350; + _hotspots[v0]._x2 = 430; + _hotspots[v0]._y2 = 460; + _hotspots[v0]._flags = SF_GRAB_CURSOR; + _hotspots[v0]._id = v0; ++v0; - _hotspots[v0].x1 = 180; - _hotspots[v0].y1 = 15; - _hotspots[v0].x2 = 620; - _hotspots[v0].y2 = 580; - _hotspots[v0].flags = 0; - _hotspots[v0].id = v0; + _hotspots[v0]._x1 = 180; + _hotspots[v0]._y1 = 15; + _hotspots[v0]._x2 = 620; + _hotspots[v0]._y2 = 580; + _hotspots[v0]._flags = SF_NONE; + _hotspots[v0]._id = v0; ++v0; - _hotspots[v0].x1 = 0; - _hotspots[v0].y1 = 0; - _hotspots[v0].x2 = 799; - _hotspots[v0].y2 = 599; - _hotspots[v0].flags = 0; - _hotspots[v0].id = v0; + _hotspots[v0]._x1 = 0; + _hotspots[v0]._y1 = 0; + _hotspots[v0]._x2 = 799; + _hotspots[v0]._y2 = 599; + _hotspots[v0]._flags = SF_NONE; + _hotspots[v0]._id = v0; _hotspotsCount = v0 + 1; } void GnapEngine::initMenuQuitQueryHotspots() { - _hotspots[0].x1 = 311; - _hotspots[0].y1 = 197; - _hotspots[0].x2 = 377; - _hotspots[0].y2 = 237; - _hotspots[0].flags = SF_GRAB_CURSOR; - _hotspots[0].id = 0; - _hotspots[1].x1 = 403; - _hotspots[1].y1 = 197; - _hotspots[1].x2 = 469; - _hotspots[1].y2 = 237; - _hotspots[1].flags = SF_GRAB_CURSOR; - _hotspots[1].id = 1; - _hotspots[2].x1 = 330; - _hotspots[2].y1 = 350; - _hotspots[2].x2 = 430; - _hotspots[2].y2 = 460; - _hotspots[2].flags = SF_GRAB_CURSOR; - _hotspots[2].id = 2; - _hotspots[3].x1 = 180; - _hotspots[3].y1 = 15; - _hotspots[3].x2 = 620; - _hotspots[3].y2 = 580; - _hotspots[3].flags = 0; - _hotspots[3].id = 3; - _hotspots[4].x1 = 0; - _hotspots[4].y1 = 0; - _hotspots[4].x2 = 799; - _hotspots[4].y2 = 599; - _hotspots[4].flags = 0; - _hotspots[4].id = 4; + _hotspots[0]._x1 = 311; + _hotspots[0]._y1 = 197; + _hotspots[0]._x2 = 377; + _hotspots[0]._y2 = 237; + _hotspots[0]._flags = SF_GRAB_CURSOR; + _hotspots[0]._id = 0; + _hotspots[1]._x1 = 403; + _hotspots[1]._y1 = 197; + _hotspots[1]._x2 = 469; + _hotspots[1]._y2 = 237; + _hotspots[1]._flags = SF_GRAB_CURSOR; + _hotspots[1]._id = 1; + _hotspots[2]._x1 = 330; + _hotspots[2]._y1 = 350; + _hotspots[2]._x2 = 430; + _hotspots[2]._y2 = 460; + _hotspots[2]._flags = SF_GRAB_CURSOR; + _hotspots[2]._id = 2; + _hotspots[3]._x1 = 180; + _hotspots[3]._y1 = 15; + _hotspots[3]._x2 = 620; + _hotspots[3]._y2 = 580; + _hotspots[3]._flags = SF_NONE; + _hotspots[3]._id = 3; + _hotspots[4]._x1 = 0; + _hotspots[4]._y1 = 0; + _hotspots[4]._x2 = 799; + _hotspots[4]._y2 = 599; + _hotspots[4]._flags = SF_NONE; + _hotspots[4]._id = 4; _hotspotsCount = 5; } void GnapEngine::initSaveLoadHotspots() { int i, v0; for (i = 0; i < 7; ++i ) { - _hotspots[i].x1 = 288; - _hotspots[i].y1 = 31 * i + 74; - _hotspots[i].x2 = _hotspots[i].x1 + 91; - _hotspots[i].y2 = _hotspots[i].y1 + 22; - _hotspots[i].flags = SF_GRAB_CURSOR; - _hotspots[i].id = i; + _hotspots[i]._x1 = 288; + _hotspots[i]._y1 = 31 * i + 74; + _hotspots[i]._x2 = _hotspots[i]._x1 + 91; + _hotspots[i]._y2 = _hotspots[i]._y1 + 22; + _hotspots[i]._flags = SF_GRAB_CURSOR; + _hotspots[i]._id = i; } if (_menuStatus == 2) { - _hotspots[i].x1 = 416; - _hotspots[i].y1 = 160; - _hotspots[i].x2 = 499; - _hotspots[i].y2 = 188; - _hotspots[i].flags = SF_GRAB_CURSOR; - _hotspots[i].id = i; + _hotspots[i]._x1 = 416; + _hotspots[i]._y1 = 160; + _hotspots[i]._x2 = 499; + _hotspots[i]._y2 = 188; + _hotspots[i]._flags = SF_GRAB_CURSOR; + _hotspots[i]._id = i; ++i; } - _hotspots[i].x1 = 416; - _hotspots[i].y1 = 213; - _hotspots[i].x2 = 499; - _hotspots[i].y2 = 241; - _hotspots[i].flags = SF_GRAB_CURSOR; - _hotspots[i].id = i; + _hotspots[i]._x1 = 416; + _hotspots[i]._y1 = 213; + _hotspots[i]._x2 = 499; + _hotspots[i]._y2 = 241; + _hotspots[i]._flags = SF_GRAB_CURSOR; + _hotspots[i]._id = i; v0 = i + 1; - _hotspots[v0].x1 = 330; - _hotspots[v0].y1 = 350; - _hotspots[v0].x2 = 430; - _hotspots[v0].y2 = 460; - _hotspots[v0].flags = SF_GRAB_CURSOR; - _hotspots[v0].id = v0; + _hotspots[v0]._x1 = 330; + _hotspots[v0]._y1 = 350; + _hotspots[v0]._x2 = 430; + _hotspots[v0]._y2 = 460; + _hotspots[v0]._flags = SF_GRAB_CURSOR; + _hotspots[v0]._id = v0; ++v0; - _hotspots[v0].x1 = 180; - _hotspots[v0].y1 = 15; - _hotspots[v0].x2 = 620; - _hotspots[v0].y2 = 580; - _hotspots[v0].flags = 0; - _hotspots[v0].id = v0; + _hotspots[v0]._x1 = 180; + _hotspots[v0]._y1 = 15; + _hotspots[v0]._x2 = 620; + _hotspots[v0]._y2 = 580; + _hotspots[v0]._flags = SF_NONE; + _hotspots[v0]._id = v0; ++v0; - _hotspots[v0].x1 = 0; - _hotspots[v0].y1 = 0; - _hotspots[v0].x2 = 799; - _hotspots[v0].y2 = 599; - _hotspots[v0].flags = 0; - _hotspots[v0].id = v0; + _hotspots[v0]._x1 = 0; + _hotspots[v0]._y1 = 0; + _hotspots[v0]._x2 = 799; + _hotspots[v0]._y2 = 599; + _hotspots[v0]._flags = SF_NONE; + _hotspots[v0]._id = v0; _hotspotsCount = v0 + 1; } void GnapEngine::drawInventoryFrames() { for (int i = 0; i < 9; ++i) - _gameSys->drawSpriteToSurface(_menuBackgroundSurface, _hotspots[i].x1 - 93, _hotspots[i].y1, 0x10001); + _gameSys->drawSpriteToSurface(_menuBackgroundSurface, _hotspots[i]._x1 - 93, _hotspots[i]._y1, 0x10001); } void GnapEngine::insertInventorySprites() { @@ -223,16 +223,16 @@ void GnapEngine::insertInventorySprites() { for (int index = 0; index < 30 && _menuSpritesIndex < 9; ++index) { if (invHas(index)) { _gameSys->drawSpriteToSurface(_menuBackgroundSurface, - _hotspots[_menuSpritesIndex].x1 - 93, _hotspots[_menuSpritesIndex].y1, 0x10000); + _hotspots[_menuSpritesIndex]._x1 - 93, _hotspots[_menuSpritesIndex]._y1, 0x10000); _menuInventorySprites[_menuSpritesIndex] = _gameSys->createSurface(getInventoryItemSpriteNum(index) | 0x10000); if (index != _grabCursorSpriteIndex) { _menuInventoryIndices[_menuSpritesIndex] = index; _gameSys->insertSpriteDrawItem(_menuInventorySprites[_menuSpritesIndex], - _hotspots[_menuSpritesIndex].x1 + ((79 - _menuInventorySprites[_menuSpritesIndex]->w) / 2), - _hotspots[_menuSpritesIndex].y1 + ((66 - _menuInventorySprites[_menuSpritesIndex]->h) / 2), + _hotspots[_menuSpritesIndex]._x1 + ((79 - _menuInventorySprites[_menuSpritesIndex]->w) / 2), + _hotspots[_menuSpritesIndex]._y1 + ((66 - _menuInventorySprites[_menuSpritesIndex]->h) / 2), 261); } - _hotspots[_menuSpritesIndex].flags = SF_GRAB_CURSOR; + _hotspots[_menuSpritesIndex]._flags = SF_GRAB_CURSOR; ++_menuSpritesIndex; } } @@ -355,7 +355,7 @@ void GnapEngine::runMenu() { clearAllKeyStatus1(); - _mouseClickState.left = false; + _mouseClickState._left = false; removeDeviceIconActive(); @@ -373,10 +373,10 @@ void GnapEngine::updateMenuStatusInventory() { }; updateGrabCursorSprite(0, 0); - _hotspots[0].x1 = 262; - _hotspots[0].y1 = 69; - _hotspots[0].x2 = 341; - _hotspots[0].y2 = 135; + _hotspots[0]._x1 = 262; + _hotspots[0]._y1 = 69; + _hotspots[0]._x2 = 341; + _hotspots[0]._y2 = 135; _sceneClickedHotspot = -1; if (_timers[2] == 0) _sceneClickedHotspot = getClickedHotspotId(); @@ -386,7 +386,7 @@ void GnapEngine::updateMenuStatusInventory() { _timers[2] = 10; playSound(0x108F4, 0); _menuStatus = 1; - Common::Rect dirtyRect(_hotspots[0].x1, _hotspots[0].y1, _hotspots[2].x2, _hotspots[_hotspotsCount - 4].y2); + Common::Rect dirtyRect(_hotspots[0]._x1, _hotspots[0]._y1, _hotspots[2]._x2, _hotspots[_hotspotsCount - 4]._y2); drawInventoryFrames(); initMenuHotspots2(); removeInventorySprites(); @@ -409,8 +409,8 @@ void GnapEngine::updateMenuStatusInventory() { } else if (_sceneClickedHotspot != -1 && _menuInventoryIndices[_sceneClickedHotspot] == -1 && _grabCursorSpriteIndex != -1) { _menuInventoryIndices[_sceneClickedHotspot] = _grabCursorSpriteIndex; _gameSys->insertSpriteDrawItem(_menuInventorySprites[_sceneClickedHotspot], - _hotspots[_sceneClickedHotspot].x1 + ((79 - _menuInventorySprites[_sceneClickedHotspot]->w) / 2), - _hotspots[_sceneClickedHotspot].y1 + (66 - _menuInventorySprites[_sceneClickedHotspot]->h) / 2, + _hotspots[_sceneClickedHotspot]._x1 + ((79 - _menuInventorySprites[_sceneClickedHotspot]->w) / 2), + _hotspots[_sceneClickedHotspot]._y1 + (66 - _menuInventorySprites[_sceneClickedHotspot]->h) / 2, 261); setGrabCursorSprite(-1); } else if (_sceneClickedHotspot != -1 && _menuInventoryIndices[_sceneClickedHotspot] != -1 && _grabCursorSpriteIndex != -1) { @@ -429,7 +429,7 @@ void GnapEngine::updateMenuStatusInventory() { playSound(0x108AE, 0); deleteSurface(&_spriteHandle); // CHECKME _spriteHandle = _gameSys->createSurface(0x10001); - _gameSys->insertSpriteDrawItem(_spriteHandle, _hotspots[_menuSpritesIndex - 1].x1, _hotspots[_menuSpritesIndex - 1].y1, 261); + _gameSys->insertSpriteDrawItem(_spriteHandle, _hotspots[_menuSpritesIndex - 1]._x1, _hotspots[_menuSpritesIndex - 1]._y1, 261); setGrabCursorSprite(kCombineItems[combineIndex].resultItem); removeInventorySprites(); insertInventorySprites(); @@ -441,10 +441,10 @@ void GnapEngine::updateMenuStatusInventory() { } void GnapEngine::updateMenuStatusMainMenu() { - _hotspots[0].x1 = 312; - _hotspots[0].y1 = 85; - _hotspots[0].x2 = 465; - _hotspots[0].y2 = 122; + _hotspots[0]._x1 = 312; + _hotspots[0]._y1 = 85; + _hotspots[0]._x2 = 465; + _hotspots[0]._y2 = 122; _sceneClickedHotspot = -1; if (!_timers[2]) _sceneClickedHotspot = getClickedHotspotId(); @@ -486,12 +486,12 @@ void GnapEngine::updateMenuStatusMainMenu() { _gameSys->insertDirtyRect(dirtyRect); } - while (!_mouseClickState.left && !isKeyStatus1(28) && !isKeyStatus1(30) && !isKeyStatus1(29) && !_timers[2]) { + while (!_mouseClickState._left && !isKeyStatus1(28) && !isKeyStatus1(30) && !isKeyStatus1(29) && !_timers[2]) { gameUpdateTick(); } playSound(0x108F5, 0); - _mouseClickState.left = false; + _mouseClickState._left = false; clearKeyStatus1(28); clearKeyStatus1(29); clearKeyStatus1(30); @@ -513,7 +513,7 @@ void GnapEngine::updateMenuStatusMainMenu() { if (_menuSprite1) _gameSys->removeSpriteDrawItem(_menuSprite1, 262); insertInventorySprites(); - Common::Rect dirtyRect(_hotspots[0].x1, _hotspots[0].y1, _hotspots[2].x2, _hotspots[_hotspotsCount - 4].y2); + Common::Rect dirtyRect(_hotspots[0]._x1, _hotspots[0]._y1, _hotspots[2]._x2, _hotspots[_hotspotsCount - 4]._y2); _gameSys->insertDirtyRect(dirtyRect); } } else { @@ -546,7 +546,7 @@ void GnapEngine::updateMenuStatusMainMenu() { if (readSavegameDescription(i + 1, savegameDescription) == 0) strncpy(_savegameFilenames[i], savegameDescription.c_str(), 40); _gameSys->drawTextToSurface(_savegameSprites[i], 0, 0, 255, 0, 0, _savegameFilenames[i]); - _gameSys->insertSpriteDrawItem(_savegameSprites[i], 288, _hotspots[i].y1, 263); + _gameSys->insertSpriteDrawItem(_savegameSprites[i], 288, _hotspots[i]._y1, 263); } _savegameIndex = -1; } @@ -729,10 +729,10 @@ void GnapEngine::updateMenuStatusSaveGame() { } void GnapEngine::updateMenuStatusLoadGame() { - _hotspots[0].x1 = 288; - _hotspots[0].y1 = 74; - _hotspots[0].x2 = 379; - _hotspots[0].y2 = 96; + _hotspots[0]._x1 = 288; + _hotspots[0]._y1 = 74; + _hotspots[0]._x2 = 379; + _hotspots[0]._y2 = 96; _sceneClickedHotspot = -1; if (!_timers[2]) _sceneClickedHotspot = getClickedHotspotId(); @@ -762,10 +762,10 @@ void GnapEngine::updateMenuStatusLoadGame() { void GnapEngine::updateMenuStatusQueryQuit() { - _hotspots[0].x1 = 311; - _hotspots[0].y1 = 197; - _hotspots[0].x2 = 377; - _hotspots[0].y2 = 237; + _hotspots[0]._x1 = 311; + _hotspots[0]._y1 = 197; + _hotspots[0]._x2 = 377; + _hotspots[0]._y2 = 237; _sceneClickedHotspot = -1; diff --git a/engines/gnap/scenes/scene01.cpp b/engines/gnap/scenes/scene01.cpp index e084a54c76..9efe45d5ae 100644 --- a/engines/gnap/scenes/scene01.cpp +++ b/engines/gnap/scenes/scene01.cpp @@ -74,9 +74,9 @@ void GnapEngine::scene01_updateHotspots() { setHotspot(kHSWalkArea8, 0, 546, 300, 600); setDeviceHotspot(kHSDevice, -1, -1, -1, -1); if (isFlag(0)) - _hotspots[kHSPlatypus].flags = SF_WALKABLE | SF_TALK_CURSOR | SF_GRAB_CURSOR | SF_LOOK_CURSOR; + _hotspots[kHSPlatypus]._flags = SF_WALKABLE | SF_TALK_CURSOR | SF_GRAB_CURSOR | SF_LOOK_CURSOR; if (isFlag(1)) - _hotspots[kHSMud].flags = SF_WALKABLE | SF_DISABLED; + _hotspots[kHSMud]._flags = SF_WALKABLE | SF_DISABLED; _hotspotsCount = 14; } @@ -259,9 +259,9 @@ void GnapEngine::scene01_run() { break; default: - if (_mouseClickState.left && _gnapActionStatus < 0) { + if (_mouseClickState._left && _gnapActionStatus < 0) { gnapWalkTo(-1, -1, -1, -1, 1); - _mouseClickState.left = false; + _mouseClickState._left = false; } break; diff --git a/engines/gnap/scenes/scene02.cpp b/engines/gnap/scenes/scene02.cpp index d745b0927a..a4d62c80dc 100644 --- a/engines/gnap/scenes/scene02.cpp +++ b/engines/gnap/scenes/scene02.cpp @@ -79,7 +79,7 @@ void GnapEngine::scene02_updateHotspots() { setHotspot(kHSWalkArea4, 386, 0, 509, 410); setDeviceHotspot(kHSDevice, -1, -1, -1, -1); if (isFlag(0)) - _hotspots[kHSPlatypus].flags = SF_WALKABLE | SF_TALK_CURSOR | SF_GRAB_CURSOR | SF_LOOK_CURSOR; + _hotspots[kHSPlatypus]._flags = SF_WALKABLE | SF_TALK_CURSOR | SF_GRAB_CURSOR | SF_LOOK_CURSOR; _hotspotsCount = 14; } @@ -238,10 +238,10 @@ void GnapEngine::scene02_run() { _gnapActionStatus = kASUseTruckNoGas; } } else if (_grabCursorSpriteIndex == kItemGas) { - _hotspots[kHSWalkArea4].flags |= SF_WALKABLE; + _hotspots[kHSWalkArea4]._flags |= SF_WALKABLE; if (gnapWalkTo(_hotspotsWalkPos[2].x, _hotspotsWalkPos[2].y, 0, getGnapSequenceId(gskIdle, 2, 2) | 0x10000, 1)) _gnapActionStatus = kASUseGasWithTruck; - _hotspots[kHSWalkArea4].flags &= ~SF_WALKABLE; + _hotspots[kHSWalkArea4]._flags &= ~SF_WALKABLE; } else if (_grabCursorSpriteIndex >= 0) { playGnapShowCurrItem(_hotspotsWalkPos[2].x, _hotspotsWalkPos[2].y, 2, 2); } else { @@ -350,9 +350,9 @@ void GnapEngine::scene02_run() { break; default: - if (_mouseClickState.left && _gnapActionStatus < 0) { + if (_mouseClickState._left && _gnapActionStatus < 0) { gnapWalkTo(-1, -1, -1, -1, 1); - _mouseClickState.left = false; + _mouseClickState._left = false; } break; diff --git a/engines/gnap/scenes/scene03.cpp b/engines/gnap/scenes/scene03.cpp index 6f191dc6e3..7ca1c4a2da 100644 --- a/engines/gnap/scenes/scene03.cpp +++ b/engines/gnap/scenes/scene03.cpp @@ -70,13 +70,13 @@ void GnapEngine::scene03_updateHotspots() { setHotspot(kHSWalkAreas3, 0, 0, 800, 354); setDeviceHotspot(kHSDevice, -1, -1, -1, -1); if (isFlag(0)) - _hotspots[kHSPlatypus].flags = SF_WALKABLE | SF_TALK_CURSOR | SF_GRAB_CURSOR | SF_LOOK_CURSOR; + _hotspots[kHSPlatypus]._flags = SF_WALKABLE | SF_TALK_CURSOR | SF_GRAB_CURSOR | SF_LOOK_CURSOR; if (isFlag(6)) - _hotspots[kHSGrass].flags = SF_WALKABLE | SF_DISABLED; + _hotspots[kHSGrass]._flags = SF_WALKABLE | SF_DISABLED; if (isFlag(0)) - _hotspots[kHSTrappedPlatypus].flags = SF_DISABLED; + _hotspots[kHSTrappedPlatypus]._flags = SF_DISABLED; if (isFlag(0) || _s03_platypusHypnotized) - _hotspots[kHSPlatypusWalkArea].flags |= SF_WALKABLE; + _hotspots[kHSPlatypusWalkArea]._flags |= SF_WALKABLE; _hotspotsCount = 10; } @@ -181,7 +181,7 @@ void GnapEngine::scene03_run() { playGnapUseDevice(0, 0); _gameSys->insertSequence(0x1B3, 253, 0x1B2, 253, kSeqSyncWait, 0, 0, 0); _gameSys->setAnimation(0x1B3, 253, 5); - _hotspots[kHSGrass].flags |= SF_WALKABLE | SF_DISABLED; + _hotspots[kHSGrass]._flags |= SF_WALKABLE | SF_DISABLED; break; case TALK_CURSOR: case PLAT_CURSOR: @@ -195,12 +195,12 @@ void GnapEngine::scene03_run() { case kHSExitTruck: if (_gnapActionStatus < 0) { _isLeavingScene = 1; - _hotspots[kHSPlatypusWalkArea].flags |= SF_WALKABLE; + _hotspots[kHSPlatypusWalkArea]._flags |= SF_WALKABLE; gnapWalkTo(_hotspotsWalkPos[2].x, _hotspotsWalkPos[2].y, 0, 0x107AD, 1); _gnapActionStatus = kASLeaveScene; if (isFlag(0)) platypusWalkTo(_hotspotsWalkPos[2].x, _hotspotsWalkPos[2].y, -1, 0x107C2, 1); - _hotspots[kHSPlatypusWalkArea].flags &= ~SF_WALKABLE; + _hotspots[kHSPlatypusWalkArea]._flags &= ~SF_WALKABLE; if (_cursorValue == 1) _newSceneNum = 2; else @@ -219,11 +219,11 @@ void GnapEngine::scene03_run() { break; case GRAB_CURSOR: if (!isFlag(0)) - _hotspots[kHSPlatypusWalkArea].flags |= SF_WALKABLE; + _hotspots[kHSPlatypusWalkArea]._flags |= SF_WALKABLE; if (gnapWalkTo(_hotspotsWalkPos[3].x, _hotspotsWalkPos[3].y, 0, getGnapSequenceId(gskIdle, _hotspotsWalkPos[3].x + 1, _hotspotsWalkPos[3].y + 1) | 0x10000, 1)) _gnapActionStatus = kASGrabCreek; if (!isFlag(0)) - _hotspots[kHSPlatypusWalkArea].flags &= ~SF_WALKABLE; + _hotspots[kHSPlatypusWalkArea]._flags &= ~SF_WALKABLE; break; case TALK_CURSOR: case PLAT_CURSOR: @@ -306,9 +306,9 @@ void GnapEngine::scene03_run() { break; default: - if (_mouseClickState.left && _gnapActionStatus < 0) { + if (_mouseClickState._left && _gnapActionStatus < 0) { gnapWalkTo(-1, -1, -1, -1, 1); - _mouseClickState.left = false; + _mouseClickState._left = false; } break; diff --git a/engines/gnap/scenes/scene04.cpp b/engines/gnap/scenes/scene04.cpp index 37ebe34839..52fdb39d83 100644 --- a/engines/gnap/scenes/scene04.cpp +++ b/engines/gnap/scenes/scene04.cpp @@ -74,11 +74,11 @@ void GnapEngine::scene04_updateHotspots() { setHotspot(kHSWalkArea2, 562, 0, 800, 500); setDeviceHotspot(kHSDevice, -1, -1, -1, -1); if (isFlag(0)) - _hotspots[kHSPlatypus].flags = SF_WALKABLE | SF_TALK_CURSOR | SF_GRAB_CURSOR | SF_LOOK_CURSOR; + _hotspots[kHSPlatypus]._flags = SF_WALKABLE | SF_TALK_CURSOR | SF_GRAB_CURSOR | SF_LOOK_CURSOR; if (isFlag(3)) - _hotspots[kHSTwig].flags = SF_WALKABLE | SF_DISABLED; + _hotspots[kHSTwig]._flags = SF_WALKABLE | SF_DISABLED; if (isFlag(26) || _cursorValue == 1) - _hotspots[kHSAxe].flags = SF_DISABLED; + _hotspots[kHSAxe]._flags = SF_DISABLED; _hotspotsCount = 11; } @@ -385,9 +385,9 @@ void GnapEngine::scene04_run() { break; default: - if (_mouseClickState.left && _gnapActionStatus < 0) { + if (_mouseClickState._left && _gnapActionStatus < 0) { gnapWalkTo(-1, -1, -1, -1, 1); - _mouseClickState.left = false; + _mouseClickState._left = false; } break; diff --git a/engines/gnap/scenes/scene05.cpp b/engines/gnap/scenes/scene05.cpp index fdc6ba16fe..fea0dc1b63 100644 --- a/engines/gnap/scenes/scene05.cpp +++ b/engines/gnap/scenes/scene05.cpp @@ -70,9 +70,9 @@ void GnapEngine::scene05_updateHotspots() { setHotspot(kHSWalkArea3, 0, 0, 104, 499); setDeviceHotspot(kHSDevice, -1, -1, -1, -1); if (isFlag(0)) - _hotspots[kHSPlatypus].flags = SF_WALKABLE | SF_TALK_CURSOR | SF_GRAB_CURSOR | SF_LOOK_CURSOR; + _hotspots[kHSPlatypus]._flags = SF_WALKABLE | SF_TALK_CURSOR | SF_GRAB_CURSOR | SF_LOOK_CURSOR; if (isFlag(7)) - _hotspots[kHSPadlock].flags = SF_EXIT_U_CURSOR; + _hotspots[kHSPadlock]._flags = SF_EXIT_U_CURSOR; _hotspotsCount = 10; } @@ -306,9 +306,9 @@ void GnapEngine::scene05_run() { break; default: - if (_mouseClickState.left && _gnapActionStatus < 0) { + if (_mouseClickState._left && _gnapActionStatus < 0) { gnapWalkTo(-1, -1, -1, -1, 1); - _mouseClickState.left = false; + _mouseClickState._left = false; } break; diff --git a/engines/gnap/scenes/scene06.cpp b/engines/gnap/scenes/scene06.cpp index 3878d3514e..7df09a1cc0 100644 --- a/engines/gnap/scenes/scene06.cpp +++ b/engines/gnap/scenes/scene06.cpp @@ -73,10 +73,10 @@ void GnapEngine::scene06_updateHotspots() { setHotspot(kHSWalkArea5, 0, 0, 800, 504); setDeviceHotspot(kHSDevice, -1, -1, -1, -1); if (isFlag(29)) - _hotspots[kHSLadder].flags = SF_DISABLED; + _hotspots[kHSLadder]._flags = SF_DISABLED; if (_cursorValue == 4) { - _hotspots[kHSLadder].flags = SF_DISABLED; - _hotspots[kHSGas].flags = SF_DISABLED; + _hotspots[kHSLadder]._flags = SF_DISABLED; + _hotspots[kHSGas]._flags = SF_DISABLED; } _hotspotsCount = 11; } @@ -174,9 +174,9 @@ void GnapEngine::scene06_run() { if (isFlag(4)) { playGnapImpossible(0, 0); } else if (triedDeviceOnGas) { - _hotspots[kHSWalkArea5].flags |= SF_WALKABLE; + _hotspots[kHSWalkArea5]._flags |= SF_WALKABLE; gnapWalkTo(_hotspotsWalkPos[1].x, _hotspotsWalkPos[1].y, 0, 0x107BC, 1); - _hotspots[kHSWalkArea5].flags &= ~SF_WALKABLE; + _hotspots[kHSWalkArea5]._flags &= ~SF_WALKABLE; _gnapActionStatus = kASTryToGetGas; } else { triedDeviceOnGas = true; @@ -225,9 +225,9 @@ void GnapEngine::scene06_run() { case kHSHorse: if (_gnapActionStatus < 0) { if (_grabCursorSpriteIndex == kItemTwig && _s06_horseTurnedBack) { - _hotspots[kHSWalkArea5].flags |= SF_WALKABLE; + _hotspots[kHSWalkArea5]._flags |= SF_WALKABLE; gnapWalkTo(_hotspotsWalkPos[3].x, _hotspotsWalkPos[3].y, 0, 0x107BC, 1); - _hotspots[kHSWalkArea5].flags &= ~SF_WALKABLE; + _hotspots[kHSWalkArea5]._flags &= ~SF_WALKABLE; _gnapIdleFacing = 5; platypusWalkTo(6, 8, 1, 0x107C2, 1); _beaverFacing = 0; @@ -245,9 +245,9 @@ void GnapEngine::scene06_run() { gnapWalkTo(_hotspotsWalkPos[3].x, _hotspotsWalkPos[3].y, 0, getGnapSequenceId(gskBrainPulsating, 3, 2) | 0x10000, 1); } else { _gnapIdleFacing = 3; - _hotspots[kHSWalkArea5].flags |= SF_WALKABLE; + _hotspots[kHSWalkArea5]._flags |= SF_WALKABLE; gnapWalkTo(_hotspotsWalkPos[3].x, _hotspotsWalkPos[3].y, 0, getGnapSequenceId(gskBrainPulsating, 0, 0) | 0x10000, 1); - _hotspots[kHSWalkArea5].flags &= ~SF_WALKABLE; + _hotspots[kHSWalkArea5]._flags &= ~SF_WALKABLE; _gnapActionStatus = kASTalkToHorse; } break; @@ -282,9 +282,9 @@ void GnapEngine::scene06_run() { break; default: - if (_mouseClickState.left && _gnapActionStatus < 0) { + if (_mouseClickState._left && _gnapActionStatus < 0) { gnapWalkTo(-1, -1, -1, -1, 1); - _mouseClickState.left = false; + _mouseClickState._left = false; } break; @@ -383,7 +383,7 @@ void GnapEngine::scene06_updateAnimations() { _gameSys->setAnimation(0, 0, 1); invAdd(kItemGas); setFlag(29); - _hotspots[kHSLadder].flags = SF_DISABLED; + _hotspots[kHSLadder]._flags = SF_DISABLED; setGrabCursorSprite(kItemGas); _beaverActionStatus = -1; _platX = 6; diff --git a/engines/gnap/scenes/scene07.cpp b/engines/gnap/scenes/scene07.cpp index 9b8ee2975b..aa486b6fb1 100644 --- a/engines/gnap/scenes/scene07.cpp +++ b/engines/gnap/scenes/scene07.cpp @@ -54,7 +54,7 @@ void GnapEngine::scene07_updateHotspots() { setHotspot(kHSWalkArea3, 160, 0, 325, 495); setDeviceHotspot(kHSDevice, -1, -1, -1, -1); if (isFlag(0)) - _hotspots[kHSDice].flags = SF_DISABLED; + _hotspots[kHSDice]._flags = SF_DISABLED; _hotspotsCount = 7; } @@ -185,9 +185,9 @@ void GnapEngine::scene07_run() { break; default: - if (_mouseClickState.left) { + if (_mouseClickState._left) { gnapWalkTo(-1, -1, -1, -1, 1); - _mouseClickState.left = false; + _mouseClickState._left = false; } break; diff --git a/engines/gnap/scenes/scene08.cpp b/engines/gnap/scenes/scene08.cpp index f7c0b9c886..29437251b6 100644 --- a/engines/gnap/scenes/scene08.cpp +++ b/engines/gnap/scenes/scene08.cpp @@ -68,11 +68,11 @@ void GnapEngine::scene08_updateHotspots() { setHotspot(kHSWalkArea2, 0, 0, 799, 420); setDeviceHotspot(kHSDevice, -1, -1, -1, -1); if (isFlag(7)) - _hotspots[kHSMeat].flags = SF_WALKABLE | SF_DISABLED; + _hotspots[kHSMeat]._flags = SF_WALKABLE | SF_DISABLED; if (isFlag(8)) - _hotspots[kHSBone].flags = SF_WALKABLE | SF_DISABLED; + _hotspots[kHSBone]._flags = SF_WALKABLE | SF_DISABLED; if (isFlag(9)) - _hotspots[kHSToy].flags = SF_WALKABLE | SF_DISABLED; + _hotspots[kHSToy]._flags = SF_WALKABLE | SF_DISABLED; _hotspotsCount = 11; } @@ -346,10 +346,10 @@ void GnapEngine::scene08_run() { break; default: - if (_mouseClickState.left) { + if (_mouseClickState._left) { gnapActionIdle(0x14D); gnapWalkTo(-1, -1, -1, -1, 1); - _mouseClickState.left = false; + _mouseClickState._left = false; } break; @@ -474,17 +474,17 @@ void GnapEngine::scene08_updateAnimations() { switch (_s08_nextDogSequenceId) { case 0x149: setFlag(7); - _hotspots[kHSMeat].flags = SF_DISABLED | SF_WALKABLE; + _hotspots[kHSMeat]._flags = SF_DISABLED | SF_WALKABLE; _gameSys->removeSequence(0x144, 1, true); break; case 0x14A: setFlag(8); - _hotspots[kHSBone].flags = SF_DISABLED | SF_WALKABLE; + _hotspots[kHSBone]._flags = SF_DISABLED | SF_WALKABLE; _gameSys->removeSequence(0x145, 1, true); break; case 0x14B: setFlag(9); - _hotspots[kHSToy].flags = SF_DISABLED | SF_WALKABLE; + _hotspots[kHSToy]._flags = SF_DISABLED | SF_WALKABLE; _gameSys->removeSequence(0x146, 1, true); break; } diff --git a/engines/gnap/scenes/scene09.cpp b/engines/gnap/scenes/scene09.cpp index 3654be55f4..69165ce8f0 100644 --- a/engines/gnap/scenes/scene09.cpp +++ b/engines/gnap/scenes/scene09.cpp @@ -167,9 +167,9 @@ void GnapEngine::scene09_run() { break; default: - if (_mouseClickState.left) { + if (_mouseClickState._left) { gnapWalkTo(-1, -1, -1, -1, 1); - _mouseClickState.left = false; + _mouseClickState._left = false; } break; diff --git a/engines/gnap/scenes/scene10.cpp b/engines/gnap/scenes/scene10.cpp index 32162e2b21..54cf5b5d89 100644 --- a/engines/gnap/scenes/scene10.cpp +++ b/engines/gnap/scenes/scene10.cpp @@ -309,10 +309,10 @@ void GnapEngine::scene10_run() { break; default: - if (_mouseClickState.left) { + if (_mouseClickState._left) { gnapActionIdle(0x10C); gnapWalkTo(-1, -1, -1, -1, 1); - _mouseClickState.left = false; + _mouseClickState._left = false; } break; diff --git a/engines/gnap/scenes/scene11.cpp b/engines/gnap/scenes/scene11.cpp index 3a112b9e9f..8097b23e73 100644 --- a/engines/gnap/scenes/scene11.cpp +++ b/engines/gnap/scenes/scene11.cpp @@ -85,7 +85,7 @@ void GnapEngine::scene11_run() { _timers[7] = 50; - _hotspots[kHSBillard].flags |= SF_DISABLED; + _hotspots[kHSBillard]._flags |= SF_DISABLED; _s11_currGoggleGuySequenceId = 0x1F9; @@ -290,9 +290,9 @@ void GnapEngine::scene11_run() { break; default: - if (_mouseClickState.left && _gnapActionStatus < 0) { + if (_mouseClickState._left && _gnapActionStatus < 0) { gnapWalkTo(-1, -1, -1, -1, 1); - _mouseClickState.left = false; + _mouseClickState._left = false; } break; @@ -434,7 +434,7 @@ void GnapEngine::scene11_updateAnimations() { _s11_nextHookGuySequenceId = -1; _timers[4] = getRandom(40) + 20; _gameSys->insertSequence(0x208, 256, 0, 0, kSeqNone, getSequenceTotalDuration(0x1F4) - 5, 0, 0); - _hotspots[kHSBillard].flags |= SF_DISABLED; + _hotspots[kHSBillard]._flags |= SF_DISABLED; _gameSys->setAnimation(0x207, 257, 4); _gameSys->insertSequence(0x207, 257, 0, 0, kSeqNone, getSequenceTotalDuration(0x1FE), 0, 0); _gnapActionStatus = -1; @@ -480,7 +480,7 @@ void GnapEngine::scene11_updateAnimations() { if (_gameSys->getAnimationStatus(4) == 2) { _gameSys->setAnimation(0, 0, 4); - _hotspots[kHSBillard].flags &= ~SF_DISABLED; + _hotspots[kHSBillard]._flags &= ~SF_DISABLED; } } diff --git a/engines/gnap/scenes/scene12.cpp b/engines/gnap/scenes/scene12.cpp index 076fa0408d..4bc10fcb43 100644 --- a/engines/gnap/scenes/scene12.cpp +++ b/engines/gnap/scenes/scene12.cpp @@ -296,9 +296,9 @@ void GnapEngine::scene12_run() { break; default: - if (_mouseClickState.left && _gnapActionStatus < 0) { + if (_mouseClickState._left && _gnapActionStatus < 0) { gnapWalkTo(-1, -1, -1, -1, 1); - _mouseClickState.left = false; + _mouseClickState._left = false; } break; diff --git a/engines/gnap/scenes/scene13.cpp b/engines/gnap/scenes/scene13.cpp index 729fdebf31..233b7544b2 100644 --- a/engines/gnap/scenes/scene13.cpp +++ b/engines/gnap/scenes/scene13.cpp @@ -87,10 +87,10 @@ void GnapEngine::scene13_showScribble() { hideCursor(); _largeSprite = _gameSys->createSurface(0x6F); _gameSys->insertSpriteDrawItem(_largeSprite, 0, 0, 300); - while (!_mouseClickState.left && !isKeyStatus1(Common::KEYCODE_ESCAPE) && + while (!_mouseClickState._left && !isKeyStatus1(Common::KEYCODE_ESCAPE) && !isKeyStatus1(Common::KEYCODE_SPACE) && !isKeyStatus1(29)) gameUpdateTick(); - _mouseClickState.left = false; + _mouseClickState._left = false; clearKeyStatus1(Common::KEYCODE_ESCAPE); clearKeyStatus1(29); clearKeyStatus1(Common::KEYCODE_SPACE); @@ -305,9 +305,9 @@ void GnapEngine::scene13_run() { break; default: - if (_mouseClickState.left) { + if (_mouseClickState._left) { gnapWalkTo(-1, -1, -1, -1, 1); - _mouseClickState.left = false; + _mouseClickState._left = false; } break; diff --git a/engines/gnap/scenes/scene14.cpp b/engines/gnap/scenes/scene14.cpp index 4f799db977..b4e68a82b4 100644 --- a/engines/gnap/scenes/scene14.cpp +++ b/engines/gnap/scenes/scene14.cpp @@ -47,7 +47,7 @@ void GnapEngine::scene14_updateHotspots() { setHotspot(kHSToilet, 225, 250, 510, 500, SF_PLAT_CURSOR | SF_TALK_CURSOR | SF_GRAB_CURSOR | SF_LOOK_CURSOR); setDeviceHotspot(kHSDevice, -1, -1, -1, -1); if (isFlag(2)) - _hotspots[kHSCoin].flags = SF_DISABLED; + _hotspots[kHSCoin]._flags = SF_DISABLED; _hotspotsCount = 5; } @@ -143,7 +143,7 @@ void GnapEngine::scene14_run() { break; default: - _mouseClickState.left = false; + _mouseClickState._left = false; break; } diff --git a/engines/gnap/scenes/scene15.cpp b/engines/gnap/scenes/scene15.cpp index 578f4fcba1..f9fb3efbe6 100644 --- a/engines/gnap/scenes/scene15.cpp +++ b/engines/gnap/scenes/scene15.cpp @@ -94,10 +94,10 @@ void GnapEngine::scene15_run() { updateMouseCursor(); updateCursorByHotspot(); - _hotspots[kHSPlatypus].x1 = 0; - _hotspots[kHSPlatypus].y1 = 0; - _hotspots[kHSPlatypus].x2 = 0; - _hotspots[kHSPlatypus].y2 = 0; + _hotspots[kHSPlatypus]._x1 = 0; + _hotspots[kHSPlatypus]._y1 = 0; + _hotspots[kHSPlatypus]._x2 = 0; + _hotspots[kHSPlatypus]._y2 = 0; _sceneClickedHotspot = getClickedHotspotId(); updateGrabCursorSprite(0, 0); @@ -222,7 +222,7 @@ void GnapEngine::scene15_run() { break; default: - _mouseClickState.left = false; + _mouseClickState._left = false; break; } diff --git a/engines/gnap/scenes/scene17.cpp b/engines/gnap/scenes/scene17.cpp index 5b7c54c0a8..c86df4c8a3 100644 --- a/engines/gnap/scenes/scene17.cpp +++ b/engines/gnap/scenes/scene17.cpp @@ -73,10 +73,10 @@ void GnapEngine::scene17_updateHotspots() { setHotspot(kHSWalkArea3, 0, 204, 173, 468); setDeviceHotspot(kHSDevice, -1, -1, -1, -1); if (isFlag(6)) - _hotspots[kHSWrench].flags = 0; + _hotspots[kHSWrench]._flags = SF_NONE; if (isFlag(26)) { - _hotspots[kHSDevice].flags = SF_DISABLED; - _hotspots[kHSPlatypus].flags = SF_DISABLED; + _hotspots[kHSDevice]._flags = SF_DISABLED; + _hotspots[kHSPlatypus]._flags = SF_DISABLED; } _hotspotsCount = 10; } @@ -85,9 +85,9 @@ void GnapEngine::scene17_update() { gameUpdateTick(); updateMouseCursor(); updateGrabCursorSprite(0, 0); - if (_mouseClickState.left) { + if (_mouseClickState._left) { gnapWalkTo(-1, -1, -1, -1, 1); - _mouseClickState.left = false; + _mouseClickState._left = false; } } @@ -476,9 +476,9 @@ void GnapEngine::scene17_run() { break; default: - if (_mouseClickState.left && _gnapActionStatus < 0) { + if (_mouseClickState._left && _gnapActionStatus < 0) { gnapWalkTo(-1, -1, -1, -1, 1); - _mouseClickState.left = 0; + _mouseClickState._left = 0; } break; } @@ -742,9 +742,9 @@ void GnapEngine::scene17_updateAnimations() { case 0x22E: case 0x235: if (_s17_nextWrenchSequenceId == 0x235) - _hotspots[kHSWrench].flags &= ~SF_DISABLED; + _hotspots[kHSWrench]._flags &= ~SF_DISABLED; else - _hotspots[kHSWrench].flags |= SF_DISABLED; + _hotspots[kHSWrench]._flags |= SF_DISABLED; _s17_canTryGetWrench = !_s17_canTryGetWrench; _gameSys->setAnimation(_s17_nextWrenchSequenceId, 40, 2); _gameSys->insertSequence(_s17_nextWrenchSequenceId, 40, _s17_currWrenchSequenceId, 40, kSeqSyncWait, 0, 0, 0); diff --git a/engines/gnap/scenes/scene18.cpp b/engines/gnap/scenes/scene18.cpp index ff43a5d202..7363468dc2 100644 --- a/engines/gnap/scenes/scene18.cpp +++ b/engines/gnap/scenes/scene18.cpp @@ -88,39 +88,39 @@ void GnapEngine::scene18_updateHotspots() { setDeviceHotspot(kHSDevice, -1, -1, -1, -1); if (isFlag(8)) { if (isFlag(9)) { - _hotspots[kHSHydrantTopValve].flags = SF_DISABLED; - _hotspots[kHSHydrantRightValve].x1 = 148; - _hotspots[kHSHydrantRightValve].y1 = 403; - _hotspots[kHSGarbageCan].flags = SF_DISABLED; + _hotspots[kHSHydrantTopValve]._flags = SF_DISABLED; + _hotspots[kHSHydrantRightValve]._x1 = 148; + _hotspots[kHSHydrantRightValve]._y1 = 403; + _hotspots[kHSGarbageCan]._flags = SF_DISABLED; _hotspotsWalkPos[kHSGarbageCan].x = 3; _hotspotsWalkPos[kHSGarbageCan].y = 7; } else { - _hotspots[kHSHydrantTopValve].y1 = 246; + _hotspots[kHSHydrantTopValve]._y1 = 246; } } else if (isFlag(7)) { - _hotspots[kHSHydrantRightValve].flags = SF_DISABLED; - _hotspots[kHSHydrantTopValve].x1 = 105; - _hotspots[kHSHydrantTopValve].x2 = 192; + _hotspots[kHSHydrantRightValve]._flags = SF_DISABLED; + _hotspots[kHSHydrantTopValve]._x1 = 105; + _hotspots[kHSHydrantTopValve]._x2 = 192; } else if (isFlag(9)) { - _hotspots[kHSGarbageCan].x1 = 115; - _hotspots[kHSGarbageCan].y1 = 365; - _hotspots[kHSGarbageCan].x2 = 168; - _hotspots[kHSGarbageCan].y2 = 470; - _hotspots[kHSGarbageCan].flags = SF_WALKABLE | SF_TALK_CURSOR | SF_GRAB_CURSOR | SF_LOOK_CURSOR; + _hotspots[kHSGarbageCan]._x1 = 115; + _hotspots[kHSGarbageCan]._y1 = 365; + _hotspots[kHSGarbageCan]._x2 = 168; + _hotspots[kHSGarbageCan]._y2 = 470; + _hotspots[kHSGarbageCan]._flags = SF_WALKABLE | SF_TALK_CURSOR | SF_GRAB_CURSOR | SF_LOOK_CURSOR; _hotspotsWalkPos[kHSGarbageCan].x = 3; _hotspotsWalkPos[kHSGarbageCan].y = 7; } if (isFlag(10)) - _hotspots[kHSGarbageCan].flags = SF_DISABLED; + _hotspots[kHSGarbageCan]._flags = SF_DISABLED; if (isFlag(26)) { - _hotspots[kHSDevice].flags = SF_DISABLED; - _hotspots[kHSHydrantTopValve].flags = SF_DISABLED; - _hotspots[kHSHydrantRightValve].flags = SF_DISABLED; - _hotspots[kHSPlatypus].flags = SF_DISABLED; + _hotspots[kHSDevice]._flags = SF_DISABLED; + _hotspots[kHSHydrantTopValve]._flags = SF_DISABLED; + _hotspots[kHSHydrantRightValve]._flags = SF_DISABLED; + _hotspots[kHSPlatypus]._flags = SF_DISABLED; } if (isFlag(14)) { - _hotspots[kHSHydrantTopValve].flags = SF_DISABLED; - _hotspots[kHSCowboyHat].flags = SF_DISABLED; + _hotspots[kHSHydrantTopValve]._flags = SF_DISABLED; + _hotspots[kHSCowboyHat]._flags = SF_DISABLED; } _hotspotsCount = 11; } @@ -571,9 +571,9 @@ void GnapEngine::scene18_run() { break; case GRAB_CURSOR: if (isFlag(7)) { - _hotspots[kHSWalkArea2].flags |= SF_WALKABLE; + _hotspots[kHSWalkArea2]._flags |= SF_WALKABLE; gnapWalkTo(_hotspotsWalkPos[kHSHydrantTopValve].x, _hotspotsWalkPos[kHSHydrantTopValve].y, 0, 0x107BA, 1); - _hotspots[kHSWalkArea2].flags &= ~SF_WALKABLE; + _hotspots[kHSWalkArea2]._flags &= ~SF_WALKABLE; _gnapActionStatus = kASCloseTopValve; } else playGnapImpossible(0, 0); @@ -679,14 +679,14 @@ void GnapEngine::scene18_run() { scene18_closeHydrantValve(); _isLeavingScene = 1; _newSceneNum = 20; - _hotspots[kHSWalkArea2].flags |= SF_WALKABLE; + _hotspots[kHSWalkArea2]._flags |= SF_WALKABLE; gnapWalkTo(_hotspotsWalkPos[kHSExitGrubCity].x, _hotspotsWalkPos[kHSExitGrubCity].y, 0, 0x107B2, 1); _gnapActionStatus = kASLeaveScene; if (isFlag(26)) scene18_platEndPhoning(0); else platypusWalkTo(_hotspotsWalkPos[kHSExitGrubCity].x, _hotspotsWalkPos[kHSExitGrubCity].y - 1, -1, 0x107CF, 1); - _hotspots[kHSWalkArea2].flags &= ~SF_WALKABLE; + _hotspots[kHSWalkArea2]._flags &= ~SF_WALKABLE; } break; @@ -699,19 +699,19 @@ void GnapEngine::scene18_run() { } else { gnapWalkTo(-1, -1, -1, -1, 1); } - _mouseClickState.left = false; + _mouseClickState._left = false; } break; default: - if (_gnapActionStatus != kASStandingOnHydrant && _mouseClickState.left) { + if (_gnapActionStatus != kASStandingOnHydrant && _mouseClickState._left) { if (isFlag(10)) { scene18_gnapCarryGarbageCanTo(-1, -1, 0, -1, -1); scene18_putDownGarbageCan(0); } else { gnapWalkTo(-1, -1, -1, -1, 1); } - _mouseClickState.left = false; + _mouseClickState._left = false; } break; @@ -739,11 +739,11 @@ void GnapEngine::scene18_run() { clearFlag(26); } } else { - _hotspots[kHSWalkArea1].y2 += 48; - _hotspots[kHSWalkArea2].x1 += 75; + _hotspots[kHSWalkArea1]._y2 += 48; + _hotspots[kHSWalkArea2]._x1 += 75; updateBeaverIdleSequence(); - _hotspots[kHSWalkArea2].x1 -= 75; - _hotspots[kHSWalkArea1].y2 -= 48; + _hotspots[kHSWalkArea2]._x1 -= 75; + _hotspots[kHSWalkArea1]._y2 -= 48; } if (!_timers[5]) { _timers[5] = getRandom(100) + 100; @@ -831,9 +831,9 @@ void GnapEngine::scene18_updateAnimations() { playGnapPullOutDevice(2, 7); playGnapUseDevice(0, 0); _gameSys->insertSequence(0x20C, 19, 0, 0, kSeqNone, 0, 0, 0); - _hotspots[kHSWalkArea2].flags |= SF_WALKABLE; + _hotspots[kHSWalkArea2]._flags |= SF_WALKABLE; gnapWalkTo(_hotspotsWalkPos[kHSHydrantTopValve].x, _hotspotsWalkPos[kHSHydrantTopValve].y, 0, 0x107BB, 1); - _hotspots[kHSWalkArea2].flags &= ~SF_WALKABLE; + _hotspots[kHSWalkArea2]._flags &= ~SF_WALKABLE; _gnapActionStatus = kASOpenTopValveDone; break; case kASOpenTopValveDone: @@ -929,9 +929,9 @@ void GnapEngine::scene18_updateAnimations() { playGnapPullOutDevice(2, 7); playGnapUseDevice(0, 0); _gameSys->insertSequence(0x20B, 19, 0, 0, kSeqNone, 0, 0, 0); - _hotspots[kHSWalkArea2].flags |= SF_WALKABLE; + _hotspots[kHSWalkArea2]._flags |= SF_WALKABLE; gnapWalkTo(_hotspotsWalkPos[kHSHydrantRightValve].x, _hotspotsWalkPos[kHSHydrantRightValve].y, 0, 0x107BA, 1); - _hotspots[kHSWalkArea2].flags &= ~SF_WALKABLE; + _hotspots[kHSWalkArea2]._flags &= ~SF_WALKABLE; if (_gnapActionStatus == kASOpenRightValveNoGarbageCan) _gnapActionStatus = kASOpenRightValveNoGarbageCanDone; else diff --git a/engines/gnap/scenes/scene19.cpp b/engines/gnap/scenes/scene19.cpp index ebfdd728a1..60208bc381 100644 --- a/engines/gnap/scenes/scene19.cpp +++ b/engines/gnap/scenes/scene19.cpp @@ -81,17 +81,17 @@ void GnapEngine::scene19_updateHotspots() { setHotspot(kHSWalkArea3, 0, 0, 800, 437); setDeviceHotspot(kHSDevice, -1, -1, -1, -1); if (isFlag(26)) { - _hotspots[kHSToy1].flags = SF_DISABLED; - _hotspots[kHSToy2].flags = SF_DISABLED; - _hotspots[kHSToy3].flags = SF_DISABLED; - _hotspots[kHSToy4].flags = SF_DISABLED; - _hotspots[kHSToy5].flags = SF_DISABLED; - _hotspots[kHSToy6].flags = SF_DISABLED; - _hotspots[kHSToy7].flags = SF_DISABLED; - _hotspots[kHSShopAssistant].flags = SF_DISABLED; - _hotspots[kHSPhone].flags = SF_DISABLED; - _hotspots[kHSPlatypus].flags = SF_DISABLED; - _hotspots[kHSPicture].flags = SF_PLAT_CURSOR | SF_TALK_CURSOR | SF_GRAB_CURSOR | SF_LOOK_CURSOR; + _hotspots[kHSToy1]._flags = SF_DISABLED; + _hotspots[kHSToy2]._flags = SF_DISABLED; + _hotspots[kHSToy3]._flags = SF_DISABLED; + _hotspots[kHSToy4]._flags = SF_DISABLED; + _hotspots[kHSToy5]._flags = SF_DISABLED; + _hotspots[kHSToy6]._flags = SF_DISABLED; + _hotspots[kHSToy7]._flags = SF_DISABLED; + _hotspots[kHSShopAssistant]._flags = SF_DISABLED; + _hotspots[kHSPhone]._flags = SF_DISABLED; + _hotspots[kHSPlatypus]._flags = SF_DISABLED; + _hotspots[kHSPicture]._flags = SF_PLAT_CURSOR | SF_TALK_CURSOR | SF_GRAB_CURSOR | SF_LOOK_CURSOR; } _hotspotsCount = 16; } @@ -182,14 +182,14 @@ void GnapEngine::scene19_run() { if (_gnapActionStatus < 0) { _isLeavingScene = true; _newSceneNum = 18; - _hotspots[kHSWalkArea1].flags |= SF_WALKABLE; + _hotspots[kHSWalkArea1]._flags |= SF_WALKABLE; gnapWalkTo(_hotspotsWalkPos[1].x, _hotspotsWalkPos[1].y, 0, 0x107B2, 1); _gnapActionStatus = kASLeaveScene; if (isFlag(26)) setFlag(27); else platypusWalkTo(_hotspotsWalkPos[1].x + 1, _hotspotsWalkPos[1].y, -1, 0x107C5, 1); - _hotspots[kHSWalkArea1].flags &= ~SF_WALKABLE; + _hotspots[kHSWalkArea1]._flags &= ~SF_WALKABLE; } break; @@ -300,9 +300,9 @@ void GnapEngine::scene19_run() { break; default: - if (_mouseClickState.left) { + if (_mouseClickState._left) { gnapWalkTo(-1, -1, -1, -1, 1); - _mouseClickState.left = 0; + _mouseClickState._left = 0; } } diff --git a/engines/gnap/scenes/scene20.cpp b/engines/gnap/scenes/scene20.cpp index 136f234bce..41a0cc4f79 100644 --- a/engines/gnap/scenes/scene20.cpp +++ b/engines/gnap/scenes/scene20.cpp @@ -266,10 +266,10 @@ void GnapEngine::scene20_run() { initGnapPos(8, 6, 3); initBeaverPos(9, 6, 4); endSceneInit(); - _hotspots[kHSWalkArea2].flags |= SF_WALKABLE; + _hotspots[kHSWalkArea2]._flags |= SF_WALKABLE; gnapWalkTo(8, 8, -1, 0x107BA, 1); platypusWalkTo(9, 9, -1, 0x107C2, 1); - _hotspots[kHSWalkArea2].flags &= ~SF_WALKABLE; + _hotspots[kHSWalkArea2]._flags &= ~SF_WALKABLE; break; } } @@ -351,11 +351,11 @@ void GnapEngine::scene20_run() { _timers[4] = 0; _isLeavingScene = 1; _newSceneNum = 18; - _hotspots[kHSWalkArea2].flags |= SF_WALKABLE; + _hotspots[kHSWalkArea2]._flags |= SF_WALKABLE; gnapWalkTo(_hotspotsWalkPos[kHSExitOutsideToyStore].x, _hotspotsWalkPos[kHSExitOutsideToyStore].y, 0, 0x107AB, 1); _gnapActionStatus = kASLeaveScene; platypusWalkTo(_hotspotsWalkPos[kHSExitOutsideToyStore].x, _hotspotsWalkPos[kHSExitOutsideToyStore].y + 1, -1, 0x107CD, 1); - _hotspots[kHSWalkArea2].flags &= ~SF_WALKABLE; + _hotspots[kHSWalkArea2]._flags &= ~SF_WALKABLE; } break; @@ -479,9 +479,9 @@ void GnapEngine::scene20_run() { break; default: - if (_mouseClickState.left) { + if (_mouseClickState._left) { gnapWalkTo(-1, -1, -1, -1, 1); - _mouseClickState.left = false; + _mouseClickState._left = false; } break; @@ -494,9 +494,9 @@ void GnapEngine::scene20_run() { if (!_isLeavingScene) { if (_beaverActionStatus < 0) { - _hotspots[kHSWalkArea1].y2 += 48; + _hotspots[kHSWalkArea1]._y2 += 48; updateBeaverIdleSequence(); - _hotspots[kHSWalkArea1].y2 -= 48; + _hotspots[kHSWalkArea1]._y2 -= 48; } if (_gnapActionStatus < 0) updateGnapIdleSequence(); diff --git a/engines/gnap/scenes/scene21.cpp b/engines/gnap/scenes/scene21.cpp index 56da904ce1..6f1f406ad2 100644 --- a/engines/gnap/scenes/scene21.cpp +++ b/engines/gnap/scenes/scene21.cpp @@ -60,9 +60,9 @@ void GnapEngine::scene21_updateHotspots() { setHotspot(kHSWalkArea2, 698, 0, 800, 600); setDeviceHotspot(kHSDevice, -1, -1, -1, -1); if (isFlag(4) || !isFlag(3)) - _hotspots[kHSBanana].flags = SF_WALKABLE | SF_DISABLED; + _hotspots[kHSBanana]._flags = SF_WALKABLE | SF_DISABLED; if (isFlag(3)) - _hotspots[kHSOldLady].flags = SF_DISABLED; + _hotspots[kHSOldLady]._flags = SF_DISABLED; _hotspotsCount = 7; } @@ -187,10 +187,10 @@ void GnapEngine::scene21_run() { break; case GRAB_CURSOR: _gnapIdleFacing = 5; - _hotspots[kHSWalkArea1].flags |= SF_WALKABLE; + _hotspots[kHSWalkArea1]._flags |= SF_WALKABLE; gnapWalkTo(7, 6, 0, getGnapSequenceId(gskIdle, 0, 0) | 0x10000, 1); _gnapActionStatus = kASGrabOldLady; - _hotspots[kHSWalkArea1].flags &= ~SF_WALKABLE; + _hotspots[kHSWalkArea1]._flags &= ~SF_WALKABLE; break; case TALK_CURSOR: _gnapIdleFacing = 7; @@ -221,9 +221,9 @@ void GnapEngine::scene21_run() { break; default: - if (_mouseClickState.left) { + if (_mouseClickState._left) { gnapWalkTo(-1, -1, -1, -1, 1); - _mouseClickState.left = false; + _mouseClickState._left = false; } break; diff --git a/engines/gnap/scenes/scene22.cpp b/engines/gnap/scenes/scene22.cpp index 0290666daa..5c390d66e5 100644 --- a/engines/gnap/scenes/scene22.cpp +++ b/engines/gnap/scenes/scene22.cpp @@ -212,9 +212,9 @@ void GnapEngine::scene22_run() { break; default: - if (_mouseClickState.left) { + if (_mouseClickState._left) { gnapWalkTo(-1, -1, -1, -1, 1); - _mouseClickState.left = false; + _mouseClickState._left = false; } break; diff --git a/engines/gnap/scenes/scene23.cpp b/engines/gnap/scenes/scene23.cpp index cafeb71a56..7257ab1753 100644 --- a/engines/gnap/scenes/scene23.cpp +++ b/engines/gnap/scenes/scene23.cpp @@ -185,9 +185,9 @@ void GnapEngine::scene23_run() { break; default: - if (_mouseClickState.left) { + if (_mouseClickState._left) { gnapWalkTo(-1, -1, -1, -1, 1); - _mouseClickState.left = false; + _mouseClickState._left = false; } break; diff --git a/engines/gnap/scenes/scene24.cpp b/engines/gnap/scenes/scene24.cpp index 236ee7d30a..b7660a3723 100644 --- a/engines/gnap/scenes/scene24.cpp +++ b/engines/gnap/scenes/scene24.cpp @@ -171,9 +171,9 @@ void GnapEngine::scene24_run() { break; default: - if (_mouseClickState.left) { + if (_mouseClickState._left) { gnapWalkTo(-1, -1, -1, -1, 1); - _mouseClickState.left = false; + _mouseClickState._left = false; } break; diff --git a/engines/gnap/scenes/scene25.cpp b/engines/gnap/scenes/scene25.cpp index cb82658cc2..1539b319cf 100644 --- a/engines/gnap/scenes/scene25.cpp +++ b/engines/gnap/scenes/scene25.cpp @@ -91,11 +91,11 @@ void GnapEngine::scene25_playAnims(int index) { } _gameSys->insertSpriteDrawItem(_largeSprite, 0, 0, 300); delayTicksCursor(5); - while (!_mouseClickState.left && !isKeyStatus1(Common::KEYCODE_ESCAPE) && !isKeyStatus1(Common::KEYCODE_SPACE) && + while (!_mouseClickState._left && !isKeyStatus1(Common::KEYCODE_ESCAPE) && !isKeyStatus1(Common::KEYCODE_SPACE) && !isKeyStatus1(29)) { gameUpdateTick(); } - _mouseClickState.left = false; + _mouseClickState._left = false; clearKeyStatus1(Common::KEYCODE_ESCAPE); clearKeyStatus1(29); clearKeyStatus1(Common::KEYCODE_SPACE); @@ -223,16 +223,16 @@ void GnapEngine::scene25_run() { if (isFlag(2)) { _isLeavingScene = true; _newSceneNum = 26; - _hotspots[kHSWalkArea1].flags |= SF_WALKABLE; + _hotspots[kHSWalkArea1]._flags |= SF_WALKABLE; gnapWalkTo(_hotspotsWalkPos[kHSExitInsideCircusWorld].x, _hotspotsWalkPos[kHSExitInsideCircusWorld].y, 0, 0x107B1, 1); _gnapActionStatus = kASLeaveScene; platypusWalkTo(_hotspotsWalkPos[kHSExitInsideCircusWorld].x + 1, _hotspotsWalkPos[kHSExitInsideCircusWorld].y, -1, 0x107C2, 1); - _hotspots[kHSWalkArea1].flags &= ~SF_WALKABLE; + _hotspots[kHSWalkArea1]._flags &= ~SF_WALKABLE; } else { - _hotspots[kHSWalkArea1].flags |= SF_WALKABLE; + _hotspots[kHSWalkArea1]._flags |= SF_WALKABLE; gnapWalkTo(4, 5, 0, 0x107BB, 1); _gnapActionStatus = kASEnterCircusWihoutTicket; - _hotspots[kHSWalkArea1].flags &= ~SF_WALKABLE; + _hotspots[kHSWalkArea1]._flags &= ~SF_WALKABLE; } } break; @@ -274,9 +274,9 @@ void GnapEngine::scene25_run() { break; default: - if (_mouseClickState.left) { + if (_mouseClickState._left) { gnapWalkTo(-1, -1, -1, -1, 1); - _mouseClickState.left = false; + _mouseClickState._left = false; } break; @@ -356,10 +356,10 @@ void GnapEngine::scene25_updateAnimations() { _gameSys->insertSequence(0x60, 2, 0, 0, kSeqNone, 0, 0, 0); _s25_currTicketVendorSequenceId = _s25_nextTicketVendorSequenceId; _s25_nextTicketVendorSequenceId = -1; - _hotspots[kHSWalkArea1].flags |= SF_WALKABLE; + _hotspots[kHSWalkArea1]._flags |= SF_WALKABLE; playGnapIdle(0, 0); gnapWalkTo(_hotspotsWalkPos[3].x, _hotspotsWalkPos[3].y, -1, 0x107BB, 1); - _hotspots[kHSWalkArea1].flags &= ~SF_WALKABLE; + _hotspots[kHSWalkArea1]._flags &= ~SF_WALKABLE; _gnapActionStatus = kASEnterCircusWihoutTicketDone; break; case kASEnterCircusWihoutTicketDone: diff --git a/engines/gnap/scenes/scene26.cpp b/engines/gnap/scenes/scene26.cpp index 644db6b3fd..974525d55a 100644 --- a/engines/gnap/scenes/scene26.cpp +++ b/engines/gnap/scenes/scene26.cpp @@ -187,9 +187,9 @@ void GnapEngine::scene26_run() { break; default: - if (_mouseClickState.left) { + if (_mouseClickState._left) { gnapWalkTo(-1, -1, -1, -1, 1); - _mouseClickState.left = false; + _mouseClickState._left = false; } break; diff --git a/engines/gnap/scenes/scene27.cpp b/engines/gnap/scenes/scene27.cpp index 000a94203c..720080d1ec 100644 --- a/engines/gnap/scenes/scene27.cpp +++ b/engines/gnap/scenes/scene27.cpp @@ -64,7 +64,7 @@ void GnapEngine::scene27_updateHotspots() { setHotspot(kHSWalkArea1, 0, 0, 800, 507); setDeviceHotspot(kHSDevice, -1, -1, -1, -1); if (isFlag(13)) - _hotspots[kHSBucket].flags = SF_DISABLED; + _hotspots[kHSBucket]._flags = SF_DISABLED; _hotspotsCount = 9; } @@ -252,9 +252,9 @@ void GnapEngine::scene27_run() { _gnapActionStatus = kASLeaveScene; platypusWalkTo(_hotspotsWalkPos[kHSExitClown].x + 1, _hotspotsWalkPos[kHSExitClown].y, -1, 0x107C4, 1); } else { - _hotspots[kHSWalkArea1].flags |= SF_WALKABLE; + _hotspots[kHSWalkArea1]._flags |= SF_WALKABLE; gnapWalkTo(_hotspotsWalkPos[kHSExitClown].x, 7, 0, 0x107BC, 1); - _hotspots[kHSWalkArea1].flags &= SF_WALKABLE; + _hotspots[kHSWalkArea1]._flags &= SF_WALKABLE; _gnapActionStatus = kASTryEnterClownTent; } } @@ -266,9 +266,9 @@ void GnapEngine::scene27_run() { break; default: - if (_mouseClickState.left && _gnapActionStatus < 0) { + if (_mouseClickState._left && _gnapActionStatus < 0) { gnapWalkTo(-1, -1, -1, -1, 1); - _mouseClickState.left = false; + _mouseClickState._left = false; } break; @@ -337,7 +337,7 @@ void GnapEngine::scene27_updateAnimations() { case kASGrabBucket: playGnapPullOutDevice(0, 0); playGnapUseDevice(0, 0); - _hotspots[kHSBucket].flags = SF_DISABLED; + _hotspots[kHSBucket]._flags = SF_DISABLED; invAdd(kItemEmptyBucket); setFlag(13); _gameSys->setAnimation(0xD2, 39, 0); @@ -361,9 +361,9 @@ void GnapEngine::scene27_updateAnimations() { _gnapActionStatus = kASTryEnterClownTentDone; break; case kASTryEnterClownTentDone: - _hotspots[kHSWalkArea1].flags |= SF_WALKABLE; + _hotspots[kHSWalkArea1]._flags |= SF_WALKABLE; gnapWalkTo(_hotspotsWalkPos[7].x, 9, -1, 0x107BC, 1); - _hotspots[kHSWalkArea1].flags &= ~SF_WALKABLE; + _hotspots[kHSWalkArea1]._flags &= ~SF_WALKABLE; _gnapActionStatus = -1; break; case kASEnterClownTent: diff --git a/engines/gnap/scenes/scene28.cpp b/engines/gnap/scenes/scene28.cpp index 251e3b48f4..e39bb8d92d 100644 --- a/engines/gnap/scenes/scene28.cpp +++ b/engines/gnap/scenes/scene28.cpp @@ -65,9 +65,9 @@ void GnapEngine::scene28_updateHotspots() { setHotspot(kHSWalkArea2, 0, 0, 0, 0, 7, SF_DISABLED); setDeviceHotspot(kHSDevice, -1, -1, -1, -1); if (invHas(kItemHorn)) - _hotspots[kHSHorn].flags = SF_DISABLED; + _hotspots[kHSHorn]._flags = SF_DISABLED; if (isFlag(22)) - _hotspots[kHSEmptyBucket].flags = SF_PLAT_CURSOR | SF_TALK_CURSOR | SF_GRAB_CURSOR | SF_LOOK_CURSOR; + _hotspots[kHSEmptyBucket]._flags = SF_PLAT_CURSOR | SF_TALK_CURSOR | SF_GRAB_CURSOR | SF_LOOK_CURSOR; _hotspotsCount = 8; } @@ -178,9 +178,9 @@ void GnapEngine::scene28_run() { } else { _gnapIdleFacing = 5; gnapWalkTo(2, 8, 0, 0x107BB, 1); - _hotspots[kHSWalkArea1].flags |= SF_WALKABLE; + _hotspots[kHSWalkArea1]._flags |= SF_WALKABLE; gnapWalkTo(_hotspotsWalkPos[kHSHorn].x, _hotspotsWalkPos[kHSHorn].y, 0, 0x107BB, 1); - _hotspots[kHSWalkArea1].flags &= ~SF_WALKABLE; + _hotspots[kHSWalkArea1]._flags &= ~SF_WALKABLE; _gnapActionStatus = kASGrabHornFails; } break; @@ -237,10 +237,10 @@ void GnapEngine::scene28_run() { if (_gnapActionStatus < 0) { _isLeavingScene = true; _newSceneNum = 27; - _hotspots[kHSWalkArea1].flags |= SF_WALKABLE; + _hotspots[kHSWalkArea1]._flags |= SF_WALKABLE; gnapWalkTo(_hotspotsWalkPos[kHSExitOutsideClown].x, _hotspotsWalkPos[kHSExitOutsideClown].y, 0, 0x107BF, 1); _gnapActionStatus = kASLeaveScene; - _hotspots[kHSWalkArea1].flags &= ~SF_WALKABLE; + _hotspots[kHSWalkArea1]._flags &= ~SF_WALKABLE; platypusWalkTo(_hotspotsWalkPos[kHSExitOutsideClown].x - 1, _hotspotsWalkPos[kHSExitOutsideClown].y, -1, 0x107C2, 1); } break; @@ -276,9 +276,9 @@ void GnapEngine::scene28_run() { break; default: - if (_mouseClickState.left && _gnapActionStatus < 0) { + if (_mouseClickState._left && _gnapActionStatus < 0) { gnapWalkTo(-1, -1, -1, -1, 1); - _mouseClickState.left = false; + _mouseClickState._left = false; } break; diff --git a/engines/gnap/scenes/scene29.cpp b/engines/gnap/scenes/scene29.cpp index 4433c0a725..666ec9e845 100644 --- a/engines/gnap/scenes/scene29.cpp +++ b/engines/gnap/scenes/scene29.cpp @@ -54,7 +54,7 @@ void GnapEngine::scene29_updateHotspots() { setHotspot(kHSWalkArea1, 0, 0, 800, 478); setDeviceHotspot(kHSDevice, -1, -1, -1, -1); if (invHas(kItemHorn)) - _hotspots[kHSMonkey].flags = SF_WALKABLE | SF_TALK_CURSOR | SF_GRAB_CURSOR | SF_LOOK_CURSOR; + _hotspots[kHSMonkey]._flags = SF_WALKABLE | SF_TALK_CURSOR | SF_GRAB_CURSOR | SF_LOOK_CURSOR; _hotspotsCount = 7; } @@ -221,9 +221,9 @@ void GnapEngine::scene29_run() { break; default: - if (_mouseClickState.left) { + if (_mouseClickState._left) { gnapWalkTo(-1, -1, -1, -1, 1); - _mouseClickState.left = false; + _mouseClickState._left = false; } break; } diff --git a/engines/gnap/scenes/scene30.cpp b/engines/gnap/scenes/scene30.cpp index 85e6614f91..48b97bdaae 100644 --- a/engines/gnap/scenes/scene30.cpp +++ b/engines/gnap/scenes/scene30.cpp @@ -127,9 +127,9 @@ void GnapEngine::scene30_run() { case kHSPillMachine: if (_gnapActionStatus < 0) { if (_grabCursorSpriteIndex == kItemDiceQuarterHole && !isFlag(23)) { - _hotspots[kHSWalkArea1].flags |= SF_WALKABLE; + _hotspots[kHSWalkArea1]._flags |= SF_WALKABLE; gnapWalkTo(_hotspotsWalkPos[kHSPillMachine].x, _hotspotsWalkPos[kHSPillMachine].y, 0, 0x107BC, 1); - _hotspots[kHSWalkArea1].flags &= ~SF_WALKABLE; + _hotspots[kHSWalkArea1]._flags &= ~SF_WALKABLE; _gnapActionStatus = kASUsePillMachine; hasTakenPill = true; } else if (_grabCursorSpriteIndex >= 0) { @@ -171,9 +171,9 @@ void GnapEngine::scene30_run() { break; default: - if (_mouseClickState.left) { + if (_mouseClickState._left) { gnapWalkTo(-1, -1, -1, -1, 1); - _mouseClickState.left = false; + _mouseClickState._left = false; } break; diff --git a/engines/gnap/scenes/scene31.cpp b/engines/gnap/scenes/scene31.cpp index 39bb1bb267..17cde86db4 100644 --- a/engines/gnap/scenes/scene31.cpp +++ b/engines/gnap/scenes/scene31.cpp @@ -151,9 +151,9 @@ void GnapEngine::scene31_run() { break; case GRAB_CURSOR: gnapWalkTo(_hotspotsWalkPos[kHSMeasuringClown].x, _hotspotsWalkPos[kHSMeasuringClown].y + 1, -1, -1, 1); - _hotspots[kHSWalkArea1].flags |= SF_WALKABLE; + _hotspots[kHSWalkArea1]._flags |= SF_WALKABLE; gnapWalkTo(_hotspotsWalkPos[kHSMeasuringClown].x, _hotspotsWalkPos[kHSMeasuringClown].y, 0, 0x107B9, 1); - _hotspots[kHSWalkArea1].flags &= ~SF_WALKABLE; + _hotspots[kHSWalkArea1]._flags &= ~SF_WALKABLE; _gnapActionStatus = kASUseMeasuringClown; _timers[4] = 300; break; @@ -164,9 +164,9 @@ void GnapEngine::scene31_run() { if (!invHas(kItemBucketWithBeer)) { gnapUseDeviceOnBeaver(); platypusWalkTo(_hotspotsWalkPos[kHSMeasuringClown].x, _hotspotsWalkPos[kHSMeasuringClown].y + 1, 1, 0x107C2, 1); - _hotspots[kHSWalkArea1].flags |= SF_WALKABLE; + _hotspots[kHSWalkArea1]._flags |= SF_WALKABLE; platypusWalkTo(_hotspotsWalkPos[kHSMeasuringClown].x, _hotspotsWalkPos[kHSMeasuringClown].y, 1, 0x107C2, 1); - _hotspots[kHSWalkArea1].flags &= ~SF_WALKABLE; + _hotspots[kHSWalkArea1]._flags &= ~SF_WALKABLE; _beaverActionStatus = kASPlatMeasuringClown; _gnapActionStatus = kASPlatMeasuringClown; _timers[4] = 300; @@ -241,9 +241,9 @@ void GnapEngine::scene31_run() { break; default: - if (_mouseClickState.left) { + if (_mouseClickState._left) { gnapWalkTo(-1, -1, -1, -1, 1); - _mouseClickState.left = false; + _mouseClickState._left = false; } break; } diff --git a/engines/gnap/scenes/scene32.cpp b/engines/gnap/scenes/scene32.cpp index 9eaf4d232d..fca05ee7b4 100644 --- a/engines/gnap/scenes/scene32.cpp +++ b/engines/gnap/scenes/scene32.cpp @@ -150,9 +150,9 @@ void GnapEngine::scene32_run() { } - if (_mouseClickState.left && _gnapActionStatus < 0) { + if (_mouseClickState._left && _gnapActionStatus < 0) { gnapWalkTo(-1, -1, -1, -1, 1); - _mouseClickState.left = 0; + _mouseClickState._left = 0; } scene32_updateAnimations(); diff --git a/engines/gnap/scenes/scene33.cpp b/engines/gnap/scenes/scene33.cpp index fc66b15b65..b601d5fab1 100644 --- a/engines/gnap/scenes/scene33.cpp +++ b/engines/gnap/scenes/scene33.cpp @@ -222,9 +222,9 @@ void GnapEngine::scene33_run() { break; default: - if (_mouseClickState.left && _gnapActionStatus < 0) { + if (_mouseClickState._left && _gnapActionStatus < 0) { gnapWalkTo(-1, -1, -1, -1, 1); - _mouseClickState.left = false; + _mouseClickState._left = false; } break; diff --git a/engines/gnap/scenes/scene38.cpp b/engines/gnap/scenes/scene38.cpp index f807728bae..a53d5b0691 100644 --- a/engines/gnap/scenes/scene38.cpp +++ b/engines/gnap/scenes/scene38.cpp @@ -73,21 +73,21 @@ void GnapEngine::scene38_updateHotspots() { setHotspot(kHSWalkArea6, 393, 0, 698, 445, SF_WALKABLE | SF_DISABLED); setDeviceHotspot(kHSDevice, -1, -1, -1, -1); if (_beaverActionStatus == kASBeaverHoldingTrapDoor) - _hotspots[kHSPlatypus].flags = SF_WALKABLE | SF_DISABLED; + _hotspots[kHSPlatypus]._flags = SF_WALKABLE | SF_DISABLED; if (_beaverActionStatus == kASBeaverHoldingTrapDoor) - _hotspots[kHSExitCave].flags = SF_EXIT_D_CURSOR; + _hotspots[kHSExitCave]._flags = SF_EXIT_D_CURSOR; else if (_gnapActionStatus == kASHoldingHuntingTrophy) - _hotspots[kHSExitCave].flags = SF_EXIT_D_CURSOR; + _hotspots[kHSExitCave]._flags = SF_EXIT_D_CURSOR; if (_beaverActionStatus == kASBeaverHoldingTrapDoor) - _hotspots[kHSTrapDoorLid1].flags = SF_DISABLED; + _hotspots[kHSTrapDoorLid1]._flags = SF_DISABLED; else if (_gnapActionStatus == kASHoldingHuntingTrophy) - _hotspots[kHSTrapDoorLid1].flags = SF_PLAT_CURSOR | SF_TALK_CURSOR | SF_GRAB_CURSOR | SF_LOOK_CURSOR; + _hotspots[kHSTrapDoorLid1]._flags = SF_PLAT_CURSOR | SF_TALK_CURSOR | SF_GRAB_CURSOR | SF_LOOK_CURSOR; if (_beaverActionStatus == kASBeaverHoldingTrapDoor) - _hotspots[kHSTrapDoorLid2].flags = SF_DISABLED; + _hotspots[kHSTrapDoorLid2]._flags = SF_DISABLED; else if (_gnapActionStatus == kASHoldingHuntingTrophy) - _hotspots[kHSTrapDoorLid2].flags = SF_PLAT_CURSOR | SF_TALK_CURSOR | SF_GRAB_CURSOR | SF_LOOK_CURSOR; + _hotspots[kHSTrapDoorLid2]._flags = SF_PLAT_CURSOR | SF_TALK_CURSOR | SF_GRAB_CURSOR | SF_LOOK_CURSOR; if (_beaverActionStatus == kASBeaverHoldingTrapDoor) - _hotspots[kHSWalkArea6].flags = 0; + _hotspots[kHSWalkArea6]._flags = SF_NONE; _hotspotsCount = 13; } @@ -224,12 +224,12 @@ void GnapEngine::scene38_run() { break; default: - if (_mouseClickState.left) { + if (_mouseClickState._left) { if (_gnapActionStatus == kASHoldingHuntingTrophy) _gnapActionStatus = kASReleaseHuntingTrophy; else if (_gnapActionStatus < 0) gnapWalkTo(-1, -1, -1, -1, 1); - _mouseClickState.left = false; + _mouseClickState._left = false; } break; diff --git a/engines/gnap/scenes/scene39.cpp b/engines/gnap/scenes/scene39.cpp index 4ba8e16b05..b8a5f1e724 100644 --- a/engines/gnap/scenes/scene39.cpp +++ b/engines/gnap/scenes/scene39.cpp @@ -172,9 +172,9 @@ void GnapEngine::scene39_run() { break; default: - if (_mouseClickState.left && _gnapActionStatus < 0) { + if (_mouseClickState._left && _gnapActionStatus < 0) { gnapWalkTo(-1, -1, -1, -1, 1); - _mouseClickState.left = false; + _mouseClickState._left = false; } break; diff --git a/engines/gnap/scenes/scene40.cpp b/engines/gnap/scenes/scene40.cpp index fe91dbf777..99b62f6330 100644 --- a/engines/gnap/scenes/scene40.cpp +++ b/engines/gnap/scenes/scene40.cpp @@ -156,8 +156,8 @@ void GnapEngine::scene40_run() { break; default: - if (_mouseClickState.left && _gnapActionStatus < 0) - _mouseClickState.left = false; + if (_mouseClickState._left && _gnapActionStatus < 0) + _mouseClickState._left = false; break; } diff --git a/engines/gnap/scenes/scene41.cpp b/engines/gnap/scenes/scene41.cpp index ff90193888..b84c4ba988 100644 --- a/engines/gnap/scenes/scene41.cpp +++ b/engines/gnap/scenes/scene41.cpp @@ -168,10 +168,10 @@ void GnapEngine::scene41_run() { playSound(0x1094B, 1); if (!isFlag(12)) { - _hotspots[kHSToyUfo].x1 = _toyUfoX - 25; - _hotspots[kHSToyUfo].y1 = _toyUfoY - 20; - _hotspots[kHSToyUfo].x2 = _toyUfoX + 25; - _hotspots[kHSToyUfo].y2 = _toyUfoY + 20; + _hotspots[kHSToyUfo]._x1 = _toyUfoX - 25; + _hotspots[kHSToyUfo]._y1 = _toyUfoY - 20; + _hotspots[kHSToyUfo]._x2 = _toyUfoX + 25; + _hotspots[kHSToyUfo]._y2 = _toyUfoY + 20; } updateMouseCursor(); @@ -354,8 +354,8 @@ void GnapEngine::scene41_run() { } } - if (_mouseClickState.left && _gnapActionStatus < 0) { - _mouseClickState.left = false; + if (_mouseClickState._left && _gnapActionStatus < 0) { + _mouseClickState._left = false; if (isFlag(12)) { int sequenceId; if (_leftClickMouseX >= 400) { diff --git a/engines/gnap/scenes/scene42.cpp b/engines/gnap/scenes/scene42.cpp index 33f437b8c6..c15919a1e1 100644 --- a/engines/gnap/scenes/scene42.cpp +++ b/engines/gnap/scenes/scene42.cpp @@ -73,7 +73,7 @@ void GnapEngine::scene42_updateHotspots() { setHotspot(kHSUfoHotSauce, 335, 110, 440, 175, SF_DISABLED); setDeviceHotspot(kHSUfoDevice, -1, 534, -1, 599); if ((isFlag(20) || isFlag(18)) && isFlag(23) && !isFlag(24)) - _hotspots[kHSUfoHotSauce].flags = SF_GRAB_CURSOR; + _hotspots[kHSUfoHotSauce]._flags = SF_GRAB_CURSOR; _hotspotsCount = 5; } else { setHotspot(kHSPlatypus, 0, 0, 0, 0, SF_WALKABLE | SF_TALK_CURSOR | SF_GRAB_CURSOR | SF_LOOK_CURSOR); @@ -311,8 +311,8 @@ void GnapEngine::scene42_run() { } - if (_mouseClickState.left && _gnapActionStatus < 0) { - _mouseClickState.left = false; + if (_mouseClickState._left && _gnapActionStatus < 0) { + _mouseClickState._left = false; if (isFlag(12)) { _toyUfoActionStatus = kASToyUfoRefresh; toyUfoFlyTo(-1, -1, 0, 799, 0, 300, 3); diff --git a/engines/gnap/scenes/scene43.cpp b/engines/gnap/scenes/scene43.cpp index 611e5c9bd3..f7ba272082 100644 --- a/engines/gnap/scenes/scene43.cpp +++ b/engines/gnap/scenes/scene43.cpp @@ -63,10 +63,10 @@ void GnapEngine::scene43_updateHotspots() { setHotspot(kHSUfoBucket, 475, 290, 545, 365, SF_DISABLED); setDeviceHotspot(kHSUfoDevice, -1, 534, -1, 599); if (isFlag(19)) - _hotspots[kHSUfoBucket].flags = SF_GRAB_CURSOR; + _hotspots[kHSUfoBucket]._flags = SF_GRAB_CURSOR; // NOTE Bug in the original. Key hotspot wasn't disabled. if (isFlag(14)) - _hotspots[kHSUfoKey].flags = SF_DISABLED; + _hotspots[kHSUfoKey]._flags = SF_DISABLED; _hotspotsCount = 6; } else { setHotspot(kHSPlatypus, 0, 0, 0, 0, SF_WALKABLE | SF_TALK_CURSOR | SF_GRAB_CURSOR | SF_LOOK_CURSOR); @@ -80,7 +80,7 @@ void GnapEngine::scene43_updateHotspots() { setHotspot(kHSWalkArea2, 465, 0, 800, 493); setDeviceHotspot(kHSDevice, -1, -1, -1, -1); if (isFlag(14)) - _hotspots[kHSKey].flags = SF_DISABLED; + _hotspots[kHSKey]._flags = SF_DISABLED; _hotspotsCount = 10; } } @@ -311,8 +311,8 @@ void GnapEngine::scene43_run() { } - if (_mouseClickState.left && _gnapActionStatus < 0) { - _mouseClickState.left = false; + if (_mouseClickState._left && _gnapActionStatus < 0) { + _mouseClickState._left = false; if (isFlag(12) && (_toyUfoActionStatus == 5 || _toyUfoActionStatus == -1)) { _toyUfoActionStatus = 5; toyUfoFlyTo(-1, -1, 0, 799, 0, 300, 3); diff --git a/engines/gnap/scenes/scene44.cpp b/engines/gnap/scenes/scene44.cpp index 27336950c6..bcc435ebc8 100644 --- a/engines/gnap/scenes/scene44.cpp +++ b/engines/gnap/scenes/scene44.cpp @@ -72,9 +72,9 @@ void GnapEngine::scene44_updateHotspots() { setHotspot(kHSWalkArea2, 617, 0, 800, 600); setDeviceHotspot(kHSDevice, -1, -1, -1, -1); if (isFlag(13)) - _hotspots[kHSKissingLady].flags = SF_DISABLED; + _hotspots[kHSKissingLady]._flags = SF_DISABLED; if (isFlag(15)) - _hotspots[kHSSpring].flags = SF_DISABLED; + _hotspots[kHSSpring]._flags = SF_DISABLED; _hotspotsCount = 10; } } @@ -356,8 +356,8 @@ void GnapEngine::scene44_run() { } - if (_mouseClickState.left && _gnapActionStatus < 0) { - _mouseClickState.left = false; + if (_mouseClickState._left && _gnapActionStatus < 0) { + _mouseClickState._left = false; if (isFlag(12)) { _toyUfoActionStatus = 7; toyUfoFlyTo(-1, -1, 0, 799, 0, 300, 3); diff --git a/engines/gnap/scenes/scene45.cpp b/engines/gnap/scenes/scene45.cpp index ba583045e5..3e1b5299b9 100644 --- a/engines/gnap/scenes/scene45.cpp +++ b/engines/gnap/scenes/scene45.cpp @@ -70,14 +70,14 @@ void GnapEngine::scene45_updateHotspots() { setHotspot(kHSWalkArea1, 0, 0, 800, 472); setDeviceHotspot(kHSDevice, -1, -1, -1, -1); if (isFlag(22)) { - _hotspots[kHSPlatypus].flags = SF_DISABLED; - _hotspots[kHSExitUfoParty].flags = SF_DISABLED; - _hotspots[kHSExitShoe].flags = SF_DISABLED; - _hotspots[kHSExitRight].flags = SF_DISABLED; - _hotspots[kHSExitDiscoBall].flags = SF_EXIT_U_CURSOR; + _hotspots[kHSPlatypus]._flags = SF_DISABLED; + _hotspots[kHSExitUfoParty]._flags = SF_DISABLED; + _hotspots[kHSExitShoe]._flags = SF_DISABLED; + _hotspots[kHSExitRight]._flags = SF_DISABLED; + _hotspots[kHSExitDiscoBall]._flags = SF_EXIT_U_CURSOR; } if (isFlag(23) || isFlag(22)) - _hotspots[kHSDiscoBall].flags = SF_DISABLED; + _hotspots[kHSDiscoBall]._flags = SF_DISABLED; _hotspotsCount = 8; } } @@ -327,8 +327,8 @@ void GnapEngine::scene45_run() { } - if (_mouseClickState.left && _gnapActionStatus < 0) { - _mouseClickState.left = false; + if (_mouseClickState._left && _gnapActionStatus < 0) { + _mouseClickState._left = false; if (isFlag(12)) { _toyUfoActionStatus = 3; toyUfoFlyTo(-1, -1, 0, 799, 0, 300, 5); diff --git a/engines/gnap/scenes/scene46.cpp b/engines/gnap/scenes/scene46.cpp index 86855bbdf2..ec061138d3 100644 --- a/engines/gnap/scenes/scene46.cpp +++ b/engines/gnap/scenes/scene46.cpp @@ -271,8 +271,8 @@ void GnapEngine::scene46_run() { } - if (_mouseClickState.left && _gnapActionStatus < 0) { - _mouseClickState.left = false; + if (_mouseClickState._left && _gnapActionStatus < 0) { + _mouseClickState._left = false; if (isFlag(12)) { _toyUfoActionStatus = 4; toyUfoFlyTo(-1, -1, 0, 799, 0, 300, 2); diff --git a/engines/gnap/scenes/scene53.cpp b/engines/gnap/scenes/scene53.cpp index 20486eb34e..cc7b7915b2 100644 --- a/engines/gnap/scenes/scene53.cpp +++ b/engines/gnap/scenes/scene53.cpp @@ -159,7 +159,7 @@ void GnapEngine::scene53_runChitChatLine() { _s53_currHandSequenceId = 0x5E; } - _hotspots[1].flags = SF_DISABLED; + _hotspots[1]._flags = SF_DISABLED; while (!flag) { |