The corrections applied in calculate_probability_of_debuff() are already taken into account in the main attack outcome calculation for being slowed. They do not need to be applied again, that only needs to be done for being poisoned. Doing this for being slowed also can cause an assert, such as the one reported in issue #5533 (and probably also the one in issue #5002).
Fixes#5533
First cause of breakage seems to be that the introduction of color_t
changed the size of the colour components from something longer than 8
bits to 8 bits, resulting in stringstream outputting invalid UTF-8. The
second cause is the dropping of GUI1 markup along with SDL_ttf.
This functionality is entirely unused in 1.14 and later because GUI1
menus aren't used to list units anymore.
(Strictly speaking, all sorters are unused right now.)
This removes the build-time dependencies on SDL_ttf and FriBidi,
alongside the SDL_ttf wrappers, the SDL_ttf text surface class, the
SDL_ttf render cache, and the SDL_ttf (de)initialization code.
A few caveats:
* This implementation allows configuring the font family class and
style to select the correct font for any given context. The default
values are equivalent to what was being done in the SDL_ttf-based
version, but not future-proof. Users like the GUI2 textbox should
make use of the new optional parameters to select a more relevant
font going forward (not part of this commit).
* Pango has a line height metric, equivalent to SDL_ttf's
TTF_FontLineSkip(). However, this is not what we want here -- the
ascender + descender formula is intended to give us a neat box where
the tallest glyph can fit, not the minimum distance between
baselines. This is important for the GUI2 textbox in particular.
* The internal implementation uses the default text renderer and sets
relevant parameters. This should not introduce new issues, but if it
does then that means someone is not resetting the renderer properly
before using it.
This notably rids GUI2 of its one known dependency on SDL_ttf.
This lets Pango do all of the work for us and pulls the text back from
the renderer. It shouldn't be much more expensive than it needs to be --
the only real expensive step is copying the characters back into a list
of strings, and it's not by much.
Note: I haven't quite figured out what the partial_line parameter does
or what to do about it. It's probably not trivial to implement since it
seems to involve the decision of whether to break a line within word
boundaries or not.
This adds a minimal wrapper around pango_text intended for use in GUI1,
in particular for the help browser. Functionality is very incomplete
right now but for the time being we can render text, determine line
dimensions, and ellipsize text, which is almost the bare minimum needed
for porting the Help system (it's still missing a word wrapping
implementation).
This connects to issue #2710, although the main reasoning about it is in #5517.
The difficulty balance isn't the only problem with loading old saved games, but
it's a simple example to explain.
This warning is intended for the change between 1.14 and 1.16, but will be shown
to anyone loading 1.15.x saves into 1.15.y - that's something that they should
expect in a dev branch.
You just know sooner or later someone's going to try to use "random" for
something other than gender and some translations will end up looking
wrong as a result.
The _ locals are there to ensure that if _ is overridden anywhere else
in the enclosing scope (which I haven't properly determined *where* it
is yet) it gets overridden again with the right textdomain object.
It *does* tell wmlxgettext what the correct textdomain is without using
the `-- #textdomain` hack anyway, so might as well just do it this way
regardless of the global-looking _ in map/main.lua.
CC #5311