The darkening of a fogged mini-tile was done in real-time for each one
and take ~80% of the rendering time. So, now use a small cache (few
8x8 tiles) for the fogged version (like we already do for the unfogged
one).
Much faster but probably noticable only on big map and/or slow CPU.
remove the spaces in parameters because some people use ~TC(1, magenta)
We also generally need robust image-paths modifications
because any add-on can (badly) use it in the add-on list
Now initialize and reset TC in titlescreen for add-ons and campaigns icons
(previously was only initialized after having played a game)
This also restore coloring for case like ~TC(not a playing side)
This make the "strategic view" of the previous commit more convenient.
It exploits the cache optimization for default zoom introduced in 1.3.4.
Like always, low memory systems must avoid using zooming. But this
doesn't change the memory requirements for them or for the zoom users
It worked only for an image::type and was incorrectly cached. So, I
remove it. It change nothing for the current use: "scaled_to_hex" for
ToD coloring and "unmasked" if not.
* Wesnoth is distributed under the terms of the GPL version 2, made
that more explicit
* updated the copyright range to 2007
* updated Dave's email adress
...which was killed only for code-refactoring reasons. This simply
intialize a vector of each TC colors when we load the side-coloring of
flags. (note that we can always improve/kill it, but now the
implementation problem doesn't pollute the question)
Most are banished by use of a new UNUSED macro that expnds to the
right GNU C++ attribute but an empty string elsewhere. I have the
definition being generated into config.h, which therefore has to be
included a few places it wasn't before. There might be a better place
to put it.
...for standard terrain at default zoom level:
Previously the image type UNMASKED was a cache for hex-masking and
scaling. added a type HEXED for caching the hex-masking, when using
it skip the UNSCALED, since these hexed images will normally never be
used non-hexed.
So this new cache doesn't cost memory and hex-masking doesn't need to
be redone when zooming.
At default zoom level, we can now skip the UNMASKED cache, so will
spare a cache level in memory
In theory, we win 25%-33% of memory space (depend of the use of
BRIGHTENED) for standard terrain hexes.
Note: the hex-masking and scaling operations are now inverted, it
doesn't seems to have a visible effect.
...and used this type for units and haloes.
renamed some items to scaled_to_hex (forgot that in the previous image
change)
I consider this too intrusive to port to the 1.2 branch.
It fixes:
* units are scaled properly when zooming also with tiny gui (bug
#8703 and bug #6570)
* haloes in tiny gui are now scaled (before unscaled, thus a factor 2
bigger as intended)
* removes the scaling handling in the halo, removing quite some code
...if the image isn't found in images/ (it seems to work here,
somebody else should review it anyway :P)
PS. We should remember to revert the hack when we have decided a rational
image directory structure