aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--engines/mads/nebular/nebular_scenes2.cpp3
-rw-r--r--engines/mads/player.cpp14
-rw-r--r--engines/mads/player.h2
3 files changed, 17 insertions, 2 deletions
diff --git a/engines/mads/nebular/nebular_scenes2.cpp b/engines/mads/nebular/nebular_scenes2.cpp
index 1f5200ab92..b423b9f9ef 100644
--- a/engines/mads/nebular/nebular_scenes2.cpp
+++ b/engines/mads/nebular/nebular_scenes2.cpp
@@ -1331,8 +1331,7 @@ void Scene205::actions() {
_game._player._stepEnabled = false;
_vm->_palette->lock();
_scene->_kernelMessages.reset();
- warning("TODO: sub70402();");
-
+ _game._player.removePlayerSprites();
_globals._spriteIndexes[9] = _scene->_sprites.addSprites(formAnimName('a', 0));
_vm->_palette->refreshSceneColors();
_globals._sequenceIndexes[9] = _scene->_sequences.addSpriteCycle(_globals._spriteIndexes[9], false, 6, 1, 0, 0);
diff --git a/engines/mads/player.cpp b/engines/mads/player.cpp
index 96e2cd6ea1..edec92ad74 100644
--- a/engines/mads/player.cpp
+++ b/engines/mads/player.cpp
@@ -766,4 +766,18 @@ void Player::synchronize(Common::Serializer &s) {
s.syncAsByte(_mirror);
}
+void Player::removePlayerSprites() {
+ int heroSpriteId = _spritesStart;
+ for (int i = 0; i < 8; i++) {
+ if (_spriteSetsPresent[i]) {
+ _vm->_game->_scene._sprites.remove(heroSpriteId++);
+ _spriteSetsPresent[i] = false;
+ }
+ }
+
+ _vm->_game->_scene._spriteSlots.clear();
+ _vm->_game->_scene._spriteSlots.fullRefresh();
+ _vm->_game->_player._visible = false;
+}
+
} // End of namespace MADS
diff --git a/engines/mads/player.h b/engines/mads/player.h
index 8127ee293c..671ac9d16e 100644
--- a/engines/mads/player.h
+++ b/engines/mads/player.h
@@ -219,6 +219,8 @@ public:
static void preloadSequences(const Common::String &prefix, int level) {
// No implementation in ScummVM
}
+
+ void removePlayerSprites();
};
} // End of namespace MADS