MADS: Add removePlayerSprites(), remove a TODO

This commit is contained in:
Strangerke 2014-05-18 22:29:46 +02:00
parent 96aaf48f44
commit edb5db36b5
3 changed files with 17 additions and 2 deletions

View File

@ -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);

View File

@ -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

View File

@ -219,6 +219,8 @@ public:
static void preloadSequences(const Common::String &prefix, int level) {
// No implementation in ScummVM
}
void removePlayerSprites();
};
} // End of namespace MADS