This removes the use_prng Advanced Preferences option and replaces it
with a new possible value for randomness in the game classification
class, "biased". It also changes the enumeration label for it in the
GUI2 campaign dialog.
It also makes it so the synced RNG is automatically used with this
option as well as the existing deterministic randomness option ("save
random seed").
We're going to be using NN scaling for the map, and that's already handled automatically
by SDL (and in the future, OGL). We don't need these settings for surface SCALED_TO_ZOOM
and SCALED_TO_HEX scaling. In any case, if we want to scale a surface to zoom or hex, it
will almost certainly be for map rendering (such scaling methods don't make sense in the
UI, for example), so just defaulting to NN is simplest.
This change drops the option to use Linear or xBRZ scaling for map zooming. This was already
the practical case due to me converting map rendering to use textures. NN was used for all
zoom levels, and it's fast and looks good.
There's really no reason to have this anymore. It was (AFAIK) introduced years ago
as a performance-saving measure, then was moved to Advanced Preferences in 1.13 since
modern PCs mostly have no issues.
This was never fully implemented and has been essentially abandoned. If we want to
add this again, we should look to adding full game controller support (Steam controller,
for example), though I don't know how suited this game is for controller support. As for
as I can tell, the only working part was ever map scrolling.
Includes a sqrt -> std::sqrt conversion I forgot in this file awhile back.
It no longer had any effect. The selective_ping flag is set was ignored by the
server since it now utilizes TCP keepalive.
(cherry-picked from commit b81a702cfa1465802b0bf299473d9c4559190122)
This is no longer needed after switching right-click menus to GUI2, since they have built-in
scrolling capability. This also removes the max_wml_menu_items preference.
New dialog added to advanced preferences. It contains toggles to
activate and deactivate logging (log messages print to console). Also
added a getter method to the base log methods so that the dialog can
'remember' previous choices.
Now that we have combo box options in Preferences -> Advanced, we can
finally present the saved game compression options in a user-friendly
fashion instead of having two separate options with an unclear
relationship.
However, in order to achieve this I had to move far more code than I am
normally comfortable with:
* Moved the config_writer::compressor enum type to a separate header
file, serialization/compression.hpp, in order to make it available to
more units without pulling a bunch of heavy crap (such as the boost
iostreams headers) that's normally unneeded. The new type is
compression::format.
* Added a compression::format_extension() function to determine a file
extension string according to a compression type. This is needed more
often than one would think, see below.
* Changed all savegame-related classes to use the compression::format
type instead of a single boolean flag and bzip2_savegame_compression
queries. This is a code-heavy task by design.
* Changed all code scattered around deciding whether to use ".gz" or
".bz2" for a save extension to use compression::format_extension()
instead. This affects both saved game implementation and interface
code for some reason (read: poor design).
* Removed the bzip2_savegame_compression preferences option, reusing
the previous compress_saves option for this feature, turning it from
a boolean option to a string option ("none", "gzip", "bzip2",
defaults to "gzip" per advanced_preferences.cfg).
* preferences::compress_saves() became
preferences::save_compression_format().
* Without bzip2_savegame_compression, people who previously enabled
bzip2 compression will revert to gzip compression. This seems to be a
rare enough case to me to bother with providing backwards
compatibility with a feature that only existed for [1.11.0, 1.11.8).
* For preferences files from previous versions where compress_saves was
set to either "yes" or "no", there will be a conspicuous value in the
second column of the advanced preferences list, especially if they
are using a translation; it'll be either "yes" or "no" as an
untranslatable string. A value of "yes" is equivalent to "gzip", and
a value of "no" is equivalent to "none". Any other unrecognized value
is equivalent to "gzip". As soon as the user chooses a compression
format again, one of the three supported values ("none", "gzip", or
"bzip2") will be written to the compressed_saves attribute in the
preferences file.
All in all, a ridiculously messy commit that's not particularly feasible
to break down into separate pieces because all of the involved code is
very closely related to the overarching feature that's being
implemented in it.
Note that the save_index currently only uses gzip regardless of whether
bzip2 is the current compression format choice. This was the case even
before this commit, and I'm not sure it's worth it to change it given
the potential CPU usage and the fact that save_index tends to be broken
most of the time anyway.
It is known to cause severe lags that may render the cursor completely
unusable at times. This probably won't be solved until Wesnoth can run
on SDL 2.0.
It is known to break under a variety of situations, including
(apparently) running on OS X, so it's not really fit for the Display
preferences page. This is probably going to remain the case until
Wesnoth is ported to SDL 2.
Also added a more discouraging tooltip to the option.