* controller_base::get_theme was removed and replaced with theme::get_theme_config. There was already a static map
of theme configs in the theme class, so no need to reinvent the wheel.
* Renamed theme::get_known_themes to theme::get_basic_theme_info
* Hidden themes will be included in the known_themes map. Filtering now happens in get_basic_theme_info, which now
has an additional `include_hidden` (false by default) argument.
* display::set_theme now takes the theme id instead of config
* editor_display no longer takes a theme_config/id argument and instead simply initializes its base class with the
"editor" theme directly.
* display now takes the theme id instead of config. game_display was adjusted accordingly
The old count_ones had undefined behavior in the case of arithmetic underflow,
so replace count_leading_zeros with a simpler implementation. A couple of extra
tests are added, for both signed and unsigned numbers.
Note: `std::numeric_limits<signed char>::digits` excludes the sign bit from the
size - so the `for` loop gets an off-by-one error unless 'std::make_unsigned_t`
is used somewhere.
This reverts commit 4551e281667072e2d4b91d376992b5b1d37e83ed. That commit
broke the Ubuntu builds, but the Windows builds were already broken by
commit 4551e281667072e2d4b91d376992b5b1d37e83ed. I need a working CI to
check that my next commit fixes the earlier problem.
* controller_base::get_theme was removed and replaced with theme::get_theme_config. There was already a static map
of theme configs in the theme class, so no need to reinvent the wheel.
* Renamed theme::get_known_themes to theme::get_basic_theme_info
* Hidden themes will be included in the known_themes map. Filtering now happens in get_basic_theme_info, which now
has an additional `include_hidden` (false by default) argument.
* display::set_theme now takes the theme id instead of config
* editor_display no longer takes a theme_config/id argument and instead simply initializes its base class with the
"editor" theme directly.
* display now takes the theme id instead of config. game_display was adjusted accordingly
This replaces them with direct queries to saved preferences. This also removes the need for set_preference_display_settings,
(introduced in 0cd14d875d9ec04b9327aaff14567b1d522f7fa3) since its only purpose was to ensure the display flags were set
correctly.
Relevant intermediate setters were merged into the main setters (`_set_*` -> `set_*`).
Idle anim rates are now saved in preferences the same way they were in the display class. Additionally, its query func now
returns double instead of int.
set_color_cursors is currently not called, and therefore removing set_preference_display_settings had no effect. Curors are
still correctly changed when changing the preference.
display::turbo_speed remains, since it does additional work with the saved pref value that depends on the display class.
Some users of wmlxgettext have scripts that already provide the file list in
a deterministic order, and the sorting added in 3761faf925 was choosing a
different order to the one desired.
(cherry picked from commit 904bb9bfb82c391d20e89dfbaacc1e71749dc3d9)