Previously, wesnoth.highlight_hex would only highlight through global
tunnels if the unit in question had a teleport ability. Now tunnels
are considered for all units.
At the moment, I do not know what the correct parameter should be, but
a hardcode of the first team cannot handle all possibilities.
This is in the implementation of a deprecated Lua function
(wesnoth.highlight_hex), so it might end up removed before being fixed.
The feature in question (the AI using speculative unit maps) is
probably better handled a different way, which would allow a layer of
overhead to be removed. I'll leave it up to the AI folks to decide
how to proceed.
white for "normal" (that is, same as movement cost), yellow for
"worse" (more than movement cost), and green for "better" (less than
movement cost). This should work out better for players, as it plays
against the default of vision costs equaling movement costs.
Previously, a unit's vision costs would fall back to movement costs
only if no vision costs were defined. Now this occurs "by terrain" --
the vision cost for a specific terrain will fall back to the movement
cost for that specific terrain, even if the vision cost for another
terrain had been defined. This makes it easier to define, for example,
being able to see over deep water without changing vision in other
cases.
This is a general overhaul of the class embodying movement types,
featuring:
* Better data encapsulation
* Less duplication of code between unit.cpp and unit_type.cpp
* Easier to use
* New files for the class (VC and XCode projects still need updating)
* New (shorter) name for the class
Some additional revisions will be coming.
The primary motivation for this was to get a class that embodies
movement costs (part of the data encapsulation).
...most of the time"
Done already in 2012-08-19T22:42:19Z!anonymissimus@arcor.de by anonymissimus.
This reverts commit 2013-02-19T06:44:24Z!shadowm@wesnoth.org.
Disable a run-time check required in SDL 1.2 due to a change in glibc.
Later versions of SDL 1.2 already have a fix for this change so no need
to do this for version 2.0.
Switched to using the SDL clipboard routines instead of our own ones.
The disadvantage is that the SDL clipboard has no proper support for the
various X11 clipboards (yet).
The SDL_PixelFormat in 2.0 misses a few fields so don't use them in the
check in set_pixel_format. (Also added a remark about some not tested
fields in the struct.)
Threads can have a name in SDL 2.0, initialise it with an empty
C-string. Once/if we move to SDL 2.0 we can look whether we want to put
useful information in the string.
When click dismissing a dialogue in the past the DOWN event was used.
This lead to a bug. The obvious change was to switch to the UP event,
this lead to another bug; the dialogue was directly dismissed. Since
the game map code uses the UP and DOWN event to select a unit there is
no simple solution.
Upon entry this value stores the mouse button state at entry. When a
button is DOWN and goes UP that button does _not_ trigger a dismissal
of the dialogue, instead that button's down state is removed from this
variable. Therefore the next UP event does dismiss the dialogue.
(Fixes bug #18970)