From aac57db782718bf40a7adea15baf8d6b899ea925 Mon Sep 17 00:00:00 2001 From: Kelly Rauchenberger Date: Wed, 17 Feb 2021 20:34:59 -0500 Subject: Made some sprites persist between map changes The player party characters are now initialised at the start of the game and are no longer re-created after every map change. The script system takes care of moving the player into the correct position on the new map. Deleted sprite IDs are now reused the next time a sprite is created, instead of throwing out everything between maps. --- src/camera_system.cpp | 4 ---- 1 file changed, 4 deletions(-) (limited to 'src/camera_system.cpp') diff --git a/src/camera_system.cpp b/src/camera_system.cpp index 2d7be61..c46b9dd 100644 --- a/src/camera_system.cpp +++ b/src/camera_system.cpp @@ -45,10 +45,6 @@ void CameraSystem::destroySprite(int spriteId) { } } -void CameraSystem::clearSpriteCache() { - followingSprite_ = -1; -} - vec2i CameraSystem::calculatePosWithCenter(vec2i center) const { const Map& map = game_.getMap(); vec2i mapBounds = map.getMapSize() * map.getTileSize(); -- cgit 1.4.1