150 Commits

Author SHA1 Message Date
fendrin
85f84dd383 Documentation and cleanups to the RotSprite methods. 2013-09-18 02:37:13 +02:00
fendrin
80ca05e448 Simplified Rotsprite algorithm.
It is used to perform any kind of rotation with the RS imagepath
function which could only rotate in multiplies of 90 degrees previously.
2013-09-18 02:37:13 +02:00
fendrin
c8e9468910 Fix spelling in comments. 2013-04-08 17:49:28 +02:00
Eric S. Raymond
043c4f9fd3 Remove $Id$ cookies. 2013-03-26 21:41:37 -04:00
Mark de Wever
adf6e8c027 Fix some doxygen warnings. 2013-02-10 21:45:41 +00:00
Boldizsár Lipka
462afa50b4 Reintroduce NN-based scaling in a separate function.
(Was removed in 2013-01-23T11:51:49Z!lipkab@zoho.com)
2013-01-24 16:00:01 +00:00
Boldizsár Lipka
668445cb6b New scaling and tiling options for story screens. Partially implements bug #20435 2013-01-21 08:59:26 +00:00
Mark de Wever
43b71f2ff0 New year copyright update. 2013-01-01 09:22:03 +00:00
Steven Panek
c2cb357a48 'favour' -> 'favor', 'colour' -> 'color', 'behaviour' -> 'behavior'...
...in the source code.
2012-09-23 22:16:02 +00:00
Mark de Wever
062fb91ba2 Strip trailing whitespace. 2012-06-30 20:28:23 +00:00
J. Tyne
bbb6631f79 Functions to rotate an image 90- or 180- degrees.
(Still need an Image Path Function to make these accessible from WML.)
2012-04-28 14:17:07 +00:00
Mark de Wever
b5240e1bf9 Rewrite the blending algorithm.
The rewrite only has minor visual differences, ImageMagick's

