Untangles dependencies by splitting up `engine.{h,cpp}` into 3 files:
1. `primitive_render`
2. `ticks` -- only contains `GetAnimationFrame` for now.
3. `GetWidth2` renamed to `CalculateSpriteTileCenterX` and moved to `levels/dun_tile.hpp`.
This has little or no effect on the optimized build
but significantly improves performance of the headless debug build
`timedemo_test` on my machine goes from 3s to 2s.
This is much faster in debug mode than the non-C++17 version.
For example, with timedemo_test in debug mode, `M_Talker` goes from 11%
of the total time to just 3.5%.
* Add helper to test if an object is a trap source
* Add helper to test if an object is a barrel
* Add helper to test if an object is a crucifix
* Add helpers to check if an object is a chest (and statuses)
* Add helpers to check if an object is a (basic) shrine
* Update random number functions to avoid IB
Most calls to set seed were using uint32_t already, there were a few variables which were better served by having their type changed from signed to unsigned. The one exception is ItemStruct::_iSeed. This is an identifier that also happens to be used as a seed occasionally so a comment was added documenting this exception.
Includes suggested style changes for Source/towners.h; Source/towners.cpp; Source/msg.h; Source/multi.h
This documents the chosen LCG parameters and the default mapping function used in random number generation.
GetLCGEngineState() is a helper needed for testing because AdvanceRndSeed combines a distribution with a call to progress the engine. I'll split those eventually but this at least shows the current behaviour and should flag any bugs introduced by future changes.