diff options
-rw-r--r-- | engines/access/amazon/amazon_game.cpp | 3 | ||||
-rw-r--r-- | engines/access/player.cpp | 7 | ||||
-rw-r--r-- | engines/access/player.h | 2 |
3 files changed, 12 insertions, 0 deletions
diff --git a/engines/access/amazon/amazon_game.cpp b/engines/access/amazon/amazon_game.cpp index dfaba977af..b665c49806 100644 --- a/engines/access/amazon/amazon_game.cpp +++ b/engines/access/amazon/amazon_game.cpp @@ -654,6 +654,9 @@ void AmazonEngine::dead(int deathId) { _room->clearRoom(); freeChar(); + _currentManOld = 1; + _player->removeSprite1(); + warning("TODO: restart game"); quitGame(); _events->pollEvents(); diff --git a/engines/access/player.cpp b/engines/access/player.cpp index 2313ed266e..cb7459e8cc 100644 --- a/engines/access/player.cpp +++ b/engines/access/player.cpp @@ -137,6 +137,13 @@ void Player::freeSprites() { _playerSprites = nullptr; } +void Player::removeSprite1() { + if (_playerSprites1) { + delete _playerSprites1; + _playerSprites1 = nullptr; + } +} + void Player::calcManScale() { if (!_vm->_manScaleOff) { _vm->_scale = ((((_rawPlayer.y - _vm->_scaleMaxY + _vm->_scaleN1) * diff --git a/engines/access/player.h b/engines/access/player.h index 67908a315d..631452f12d 100644 --- a/engines/access/player.h +++ b/engines/access/player.h @@ -120,6 +120,8 @@ public: void freeSprites(); + void removeSprite1(); + void calcManScale(); void walk(); |