The previous implementation didn't behave quite like A-* is supposed to.
After trying to figure out what's causing it and giving up,
I've reimplemented it in a straightforward manner.
Now it seems to work a lot better.
Also increases maximum player path length to 100 steps.
We still only store the first 25 steps in the save file for vanilla
compatibility.
1. The char pointer returned by SDL is only valid temporarily,
keeping it around is not allowed so we copy the string.
2. Moves the trimming to DiabloUI. It now happens every frame
but that's OK here (not performance-sensitive and there is
little else happening on that screen).
In C++, globals initialization order accross translation units is not
defined. Accessing a global via a function ensures that it is initialized.
This will be needed for #7638, which will statically initialize change
handlers after the Options object has been initialized.
We still have some issues preventing even data_file_test from depending
on the world:
1. `options` transitively depends on everything because of the change
handlers.
2. `sound` depends on `monster` via `sgbSaveSoundOn` and
`monster` depends on `sound` via `gbSoundOn`.
This does not fully address the issue of most everything
being a giant library but it's a start.
Note that the libraries are OBJECT libraries, so they
may (and currently do) contain references to missing
symbols.
Also fixes the implementation of transitive dependency
support for OBJECT libraries.
This mod renders a clock in the top-right corner
and is always available (disabled by default).
It is useful to have a mod available by default
as we work on mod support.
1. Moves more assets-related stuff from `init` to `engine/assets`.
2. Removes `SDL_audiolib` dependency from `soundsample.h`.
3. Cleans up some unused/missing includes.
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`.