Commit graph

592 commits

Author SHA1 Message Date
Anonymissimus
56ffd2f2cd make display::color_adjust_red_, green_ and blue_ private
No references require them to be protected.
2011-10-27 14:16:00 +00:00
Alexander van Gessel
81e0a2007f Revert token t_token commits from 2011-09-08T19:15:40Z!thonsew@yahoo.com on. 2011-10-10 03:43:29 +01:00
Mark de Wever
b99c907f5c Let operator++() return a reference. 2011-09-28 19:21:12 +00:00
Thonsew
1a5810656b [[t_token optimizations]]
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.
2011-09-08 19:17:55 +00:00
Thonsew
ebbe106e49 Fixes for ToD and fading related bugs #18504 #18493 #18017
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)
2011-08-15 15:01:11 +00:00
Thonsew
14a2e2bec1 Fix for bug #18017 FADE_TO_BLACK and local tod don't play nice.
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.
2011-08-06 11:32:19 +00:00
Fabian Müller
97eb3bac1c Fixed misspelling. 2011-06-24 17:05:19 +00:00
Fabian Müller
17f430852b Added the ONSCREEN_WARP scrolltype which compines the features...
...of ONSCREEN and WARP scrolling.
2011-06-23 15:00:46 +00:00
Jérémy Rosen
15ef729b16 fix for bug 17573:
wesnoth unusable on certain comination of glibc and sdl du to changes
in memcopy
2011-03-19 19:51:23 +00:00
Mark de Wever
b06e17931a Strip trailing whitespace. 2011-03-06 18:27:54 +00:00
Jérémy Rosen
6edcc85bc3 Add parallel analysis of unit invalidation using OpenMP.
This is ifdefed out by default, mail to wesnoth-dev to follow shortly
2011-02-28 20:37:38 +00:00
Bartek Waresiak
cc6ffebbbc Fixed bug #17207 2011-02-08 00:17:50 +00:00
Mark de Wever
ecbabea838 New year copyright update. 2011-01-01 15:57:50 +00:00
Guillaume Melquiond
3ec734ba75 Removed separation between unit reports and game status reports,
since testing shows that game status is invalidated almost each time
unit is.
2011-01-01 06:17:31 +00:00
Guillaume Melquiond
ef36d05b20 Replaced the report and element classes...
...with a WML-friendly data structure, that is, config.
2010-12-26 20:01:00 +00:00
Guillaume Melquiond
f7dae4410c Removed hardcoded enum for report generators. Used their theme names instead. 2010-12-26 20:00:54 +00:00
Mark de Wever
f169ce4f57 Add some headers for g++-4.4. 2010-11-21 14:32:46 +00:00
Mark de Wever
c2acb81141 Remove unneeded includes. 2010-11-21 13:57:05 +00:00
Ignacio R. Morelle
d6a3de1938 Apply patch #2213 by stikonas, using file #11274 2010-11-21 01:56:29 +00:00
Mark de Wever
6c3fc4aced Pass parameter by const ref instead of const value.
Issue found by cppcheck.
2010-09-17 19:15:48 +00:00
Mark de Wever
327c99cee3 Pass parameter by const ref instead of const value.
Issue found by cppcheck.
2010-09-17 19:15:33 +00:00
Ali El Gariani
fd59c45277 Also commit part 2 of patch #1952, because part 1...
...was already in but had a small regression

