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
Some compilers are calling destructors for static objects before other
static objects use them in their destructors. This patch initializes
static t_interned objects with new and intentionally doesn't call
delete in order to guarrantee their existence throughout the static
de-initialization phase. It creates a new function
generate_safe_static_const_t_interned for this purpose. It might
address bug #18666, although I can not duplicate the crash with gcc on
fedora 15.
...of config::attribute_value & to tstring & or t_token reference
causes crashes. Some compilers were generating a temporary object and
binding a reference to the temporary when creating an implicit cast to
an attribute value. I removed the implicit cast and replaced all (I
think) instances of the implicit cast with explicit 2 step operation.
This fixes bugs like bug #18663, bug #18684
1. Updated terrain_builder to use t_token in place of std::string to
facilitate fast copying, hashing and comparison
2. Added utils::parenthetical_split_token, a cached parenthetical
version of the string version
3. Made the lru_cache faster for the cache miss case.
(>4x faster, for both cache building and "building terrain rules")
by introducing a new method for terrain variations, which stop relying
on the WML preprocessor.
Still WiP. WML syntax is not final, and thus also WML macros and WML
parsing (not optimized yet)
The bar should now accurately reflect the loading time, and therefore
regularly progress.
The magic values are automatically generated in the 'loadscreen' log
domain and can be copy-pasted in the code if the current ones become
off.
- also display (scaled) image from the source for easier identification
- show center.x/y
- support [variant]
- directly log from the engine function to avoid code duplication
This provides an alternative way to have random terrain images.
Main advantages: much lighter (all in the same terrain rule) and allow
to use human-friendly probabilty distribution (sum = 100%)
Already working but its WML interface will be improved to support
heavy use.
...which sometimes could incorrectly put images in background instead
of foreground.
I didn't see any visible change but possibly fixes or introduces bug with
terrain rules using layer around 0.