- added map_memory_sweep_pending to level_cache
- armed it from memory cache dirty writes, map shift and clear
- gated the sweep on draw points, pending writes and origin
- added test hooks that draw a cata_tiles on the fixture
- added end-to-end memorize sweep tests
In LLVM 16 this check was a lot more effective. So, it was briefly
disabled during the migration. This fixes all its warnings again, and
re-enables it.
* 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>
Catch2 provides a customization point for converting our types to
strings by specializing the StringMaker template.
We have some specializations in stringmaker.h, but this feature was only
working intermittently. I finally figured out that was due to an ODR
violation. The test files that didn't include stringmaker.h were
compiling a different specialization than the ones that did.
Re-jig the test includes so that any file including catch.hpp also
includes stringmaker.h, thereby ensuring that the custom
specializations are used everywhere and there is no ODR violation.
I achieved this by adding a new cata_catch.h header and making all
existing headers include catch.hpp via the new header.
* Change _ctype.h and __locale to cctype and clocale
* Change _wctype.h to cwctype in game.cpp
* Change __functional_base to functional
* Remove libcxx internal headers
* Remove UNIX system headers
* Fix clang-tidy error with -nostdinc++
Use the new clang-tidy check to convert a bunch of declarations to
static.
In a few cases, there were 'secret' dependencies being exposed without
headers. Convert those to work via headers instead.
* Helper script to run IWYU
* Run IWYU
* Update deprecated headers
* Run IWYU again
* Re-suppress cxxabi.h
This pragma got accidentally removed because it was deemed to be a
comment attached to a #include.
* Remove extra SDL header includes
* Fix ime.cpp headers
Some tweaks to help IWYU not break this file by messing with
platform-specific stuff not relevant on Linux.
* Update game.h
* Move new point.h includes inside #ifdef
* Re-add platform_win.h to mapsharing.cpp
* Apply suggestions from code review
Co-authored-by: ZhilkinSerg <ZhilkinSerg@users.noreply.github.com>