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`.
1. Load assets from the bundle on Mac.
2. In timedemo_test, load MPQs before overriding pref path,
so that they can also be loaded from the user/system location.
3. Fix various double directory separators ("build//assets" etc).
Pushing events from a background thread on Tiger + SDL1
does not appear to do anything at all.
I don't know if the issue is limited to Tiger,
so apply the workaround on all macOS when using SDL1.