(incorrect ordering with some x parity). Besides that, no logic
changes but cleaner and better documented.
2010-09-15 16:27:37 +00:00
Ali El Gariani
4d18562b53 Tiny optimization of screen update.
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)
2010-09-14 05:37:55 +00:00
Ali El Gariani
c375a1e32d Kill an always true bool
Supposed to track change but broken. Not worth the trouble since when
there is no change, there is not much to skip
2010-09-14 05:37:46 +00:00
Jérémy Rosen
29fe502d8a optimize the drawing loop, apply patch #1952 by VIR 2010-09-12 13:17:10 +00:00
Ali El Gariani
b5a595775c Skip local light calculation on map not using any ToD areas 2010-09-11 00:36:15 +00:00
Guillaume Melquiond
eeb047de55 Fixed file headers so that they match the content of the COPYING file. 2010-09-01 21:12:38 +00:00
Ali El Gariani
d55e309546 Simplify previous commit, now never decapitate
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)
2010-08-18 00:58:40 +00:00
Ali El Gariani
a5dd484e31 Fix mouseover golden hex decapitating big unit on keep...
...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)
2010-08-18 00:09:29 +00:00
Ali El Gariani
5ef9a07a17 Move layers of mouseover_hex,
...selected_hex and attack_indicator under unit bars.  Also move
mouseover_hex under attack_indicator (but doesn't change much because
of the transparency)
2010-08-17 03:36:16 +00:00
Ali El Gariani
037b79e36b New advanced preference to use a local ToD color-shift
Because the memory cost is now acceptable (and only there when playing
maps with big caves using special ToD)
2010-08-16 07:07:51 +00:00
Guillaume Melquiond
d50506f981 Cached the value of animate_map preference.
Since it was queried every tile every frame, its footprint was not
negligible.
2010-08-06 17:07:38 +00:00
Mark de Wever
a99c78e0d8 Update doxygen comment.
The filename after the @file comment is optional (spotted by alink).
2010-07-26 21:32:18 +00:00
Ali El Gariani
e1d969595f Fix a merging error in 2010-07-20T19:46:08Z!alinkmaze@gmail.com 2010-07-20 19:55:16 +00:00
Ali El Gariani
7e53c42340 More use of reference for ToD.
Helps to reduce a bit the overhead of local_light for common case.
2010-07-20 19:46:08 +00:00
Guillaume Melquiond
02c47fc5b1 Simplified code.
Fixed internationalization of selected terrain report.
2010-07-19 16:14:13 +00:00
Ali El Gariani
14ba29f0f6 Clean the implentation of ':layers'
- 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
2010-07-17 13:30:43 +00:00
Ali El Gariani
6755770b22 Fix constness of display::get_time_of_day and make it public 2010-07-17 13:30:37 +00:00
Ali El Gariani
6d8dbee178 New debug command ":layers" displaying layer info...
...from the hex under the mouse.  Commit to start to study terrain
layers, but code and UI details are dirty WiP
2010-07-16 21:37:15 +00:00
Ali El Gariani
7e414ed587 New debug command ":foreground"...
...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).
2010-07-14 22:13:04 +00:00
Ali El Gariani
750cc05961 change bad type name 2010-07-11 04:28:17 +00:00
Ali El Gariani
baae56f633 Better separate fog/shroud generation from terrain images 2010-07-11 04:28:11 +00:00
Ali El Gariani
a5c24198b4 Make previous commit about fog/shroud variants less config heavy.
Simply scan which images exist as we already do for transitions.
2010-07-09 04:20:03 +00:00
Ali El Gariani
a658bd23bb Move fog/shroud image definition into game_config
Put there image variants for fog, and now shroud too (but not used and
still WIP). Few minor optimizations and fix broken fog in trunk
2010-07-09 01:28:37 +00:00
Gabriel Morin
2f9dfb472f Moved arrow typedefs in display.hpp to private visibility. 2010-07-07 09:02:08 +00:00
Ali El Gariani
86c190c72e Fix local ToD terrain variants (assuming they even work for global ToD).
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.
2010-07-06 20:11:38 +00:00
Gabriel Morin
ffe96c7537 Whiteboard: visible numbering of actions. 2010-07-05 23:25:18 +00:00
Gabriel Morin
1c7c79a2c3 Arrows/Whiteboard: big and hopefully final refactoring;...
...got rid of observer pattern and settled on a lifecycle management
strategy.
2010-06-15 20:37:35 +00:00
Gabriel Morin
6e1dee902d Arrows: removed notification of deletion,
...since arrows can outlive display and try to notify a dead pointer.
2010-06-14 22:59:40 +00:00
Mark de Wever
96b609543f Make Wesnoth more compatible with C++0x (g++-4.5). 2010-06-12 16:02:00 +00:00