forked from CleverRaven/Cataclysm-DDA
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Unlimited map memory (CleverRaven#47253)
* Encapsulate map::drawsq() arguments and clarify their meaning * Split map memory into submap-sized chunks Note: this naive implementation significantly lowers FPS * Optimize map memory access Move memorized submaps that would be affected during drawing into a 2d array. * Save/load memorized submaps; migrate old mm file * Remove leftovers from map memory limit * Some map memory cleanup * Don't save empty mm submaps * Deallocate far-away mm submaps on save; report save failure * Rework tests for map memory * Don't re-allocate region if old region contains required submaps * Remove map_memory.h from avatar.h * Rename memorized_submap -> mm_submap * Rename mm_submap::clean -> mm_submap::empty, add comments. * Improve drawsq_params interface * Remove map_memory.h from lru_cache.cpp * Add function for rectangle overlapping * Save mm_submaps in regions * Fix save/load not using avatar's global pos, improve docs. * When saving, compress mm_submaps using RLE * Simplify map rendering in ascii mode Collect map::draw code in one place, simplify indexing/bound checks. Remove the "batch drawing" optimization: it doesn't help with drawing, but harms code clarity. Instead, convert all relevant draw methods to use 'wputch' and rely on caller to position the cursor properly. * Memorize off-screen tiles in ascii mode * Fix copypasted code * Fix tile memory saving code, minor cleanup. * Add debug logging for tile memory operations * Fix broken saving for tile memory submaps with z != 0 * Lazy allocation for tile memory submaps Co-authored-by: olanti-p <olanti-p@yandex.ru>
- Loading branch information
1 parent
bd09f28
commit 25a94d4
Showing
25 changed files
with
1,170 additions
and
405 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.