This is the result of running this command in directory src/
find . -type f -exec sed -i 's/\(ERR.*\)\\n\"\;/\1\" << std::endl\;/g' '{}' \;
and carefully inspecting the results.
If we decided it was worth it to inline map_location ==, then
surely this is also worth it to inline null_location, as the
compiler may be able to reduce tests for == null location to
"x == ... && y == ...", without having to move to a different
compilation unit.
The code doesn't compile for SDL2 and it seems a work-around for an
issue in SDL, so maybe it is no longer required with SDL2. This needs to
be tested later.
Commit c1374ba032a06510e741f0944547dfeb655edadd for some reason reverted
commits 4a44369d8ab01feb69bee0875d659fe7bd086970 and
91cbc9aff14c6290071e6d317024cd4ebf24917d.
[theme] id specifies the internal theme id used by the engine to match
the theme definition against the recorded user settings. Existing themes
are still handled by using the name attribute if it's present when the
id is not, and a deprecation warning is issued in that case.
The name attribute is expected to be translatable for UI usage, whereas
the id attribute is not. (See also: [unit], [unit_type], etc.)
From commits 36b6b60beb507a1277de59691da051d4a2f75171 and
d04f6af930b18a740c7fccd0ee91d0e635f288e5 (paraphrasing):
map_location original_loc = resources::controller->get_mouse_handler_base().get_scroll_start();
.
.
.
if (point_in_rect(mousex, mousey,rect) && resources::controller->get_mouse_handler_base().scroll_started()) {
.
.
.
When in the game map editor, resources::controller is set to NULL since
it is only intended to refer to a play_controller object. But there's no
need to look specifically for a play_controller in this code or get the
current pointer to a controller_base subclass since the pointer we need
is actually none other than 'this', which is always non-NULL.
(get_mouse_handler_base() is a method of the same class the faulty
handle_scroll() method is, controller_base. There are no derived classes
of it other than play_controller and editor_controller, and there is
only supposed to be one such instantiated at a time, so the fix is
trivial.)
Not entirely sure whether the e instead of event should have been used,
but the code is there since 2008 an no bug reports. ilor you still might
want to review it.
Fixes a g++ 4.6 warning.
by removing an useless 20ms delay between frames, which was stupid
since display::draw has already a smarter one.
PS: cleaning in next commmits, this was just for my "big optimization
in one char" collection :)