Adds simple string / integer concatenation functions.
Many of the uses of `fmt::format` are simply concatenation
of a few strings and integers.
`StrCat` is an easier-to-read alternative to such uses of `fmt`.
* Change defines to constexpr int in player.h
* Add const or constexpr to player.h/cpp where applicable
* Update tests with changed names of player constatns
* remove unecessary variable
* AnimationInfo class correct case-style for private members
clang-tidy warnings:
readability-identifier-naming invalid case style for private member
* AnimationInfo class correct case-style for members
clang-tidy warnings:
readability-identifier-naming invalid case style for member
* AnimationInfo class correct case-style for methods
clang-tidy warnings:
readability-identifier-naming invalid case style for method
* AnimationInfo class use nodiscard
clang-tidy warnings:
modernize-use-nodiscard function should be marked [[nodiscard]]
* Non-int versions of `Point` and `Displacement`
This will allow us to make some structs, such as `ActorPosition`, much
smaller.
* ActorPosition: Use smaller types
`Monsters`: 56K -> 46K
* player.cpp: Reduce size of `DirectionSettings`
* CrawlTable: Displacement -> DisplacementOf<int8_t>
* CrawlTable: vector<vector> -> array<vector>
Also only allocate one vector during construction instead of two.
A bit less indirection.
* Monster#enemyPosition: Point -> WorldTilePosition
sizeof(Monster): 240 -> 232
* Monster: Further optimize field layout and sizes
sizeof(Monster): 232 -> 208
`Monsters` is down to 40,000 bytes
* DMonsterStr: _mx/_my -> position
1. Do not modify the map after loading. Instead, return string views
(guaranteed to be null-terminated) from look up functions and return
the key directly if not found.
2. Use an `unorded_map` instead of `map` where available (C++20).
Saves a bit of RAM (~50 KiB) and improves lookup performance.
Previously this was falling back to FunctionCase, leading to inconsistent casing of class methods throughout the codebase. Applied to Item as an example.