Changeset - r14342:76ef2bbc2881
[Not reviewed]
master
0 8 0
alberth - 15 years ago 2010-01-23 22:37:14
alberth@openttd.org
(svn r18907) -Cleanup: Smallmap was the last user of SetPixelIfEmpty().
8 files changed with 0 insertions and 36 deletions:
0 comments (0 inline, 0 general)
src/blitter/32bpp_anim.cpp
Show inline comments
 
@@ -261,17 +261,6 @@ void Blitter_32bppAnim::SetPixel(void *v
 
	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) {
src/blitter/32bpp_anim.hpp
Show inline comments
 
@@ -30,7 +30,6 @@ public:
 
	/* 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);
src/blitter/32bpp_base.cpp
Show inline comments
 
@@ -22,12 +22,6 @@ void Blitter_32bppBase::SetPixel(void *v
 
	*((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);
src/blitter/32bpp_base.hpp
Show inline comments
 
@@ -24,7 +24,6 @@ public:
 
//	/* 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);
src/blitter/8bpp_base.cpp
Show inline comments
 
@@ -33,12 +33,6 @@ void Blitter_8bppBase::SetPixel(void *vi
 
	*((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 {
src/blitter/8bpp_base.hpp
Show inline comments
 
@@ -22,7 +22,6 @@ public:
 
//	/* 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);
src/blitter/base.hpp
Show inline comments
 
@@ -95,15 +95,6 @@ public:
 
	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.
src/blitter/null.hpp
Show inline comments
 
@@ -23,7 +23,6 @@ public:
 
	/* 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) {};
0 comments (0 inline, 0 general)