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.
1. Broke display::adjust_colors into 2 functions, update_tod() and
adjust_color_overlay(). Update_tod() called whenever (but at least
once per turn) to update the tod color shift. Adjust_color_overlay()
called from the lua color_adjust handler to apply the color_adjust on
top and just once to the display.
2. Changed the startup code to prevent color shift after initial
dialog. In play_controller start the scenario with the initial tod
not rgb=(0,0,0)
Implemented a local per tile color adjustment to go along with the
local per tile time of day (tod) adjustment, during fades. Also fixed
scaling of tod lightmap, which was issuing errors.
...was already in but had a small regression
(incorrect ordering with some x parity). Besides that, no logic
changes but cleaner and better documented.
Update only once by hex instead of once by tblit. The tblit update had
incorrect size and fixing this will slow us.
Also, only the drawer can know how to efficently update (without
relying on our rectangle merging algo)
but simply draw the mouseover golden hex under fog/shroud as 1.8 does.
A bit less visible under fog, but not important and give a visual cue
for terrain where it's not clear if fogged or not (like water)
...by using the same trick as for grid and ellipse (2 top/bottom
layers). Slight little inconvenience is that it still need to
decapitate unit at the edge of fog/shroud. But it's rare enough (need
big unit on keep there)
...selected_hex and attack_indicator under unit bars. Also move
mouseover_hex under attack_indicator (but doesn't change much because
of the transparency)
- 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
...useful to better separate background and foreground terrains and
spot any error there. Currently use an half-transparent layer of snow
recovering the background, but a more flashy image may be needed (edit
terrain/foreground.png).
Use virtual function because not sure yet if editor will need a
tod_manager. Also move up ToD masks from game_display to display,
even if that feature should be killed.