diff options
author | truelight <truelight@openttd.org> | 2007-06-21 12:36:46 +0000 |
---|---|---|
committer | truelight <truelight@openttd.org> | 2007-06-21 12:36:46 +0000 |
commit | 3fa3d2e3653f351ba071152a4fa8ff19e31aa14f (patch) | |
tree | 32794e63c78972c1d43b56d335b38c6f56fad413 /src/blitter/base.hpp | |
parent | 3b12e7b6b0a6b71a7b085c60c3b4ac4ffbe1dc44 (diff) | |
download | openttd-3fa3d2e3653f351ba071152a4fa8ff19e31aa14f.tar.xz |
(svn r10241) -Codechange: CopyToBuffer now produces a buffer that is unreadable from outside the blitter, so the blitter can store anything he likes
-Codechange: added CopyImageToBuffer, which produces a readable buffer for screenshots
-Fix: 32bpp-anim now holds animation on transparent objects to avoid strange graphical effects
-Fix: 32bpp-anim now works correct on mouse-movement (it holds the palette animation correctly)
Diffstat (limited to 'src/blitter/base.hpp')
-rw-r--r-- | src/blitter/base.hpp | 21 |
1 files changed, 11 insertions, 10 deletions
diff --git a/src/blitter/base.hpp b/src/blitter/base.hpp index 268e13b17..f3ac308e4 100644 --- a/src/blitter/base.hpp +++ b/src/blitter/base.hpp @@ -121,9 +121,9 @@ public: * @param src The buffer from which the data will be read. * @param width The width of the buffer. * @param height The height of the buffer. - * @param src_pitch The pitch (byte per line) of the source buffer. + * @note You can not do anything with the content of the buffer, as the blitter can store non-pixel data in it too! */ - virtual void CopyFromBuffer(void *video, const void *src, int width, int height, int src_pitch) = 0; + virtual void CopyFromBuffer(void *video, const void *src, int width, int height) = 0; /** * Copy from the screen to a buffer. @@ -131,18 +131,19 @@ public: * @param dst The buffer in which the data will be stored. * @param width The width of the buffer. * @param height The height of the buffer. - * @param dst_pitch The pitch (byte per line) of the destination buffer. + * @note You can not do anything with the content of the buffer, as the blitter can store non-pixel data in it too! */ - virtual void CopyToBuffer(const void *video, void *dst, int width, int height, int dst_pitch) = 0; + virtual void CopyToBuffer(const void *video, void *dst, int width, int height) = 0; /** - * Move the videobuffer some places (via memmove). - * @param video_dst The destination pointer (video-buffer). - * @param video_src The source pointer (video-buffer). - * @param width The width of the buffer to move. - * @param height The height of the buffer to move. + * Copy from the screen to a buffer in a palette format for 8bpp and RGBA format for 32bpp. + * @param video The destination pointer (video-buffer). + * @param dst The buffer in which the data will be stored. + * @param width The width of the buffer. + * @param height The height of the buffer. + * @param dst_pitch The pitch (byte per line) of the destination buffer. */ - virtual void MoveBuffer(void *video_dst, const void *video_src, int width, int height) = 0; + virtual void CopyImageToBuffer(const void *video, void *dst, int width, int height, int dst_pitch) = 0; /** * Scroll the videobuffer some 'x' and 'y' value. |