Fixes a problem when using the SDL nightly builds (post 1.2.14).
The direct blurring of the screen fails on OS X, since the surface is
not a neutral surface, so only testing for 32 bpp isn't enough. Exports
the neutral surface test from sdl_utils to have a proper test in the
canvas code.
This commit helps fixing bug #18319, but the speed of rendering is still
too slow.
Thanks to Alarantalara for testing the code on OS X.
This reverts commit 2011-12-14T14:50:39Z!anonymissimus@arcor.de.
There appears to be at least one fatal c++0x bug yet;
std::stable_sort, messing up the campaign selection menu.
This make screen update (zooming, ToD changes, etc) several times
faster, gain some fps (esp. for complex map), optimize some animated
terrains (stop refreshing empty parts) and spare some memory
(sometimes, not clear yet)
Also remove the noise in :layers.
Note: This is an improved version of 2010-10-06T16:07:43Z!alinkmaze@gmail.com from the OGL branch
1. The internal type is a std::string, the lua getters/setters should
reflect that like all the existing ones already do instead of making
implicit conversions.
2. It doesn't make sense to convert the already translated string
into a t_string again upon getting it.
3. The setter in team.cpp you added is redundant.
4. The attribute is apparently not really meant to be modified
by lua or wml so a tag is no good idea.
Also adapt it to a recent change and remove an old limitation: now the
lightmap can have any size and is just resized to the image. This
make it easy to use ~L() on animated units, making it more useful
Not used anymore by the ToD engine. I hesitated to let it live there
but just realised that it requires lightmap having same width as the
image, which makes it too limited.
(perf cost is now minimal)
Manipulate light info in a small binary format with a dedicated cache
instead of abusing image path functions for every terrain images.
This is much faster and fix any risks of growing image cache when
overusing ToD effects.