From c0a8d09ca72873bbbef14dd317cbd29319e54640 Mon Sep 17 00:00:00 2001 From: rubidium Date: Mon, 9 Feb 2009 02:57:15 +0000 Subject: (svn r15428) -Codechange: consistently use colour instead of having both color and colour. --- src/blitter/32bpp_anim.cpp | 40 ++++++++++++++++++++-------------------- src/blitter/32bpp_anim.hpp | 8 ++++---- src/blitter/32bpp_base.cpp | 22 +++++++++++----------- src/blitter/32bpp_base.hpp | 10 +++++----- src/blitter/32bpp_optimized.cpp | 4 ++-- src/blitter/32bpp_simple.cpp | 16 ++++++++-------- src/blitter/32bpp_simple.hpp | 2 +- src/blitter/8bpp_base.cpp | 22 +++++++++++----------- src/blitter/8bpp_base.hpp | 10 +++++----- src/blitter/8bpp_debug.cpp | 6 +++--- src/blitter/8bpp_optimized.cpp | 2 +- src/blitter/8bpp_simple.cpp | 10 +++++----- src/blitter/base.hpp | 30 +++++++++++++++--------------- src/blitter/null.hpp | 10 +++++----- 14 files changed, 96 insertions(+), 96 deletions(-) (limited to 'src/blitter') diff --git a/src/blitter/32bpp_anim.cpp b/src/blitter/32bpp_anim.cpp index 2b7887855..8dbcb0043 100644 --- a/src/blitter/32bpp_anim.cpp +++ b/src/blitter/32bpp_anim.cpp @@ -129,11 +129,11 @@ inline void Blitter_32bppAnim::Draw(const Blitter::BlitterParams *bp, ZoomLevel break; case BM_TRANSPARENT: - /* TODO -- We make an assumption here that the remap in fact is transparency, not some color. + /* TODO -- We make an assumption here that the remap in fact is transparency, not some colour. * This is never a problem with the code we produce, but newgrfs can make it fail... or at least: * we produce a result the newgrf maker didn't expect ;) */ - /* Make the current color a bit more black, so it looks like this image is transparent */ + /* Make the current colour a bit more black, so it looks like this image is transparent */ src_n += n; if (src_px->a == 255) { src_px += n; @@ -212,11 +212,11 @@ void Blitter_32bppAnim::Draw(Blitter::BlitterParams *bp, BlitterMode mode, ZoomL } } -void Blitter_32bppAnim::DrawColorMappingRect(void *dst, int width, int height, int pal) +void Blitter_32bppAnim::DrawColourMappingRect(void *dst, int width, int height, int pal) { if (_screen_disable_anim) { - /* This means our output is not to the screen, so we can't be doing any animation stuff, so use our parent DrawColorMappingRect() */ - Blitter_32bppOptimized::DrawColorMappingRect(dst, width, height, pal); + /* This means our output is not to the screen, so we can't be doing any animation stuff, so use our parent DrawColourMappingRect() */ + Blitter_32bppOptimized::DrawColourMappingRect(dst, width, height, pal); return; } @@ -252,38 +252,38 @@ void Blitter_32bppAnim::DrawColorMappingRect(void *dst, int width, int height, i return; } - DEBUG(misc, 0, "32bpp blitter doesn't know how to draw this color table ('%d')", pal); + DEBUG(misc, 0, "32bpp blitter doesn't know how to draw this colour table ('%d')", pal); } -void Blitter_32bppAnim::SetPixel(void *video, int x, int y, uint8 color) +void Blitter_32bppAnim::SetPixel(void *video, int x, int y, uint8 colour) { - *((uint32 *)video + x + y * _screen.pitch) = LookupColourInPalette(color); + *((uint32 *)video + x + y * _screen.pitch) = LookupColourInPalette(colour); - /* Set the color in the anim-buffer too, if we are rendering to the screen */ + /* 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] = color; + 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 color) +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(color); - /* Set the color in the anim-buffer too, if we are rendering to the screen */ + *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] = color; + 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 color) +void Blitter_32bppAnim::DrawRect(void *video, int width, int height, uint8 colour) { if (_screen_disable_anim) { /* This means our output is not to the screen, so we can't be doing any animation stuff, so use our parent DrawRect() */ - Blitter_32bppOptimized::DrawRect(video, width, height, color); + Blitter_32bppOptimized::DrawRect(video, width, height, colour); return; } - uint32 color32 = LookupColourInPalette(color); + uint32 colour32 = LookupColourInPalette(colour); uint8 *anim_line; anim_line = ((uint32 *)video - (uint32 *)_screen.dst_ptr) + this->anim_buf; @@ -293,9 +293,9 @@ void Blitter_32bppAnim::DrawRect(void *video, int width, int height, uint8 color uint8 *anim = anim_line; for (int i = width; i > 0; i--) { - *dst = color32; - /* Set the color in the anim-buffer too */ - *anim = color; + *dst = colour32; + /* Set the colour in the anim-buffer too */ + *anim = colour; dst++; anim++; } diff --git a/src/blitter/32bpp_anim.hpp b/src/blitter/32bpp_anim.hpp index c16104c7a..c03b96aaf 100644 --- a/src/blitter/32bpp_anim.hpp +++ b/src/blitter/32bpp_anim.hpp @@ -22,10 +22,10 @@ public: {} /* virtual */ void Draw(Blitter::BlitterParams *bp, BlitterMode mode, ZoomLevel zoom); - /* virtual */ void DrawColorMappingRect(void *dst, int width, int height, int pal); - /* virtual */ void SetPixel(void *video, int x, int y, uint8 color); - /* virtual */ void SetPixelIfEmpty(void *video, int x, int y, uint8 color); - /* virtual */ void DrawRect(void *video, int width, int height, uint8 color); + /* virtual */ void DrawColourMappingRect(void *dst, int width, int height, int 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); /* virtual */ void ScrollBuffer(void *video, int &left, int &top, int &width, int &height, int scroll_x, int scroll_y); diff --git a/src/blitter/32bpp_base.cpp b/src/blitter/32bpp_base.cpp index eddec74ff..f4863e55e 100644 --- a/src/blitter/32bpp_base.cpp +++ b/src/blitter/32bpp_base.cpp @@ -11,32 +11,32 @@ void *Blitter_32bppBase::MoveTo(const void *video, int x, int y) return (uint32 *)video + x + y * _screen.pitch; } -void Blitter_32bppBase::SetPixel(void *video, int x, int y, uint8 color) +void Blitter_32bppBase::SetPixel(void *video, int x, int y, uint8 colour) { - *((uint32 *)video + x + y * _screen.pitch) = LookupColourInPalette(color); + *((uint32 *)video + x + y * _screen.pitch) = LookupColourInPalette(colour); } -void Blitter_32bppBase::SetPixelIfEmpty(void *video, int x, int y, uint8 color) +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(color); + if (*dst == 0) *dst = LookupColourInPalette(colour); } -void Blitter_32bppBase::DrawRect(void *video, int width, int height, uint8 color) +void Blitter_32bppBase::DrawRect(void *video, int width, int height, uint8 colour) { - uint32 color32 = LookupColourInPalette(color); + uint32 colour32 = LookupColourInPalette(colour); do { uint32 *dst = (uint32 *)video; for (int i = width; i > 0; i--) { - *dst = color32; + *dst = colour32; dst++; } video = (uint32 *)video + _screen.pitch; } while (--height); } -void Blitter_32bppBase::DrawLine(void *video, int x, int y, int x2, int y2, int screen_width, int screen_height, uint8 color) +void Blitter_32bppBase::DrawLine(void *video, int x, int y, int x2, int y2, int screen_width, int screen_height, uint8 colour) { int dy; int dx; @@ -60,7 +60,7 @@ void Blitter_32bppBase::DrawLine(void *video, int x, int y, int x2, int y2, int stepx = 1; } - if (x >= 0 && y >= 0 && x < screen_width && y < screen_height) this->SetPixel(video, x, y, color); + if (x >= 0 && y >= 0 && x < screen_width && y < screen_height) this->SetPixel(video, x, y, colour); if (dx > dy) { frac = dy - (dx / 2); while (x != x2) { @@ -70,7 +70,7 @@ void Blitter_32bppBase::DrawLine(void *video, int x, int y, int x2, int y2, int } x += stepx; frac += dy; - if (x >= 0 && y >= 0 && x < screen_width && y < screen_height) this->SetPixel(video, x, y, color); + if (x >= 0 && y >= 0 && x < screen_width && y < screen_height) this->SetPixel(video, x, y, colour); } } else { frac = dx - (dy / 2); @@ -81,7 +81,7 @@ void Blitter_32bppBase::DrawLine(void *video, int x, int y, int x2, int y2, int } y += stepy; frac += dx; - if (x >= 0 && y >= 0 && x < screen_width && y < screen_height) this->SetPixel(video, x, y, color); + if (x >= 0 && y >= 0 && x < screen_width && y < screen_height) this->SetPixel(video, x, y, colour); } } } diff --git a/src/blitter/32bpp_base.hpp b/src/blitter/32bpp_base.hpp index f8be717b3..7bbdf54d0 100644 --- a/src/blitter/32bpp_base.hpp +++ b/src/blitter/32bpp_base.hpp @@ -12,13 +12,13 @@ class Blitter_32bppBase : public Blitter { public: /* virtual */ uint8 GetScreenDepth() { return 32; } // /* virtual */ void Draw(Blitter::BlitterParams *bp, BlitterMode mode, ZoomLevel zoom); -// /* virtual */ void DrawColorMappingRect(void *dst, int width, int height, int pal); +// /* virtual */ void DrawColourMappingRect(void *dst, int width, int height, int pal); // /* 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 color); - /* virtual */ void SetPixelIfEmpty(void *video, int x, int y, uint8 color); - /* virtual */ void DrawRect(void *video, int width, int height, uint8 color); - /* virtual */ void DrawLine(void *video, int x, int y, int x2, int y2, int screen_width, int screen_height, uint8 color); + /* 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); /* virtual */ void CopyToBuffer(const void *video, void *dst, int width, int height); /* virtual */ void CopyImageToBuffer(const void *video, void *dst, int width, int height, int dst_pitch); diff --git a/src/blitter/32bpp_optimized.cpp b/src/blitter/32bpp_optimized.cpp index d37615448..ae360c99b 100644 --- a/src/blitter/32bpp_optimized.cpp +++ b/src/blitter/32bpp_optimized.cpp @@ -136,11 +136,11 @@ inline void Blitter_32bppOptimized::Draw(const Blitter::BlitterParams *bp, ZoomL break; case BM_TRANSPARENT: - /* TODO -- We make an assumption here that the remap in fact is transparency, not some color. + /* TODO -- We make an assumption here that the remap in fact is transparency, not some colour. * This is never a problem with the code we produce, but newgrfs can make it fail... or at least: * we produce a result the newgrf maker didn't expect ;) */ - /* Make the current color a bit more black, so it looks like this image is transparent */ + /* Make the current colour a bit more black, so it looks like this image is transparent */ src_n += n; if (src_px->a == 255) { src_px += n; diff --git a/src/blitter/32bpp_simple.cpp b/src/blitter/32bpp_simple.cpp index 7b46af10f..9e8263b1f 100644 --- a/src/blitter/32bpp_simple.cpp +++ b/src/blitter/32bpp_simple.cpp @@ -39,11 +39,11 @@ void Blitter_32bppSimple::Draw(Blitter::BlitterParams *bp, BlitterMode mode, Zoo break; case BM_TRANSPARENT: - /* TODO -- We make an assumption here that the remap in fact is transparency, not some color. + /* TODO -- We make an assumption here that the remap in fact is transparency, not some colour. * This is never a problem with the code we produce, but newgrfs can make it fail... or at least: * we produce a result the newgrf maker didn't expect ;) */ - /* Make the current color a bit more black, so it looks like this image is transparent */ + /* Make the current colour a bit more black, so it looks like this image is transparent */ if (src->a != 0) *dst = MakeTransparent(*dst, 192); break; @@ -57,7 +57,7 @@ void Blitter_32bppSimple::Draw(Blitter::BlitterParams *bp, BlitterMode mode, Zoo } } -void Blitter_32bppSimple::DrawColorMappingRect(void *dst, int width, int height, int pal) +void Blitter_32bppSimple::DrawColourMappingRect(void *dst, int width, int height, int pal) { uint32 *udst = (uint32 *)dst; @@ -82,7 +82,7 @@ void Blitter_32bppSimple::DrawColorMappingRect(void *dst, int width, int height, return; } - DEBUG(misc, 0, "32bpp blitter doesn't know how to draw this color table ('%d')", pal); + DEBUG(misc, 0, "32bpp blitter doesn't know how to draw this colour table ('%d')", pal); } Sprite *Blitter_32bppSimple::Encode(SpriteLoader::Sprite *sprite, Blitter::AllocatorProc *allocator) @@ -102,10 +102,10 @@ Sprite *Blitter_32bppSimple::Encode(SpriteLoader::Sprite *sprite, Blitter::Alloc for (int i = 0; i < sprite->height * sprite->width; i++) { if (dst[i].m != 0) { /* Pre-convert the mapping channel to a RGB value */ - uint color = this->LookupColourInPalette(dst[i].m); - dst[i].r = GB(color, 16, 8); - dst[i].g = GB(color, 8, 8); - dst[i].b = GB(color, 0, 8); + uint colour = this->LookupColourInPalette(dst[i].m); + dst[i].r = GB(colour, 16, 8); + dst[i].g = GB(colour, 8, 8); + dst[i].b = GB(colour, 0, 8); } } diff --git a/src/blitter/32bpp_simple.hpp b/src/blitter/32bpp_simple.hpp index 5ca965b27..2c08dec3a 100644 --- a/src/blitter/32bpp_simple.hpp +++ b/src/blitter/32bpp_simple.hpp @@ -11,7 +11,7 @@ class Blitter_32bppSimple : public Blitter_32bppBase { public: /* virtual */ void Draw(Blitter::BlitterParams *bp, BlitterMode mode, ZoomLevel zoom); - /* virtual */ void DrawColorMappingRect(void *dst, int width, int height, int pal); + /* virtual */ void DrawColourMappingRect(void *dst, int width, int height, int pal); /* virtual */ Sprite *Encode(SpriteLoader::Sprite *sprite, Blitter::AllocatorProc *allocator); /* virtual */ const char *GetName() { return "32bpp-simple"; } diff --git a/src/blitter/8bpp_base.cpp b/src/blitter/8bpp_base.cpp index 4bdbfe2df..7033e2fa1 100644 --- a/src/blitter/8bpp_base.cpp +++ b/src/blitter/8bpp_base.cpp @@ -6,7 +6,7 @@ #include "../gfx_func.h" #include "8bpp_base.hpp" -void Blitter_8bppBase::DrawColorMappingRect(void *dst, int width, int height, int pal) +void Blitter_8bppBase::DrawColourMappingRect(void *dst, int width, int height, int pal) { const uint8 *ctab = GetNonSprite(pal, ST_RECOLOUR) + 1; @@ -21,26 +21,26 @@ void *Blitter_8bppBase::MoveTo(const void *video, int x, int y) return (uint8 *)video + x + y * _screen.pitch; } -void Blitter_8bppBase::SetPixel(void *video, int x, int y, uint8 color) +void Blitter_8bppBase::SetPixel(void *video, int x, int y, uint8 colour) { - *((uint8 *)video + x + y * _screen.pitch) = color; + *((uint8 *)video + x + y * _screen.pitch) = colour; } -void Blitter_8bppBase::SetPixelIfEmpty(void *video, int x, int y, uint8 color) +void Blitter_8bppBase::SetPixelIfEmpty(void *video, int x, int y, uint8 colour) { uint8 *dst = (uint8 *)video + x + y * _screen.pitch; - if (*dst == 0) *dst = color; + if (*dst == 0) *dst = colour; } -void Blitter_8bppBase::DrawRect(void *video, int width, int height, uint8 color) +void Blitter_8bppBase::DrawRect(void *video, int width, int height, uint8 colour) { do { - memset(video, color, width); + memset(video, colour, width); video = (uint8 *)video + _screen.pitch; } while (--height); } -void Blitter_8bppBase::DrawLine(void *video, int x, int y, int x2, int y2, int screen_width, int screen_height, uint8 color) +void Blitter_8bppBase::DrawLine(void *video, int x, int y, int x2, int y2, int screen_width, int screen_height, uint8 colour) { int dy; int dx; @@ -64,7 +64,7 @@ void Blitter_8bppBase::DrawLine(void *video, int x, int y, int x2, int y2, int s stepx = 1; } - if (x >= 0 && y >= 0 && x < screen_width && y < screen_height) this->SetPixel(video, x, y, color); + if (x >= 0 && y >= 0 && x < screen_width && y < screen_height) this->SetPixel(video, x, y, colour); if (dx > dy) { frac = dy - (dx / 2); while (x != x2) { @@ -74,7 +74,7 @@ void Blitter_8bppBase::DrawLine(void *video, int x, int y, int x2, int y2, int s } x += stepx; frac += dy; - if (x >= 0 && y >= 0 && x < screen_width && y < screen_height) this->SetPixel(video, x, y, color); + if (x >= 0 && y >= 0 && x < screen_width && y < screen_height) this->SetPixel(video, x, y, colour); } } else { frac = dx - (dy / 2); @@ -85,7 +85,7 @@ void Blitter_8bppBase::DrawLine(void *video, int x, int y, int x2, int y2, int s } y += stepy; frac += dx; - if (x >= 0 && y >= 0 && x < screen_width && y < screen_height) this->SetPixel(video, x, y, color); + if (x >= 0 && y >= 0 && x < screen_width && y < screen_height) this->SetPixel(video, x, y, colour); } } } diff --git a/src/blitter/8bpp_base.hpp b/src/blitter/8bpp_base.hpp index df0f51513..bfef67e63 100644 --- a/src/blitter/8bpp_base.hpp +++ b/src/blitter/8bpp_base.hpp @@ -11,13 +11,13 @@ class Blitter_8bppBase : public Blitter { public: /* virtual */ uint8 GetScreenDepth() { return 8; } // /* virtual */ void Draw(Blitter::BlitterParams *bp, BlitterMode mode, ZoomLevel zoom); - /* virtual */ void DrawColorMappingRect(void *dst, int width, int height, int pal); + /* virtual */ void DrawColourMappingRect(void *dst, int width, int height, int pal); // /* 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 color); - /* virtual */ void SetPixelIfEmpty(void *video, int x, int y, uint8 color); - /* virtual */ void DrawRect(void *video, int width, int height, uint8 color); - /* virtual */ void DrawLine(void *video, int x, int y, int x2, int y2, int screen_width, int screen_height, uint8 color); + /* 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); /* virtual */ void CopyToBuffer(const void *video, void *dst, int width, int height); /* virtual */ void CopyImageToBuffer(const void *video, void *dst, int width, int height, int dst_pitch); diff --git a/src/blitter/8bpp_debug.cpp b/src/blitter/8bpp_debug.cpp index 3ce0600c3..e8d4c739f 100644 --- a/src/blitter/8bpp_debug.cpp +++ b/src/blitter/8bpp_debug.cpp @@ -44,10 +44,10 @@ Sprite *Blitter_8bppDebug::Encode(SpriteLoader::Sprite *sprite, Blitter::Allocat dest_sprite->x_offs = sprite->x_offs; dest_sprite->y_offs = sprite->y_offs; - /* Write a random color as sprite; this makes debugging really easy */ - uint color = InteractiveRandom() % 150 + 2; + /* Write a random colour as sprite; this makes debugging really easy */ + uint colour = InteractiveRandom() % 150 + 2; for (int i = 0; i < sprite->height * sprite->width; i++) { - dest_sprite->data[i] = (sprite->data[i].m == 0) ? 0 : color; + dest_sprite->data[i] = (sprite->data[i].m == 0) ? 0 : colour; } return dest_sprite; diff --git a/src/blitter/8bpp_optimized.cpp b/src/blitter/8bpp_optimized.cpp index f002dc070..350715dc6 100644 --- a/src/blitter/8bpp_optimized.cpp +++ b/src/blitter/8bpp_optimized.cpp @@ -140,7 +140,7 @@ Sprite *Blitter_8bppOptimized::Encode(SpriteLoader::Sprite *sprite, Blitter::All for (int x = 0; x < scaled_width; x++) { uint colour = 0; - /* Get the color keeping in mind the zoom-level */ + /* Get the colour keeping in mind the zoom-level */ for (int j = 0; j < scaled_1; j++) { if (src->m != 0) colour = src->m; /* Because of the scaling it might happen we read outside the buffer. Avoid that. */ diff --git a/src/blitter/8bpp_simple.cpp b/src/blitter/8bpp_simple.cpp index 5bef7927f..ec9c647b6 100644 --- a/src/blitter/8bpp_simple.cpp +++ b/src/blitter/8bpp_simple.cpp @@ -25,22 +25,22 @@ void Blitter_8bppSimple::Draw(Blitter::BlitterParams *bp, BlitterMode mode, Zoom src_line += bp->sprite_width * ScaleByZoom(1, zoom); for (int x = 0; x < bp->width; x++) { - uint color = 0; + uint colour = 0; switch (mode) { case BM_COLOUR_REMAP: - color = bp->remap[*src]; + colour = bp->remap[*src]; break; case BM_TRANSPARENT: - if (*src != 0) color = bp->remap[*dst]; + if (*src != 0) colour = bp->remap[*dst]; break; default: - color = *src; + colour = *src; break; } - if (color != 0) *dst = color; + if (colour != 0) *dst = colour; dst++; src += ScaleByZoom(1, zoom); } diff --git a/src/blitter/base.hpp b/src/blitter/base.hpp index c05f21a5d..cb4fe66b4 100644 --- a/src/blitter/base.hpp +++ b/src/blitter/base.hpp @@ -54,15 +54,15 @@ public: virtual void Draw(Blitter::BlitterParams *bp, BlitterMode mode, ZoomLevel zoom) = 0; /** - * Draw a colortable to the screen. This is: the color of the screen is read - * and is looked-up in the palette to match a new color, which then is put + * Draw a colourtable to the screen. This is: the colour of the screen is read + * and is looked-up in the palette to match a new colour, which then is put * on the screen again. * @param dst the destination pointer (video-buffer). * @param width the width of the buffer. * @param height the height of the buffer. * @param pal the palette to use. */ - virtual void DrawColorMappingRect(void *dst, int width, int height, int pal) = 0; + virtual void DrawColourMappingRect(void *dst, int width, int height, int pal) = 0; /** * Convert a sprite from the loader to our own format. @@ -80,33 +80,33 @@ public: virtual void *MoveTo(const void *video, int x, int y) = 0; /** - * Draw a pixel with a given color on the video-buffer. + * Draw a pixel with a given colour on the video-buffer. * @param video The destination pointer (video-buffer). * @param x The x position within video-buffer. * @param y The y position within video-buffer. - * @param color A 8bpp mapping color. + * @param colour A 8bpp mapping colour. */ - virtual void SetPixel(void *video, int x, int y, uint8 color) = 0; + virtual void SetPixel(void *video, int x, int y, uint8 colour) = 0; /** - * Draw a pixel with a given color on the video-buffer if there is currently a black pixel. + * 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 color A 8bpp mapping color. + * @param colour A 8bpp mapping colour. */ - virtual void SetPixelIfEmpty(void *video, int x, int y, uint8 color) = 0; + virtual void SetPixelIfEmpty(void *video, int x, int y, uint8 colour) = 0; /** - * Make a single horizontal line in a single color on the video-buffer. + * Make a single horizontal line in a single colour on the video-buffer. * @param video The destination pointer (video-buffer). * @param width The lenght of the line. - * @param color A 8bpp mapping color. + * @param colour A 8bpp mapping colour. */ - virtual void DrawRect(void *video, int width, int height, uint8 color) = 0; + virtual void DrawRect(void *video, int width, int height, uint8 colour) = 0; /** - * Draw a line with a given color. + * Draw a line with a given colour. * @param video The destination pointer (video-buffer). * @param x The x coordinate from where the line starts. * @param y The y coordinate from where the line starts. @@ -114,9 +114,9 @@ public: * @param y2 The y coordinate to where the lines goes. * @param screen_width The width of the screen you are drawing in (to avoid buffer-overflows). * @param screen_height The height of the screen you are drawing in (to avoid buffer-overflows). - * @param color A 8bpp mapping color. + * @param colour A 8bpp mapping colour. */ - virtual void DrawLine(void *video, int x, int y, int x2, int y2, int screen_width, int screen_height, uint8 color) = 0; + virtual void DrawLine(void *video, int x, int y, int x2, int y2, int screen_width, int screen_height, uint8 colour) = 0; /** * Copy from a buffer to the screen. diff --git a/src/blitter/null.hpp b/src/blitter/null.hpp index aae238fc3..2f01f5a8a 100644 --- a/src/blitter/null.hpp +++ b/src/blitter/null.hpp @@ -12,13 +12,13 @@ class Blitter_Null : public Blitter { public: /* virtual */ uint8 GetScreenDepth() { return 0; } /* virtual */ void Draw(Blitter::BlitterParams *bp, BlitterMode mode, ZoomLevel zoom) {}; - /* virtual */ void DrawColorMappingRect(void *dst, int width, int height, int pal) {}; + /* virtual */ void DrawColourMappingRect(void *dst, int width, int height, int pal) {}; /* 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 color) {}; - /* virtual */ void SetPixelIfEmpty(void *video, int x, int y, uint8 color) {}; - /* virtual */ void DrawRect(void *video, int width, int height, uint8 color) {}; - /* virtual */ void DrawLine(void *video, int x, int y, int x2, int y2, int screen_width, int screen_height, uint8 color) {}; + /* 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) {}; /* virtual */ void CopyToBuffer(const void *video, void *dst, int width, int height) {}; /* virtual */ void CopyImageToBuffer(const void *video, void *dst, int width, int height, int dst_pitch) {}; -- cgit v1.2.3-54-g00ecf