diff options
Diffstat (limited to 'engines/sword2')
-rw-r--r-- | engines/sword2/controls.cpp | 2 | ||||
-rw-r--r-- | engines/sword2/function.cpp | 16 | ||||
-rw-r--r-- | engines/sword2/header.h | 10 | ||||
-rw-r--r-- | engines/sword2/icons.cpp | 20 | ||||
-rw-r--r-- | engines/sword2/interpreter.cpp | 2 | ||||
-rw-r--r-- | engines/sword2/layers.cpp | 2 | ||||
-rw-r--r-- | engines/sword2/logic.h | 2 | ||||
-rw-r--r-- | engines/sword2/maketext.cpp | 30 | ||||
-rw-r--r-- | engines/sword2/maketext.h | 4 | ||||
-rw-r--r-- | engines/sword2/mouse.cpp | 2 | ||||
-rw-r--r-- | engines/sword2/object.h | 2 | ||||
-rw-r--r-- | engines/sword2/palette.cpp | 24 | ||||
-rw-r--r-- | engines/sword2/protocol.cpp | 4 | ||||
-rw-r--r-- | engines/sword2/render.cpp | 16 | ||||
-rw-r--r-- | engines/sword2/router.cpp | 6 | ||||
-rw-r--r-- | engines/sword2/router.h | 2 | ||||
-rw-r--r-- | engines/sword2/screen.cpp | 16 | ||||
-rw-r--r-- | engines/sword2/screen.h | 6 | ||||
-rw-r--r-- | engines/sword2/sprite.cpp | 32 |
19 files changed, 99 insertions, 99 deletions
diff --git a/engines/sword2/controls.cpp b/engines/sword2/controls.cpp index c55cc72493..b488092007 100644 --- a/engines/sword2/controls.cpp +++ b/engines/sword2/controls.cpp @@ -465,7 +465,7 @@ void Widget::createSurfaceImage(int state, uint32 res, int x, int y, uint32 pc) break; case RLE16: spriteType |= RDSPR_RLE256; - // Points to just after last cdt_entry, i.e. start of colour + // Points to just after last cdt_entry, i.e. start of color // table colTablePtr = _vm->fetchAnimHeader(file) + AnimHeader::size() + anim_head.noAnimFrames * CdtEntry::size(); diff --git a/engines/sword2/function.cpp b/engines/sword2/function.cpp index 5e570fbaad..a968a5600d 100644 --- a/engines/sword2/function.cpp +++ b/engines/sword2/function.cpp @@ -1859,15 +1859,15 @@ int32 Logic::fnSetScrollRightMouse(int32 *params) { return IR_CONT; } -int32 Logic::fnColour(int32 *params) { - // set border colour - useful during script development - // eg. set to colour during a timer situation, then black when timed +int32 Logic::fnColor(int32 *params) { + // set border color - useful during script development + // eg. set to color during a timer situation, then black when timed // out - // params 0: colour (see defines above) + // params 0: color (see defines above) #ifdef SWORD2_DEBUG - // what colour? + // what color? switch (params[0]) { case BLACK: _vm->_screen->setPalette(0, 1, black, RDPAL_INSTANT); @@ -1905,14 +1905,14 @@ static const uint8 blue[3] = { 0, 0, 255 }; #endif int32 Logic::fnFlash(int32 *params) { - // flash colour 0 (ie. border) - useful during script development + // flash color 0 (ie. border) - useful during script development // eg. fnFlash(BLUE) where a text line is missed; RED when some code // missing, etc - // params: 0 colour to flash + // params: 0 color to flash #ifdef SWORD2_DEBUG - // what colour? + // what color? switch (params[0]) { case WHITE: _vm->_screen->setPalette(0, 1, white, RDPAL_INSTANT); diff --git a/engines/sword2/header.h b/engines/sword2/header.h index 3f64152bb9..ed63c806bc 100644 --- a/engines/sword2/header.h +++ b/engines/sword2/header.h @@ -114,7 +114,7 @@ enum { // standard file header // animation header // a string of CDT entries (one per frame of the anim) -// a 16-byte colour table ONLY if (runTimeComp==RLE16) +// a 16-byte color table ONLY if (runTimeComp==RLE16) // a string of groups of (frame header + frame data) // Animation Header @@ -147,11 +147,11 @@ struct AnimHeader { enum { NONE = 0, // No frame compression - RLE256 = 1, // James's RLE for 256-colour sprites - RLE16 = 2 // James's RLE for 16- or 17-colour sprites - // (raw blocks have max 16 colours for 2 pixels + RLE256 = 1, // James's RLE for 256-color sprites + RLE16 = 2 // James's RLE for 16- or 17-color sprites + // (raw blocks have max 16 colors for 2 pixels // per byte, so '0's are encoded only as FLAT - // for 17-colour sprites eg. George's mega-set) + // for 17-color sprites eg. George's mega-set) }; // CDT Entry diff --git a/engines/sword2/icons.cpp b/engines/sword2/icons.cpp index b115eb373b..8336178ae5 100644 --- a/engines/sword2/icons.cpp +++ b/engines/sword2/icons.cpp @@ -157,33 +157,33 @@ void Mouse::buildMenu() { byte *icon = NULL; if (res) { - bool icon_coloured; + bool icon_colored; uint32 object_held = _vm->_logic->readVar(OBJECT_HELD); uint32 combine_base = _vm->_logic->readVar(COMBINE_BASE); if (_examiningMenuIcon) { // When examining an object, that object is - // coloured. The rest are greyed out. - icon_coloured = (res == object_held); + // colored. The rest are greyed out. + icon_colored = (res == object_held); } else if (combine_base) { // When combining two menu object (i.e. using - // one on another), both are coloured. The rest + // one on another), both are colored. The rest // are greyed out. - icon_coloured = (res == object_held || combine_base); + icon_colored = (res == object_held || combine_base); } else { // If an object is selected but we are not yet // doing anything with it, the selected object - // is greyed out. The rest are coloured. - icon_coloured = (res != object_held); + // is greyed out. The rest are colored. + icon_colored = (res != object_held); } icon = _vm->_resman->openResource(res) + ResHeader::size(); - // The coloured icon is stored directly after the + // The colored icon is stored directly after the // greyed out one. - if (icon_coloured) + if (icon_colored) icon += (menuIconWidth * RDMENU_ICONDEEP); } @@ -216,7 +216,7 @@ void Mouse::buildSystemMenu() { else menuIconWidth = RDMENU_ICONWIDE; - // Build them all high in full colour - when one is clicked on all the + // Build them all high in full color - when one is clicked on all the // rest will grey out. for (int i = 0; i < ARRAYSIZE(icon_list); i++) { diff --git a/engines/sword2/interpreter.cpp b/engines/sword2/interpreter.cpp index a51ce5702c..e039ae3888 100644 --- a/engines/sword2/interpreter.cpp +++ b/engines/sword2/interpreter.cpp @@ -147,7 +147,7 @@ void Logic::setupOpcodes() { OPCODE(fnSetScrollLeftMouse), OPCODE(fnSetScrollRightMouse), /* 4C */ - OPCODE(fnColour), + OPCODE(fnColor), OPCODE(fnFlash), OPCODE(fnPreFetch), OPCODE(fnGetPlayerSaveData), diff --git a/engines/sword2/layers.cpp b/engines/sword2/layers.cpp index d97b1395d5..c5091a248f 100644 --- a/engines/sword2/layers.cpp +++ b/engines/sword2/layers.cpp @@ -166,7 +166,7 @@ void Screen::initBackground(int32 res, int32 new_palette) { spriteInfo.type = 0; spriteInfo.blend = 0; spriteInfo.data = _vm->fetchShadingMask(file); - spriteInfo.colourTable = 0; + spriteInfo.colorTable = 0; if (openLightMask(&spriteInfo) != RD_OK) error("Could not open light mask"); diff --git a/engines/sword2/logic.h b/engines/sword2/logic.h index 793f87d037..e40a12bba3 100644 --- a/engines/sword2/logic.h +++ b/engines/sword2/logic.h @@ -260,7 +260,7 @@ public: int32 fnStandAtAnim(int32 *params); int32 fnSetScrollLeftMouse(int32 *params); int32 fnSetScrollRightMouse(int32 *params); - int32 fnColour(int32 *params); + int32 fnColor(int32 *params); int32 fnFlash(int32 *params); int32 fnPreFetch(int32 *params); int32 fnGetPlayerSaveData(int32 *params); diff --git a/engines/sword2/maketext.cpp b/engines/sword2/maketext.cpp index 84a2fccedd..7acfc63adc 100644 --- a/engines/sword2/maketext.cpp +++ b/engines/sword2/maketext.cpp @@ -27,17 +27,17 @@ // MAKETEXT - Constructs a single-frame text sprite: returns a handle to a // FLOATING memory block containing the sprite, given a -// null-terminated string, max width allowed, pen colour and +// null-terminated string, max width allowed, pen color and // pointer to required character set. // // NB 1) The routine does not create a standard file header or // an anim header for the text sprite - the data simply begins // with the frame header. // -// NB 2) If pen colour is zero, it copies the characters into -// the sprite without remapping the colours. -// ie. It can handle both the standard 2-colour font for speech -// and any multicoloured fonts for control panels, etc. +// NB 2) If pen color is zero, it copies the characters into +// the sprite without remapping the colors. +// ie. It can handle both the standard 2-color font for speech +// and any multicolored fonts for control panels, etc. // // Based on textsprt.c as used for Broken Sword 1, but updated // for new system by JEL on 9oct96 and updated again (for font @@ -58,10 +58,10 @@ namespace Sword2 { #define MAX_LINES 30 // max character lines in output sprite -#define BORDER_COL 200 // source colour for character border (only - // needed for remapping colours) +#define BORDER_COL 200 // source color for character border (only + // needed for remapping colors) -#define LETTER_COL 193 // source colour for bulk of character ( " ) +#define LETTER_COL 193 // source color for bulk of character ( " ) #define LETTER_COL_PSX1 33 #define LETTER_COL_PSX2 34 #define SPACE ' ' @@ -76,9 +76,9 @@ namespace Sword2 { * * @param sentence pointer to a null-terminated string * @param maxWidth the maximum allowed text sprite width in pixels - * @param pen the text colour, or zero to use the source colours + * @param pen the text color, or zero to use the source colors * @param fontRes the font resource id - * @param border the border colour; black by default + * @param border the border color; black by default * @return a handle to a floating memory block containing the text sprite * @note The sentence must contain no leading, trailing or extra spaces. * Out-of-range characters in the string are replaced by a special @@ -200,7 +200,7 @@ uint16 FontRenderer::analyseSentence(byte *sentence, uint16 maxWidth, uint32 fon * * @param sentence pointer to a null-terminated string * @param fontRes the font resource id - * @param pen the text colour, or zero to use the source colours + * @param pen the text color, or zero to use the source colors * @param line array of LineInfo structures, created by analyseSentence() * @param noOfLines the number of lines, i.e. the number of elements in 'line' * @return a handle to a floating memory block containing the text sprite @@ -448,7 +448,7 @@ byte *FontRenderer::findChar(byte ch, byte *charSet) { * @param spritePtr pointer to the sprite buffer * @param spriteWidth the width of the character * @param pen If zero, copy the data directly. Otherwise remap the - * sprite's colours from BORDER_COL to _borderPen and from + * sprite's colors from BORDER_COL to _borderPen and from * LETTER_COL to pen. */ @@ -464,7 +464,7 @@ void FontRenderer::copyChar(byte *charPtr, byte *spritePtr, uint16 spriteWidth, byte *dest = rowPtr; if (pen) { - // Use the specified colours + // Use the specified colors for (uint j = 0; j < frame.width; j++) { switch (*source++) { case 0: @@ -489,7 +489,7 @@ void FontRenderer::copyChar(byte *charPtr, byte *spritePtr, uint16 spriteWidth, } } else { // Pen is zero, so just copy character sprites - // directly into text sprite without remapping colours. + // directly into text sprite without remapping colors. // Apparently overlapping is never considered here? memcpy(dest, source, frame.width); source += frame.width; @@ -613,7 +613,7 @@ void FontRenderer::printTextBlocs() { spriteInfo.type = _blocList[i].type; spriteInfo.blend = 0; spriteInfo.data = _blocList[i].text_mem + FrameHeader::size(); - spriteInfo.colourTable = 0; + spriteInfo.colorTable = 0; spriteInfo.isText = true; uint32 rv = _vm->_screen->drawSprite(&spriteInfo); diff --git a/engines/sword2/maketext.h b/engines/sword2/maketext.h index 63b65a32b1..840f5e5fa1 100644 --- a/engines/sword2/maketext.h +++ b/engines/sword2/maketext.h @@ -32,7 +32,7 @@ namespace Sword2 { -// Output colour for character border - should be be black but note that we +// Output color for character border - should be be black but note that we // have to use a different pen number during sequences #define BORDER_PEN 194 @@ -92,7 +92,7 @@ private: // for overlap int8 _charSpacing; // no. of pixels to separate characters along // each line - negative for overlap - uint8 _borderPen; // output pen colour of character borders + uint8 _borderPen; // output pen color of character borders uint16 analyseSentence(byte *sentence, uint16 maxWidth, uint32 fontRes, LineInfo *line); byte *buildTextSprite(byte *sentence, uint32 fontRes, uint8 pen, LineInfo *line, uint16 noOfLines); diff --git a/engines/sword2/mouse.cpp b/engines/sword2/mouse.cpp index c8e9387cb7..d3dcf10f55 100644 --- a/engines/sword2/mouse.cpp +++ b/engines/sword2/mouse.cpp @@ -1433,7 +1433,7 @@ void Mouse::refreshInventory() { // Can reset this now _vm->_logic->writeVar(COMBINE_BASE, 0); - // Cause 'object_held' icon to be greyed. The rest are coloured. + // Cause 'object_held' icon to be greyed. The rest are colored. _examiningMenuIcon = true; buildMenu(); _examiningMenuIcon = false; diff --git a/engines/sword2/object.h b/engines/sword2/object.h index 53819c08cc..94a968e58d 100644 --- a/engines/sword2/object.h +++ b/engines/sword2/object.h @@ -139,7 +139,7 @@ public: // speech structure - contains fields used by speech scripts & text output class ObjectSpeech { - // int32 pen; // colour to use for body of characters + // int32 pen; // color to use for body of characters // int32 width; // max width of text sprite // int32 command; // speech script command id // int32 ins1; // speech script instruction parameters diff --git a/engines/sword2/palette.cpp b/engines/sword2/palette.cpp index b348fd6bb5..f43efcaa7f 100644 --- a/engines/sword2/palette.cpp +++ b/engines/sword2/palette.cpp @@ -107,8 +107,8 @@ void Screen::setFullPalette(int32 palRes) { pal += ResHeader::size(); - // always set colour 0 to black because most background screen - // palettes have a bright colour 0 although it should come out + // always set color 0 to black because most background screen + // palettes have a bright color 0 although it should come out // as black in the game! _palette[0] = 0; @@ -144,11 +144,11 @@ void Screen::setFullPalette(int32 palRes) { } /** - * Matches a colour triplet to a palette index. - * @param r red colour component - * @param g green colour component - * @param b blue colour component - * @return the palette index of the closest matching colour in the palette + * Matches a color triplet to a palette index. + * @param r red color component + * @param g green color component + * @param b blue color component + * @return the palette index of the closest matching color in the palette */ // FIXME: This used to be inlined - probably a good idea - but the @@ -160,16 +160,16 @@ uint8 Screen::quickMatch(uint8 r, uint8 g, uint8 b) { /** * Sets the palette. - * @param startEntry the first colour entry to set - * @param noEntries the number of colour entries to set - * @param colourTable the new colour entries + * @param startEntry the first color entry to set + * @param noEntries the number of color entries to set + * @param colorTable the new color entries * @param fadeNow whether to perform the change immediately or delayed */ -void Screen::setPalette(int16 startEntry, int16 noEntries, byte *colourTable, uint8 fadeNow) { +void Screen::setPalette(int16 startEntry, int16 noEntries, byte *colorTable, uint8 fadeNow) { assert(noEntries > 0); - memmove(&_palette[3 * startEntry], colourTable, noEntries * 3); + memmove(&_palette[3 * startEntry], colorTable, noEntries * 3); if (fadeNow == RDPAL_INSTANT) { setSystemPalette(_palette, startEntry, noEntries); diff --git a/engines/sword2/protocol.cpp b/engines/sword2/protocol.cpp index ef2c622287..3d16e4ea4c 100644 --- a/engines/sword2/protocol.cpp +++ b/engines/sword2/protocol.cpp @@ -52,8 +52,8 @@ void Sword2Engine::fetchPalette(byte *screenFile, byte *palBuffer) { palette = screenFile + ResHeader::size() + mscreenHeader.palette; } - // Always set colour 0 to black, because while most background screen - // palettes have a bright colour 0 it should come out as black in the + // Always set color 0 to black, because while most background screen + // palettes have a bright color 0 it should come out as black in the // game. palBuffer[0] = 0; diff --git a/engines/sword2/render.cpp b/engines/sword2/render.cpp index a71d503d95..a47f8abe0d 100644 --- a/engines/sword2/render.cpp +++ b/engines/sword2/render.cpp @@ -234,24 +234,24 @@ void Screen::scaleImageGood(byte *dst, uint16 dstPitch, uint16 dstWidth, uint16 * used for debugging. * @param x x-coordinate of the point * @param y y-coordinate of the point - * @param colour colour of the point + * @param color color of the point */ -void Screen::plotPoint(int x, int y, uint8 colour) { +void Screen::plotPoint(int x, int y, uint8 color) { byte *buf = _buffer + MENUDEEP * RENDERWIDE; x -= _scrollX; y -= _scrollY; if (x >= 0 && x < RENDERWIDE && y >= 0 && y < RENDERDEEP) { - buf[y * RENDERWIDE + x] = colour; + buf[y * RENDERWIDE + x] = color; markAsDirty(x, y + MENUDEEP, x, y + MENUDEEP); } } -static void plot(int x, int y, int colour, void *data) { +static void plot(int x, int y, int color, void *data) { Screen *screen = (Screen *)data; - screen->plotPoint(x, y, (uint8) colour); + screen->plotPoint(x, y, (uint8) color); } /** @@ -260,11 +260,11 @@ static void plot(int x, int y, int colour, void *data) { * @param y0 y-coordinate of the start point * @param x1 x-coordinate of the end point * @param y1 y-coordinate of the end point - * @param colour colour of the line + * @param color color of the line */ -void Screen::drawLine(int x0, int y0, int x1, int y1, uint8 colour) { - Graphics::drawLine(x0, y0, x1, y1, colour, &plot, this); +void Screen::drawLine(int x0, int y0, int x1, int y1, uint8 color) { + Graphics::drawLine(x0, y0, x1, y1, color, &plot, this); } /** diff --git a/engines/sword2/router.cpp b/engines/sword2/router.cpp index 1548536ccb..8f355151f4 100644 --- a/engines/sword2/router.cpp +++ b/engines/sword2/router.cpp @@ -2344,9 +2344,9 @@ void Router::plotWalkGrid() { plotCross(_node[i].x, _node[i].y, 184); } -void Router::plotCross(int16 x, int16 y, uint8 colour) { - _vm->_screen->drawLine(x - 1, y - 1, x + 1, y + 1, colour); - _vm->_screen->drawLine(x + 1, y - 1, x - 1, y + 1, colour); +void Router::plotCross(int16 x, int16 y, uint8 color) { + _vm->_screen->drawLine(x - 1, y - 1, x + 1, y + 1, color); + _vm->_screen->drawLine(x + 1, y - 1, x - 1, y + 1, color); } void Router::loadWalkGrid() { diff --git a/engines/sword2/router.h b/engines/sword2/router.h index f556850797..1ad3dd74c4 100644 --- a/engines/sword2/router.h +++ b/engines/sword2/router.h @@ -193,7 +193,7 @@ private: int32 solidWalkAnimator(WalkData *walkAnim); #endif - void plotCross(int16 x, int16 y, uint8 colour); + void plotCross(int16 x, int16 y, uint8 color); public: Router(Sword2Engine *vm) : _vm(vm), _diagonalx(0), _diagonaly(0) { diff --git a/engines/sword2/screen.cpp b/engines/sword2/screen.cpp index 8c2db79297..74a23c8b2c 100644 --- a/engines/sword2/screen.cpp +++ b/engines/sword2/screen.cpp @@ -253,7 +253,7 @@ void Screen::updateDisplay(bool redrawScene) { } /** - * Fill the screen buffer with palette colour zero. Note that it does not + * Fill the screen buffer with palette color zero. Note that it does not * touch the menu areas of the screen. */ @@ -392,7 +392,7 @@ void Screen::displayMsg(byte *text, int time) { spriteInfo.type = RDSPR_DISPLAYALIGN | RDSPR_NOCOMPRESSION | RDSPR_TRANS; spriteInfo.blend = 0; spriteInfo.data = text_spr + FrameHeader::size(); - spriteInfo.colourTable = 0; + spriteInfo.colorTable = 0; spriteInfo.isText = true; uint32 rv = drawSprite(&spriteInfo); @@ -530,7 +530,7 @@ void Screen::processLayer(byte *file, uint32 layer_number) { } spriteInfo.blend = 0; - spriteInfo.colourTable = 0; + spriteInfo.colorTable = 0; // check for largest layer for debug info @@ -572,7 +572,7 @@ void Screen::processImage(BuildUnit *build_unit) { cdt_entry.read(_vm->fetchCdtEntry(file, build_unit->anim_pc)); frame_head.read(frame); - // so that 0-colour is transparent + // so that 0-color is transparent uint32 spriteType = RDSPR_TRANS; if (anim_head.blend) @@ -606,7 +606,7 @@ void Screen::processImage(BuildUnit *build_unit) { case RLE16: spriteType |= RDSPR_RLE16; // points to just after last cdt_entry, ie. - // start of colour table + // start of color table colTablePtr = _vm->fetchAnimHeader(file) + AnimHeader::size() + anim_head.noAnimFrames * CdtEntry::size(); if (Sword2Engine::isPsx()) colTablePtr++; // There is one additional byte to skip before the table in psx version @@ -632,7 +632,7 @@ void Screen::processImage(BuildUnit *build_unit) { spriteInfo.blend = anim_head.blend; // points to just after frame header, ie. start of sprite data spriteInfo.data = frame + FrameHeader::size(); - spriteInfo.colourTable = colTablePtr; + spriteInfo.colorTable = colTablePtr; spriteInfo.isText = false; // check for largest layer for debug info @@ -895,7 +895,7 @@ void Screen::rollCredits() { // palette 3 * 256 bytes // data width * height bytes // - // Note that the maximum colour component in the palette is 0x3F. + // Note that the maximum color component in the palette is 0x3F. // This is the same resolution as the _paletteMatch table. I doubt // that this is a coincidence, but let's use the image palette // directly anyway, just to be safe. @@ -1261,7 +1261,7 @@ void Screen::splashScreen() { barSprite.scaledHeight = 0; barSprite.type = RDSPR_RLE256FAST | RDSPR_TRANS; barSprite.blend = 0; - barSprite.colourTable = 0; + barSprite.colorTable = 0; barSprite.data = frame + FrameHeader::size(); barSprite.isText = false; diff --git a/engines/sword2/screen.h b/engines/sword2/screen.h index 46eb53d0db..9ef4f28049 100644 --- a/engines/sword2/screen.h +++ b/engines/sword2/screen.h @@ -172,7 +172,7 @@ struct SpriteInfo { uint16 type; // mask containing 'RDSPR_' bits specifying compression type, flip, transparency, etc uint16 blend; // holds the blending values. byte *data; // pointer to the sprite data - byte *colourTable; // pointer to 16-byte colour table, only applicable to 16-col compression type + byte *colorTable; // pointer to 16-byte color table, only applicable to 16-col compression type bool isText; // It is a engine-generated sprite containing text }; @@ -442,8 +442,8 @@ public: void buildDisplay(); - void plotPoint(int x, int y, uint8 colour); - void drawLine(int x0, int y0, int x1, int y1, uint8 colour); + void plotPoint(int x, int y, uint8 color); + void drawLine(int x0, int y0, int x1, int y1, uint8 color); void rollCredits(); void splashScreen(); diff --git a/engines/sword2/sprite.cpp b/engines/sword2/sprite.cpp index 255176292a..9a25812178 100644 --- a/engines/sword2/sprite.cpp +++ b/engines/sword2/sprite.cpp @@ -51,7 +51,7 @@ void Screen::mirrorSprite(byte *dst, byte *src, int16 w, int16 h) { } /** - * This function takes a compressed frame of a sprite with up to 256 colours + * This function takes a compressed frame of a sprite with up to 256 colors * and decompresses it. * @param dst destination buffer * @param src source buffer @@ -82,7 +82,7 @@ int32 Screen::decompressRLE256(byte *dst, byte *src, int32 decompSize) { break; } - // set the next 'headerByte' pixels to the next colour + // set the next 'headerByte' pixels to the next color // at 'source' memset(dst, *src, headerByte); @@ -90,7 +90,7 @@ int32 Screen::decompressRLE256(byte *dst, byte *src, int32 decompSize) { // block dst += headerByte; - // increment source pointer to just after this colour + // increment source pointer to just after this color src++; // if we've decompressed all of the data @@ -135,7 +135,7 @@ int32 Screen::decompressRLE256(byte *dst, byte *src, int32 decompSize) { } /** - * Unwinds a run of 16-colour data into 256-colour palette data. + * Unwinds a run of 16-color data into 256-color palette data. */ void Screen::unwindRaw16(byte *dst, byte *src, uint16 blockSize, byte *colTable) { @@ -143,11 +143,11 @@ void Screen::unwindRaw16(byte *dst, byte *src, uint16 blockSize, byte *colTable) while (blockSize > 1) { if (Sword2Engine::isPsx()) { - // 1st colour = number in table at position given by upper + // 1st color = number in table at position given by upper // nibble of source byte *dst++ = colTable[(*src) & 0x0f]; - // 2nd colour = number in table at position given by lower + // 2nd color = number in table at position given by lower // nibble of source byte *dst++ = colTable[(*src) >> 4]; } else { @@ -165,19 +165,19 @@ void Screen::unwindRaw16(byte *dst, byte *src, uint16 blockSize, byte *colTable) // if there's a final odd pixel if (blockSize) { - // colour = number in table at position given by upper nibble + // color = number in table at position given by upper nibble // of source byte *dst++ = colTable[(*src) >> 4]; } } /** - * This function takes a compressed frame of a sprite (with up to 16 colours) + * This function takes a compressed frame of a sprite (with up to 16 colors) * and decompresses it. * @param dst destination buffer * @param src source buffer * @param decompSize the expected size of the uncompressed sprite - * @param colTable mapping from the 16 encoded colours to the current palette + * @param colTable mapping from the 16 encoded colors to the current palette */ int32 Screen::decompressRLE16(byte *dst, byte *src, int32 decompSize, byte *colTable) { @@ -199,14 +199,14 @@ int32 Screen::decompressRLE16(byte *dst, byte *src, int32 decompSize, byte *colT } // set the next 'headerByte' pixels to the next - // colour at 'source' + // color at 'source' memset(dst, *src, headerByte); // increment destination pointer to just after this // block dst += headerByte; - // increment source pointer to just after this colour + // increment source pointer to just after this color src++; // if we've decompressed all of the data @@ -470,13 +470,13 @@ void Screen::deleteSurface(byte *surface) { * RDSPR_DISPLAYALIGN The sprite is drawn relative to the top left corner * of the screen * RDSPR_FLIP The sprite is mirrored - * RDSPR_TRANS The sprite has a transparent colour zero + * RDSPR_TRANS The sprite has a transparent color zero * RDSPR_BLEND The sprite is translucent * RDSPR_SHADOW The sprite is affected by the light mask. (Scaled * sprites always are.) * RDSPR_NOCOMPRESSION The sprite data is not compressed - * RDSPR_RLE16 The sprite data is a 16-colour compressed sprite - * RDSPR_RLE256 The sprite data is a 256-colour compressed sprite + * RDSPR_RLE16 The sprite data is a 16-color compressed sprite + * RDSPR_RLE256 The sprite data is a 256-color compressed sprite * @param s all the information needed to draw the sprite * @warning Sprites will only be drawn onto the background, not over menubar * areas. @@ -538,7 +538,7 @@ int32 Screen::drawSprite(SpriteInfo *s) { byte *tempBuf2 = (byte *)malloc(s->w * s->h * 10); memset(tempBuf2, 0, s->w * s->h * 2); - unwindRaw16(tempBuf2, tempBuf, (s->w * (s->h / 2)), s->colourTable); + unwindRaw16(tempBuf2, tempBuf, (s->w * (s->h / 2)), s->colorTable); sprite = (byte *)malloc(s->w * s->h); if (!sprite) { @@ -557,7 +557,7 @@ int32 Screen::drawSprite(SpriteInfo *s) { if (!sprite) return RDERR_OUTOFMEMORY; - if (decompressRLE16(sprite, s->data, s->w * s->h, s->colourTable)) { + if (decompressRLE16(sprite, s->data, s->w * s->h, s->colorTable)) { free(sprite); return RDERR_DECOMPRESSION; } |