150 Commits

Author SHA1 Message Date
Mark de Wever
67726dd706 Fix comment, which was incorrect. 2009-05-12 21:06:01 +00:00
Chris Hopman
8bf8327563 undo delete of get_rect_union 2009-05-07 18:08:51 +00:00
Chris Hopman
7c4c366713 rewrite get_rect_union to return the smallest rectangle...
...that contains the union.

rename get_rect_union to union_rects to be consistent with
intersect_rects.
2009-05-07 17:46:30 +00:00
Mark de Wever
946b580f2d Remove unneeded includes. 2009-04-10 19:20:22 +00:00
Ali El Gariani
edfd02e731 Scan the base frame image to find the in_hex status...
...instead of using a WML key.

Code is working but not activated yet, to continue to test the 1.6.1
version Could also replace the in_hex key in 1.6.1, but it's more (too
much?) new code
2009-03-25 00:24:53 +00:00
Mark de Wever
f6b3368aac Strip trailing whitespace. 2009-03-15 16:50:42 +00:00
Ali El Gariani
c421154d5c An optimized version of scale_surface for opaque surfaces
(no difference, just skip alpha but ~2x faster)

Currently only used for the titlescreen. But may also be used for story images.
2009-03-07 02:43:01 +00:00
Ali El Gariani
54ed6fd54f Mainly revert 2009-02-20T16:40:51Z!alinkmaze@gmail.com...
...(problem with fake screen) but keep the small optimization
2009-02-21 15:48:02 +00:00
Ali El Gariani
2e12324a38 Add a new function get_screen_portion,
...slightly better than get_surface_portion and use it for old and new
dialogs, haloes and sidebar.
2009-02-20 16:40:51 +00:00
Mark de Wever
973a0a7d5c Remove trailing whitespace. 2009-01-01 10:28:26 +00:00
Mark de Wever
a5d1d2e969 New year copyright update. 2009-01-01 10:27:41 +00:00
Mark de Wever
f1c73760c9 Add get_rect_union() for future usage. 2009-01-01 01:03:16 +00:00
Mark de Wever
fc9aedaa78 Add the operator to stream a SDL_Rect as well. 2008-09-07 19:53:44 +00:00
Mark de Wever
49fd0b421e Header cleanup.
util.hpp didn't use <map> so removed it, fixed the files which did
depend on this include.
2008-08-24 16:12:27 +00:00
Ali El Gariani
7bdfb9bb65 Add a gfx effect shadow_image() to create a dark, blurry shadow of a surface.
And use it for floatings labels. This fix the recent bug of having
colored shadows when using color markup there, and it allows new
optimization of this (combine blur, darkening and alpha change, and
reuse the foreground text)

No visible change.
2008-07-01 13:00:17 +00:00
Ali El Gariani
2f8285df30 Fix various old (but serious) bugs in 8bpp display mode:
broken minimap, halo, damage stats, transparency or clearing of some dialogs.

Also optimize a little these things and do some cleaning.
2008-06-16 15:21:13 +00:00
Mark de Wever
088705c7fe Update doxygen comment style. 2008-05-25 17:04:54 +00:00
Mark de Wever
8455eec72a Convert stretch_surface_*() also to have an optimize flag. 2008-04-29 19:46:55 +00:00
Ali El Gariani
5a41e46a18 Generalize optional RLE-optimization in sdl_utils calls...
...and stop using it where not needed.

(rle-optmization is still the default)
2008-04-29 18:48:23 +00:00
Mark de Wever
9d8935aa5e Change the calling converion of blit_surface...
...so it can use the normal locker class.
2008-04-28 15:58:29 +00:00
Moritz Göbelbecker
ab74a6bc3c Move blit_surface from gui/widgets/helper.cpp to sdl_utils.cpp 2008-04-27 20:33:19 +00:00
Mark de Wever
8bcb690932 Added stretch_surface_horizontal and stretch_surface_vertical.
The functions stretch a surface based on the first row/column. This
looks better for the widget borders as scale_surface and should be
faster (not tested).  Added the option to the widget library to use
these functions and convert the window borders to use the new option.
2008-04-10 16:52:18 +00:00
Mark de Wever
f6f0c0ecb2 Add a helper function to easily create a SDL_Rect. 2008-03-09 18:13:26 +00:00
Ali El Gariani
49150689af Optimization of damage floating labels:
Stop compress and decompress these images between each alpha changes.
Completly useless for one-use blit and seems to cost half of the work.
2008-02-17 12:18:58 +00:00
Mark de Wever
001af46e6e Updated all headers to 2008. 2008-02-16 08:47:16 +00:00
Ali El Gariani
a83efa6dba Fix FR / bug #9999: Preserve aspect ratio of the minimap.
- Try to correct a maximum of little 1-2 pixels imprecisions of the
previous system (but those are probably only visible with magnifing
tools).