`composite -compose difference'

shows no visual differences.

The change makes it possible to optimise the code on the ARM Cortex A8
using NEON instructions.
2012-03-31 14:45:23 +00:00
Mark de Wever
6cdad25548 Add the blend method to wesmage.
Also used the opportunity to better document the blend_surface function.
2012-03-25 15:23:28 +00:00
Anonymissimus
3a1a2f4657 Make an error message more useful by propagating the filename. 2012-01-21 19:23:47 +00:00
Ignacio R. Morelle
6ca69b2df5 New year copyright update 2012-01-07 02:35:17 +00:00
Mark de Wever
63528912fa Fixes crash when using fullscreen on Mac OS.
Fixes a problem when using the SDL nightly builds (post 1.2.14).

The direct blurring of the screen fails on OS X, since the surface is
not a neutral surface, so only testing for 32 bpp isn't enough. Exports
the neutral surface test from sdl_utils to have a proper test in the
canvas code.

This commit helps fixing bug #18319, but the speed of rendering is still
too slow.

Thanks to Alarantalara for testing the code on OS X.
2011-12-17 20:27:56 +00:00
Ali El Gariani
7ca44f7ac6 Big optimization of terrain rendering by removing all empty images.
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
2011-12-17 15:07:07 +00:00
Ali El Gariani
62d2e838c6 Optimize ToD update by skipping an useless step in lightmap application 2011-12-16 03:39:04 +00:00
Ali El Gariani
3dcb910d92 Fix local-ToD transitions for big RGB values (was clamped to +/-128) 2011-12-09 22:42:12 +00:00
Mark de Wever
5679174239 Update doxygen comment. 2011-01-08 20:40:46 +00:00
Mark de Wever
ecbabea838 New year copyright update. 2011-01-01 15:57:50 +00:00
Guillaume Melquiond
ff2ffb657b Merged scale_surface and scale_surface_blended...
...and choose whether upscaling or downscaling depending on the scaling.
2010-12-19 21:20:10 +00:00
Ignacio R. Morelle
d6a3de1938 Apply patch #2213 by stikonas, using file #11274 2010-11-21 01:56:29 +00:00
Guillaume Melquiond
293f680af1 Removed unused function scale_opaque_surface. 2010-10-30 09:25:10 +00:00
Mark de Wever
0aa5d84f36 Remove an unneeded include. 2010-10-26 21:37:39 +00:00
Ali El Gariani
c63a7d97ae Improving constness of surface: forbid to blit on a const surface. 2010-10-01 01:43:16 +00:00
Ali El Gariani
33d1de9cf0 Improving constness and encapsulation of surface:
Provide a read-only access to pixels data and use it when appropriate.
Remove last use of SDL_Surface reference outside of surface.
2010-10-01 01:42:55 +00:00
Ali El Gariani
78ab001eb8 Directly use surface in the new SDL wrappers 2010-09-25 17:24:48 +00:00
Ali El Gariani
3a085f75b6 Move all calls to SDL_FillRect into one place (sdl_fill_rect) 2010-09-24 18:45:19 +00:00
Ali El Gariani
d0bb4ad22f Move all calls of SDL_BlitSurface into one place (sdl_blit) 2010-09-24 18:45:02 +00:00
Ali El Gariani
fc99eb2592 Better submerge effect: transparency of water decrease with depth...
...(feet are less visible)

Parameters probably need tuning, but currently hardcoded (as the old
effect was)
2010-09-15 05:24:59 +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
Guillaume Melquiond
e4ca82489c Replaced usage of get_union_rect by intersect_rects,
...as the function was actually computing the intersection of two
rectangles. Added a proper function for computing unions.
2010-08-10 12:08:19 +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
dd185c0174 New imagepath function ~L(lightmap.png) to do ToD color-shift per pixel.
Possibly temporary, since added for the prototype of local ToD light
transitions.  But I suppose it could be used for some special effect
on units.
2010-07-19 00:40:15 +00:00
Ali El Gariani
29fb377a6b Use 255 has default alpha value in the new create_color() 2010-06-12 16:46:34 +00:00
Mark de Wever
e9b3b756ae Make Wesnoth more compatible with C++0x (g++-4.5).
Prevent narrowing when using an initializer list to initialize
SDL_Color.
2010-06-12 16:03:35 +00:00
Ali El Gariani
51ab72860e Replace all uses of 'colour' by 'color' in code. 2010-06-03 01:47:06 +00:00
Ali El Gariani
c7f242a04d Add more flexibility to clip_rect_setter:
- Allow to disable previous clipping

- Add a flag for easier toggling
2010-05-18 17:42:43 +00:00
Guillaume Melquiond
e8f2aba4ed Enforced usage of neutral surfaces...
...when doing low-level pixel manipulations. Any other usage is most
certainly a bug (e.g. locking a copy of the main display).
2010-04-17 17:16:01 +00:00
Guillaume Melquiond
9d173ca4ec Removed useless class pixel_data. 2010-02-13 10:43:57 +00:00
Mark de Wever
92f5f92ce5 New year copyright update. 2010-01-01 13:16:49 +00:00
Ignacio R. Morelle
ee515f0db8 Document recolor_image(). 2009-11-03 22:04:54 +00:00
Gregory Shikhman
eff445e009 Changed all surface const &var to const surface &var.
The syntax was mixed before.
2009-08-20 03:56:54 +00:00
Guillaume Melquiond
50352cf7f9 Removed unused function color_to_int. 2009-08-15 12:00:45 +00:00
Guillaume Melquiond
1620a04e69 Removed unused function darken_image. 2009-08-15 12:00:31 +00:00
Ignacio R. Morelle
b28cb0496c Fix a doxygen comment. 2009-07-25 03:02:05 +00:00
Mark de Wever
cf17c0d355 Fix blurring if the bpp is not 32.
Ilor discovered the problem and YogiHH noticed it be due to using 16
bpp and also tested the initial version of this patch.
2009-06-21 09:22:42 +00:00
Mark de Wever
f561e6df5d Add an inplace blur function.
This function will be used to reenable blurring of transparent dialogs.
2009-06-01 15:39:14 +00:00
Mark de Wever
f0f01da15c Remove an unused function. 2009-05-12 21:06:06 +00:00