aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--engines/access/amazon/amazon_game.cpp6
-rw-r--r--engines/access/amazon/amazon_room.cpp2
-rw-r--r--engines/access/amazon/amazon_scripts.cpp9
3 files changed, 9 insertions, 8 deletions
diff --git a/engines/access/amazon/amazon_game.cpp b/engines/access/amazon/amazon_game.cpp
index 5c7a3edca2..657458fa44 100644
--- a/engines/access/amazon/amazon_game.cpp
+++ b/engines/access/amazon/amazon_game.cpp
@@ -79,12 +79,12 @@ AmazonEngine::AmazonEngine(OSystem *syst, const AccessGameDescription *gameDesc)
}
AmazonEngine::~AmazonEngine() {
- delete _inactive._spritesPtr;
+ delete _inactive._altSpritesPtr;
}
void AmazonEngine::freeInactivePlayer() {
- delete _inactive._spritesPtr;
- _inactive._spritesPtr = nullptr;
+ delete _inactive._altSpritesPtr;
+ _inactive._altSpritesPtr = nullptr;
}
void AmazonEngine::playGame() {
diff --git a/engines/access/amazon/amazon_room.cpp b/engines/access/amazon/amazon_room.cpp
index 262a6caa87..3381688356 100644
--- a/engines/access/amazon/amazon_room.cpp
+++ b/engines/access/amazon/amazon_room.cpp
@@ -78,7 +78,7 @@ void AmazonRoom::reloadRoom1() {
if (_vm->_player->_roomNumber == 29 || _vm->_player->_roomNumber == 31
|| _vm->_player->_roomNumber == 42 || _vm->_player->_roomNumber == 44) {
Resource *spriteData = _vm->_files->loadFile("MAYA.LZ");
- _game->_inactive._spritesPtr = new SpriteResource(_vm, spriteData);
+ _game->_inactive._altSpritesPtr = new SpriteResource(_vm, spriteData);
delete spriteData;
_vm->_currentCharFlag = false;
}
diff --git a/engines/access/amazon/amazon_scripts.cpp b/engines/access/amazon/amazon_scripts.cpp
index 8a92dd6994..e4c58c9eb5 100644
--- a/engines/access/amazon/amazon_scripts.cpp
+++ b/engines/access/amazon/amazon_scripts.cpp
@@ -1558,9 +1558,7 @@ void AmazonScripts::plotInactive() {
if (_game->_charSegSwitch) {
_game->_currentCharFlag = true;
- SpriteResource *tmp = inactive._spritesPtr;
- inactive._spritesPtr = player._playerSprites;
- player._playerSprites = tmp;
+ SWAP(inactive._altSpritesPtr, player._playerSprites);
_game->_charSegSwitch = false;
} else if (_game->_jasMayaFlag != (_game->_currentCharFlag ? 1 : 0)) {
if (player._playerOff) {
@@ -1575,6 +1573,9 @@ void AmazonScripts::plotInactive() {
player._rawPlayer.y = tmpY;
_game->_inactiveYOff = player._playerOffset.y;
player.calcManScale();
+
+ SWAP(inactive._altSpritesPtr, player._playerSprites);
+ _vm->_room->setWallCodes();
}
}
@@ -1595,7 +1596,7 @@ void AmazonScripts::plotInactive() {
inactive._position.x = _game->_rawInactiveX;
inactive._position.y = _game->_rawInactiveY - _game->_inactiveYOff;
inactive._offsetY = _game->_inactiveYOff;
- inactive._frameNumber = 0;
+ inactive._spritesPtr = inactive._altSpritesPtr;
_vm->_images.addToList(_game->_inactive);
}