In CMake this is the FORCE_COLOR_OUTPUT option. In SCons this is the
force_color option. They both pass -fdiagnostics-color=always to gcc,
or -fcolor-diagnostics to clang.
This is useful when building with Ninja, or running piped CI tools.
The castle switch CA stores the leader move because the evaluation is expensive. If the leader was killed in between storing and reevaluation of the CA, this would previously cause an on-screen error message and the CA to be blacklisted for the turn.
This fixes#6440.
The probabilities being combined here are additive, not multiplicative. The two terms in the equations are the probabilities that either unit in a fight is already dead before the strike currently being evaluated. As a result, this only affected fights in which both units can die before the last round of combat. It also only affected the chance of being unscathed, the HP distributions shown were correct.
This fixes#6590.
An integral part of this MAI is that it moves weaker units out of the way for stronger ones. Units without moves are taken into account by giving them a very high rating. This was previously only done on what's considered the AI's territory (the AI side of the bottleneck) which works fine most of the time since the AI does not try to move onto enemy territory. However, it breaks down on more open maps, where there are way for units to move around the bottleneck, as AI territory is not always well defined on them. However, there is no need to restrict this to AI territory only.
This fixes#6599.
When finding the vision path for a unit, that unit's team's vision needs to be used. This had the potential of causing OOS errors in rare cases on maps with tunnels and at least three sides that do not share vision.
The idea being that this could then also be included as a sheet in the multiplayer activity report, which would then be an easy way to view add-on downloads over time. This would of course not be especially useful until 1.18, since for 1.17 the database count would be starting at 0 even though existing add-ons would have a non-zero download count.
The passed filter needs to be enclosed in an [and] tag, otherwise the check for visibility might not work correctly, for example if the filter contains a top level [or] tag.
Fixes#6724, where scrolling with the mousewheel could reach the last row, but
scrolling with keys or buttons couldn't. Although can_scroll_up() and
can_scroll_down() already existed, can_scroll_down() didn't allow access to the
last line when that line had less than the full number of items. The mousewheel
still worked, because it ignored that logic.
Remove a feature that was seen when the last row is visible - things jumped
between columns to fill the spaces. If you have 10 items, with 4 columns and 2
visible rows then it will appear like this:
a b c d
e f g h
when scrolling down it used to move items sideways to fill the last line, which
seems bad UI because it made items harder to find:
c d e f
g h i j
the new code is simpler, and will instead show the following when scrolling down:
e f g h
i j
Move the layout code into adjust_size(), so that it runs one time when the number
of buttons changes. That could be separated from this commit, but the code
would still be touched in this commit (`counter_from_zero` would still be
replaced by `i`), so doing it and testing the changes together made sense.
Note for the master branch only: scrolling the palettes up and down is
noticeably laggy, which is a regression from last week. That's not caused by
this commit, we're just at a point in the rendering refactor where
`surface_restorer::update()` and thus `gui::widget::hide()` are slow. The fix
for that is already in progress and going to be in 1.17.5.
Contains primitive drawing functions, such as fill, points, line, etc,
and also texture drawing functions blit, flipped, tiled.
This removes specialty drawing code from several places, most notably
CVideo and gui/core/canvas.
Functions to draw to the screen should now go in draw.cpp.
Places where usage is clear have been converted to the new calls.
Places that need extra work to convert are still using get_image(),
as are places that will be clobbered as part of general rendering
system upgrades anyway.