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/spriteloader/grf.cpp | 2 +- src/spriteloader/png.cpp | 18 +++++++++--------- 2 files changed, 10 insertions(+), 10 deletions(-) (limited to 'src/spriteloader') diff --git a/src/spriteloader/grf.cpp b/src/spriteloader/grf.cpp index d7403ef31..b4f51eda9 100644 --- a/src/spriteloader/grf.cpp +++ b/src/spriteloader/grf.cpp @@ -41,7 +41,7 @@ bool SpriteLoaderGrf::LoadSprite(SpriteLoader::Sprite *sprite, uint8 file_slot, int num = FioReadWord(); byte type = FioReadByte(); - /* Type 0xFF indicates either a colormap or some other non-sprite info; we do not handle them here */ + /* Type 0xFF indicates either a colourmap or some other non-sprite info; we do not handle them here */ if (type == 0xFF) return false; sprite->height = FioReadByte(); diff --git a/src/spriteloader/png.cpp b/src/spriteloader/png.cpp index 43a188fbf..d6648b6be 100644 --- a/src/spriteloader/png.cpp +++ b/src/spriteloader/png.cpp @@ -49,7 +49,7 @@ static bool LoadPNG(SpriteLoader::Sprite *sprite, const char *filename, uint32 i png_byte header[8]; png_structp png_ptr; png_infop info_ptr, end_info; - uint bit_depth, color_type; + uint bit_depth, colour_type; uint i, pixelsize; png_bytep row_pointer; SpriteLoader::CommonPixel *dst; @@ -106,9 +106,9 @@ static bool LoadPNG(SpriteLoader::Sprite *sprite, const char *filename, uint32 i } bit_depth = png_get_bit_depth(png_ptr, info_ptr); - color_type = png_get_color_type(png_ptr, info_ptr); + colour_type = png_get_color_type(png_ptr, info_ptr); - if (mask && (bit_depth != 8 || color_type != PNG_COLOR_TYPE_PALETTE)) { + if (mask && (bit_depth != 8 || colour_type != PNG_COLOR_TYPE_PALETTE)) { DEBUG(misc, 0, "Ignoring mask for SpriteID %d as it isn't a 8 bit palette image", id); return true; } @@ -116,16 +116,16 @@ static bool LoadPNG(SpriteLoader::Sprite *sprite, const char *filename, uint32 i if (!mask) { if (bit_depth == 16) png_set_strip_16(png_ptr); - if (color_type == PNG_COLOR_TYPE_PALETTE) { + if (colour_type == PNG_COLOR_TYPE_PALETTE) { png_set_palette_to_rgb(png_ptr); - color_type = PNG_COLOR_TYPE_RGB; + colour_type = PNG_COLOR_TYPE_RGB; } - if (color_type == PNG_COLOR_TYPE_GRAY || color_type == PNG_COLOR_TYPE_GRAY_ALPHA) { + if (colour_type == PNG_COLOR_TYPE_GRAY || colour_type == PNG_COLOR_TYPE_GRAY_ALPHA) { png_set_gray_to_rgb(png_ptr); - color_type = PNG_COLOR_TYPE_RGB; + colour_type = PNG_COLOR_TYPE_RGB; } - if (color_type == PNG_COLOR_TYPE_RGB) { + if (colour_type == PNG_COLOR_TYPE_RGB) { png_set_filler(png_ptr, 0xff, PNG_FILLER_AFTER); } @@ -151,7 +151,7 @@ static bool LoadPNG(SpriteLoader::Sprite *sprite, const char *filename, uint32 i dst[x].r = 0; dst[x].g = 0; dst[x].b = 0; - /* Alpha channel is used from the original image (to allow transparency in remap colors) */ + /* Alpha channel is used from the original image (to allow transparency in remap colours) */ dst[x].m = row_pointer[x * sizeof(uint8)]; } } else { -- cgit v1.2.3-70-g09d2