- Clean/simplify the related functions

TODO: center minimaps in all remaining dialogs (currently only in create_game)
2007-09-27 19:56:29 +00:00
David Philippi
4ff9d8c45d initialize all members 2007-09-01 16:03:10 +00:00
Gunter Labes
ae9e10f260 codeclean run
set svn:eol-style to native where missing
2007-08-31 19:09:40 +00:00
Hans Joachim Gurt
3e5c996c2a doxygen, comments 2007-08-17 13:55:37 +00:00
Mark de Wever
080eb69f60 Updated the headers to state GPL 2+ and a few changelog cleanups. 2007-08-15 13:41:56 +00:00
Mark de Wever
bb01934b85 A rather large update which updates the copyright info
* 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
2007-07-21 07:28:04 +00:00
Ali El Gariani
a82f35de82 copy paste the new blur code to a second version blurring alpha too...
...(for floating labels) because I don't want to modify the code used
for dialogue (and impact its peformance)

This is a quick working hack, but need to be clean later and probably
improve the algorithm about the color of fully transparent pixels.
2007-06-22 13:14:12 +00:00
Patrick Parker
c13b07c569 an attempt to make disabled buttons more obviously disabled (bug #9121) 2007-06-22 04:14:10 +00:00
Ali El Gariani
e634ef4649 fix a typo in a function's name
( get_transpErAnt_portion -> get_transpArEnt_portion )
2007-05-11 23:27:44 +00:00
Ali El Gariani
ba130b3ceb Move the definition of horizontal mousewheel buttons next to the vertical ones.
This also remove a redundancy between game and editor.
2007-05-07 01:31:23 +00:00
Ali El Gariani
37784872ef get_surface_portion now quietly give NULL...
...if you ask a portion outside of the surface. This seems like a correct 
behavior.

This also silence a flood of error messages "illegal surface
portion..." when the chat/command text field go out of the
screen after a resolution change / window resizing.
2007-05-06 20:07:49 +00:00
Martin Renold
77a1e5b48f don't create_optimized_surface() for one-time-use
(speeds up sea battle a bit)
2007-02-25 18:04:30 +00:00
Patrick Parker
402c8e4c93 added an int_to_color() utility function 2007-02-24 04:58:31 +00:00
Patrick Parker
7966589b87 fix the keylogger effect (for real this time)! 2007-02-05 04:31:33 +00:00
Patrick Parker
293b9c5343 fixed the "keylogger" effect when joining the MP Lobby
note: there are other places where input blocking may potentially be
desirable
2007-01-21 02:23:26 +00:00
David Philippi
5efed739d2 removed a couple of header dependencies 2007-01-04 20:51:17 +00:00
Serge Martin
918334b15e move recolor range function from sdl_utils.cpp to color_range.cpp
so we can compile wesnothd

this is due to 2006-11-12T18:38:34Z!mcn4bb@gmail.com
2006-11-13 21:15:56 +00:00
John W. C. McNabb
28b06edc9d [[Fixes for LOW_MEM behavior]] 2006-11-12 18:38:34 +00:00
Patrick Parker
15f1c253c2 this change shortens the width of the MP dialog on the titlescreen,
...and makes it easier to change dialog dimension measurements
generally. also moved around a few constants to avoid redefinition
conflict.
2006-07-23 11:31:37 +00:00
John W. C. McNabb
0c56b20f75 cleanup of team color code 2005-12-15 17:33:20 +00:00
John W. C. McNabb
c6d4551563 modifications to team_rgb 2005-12-12 04:09:50 +00:00
Isaac Clerencia Perez
8f1ad01e58 Commit path from Noyga for path highlighting, patch #488 2005-12-05 12:28:12 +00:00
John W. C. McNabb
7d8962dda0 recoloring of units to team colors 2005-11-12 20:44:09 +00:00
András Salamon
8d25fb99a6 codeclean in src, mostly Dave's new email address (checked with cvs diff -b)
BY THE WAY, many of the source files have no copyright headers!
2005-07-02 21:37:20 +00:00
András Salamon
8bd9bc98a5 ran codeclean against files 2005-06-04 19:16:06 +00:00