Mercurial > hg > openttd
changeset 14352:053e6a35d232 draft
(svn r18907) -Cleanup: Smallmap was the last user of SetPixelIfEmpty().
author | alberth <alberth@openttd.org> |
---|---|
date | Sat, 23 Jan 2010 22:37:14 +0000 |
parents | e65d81b10bfe |
children | 098ac3e84f3b |
files | src/blitter/32bpp_anim.cpp src/blitter/32bpp_anim.hpp src/blitter/32bpp_base.cpp src/blitter/32bpp_base.hpp src/blitter/8bpp_base.cpp src/blitter/8bpp_base.hpp src/blitter/base.hpp src/blitter/null.hpp |
diffstat | 8 files changed, 0 insertions(+), 36 deletions(-) [+] |
line wrap: on
line diff
--- a/src/blitter/32bpp_anim.cpp +++ b/src/blitter/32bpp_anim.cpp @@ -261,17 +261,6 @@ this->anim_buf[((uint32 *)video - (uint32 *)_screen.dst_ptr) + x + y * this->anim_buf_width] = colour; } -void Blitter_32bppAnim::SetPixelIfEmpty(void *video, int x, int y, uint8 colour) -{ - uint32 *dst = (uint32 *)video + x + y * _screen.pitch; - if (*dst == 0) { - *dst = LookupColourInPalette(colour); - /* Set the colour in the anim-buffer too, if we are rendering to the screen */ - if (_screen_disable_anim) return; - this->anim_buf[((uint32 *)video - (uint32 *)_screen.dst_ptr) + x + y * this->anim_buf_width] = colour; - } -} - void Blitter_32bppAnim::DrawRect(void *video, int width, int height, uint8 colour) { if (_screen_disable_anim) {
--- a/src/blitter/32bpp_anim.hpp +++ b/src/blitter/32bpp_anim.hpp @@ -30,7 +30,6 @@ /* virtual */ void Draw(Blitter::BlitterParams *bp, BlitterMode mode, ZoomLevel zoom); /* virtual */ void DrawColourMappingRect(void *dst, int width, int height, PaletteID pal); /* virtual */ void SetPixel(void *video, int x, int y, uint8 colour); - /* virtual */ void SetPixelIfEmpty(void *video, int x, int y, uint8 colour); /* virtual */ void DrawRect(void *video, int width, int height, uint8 colour); /* virtual */ void CopyFromBuffer(void *video, const void *src, int width, int height); /* virtual */ void CopyToBuffer(const void *video, void *dst, int width, int height);
--- a/src/blitter/32bpp_base.cpp +++ b/src/blitter/32bpp_base.cpp @@ -22,12 +22,6 @@ *((uint32 *)video + x + y * _screen.pitch) = LookupColourInPalette(colour); } -void Blitter_32bppBase::SetPixelIfEmpty(void *video, int x, int y, uint8 colour) -{ - uint32 *dst = (uint32 *)video + x + y * _screen.pitch; - if (*dst == 0) *dst = LookupColourInPalette(colour); -} - void Blitter_32bppBase::DrawRect(void *video, int width, int height, uint8 colour) { uint32 colour32 = LookupColourInPalette(colour);
--- a/src/blitter/32bpp_base.hpp +++ b/src/blitter/32bpp_base.hpp @@ -24,7 +24,6 @@ // /* virtual */ Sprite *Encode(SpriteLoader::Sprite *sprite, Blitter::AllocatorProc *allocator); /* virtual */ void *MoveTo(const void *video, int x, int y); /* virtual */ void SetPixel(void *video, int x, int y, uint8 colour); - /* virtual */ void SetPixelIfEmpty(void *video, int x, int y, uint8 colour); /* virtual */ void DrawRect(void *video, int width, int height, uint8 colour); /* virtual */ void DrawLine(void *video, int x, int y, int x2, int y2, int screen_width, int screen_height, uint8 colour); /* virtual */ void CopyFromBuffer(void *video, const void *src, int width, int height);
--- a/src/blitter/8bpp_base.cpp +++ b/src/blitter/8bpp_base.cpp @@ -33,12 +33,6 @@ *((uint8 *)video + x + y * _screen.pitch) = colour; } -void Blitter_8bppBase::SetPixelIfEmpty(void *video, int x, int y, uint8 colour) -{ - uint8 *dst = (uint8 *)video + x + y * _screen.pitch; - if (*dst == 0) *dst = colour; -} - void Blitter_8bppBase::DrawRect(void *video, int width, int height, uint8 colour) { do {
--- a/src/blitter/8bpp_base.hpp +++ b/src/blitter/8bpp_base.hpp @@ -22,7 +22,6 @@ // /* virtual */ Sprite *Encode(SpriteLoader::Sprite *sprite, Blitter::AllocatorProc *allocator); /* virtual */ void *MoveTo(const void *video, int x, int y); /* virtual */ void SetPixel(void *video, int x, int y, uint8 colour); - /* virtual */ void SetPixelIfEmpty(void *video, int x, int y, uint8 colour); /* virtual */ void DrawRect(void *video, int width, int height, uint8 colour); /* virtual */ void DrawLine(void *video, int x, int y, int x2, int y2, int screen_width, int screen_height, uint8 colour); /* virtual */ void CopyFromBuffer(void *video, const void *src, int width, int height);
--- a/src/blitter/base.hpp +++ b/src/blitter/base.hpp @@ -95,15 +95,6 @@ virtual void SetPixel(void *video, int x, int y, uint8 colour) = 0; /** - * Draw a pixel with a given colour on the video-buffer if there is currently a black pixel. - * @param video The destination pointer (video-buffer). - * @param x The x position within video-buffer. - * @param y The y position within video-buffer. - * @param colour A 8bpp mapping colour. - */ - virtual void SetPixelIfEmpty(void *video, int x, int y, uint8 colour) = 0; - - /** * Make a single horizontal line in a single colour on the video-buffer. * @param video The destination pointer (video-buffer). * @param width The length of the line.
--- a/src/blitter/null.hpp +++ b/src/blitter/null.hpp @@ -23,7 +23,6 @@ /* virtual */ Sprite *Encode(SpriteLoader::Sprite *sprite, Blitter::AllocatorProc *allocator); /* virtual */ void *MoveTo(const void *video, int x, int y) { return NULL; }; /* virtual */ void SetPixel(void *video, int x, int y, uint8 colour) {}; - /* virtual */ void SetPixelIfEmpty(void *video, int x, int y, uint8 colour) {}; /* virtual */ void DrawRect(void *video, int width, int height, uint8 colour) {}; /* virtual */ void DrawLine(void *video, int x, int y, int x2, int y2, int screen_width, int screen_height, uint8 colour) {}; /* virtual */ void CopyFromBuffer(void *video, const void *src, int width, int height) {};