From bea93f3441154197a8f599912a1102ac11688d7f Mon Sep 17 00:00:00 2001 From: Paul Gilbert Date: Thu, 7 Aug 2014 09:23:31 -0400 Subject: ACCESS: Implemented setupRoom method --- engines/access/amazon/amazon_game.cpp | 6 +++--- engines/access/amazon/amazon_room.cpp | 16 ++++++++-------- 2 files changed, 11 insertions(+), 11 deletions(-) (limited to 'engines/access/amazon') diff --git a/engines/access/amazon/amazon_game.cpp b/engines/access/amazon/amazon_game.cpp index eccfc4dae7..7a16036ff3 100644 --- a/engines/access/amazon/amazon_game.cpp +++ b/engines/access/amazon/amazon_game.cpp @@ -164,9 +164,9 @@ void AmazonEngine::setupGame() { } // Set miscellaneous fields - _roomNumber = 4; - _player->_playerX = _rawPlayerX = TRAVEL_POS[_roomNumber][0]; - _player->_playerY = _rawPlayerY = TRAVEL_POS[_roomNumber][1]; + _player->_roomNumber = 4; + _player->_playerX = _player->_rawPlayer.x = TRAVEL_POS[_player->_roomNumber][0]; + _player->_playerY = _player->_rawPlayer.y = TRAVEL_POS[_player->_roomNumber][1]; _selectCommand = -1; } diff --git a/engines/access/amazon/amazon_room.cpp b/engines/access/amazon/amazon_room.cpp index 21d9c6097e..c2a0332e17 100644 --- a/engines/access/amazon/amazon_room.cpp +++ b/engines/access/amazon/amazon_room.cpp @@ -38,7 +38,7 @@ void AmazonRoom::loadRoom(int roomNumber) { } void AmazonRoom::reloadRoom() { - loadRoom(_vm->_roomNumber); + loadRoom(_vm->_player->_roomNumber); if (_roomFlag != 1) { _vm->_currentMan = _roomFlag; @@ -68,8 +68,8 @@ void AmazonRoom::reloadRoom() { } void AmazonRoom::reloadRoom1() { - if (_vm->_roomNumber == 22 || _vm->_roomNumber == 31 - || _vm->_roomNumber == 42 || _vm->_roomNumber == 44) { + if (_vm->_player->_roomNumber == 22 || _vm->_player->_roomNumber == 31 + || _vm->_player->_roomNumber == 42 || _vm->_player->_roomNumber == 44) { _vm->_inactive = _vm->_files->loadFile("MAYA.LZ"); _vm->_currentCharFlag = false; } @@ -84,13 +84,13 @@ void AmazonRoom::reloadRoom1() { _vm->_screen->clearScreen(); roomSet(); - if (!_roomFlag && (_vm->_roomNumber != 61 || !_antOutFlag)) { + if (!_roomFlag && (_vm->_player->_roomNumber != 61 || !_antOutFlag)) { _vm->_player->load(); _vm->_player->calcManScale(); } - if (_vm->_roomNumber != 20 && _vm->_roomNumber != 24 - && _vm->_roomNumber != 33 && _vm->_roomNumber != 45) { + if (_vm->_player->_roomNumber != 20 && _vm->_player->_roomNumber != 24 + && _vm->_player->_roomNumber != 33 && _vm->_player->_roomNumber != 45) { roomMenu(); } @@ -99,8 +99,8 @@ void AmazonRoom::reloadRoom1() { setWallCodes(); buildScreen(); - if (_vm->_roomNumber != 20 && _vm->_roomNumber != 24 - && _vm->_roomNumber != 33) { + if (_vm->_player->_roomNumber != 20 && _vm->_player->_roomNumber != 24 + && _vm->_player->_roomNumber != 33) { _vm->_screen->setPalette(); _vm->_screen->copyBF2Vid(); } -- cgit v1.2.3