diff options
author | Max Horn | 2011-04-14 14:12:27 +0200 |
---|---|---|
committer | Max Horn | 2011-04-14 14:12:35 +0200 |
commit | 84184aabc00251374a181fe296487619afa779ed (patch) | |
tree | 6e635dcaf2300d979e6ad1be9a5e9e0ec653df4a /engines | |
parent | 64c4e65201ca3097cc25b295359683eafaf25b07 (diff) | |
download | scummvm-rg350-84184aabc00251374a181fe296487619afa779ed.tar.gz scummvm-rg350-84184aabc00251374a181fe296487619afa779ed.tar.bz2 scummvm-rg350-84184aabc00251374a181fe296487619afa779ed.zip |
ALL: colour -> color
Diffstat (limited to 'engines')
143 files changed, 1091 insertions, 1092 deletions
diff --git a/engines/agi/agi.h b/engines/agi/agi.h index df19f55b52..eb3f3bc052 100644 --- a/engines/agi/agi.h +++ b/engines/agi/agi.h @@ -92,7 +92,7 @@ typedef signed int Err; #define CRYPT_KEY_SIERRA "Avis Durgan" #define CRYPT_KEY_AGDS "Alex Simkin" -#define MSG_BOX_COLOUR 0x0f // White +#define MSG_BOX_COLOR 0x0f // White #define MSG_BOX_TEXT 0x00 // Black #define MSG_BOX_LINE 0x04 // Red #define BUTTON_BORDER 0x00 // Black diff --git a/engines/agi/graphics.cpp b/engines/agi/graphics.cpp index 58982a2931..d0bc83d4c4 100644 --- a/engines/agi/graphics.cpp +++ b/engines/agi/graphics.cpp @@ -685,14 +685,14 @@ void GfxMgr::drawFrame(int x1, int y1, int x2, int y2, int c1, int c2) { } } -void GfxMgr::drawBox(int x1, int y1, int x2, int y2, int colour1, int colour2, int m) { +void GfxMgr::drawBox(int x1, int y1, int x2, int y2, int color1, int color2, int m) { x1 += m; y1 += m; x2 -= m; y2 -= m; - drawRectangle(x1, y1, x2, y2, colour1); - drawFrame(x1 + 2, y1 + 2, x2 - 2, y2 - 2, colour2, colour2); + drawRectangle(x1, y1, x2, y2, color1); + drawFrame(x1 + 2, y1 + 2, x2 - 2, y2 - 2, color2, color2); flushBlock(x1, y1, x2, y2); } @@ -752,7 +752,7 @@ void GfxMgr::rawDrawButton(int x, int y, const char *s, int fgcolor, int bgcolor // Draw a filled rectangle that's larger than the button. Used for drawing // a border around the button as the button itself is drawn after this. - drawRectangle(x1, y1, x2, y2, border ? BUTTON_BORDER : MSG_BOX_COLOUR); + drawRectangle(x1, y1, x2, y2, border ? BUTTON_BORDER : MSG_BOX_COLOR); while (*s) { putTextCharacter(0, x + textOffset, y + textOffset, *s++, fgcolor, bgcolor); diff --git a/engines/agi/menu.cpp b/engines/agi/menu.cpp index 5ec4908e4a..b62bcd9ad8 100644 --- a/engines/agi/menu.cpp +++ b/engines/agi/menu.cpp @@ -117,7 +117,7 @@ void Menu::drawMenuOptionHilite(int hMenu, int vMenu) { AgiMenuOption *d = getMenuOption(hMenu, vMenu); // Disabled menu items are "greyed out" with a checkerboard effect, - // rather than having a different colour. -- dsymonds + // rather than having a different color. -- dsymonds _vm->printText(d->text, 0, m->wincol + 1, vMenu + 2, m->width + 2, MENU_BG, MENU_FG, !d->enabled); } diff --git a/engines/agi/picture.cpp b/engines/agi/picture.cpp index 47b72cc8c6..d17fe1d497 100644 --- a/engines/agi/picture.cpp +++ b/engines/agi/picture.cpp @@ -601,7 +601,7 @@ void PictureMgr::drawPicture() { _patCode = nextByte(); plotBrush(); break; - case 0xf0: // set colour on screen (AGI pic v2) + case 0xf0: // set color on screen (AGI pic v2) if (_pictureVersion == AGIPIC_V15) break; @@ -615,7 +615,7 @@ void PictureMgr::drawPicture() { _scrColor &= 0xF; // for v3 drawing diff _scrOn = true; _priOn = false; - } else if (_pictureVersion == AGIPIC_V15) { // set colour on screen + } else if (_pictureVersion == AGIPIC_V15) { // set color on screen _scrColor = nextByte(); _scrColor &= 0xF; _scrOn = true; @@ -623,7 +623,7 @@ void PictureMgr::drawPicture() { _scrOn = false; } break; - case 0xf2: // set colour on priority (AGI pic v2) + case 0xf2: // set color on priority (AGI pic v2) if (_pictureVersion == AGIPIC_V15) break; diff --git a/engines/agi/saveload.cpp b/engines/agi/saveload.cpp index 9194cc642c..4801efa808 100644 --- a/engines/agi/saveload.cpp +++ b/engines/agi/saveload.cpp @@ -642,8 +642,8 @@ int AgiEngine::selectSlot() { for (i = 0; i < NUM_VISIBLE_SLOTS; i++) { sprintf(dstr, "[%2d. %-28.28s]", i + _firstSlot, desc[i]); printText(dstr, 0, hm + 1, vm + 4 + i, - (40 - 2 * hm) - 1, i == active ? MSG_BOX_COLOUR : MSG_BOX_TEXT, - i == active ? MSG_BOX_TEXT : MSG_BOX_COLOUR); + (40 - 2 * hm) - 1, i == active ? MSG_BOX_COLOR : MSG_BOX_TEXT, + i == active ? MSG_BOX_TEXT : MSG_BOX_COLOR); } char upArrow[] = "^"; @@ -651,11 +651,11 @@ int AgiEngine::selectSlot() { char scrollBar[] = " "; for (i = 1; i < NUM_VISIBLE_SLOTS - 1; i++) - printText(scrollBar, 35, hm + 1, vm + 4 + i, 1, MSG_BOX_COLOUR, 7, true); + printText(scrollBar, 35, hm + 1, vm + 4 + i, 1, MSG_BOX_COLOR, 7, true); printText(upArrow, 35, hm + 1, vm + 4, 1, 8, 7); printText(downArrow, 35, hm + 1, vm + 4 + NUM_VISIBLE_SLOTS - 1, 1, 8, 7); - printText(scrollBar, 35, hm + 1, vm + 4 + sbPos, 1, MSG_BOX_COLOUR, MSG_BOX_TEXT); + printText(scrollBar, 35, hm + 1, vm + 4 + sbPos, 1, MSG_BOX_COLOR, MSG_BOX_TEXT); oldActive = active; oldFirstSlot = _firstSlot; @@ -808,7 +808,7 @@ int AgiEngine::saveGameDialog() { do { drawWindow(hp, vp, GFX_WIDTH - hp, GFX_HEIGHT - vp); printText("Select a slot in which you wish to\nsave the game:", - 0, hm + 1, vm + 1, w, MSG_BOX_TEXT, MSG_BOX_COLOUR); + 0, hm + 1, vm + 1, w, MSG_BOX_TEXT, MSG_BOX_COLOR); slot = selectSlot(); if (slot + _firstSlot == 0) messageBox("That slot is for Autosave only."); @@ -819,7 +819,7 @@ int AgiEngine::saveGameDialog() { drawWindow(hp, vp + 5 * CHAR_LINES, GFX_WIDTH - hp, GFX_HEIGHT - vp - 9 * CHAR_LINES); printText("Enter a description for this game:", - 0, hm + 1, vm + 6, w, MSG_BOX_TEXT, MSG_BOX_COLOUR); + 0, hm + 1, vm + 6, w, MSG_BOX_TEXT, MSG_BOX_COLOR); _gfx->drawRectangle(3 * CHAR_COLS, 11 * CHAR_LINES - 1, 37 * CHAR_COLS, 12 * CHAR_LINES, MSG_BOX_TEXT); _gfx->flushBlock(3 * CHAR_COLS, 11 * CHAR_LINES - 1, @@ -844,7 +844,7 @@ int AgiEngine::saveGameDialog() { for (numChars = 0; numChars < 28 && name[numChars]; numChars++) handleGetstring(name[numChars]); - _gfx->printCharacter(numChars + 3, 11, _game.cursorChar, MSG_BOX_COLOUR, MSG_BOX_TEXT); + _gfx->printCharacter(numChars + 3, 11, _game.cursorChar, MSG_BOX_COLOR, MSG_BOX_TEXT); do { mainCycle(); } while (_game.inputMode == INPUT_GETSTRING); @@ -902,7 +902,7 @@ int AgiEngine::loadGameDialog() { drawWindow(hp, vp, GFX_WIDTH - hp, GFX_HEIGHT - vp); printText("Select a game which you wish to\nrestore:", - 0, hm + 1, vm + 1, w, MSG_BOX_TEXT, MSG_BOX_COLOUR); + 0, hm + 1, vm + 1, w, MSG_BOX_TEXT, MSG_BOX_COLOR); slot = selectSlot(); diff --git a/engines/agi/text.cpp b/engines/agi/text.cpp index af3881170a..f85c4c1cdd 100644 --- a/engines/agi/text.cpp +++ b/engines/agi/text.cpp @@ -166,7 +166,7 @@ void AgiEngine::blitTextbox(const char *p, int y, int x, int len) { drawWindow(xoff, yoff, xoff + w - 1, yoff + h - 1); printText2(2, msg, 0, CHAR_COLS + xoff, CHAR_LINES + yoff, - len + 1, MSG_BOX_TEXT, MSG_BOX_COLOUR); + len + 1, MSG_BOX_TEXT, MSG_BOX_COLOR); free(msg); @@ -730,7 +730,7 @@ void AgiEngine::drawWindow(int x1, int y1, int x2, int y2) { debugC(4, kDebugLevelText, "x1=%d, y1=%d, x2=%d, y2=%d", x1, y1, x2, y2); _gfx->saveBlock(x1, y1, x2, y2, _game.window.buffer); - _gfx->drawBox(x1, y1, x2, y2, MSG_BOX_COLOUR, MSG_BOX_LINE, 2); + _gfx->drawBox(x1, y1, x2, y2, MSG_BOX_COLOR, MSG_BOX_LINE, 2); } } // End of namespace Agi diff --git a/engines/cruise/ctp.cpp b/engines/cruise/ctp.cpp index 4f6c21e0e4..f1223c12e6 100644 --- a/engines/cruise/ctp.cpp +++ b/engines/cruise/ctp.cpp @@ -167,7 +167,7 @@ void makeCtStruct(Common::Array<CtStruct> &lst, int16 table[][40], int num, int } ct.num = num; - ct.colour = walkboxColor[num]; + ct.color = walkboxColor[num]; ct.bounds.left = minX; ct.bounds.right = maxX; ct.bounds.top = minY; diff --git a/engines/cruise/ctp.h b/engines/cruise/ctp.h index 3c6c9582cc..0aec9c52d8 100644 --- a/engines/cruise/ctp.h +++ b/engines/cruise/ctp.h @@ -57,7 +57,7 @@ class CtStruct { public: CtStruct *next; int16 num; - int16 colour; + int16 color; Common::Rect bounds; Common::Array<CtEntry> slices; }; diff --git a/engines/cruise/detection.cpp b/engines/cruise/detection.cpp index e43fadf598..66018fac2e 100644 --- a/engines/cruise/detection.cpp +++ b/engines/cruise/detection.cpp @@ -74,7 +74,7 @@ static const CRUISEGameDescription gameDescriptions[] = { { { "cruise", - "16 colours", + "16 colors", AD_ENTRY1("D1", "cd29a4cd9162076e9a18495fe56a48f3"), Common::EN_GRB, Common::kPlatformPC, diff --git a/engines/cruise/font.cpp b/engines/cruise/font.cpp index 3a609cb8d4..2bf36bbdbd 100644 --- a/engines/cruise/font.cpp +++ b/engines/cruise/font.cpp @@ -266,13 +266,13 @@ int32 prepareWordRender(int32 inRightBorder_X, int16 wordSpacingWidth, return counter; } -void drawString(int32 x, int32 y, const char *string, uint8 *buffer, uint8 fontColour, int32 rightBorder_X) { +void drawString(int32 x, int32 y, const char *string, uint8 *buffer, uint8 fontColor, int32 rightBorder_X) { // Get the rendered text to display gfxEntryStruct *s = renderText(rightBorder_X, string); // Draw the message - drawMessage(s, x, y, rightBorder_X - x, fontColour, buffer); + drawMessage(s, x, y, rightBorder_X - x, fontColor, buffer); // Free the data delete s->imagePtr; diff --git a/engines/cruise/font.h b/engines/cruise/font.h index 849c074ac5..17bb4372cf 100644 --- a/engines/cruise/font.h +++ b/engines/cruise/font.h @@ -66,7 +66,7 @@ void renderWord(uint8 *fontPtr_Data, uint8 *outBufferPtr, int32 drawPosPixel_X, int32 heightOff, int32 height, int32 param4, int32 stringRenderBufferSize, int32 width, int32 charWidth); gfxEntryStruct *renderText(int inRightBorder_X, const char *string); -void drawString(int32 x, int32 y, const char *string, uint8 * buffer, uint8 fontColour, +void drawString(int32 x, int32 y, const char *string, uint8 * buffer, uint8 fontColor, int32 inRightBorder_X); void freeGfx(gfxEntryStruct *pGfx); diff --git a/engines/cruise/gfxModule.cpp b/engines/cruise/gfxModule.cpp index f9ab193399..1b6f3942de 100644 --- a/engines/cruise/gfxModule.cpp +++ b/engines/cruise/gfxModule.cpp @@ -203,7 +203,7 @@ void gfxModuleData_gfxWaitVSync() { void gfxModuleData_flip() { } -void gfxCopyRect(const uint8 *sourceBuffer, int width, int height, byte *dest, int x, int y, int colour) { +void gfxCopyRect(const uint8 *sourceBuffer, int width, int height, byte *dest, int x, int y, int color) { int xp, yp; for (yp = 0; yp < height; ++yp) { @@ -216,7 +216,7 @@ void gfxCopyRect(const uint8 *sourceBuffer, int width, int height, byte *dest, i int yDest = y + yp; if ((v != 0) && (xDest >= 0) && (yDest >= 0) && (xDest < 320) && (yDest < 200)) - *destP = (v == 1) ? 0 : colour; + *destP = (v == 1) ? 0 : color; } } } @@ -324,10 +324,10 @@ void flip() { g_system->updateScreen(); } -void drawSolidBox(int32 x1, int32 y1, int32 x2, int32 y2, uint8 colour) { +void drawSolidBox(int32 x1, int32 y1, int32 x2, int32 y2, uint8 color) { for (int y = y1; y < y2; ++y) { byte *p = &gfxModuleData.pPage00[y * 320 + x1]; - Common::set_to(p, p + (x2 - x1), colour); + Common::set_to(p, p + (x2 - x1), color); } } diff --git a/engines/cruise/gfxModule.h b/engines/cruise/gfxModule.h index 1dbc5afc9b..1ca2581af5 100644 --- a/engines/cruise/gfxModule.h +++ b/engines/cruise/gfxModule.h @@ -55,7 +55,7 @@ void gfxModuleData_flip(); void gfxModuleData_updatePalette(); void gfxModuleData_updateScreen(); -void gfxCopyRect(const uint8 *sourceBuffer, int width, int height, byte *dest, int x, int y, int colour); +void gfxCopyRect(const uint8 *sourceBuffer, int width, int height, byte *dest, int x, int y, int color); void gfxModuleData_gfxCopyScreen(const uint8 *sourcePtr, uint8 *destPtr); void convertGfxFromMode4(const uint8 *sourcePtr, int width, int height, uint8 *destPtr); void convertGfxFromMode5(const uint8 *sourcePtr, int width, int height, uint8 *destPtr); @@ -67,7 +67,7 @@ void gfxModuleData_setPalEntries(const byte *ptr, int start, int num); void gfxModuleData_setPal256(const byte *ptr); void gfxModuleData_addDirtyRect(const Common::Rect &r); void flip(); -void drawSolidBox(int32 x1, int32 y1, int32 x2, int32 y2, uint8 colour); +void drawSolidBox(int32 x1, int32 y1, int32 x2, int32 y2, uint8 color); void resetBitmap(uint8 *dataPtr, int32 dataSize); void switchBackground(const byte *newBg); diff --git a/engines/draci/animation.cpp b/engines/draci/animation.cpp index d7582ec31d..bc38e84d72 100644 --- a/engines/draci/animation.cpp +++ b/engines/draci/animation.cpp @@ -359,7 +359,7 @@ void AnimationManager::insert(Animation *anim, bool allocateIndex) { } void AnimationManager::drawScene(Surface *surf) { - // Fill the screen with colour zero since some rooms may rely on the screen being black + // Fill the screen with color zero since some rooms may rely on the screen being black _vm->_screen->getSurface()->fill(0); sortAnimations(); @@ -498,8 +498,8 @@ const Animation *AnimationManager::getTopAnimation(int x, int y) const { Animation *retval = NULL; - // Get transparent colour for the current screen - const int transparent = _vm->_screen->getSurface()->getTransparentColour(); + // Get transparent color for the current screen + const int transparent = _vm->_screen->getSurface()->getTransparentColor(); for (it = _animations.reverse_begin(); it != _animations.end(); --it) { diff --git a/engines/draci/font.cpp b/engines/draci/font.cpp index 688458f3d4..d869d046f3 100644 --- a/engines/draci/font.cpp +++ b/engines/draci/font.cpp @@ -125,7 +125,7 @@ uint8 Font::getCharWidth(uint8 chr) const { * @param ty Vertical offset on the surface */ -void Font::drawChar(Surface *dst, uint8 chr, int tx, int ty, int with_colour) const { +void Font::drawChar(Surface *dst, uint8 chr, int tx, int ty, int with_color) const { assert(dst != NULL); assert(tx >= 0); assert(ty >= 0); @@ -147,39 +147,39 @@ void Font::drawChar(Surface *dst, uint8 chr, int tx, int ty, int with_colour) co int ySpaceLeft = dst->h - ty - 1; int yPixelsToDraw = (_fontHeight < ySpaceLeft) ? _fontHeight : ySpaceLeft; - int _transparent = dst->getTransparentColour(); + int _transparent = dst->getTransparentColor(); for (int y = 0; y < yPixelsToDraw; ++y) { for (int x = 0; x <= xPixelsToDraw; ++x) { int curr = y * _maxCharWidth + x; - int colour = _charData[charOffset + curr]; + int color = _charData[charOffset + curr]; // If pixel is transparent, skip it - if (colour == _transparent) + if (color == _transparent) continue; - // Replace colour with font colours - switch (colour) { + // Replace color with font colors + switch (color) { case 254: - colour = with_colour; + color = with_color; break; case 253: - colour = kFontColour2; + color = kFontColor2; break; case 252: - colour = kFontColour3; + color = kFontColor3; break; case 251: - colour = kFontColour4; + color = kFontColor4; break; } // Paint the pixel - ptr[x] = colour; + ptr[x] = color; } // Advance to next row @@ -198,8 +198,8 @@ void Font::drawChar(Surface *dst, uint8 chr, int tx, int ty, int with_colour) co * @param spacing Space to leave between individual characters. Defaults to 0. */ void Font::drawString(Surface *dst, const byte *str, uint len, - int x, int y, int with_colour, int spacing, bool markDirty) const { - drawString(dst, Common::String((const char *)str, len), x, y, with_colour, spacing, markDirty); + int x, int y, int with_color, int spacing, bool markDirty) const { + drawString(dst, Common::String((const char *)str, len), x, y, with_color, spacing, markDirty); } /** @@ -213,7 +213,7 @@ void Font::drawString(Surface *dst, const byte *str, uint len, */ void Font::drawString(Surface *dst, const Common::String &str, - int x, int y, int with_colour, int spacing, bool markDirty) const { + int x, int y, int with_color, int spacing, bool markDirty) const { assert(dst != NULL); assert(x >= 0); assert(y >= 0); @@ -238,7 +238,7 @@ void Font::drawString(Surface *dst, const Common::String &str, break; } - drawChar(dst, str[i], curx, cury, with_colour); + drawChar(dst, str[i], curx, cury, with_color); curx += getCharWidth(str[i]) + spacing; } diff --git a/engines/draci/font.h b/engines/draci/font.h index 010de66e2c..0ccc900465 100644 --- a/engines/draci/font.h +++ b/engines/draci/font.h @@ -36,19 +36,19 @@ extern const char * const kFontBig; class Surface; /** - * Default font colours. They all seem to remain constant except for the + * Default font colors. They all seem to remain constant except for the * first one which varies depending on the character speaking. - * kOverFontColour is set to transparent. + * kOverFontColor is set to transparent. */ enum { - kFontColour1 = 2, - kFontColour2 = 0, - kFontColour3 = 3, - kFontColour4 = 4, - kOverFontColour = 255, - kTitleColour = 255, - kLineActiveColour = 254, - kLineInactiveColour = 255 + kFontColor1 = 2, + kFontColor2 = 0, + kFontColor3 = 3, + kFontColor4 = 4, + kOverFontColor = 255, + kTitleColor = 255, + kLineActiveColor = 254, + kLineInactiveColor = 255 }; /** @@ -64,12 +64,12 @@ public: uint8 getFontHeight() const { return _fontHeight; } uint8 getMaxCharWidth() const { return _maxCharWidth; } uint8 getCharWidth(byte chr) const; - void drawChar(Surface *dst, uint8 chr, int tx, int ty, int with_colour) const; + void drawChar(Surface *dst, uint8 chr, int tx, int ty, int with_color) const; - void drawString(Surface *dst, const byte *str, uint len, int x, int y, int with_colour, + void drawString(Surface *dst, const byte *str, uint len, int x, int y, int with_color, int spacing, bool markDirty) const; void drawString(Surface *dst, const Common::String &str, - int x, int y, int with_colour, int spacing, bool markDirty) const; + int x, int y, int with_color, int spacing, bool markDirty) const; uint getStringWidth(const Common::String &str, int spacing) const; uint getStringHeight(const Common::String &str) const; diff --git a/engines/draci/game.cpp b/engines/draci/game.cpp index 060ee41077..e19ec67810 100644 --- a/engines/draci/game.cpp +++ b/engines/draci/game.cpp @@ -47,9 +47,9 @@ static const char *dialoguePath = "ROZH"; static double real_to_double(byte real[6]); enum { - kWalkingMapOverlayColour = 2, - kWalkingShortestPathOverlayColour = 120, - kWalkingObliquePathOverlayColour = 73 + kWalkingMapOverlayColor = 2, + kWalkingShortestPathOverlayColor = 120, + kWalkingObliquePathOverlayColor = 73 }; Game::Game(DraciEngine *vm) : _vm(vm), _walkingState(vm) { @@ -69,7 +69,7 @@ Game::Game(DraciEngine *vm) : _vm(vm), _walkingState(vm) { for (i = 0; i < numPersons; ++i) { _persons[i]._x = personData.readUint16LE(); _persons[i]._y = personData.readUint16LE(); - _persons[i]._fontColour = personData.readByte(); + _persons[i]._fontColor = personData.readByte(); } // Read in dialogue offsets @@ -217,12 +217,12 @@ void Game::init() { // Initialize animation for object / room titles _titleAnim = new Animation(_vm, kTitleText, 257, true); - _titleAnim->addFrame(new Text("", _vm->_smallFont, kTitleColour, 0, 0, 0), NULL); + _titleAnim->addFrame(new Text("", _vm->_smallFont, kTitleColor, 0, 0, 0), NULL); _vm->_anims->insert(_titleAnim, false); // Initialize animation for speech text Animation *speechAnim = new Animation(_vm, kSpeechText, 257, true); - speechAnim->addFrame(new Text("", _vm->_bigFont, kFontColour1, 0, 0, 0), NULL); + speechAnim->addFrame(new Text("", _vm->_bigFont, kFontColor1, 0, 0, 0), NULL); _vm->_anims->insert(speechAnim, false); // Initialize inventory animation. _iconsArchive is never flushed. @@ -236,7 +236,7 @@ void Game::init() { for (uint i = 0; i < kDialogueLines; ++i) { _dialogueAnims[i] = new Animation(_vm, kDialogueLinesID - i, 254, true); - _dialogueAnims[i]->addFrame(new Text("", _vm->_smallFont, kLineInactiveColour, 0, 0, 0), NULL); + _dialogueAnims[i]->addFrame(new Text("", _vm->_smallFont, kLineInactiveColor, 0, 0, 0), NULL); _dialogueAnims[i]->setRelative(1, kScreenHeight - (i + 1) * _vm->_smallFont->getFontHeight()); @@ -418,9 +418,9 @@ void Game::handleDialogueLoop() { text = reinterpret_cast<Text *>(_dialogueAnims[i]->getCurrentFrame()); if (_animUnderCursor == _dialogueAnims[i]) { - text->setColour(kLineActiveColour); + text->setColor(kLineActiveColor); } else { - text->setColour(kLineInactiveColour); + text->setColor(kLineInactiveColor); } } @@ -442,7 +442,7 @@ void Game::fadePalette(bool fading_out) { } for (int i = 1; i <= kBlackFadingIterations; ++i) { _vm->_system->delayMillis(kBlackFadingTimeUnit); - _vm->_screen->interpolatePalettes(startPal, endPal, 0, kNumColours, i, kBlackFadingIterations); + _vm->_screen->interpolatePalettes(startPal, endPal, 0, kNumColors, i, kBlackFadingIterations); _vm->_screen->copyToScreen(); } } @@ -454,7 +454,7 @@ void Game::advanceAnimationsAndTestLoopExit() { --_fadePhase; const byte *startPal = _currentRoom._palette >= 0 ? _vm->_paletteArchive->getFile(_currentRoom._palette)->_data : NULL; const byte *endPal = getScheduledPalette() >= 0 ? _vm->_paletteArchive->getFile(getScheduledPalette())->_data : NULL; - _vm->_screen->interpolatePalettes(startPal, endPal, 0, kNumColours, _fadePhases - _fadePhase, _fadePhases); + _vm->_screen->interpolatePalettes(startPal, endPal, 0, kNumColors, _fadePhases - _fadePhase, _fadePhases); if (_fadePhase == 0) { if (_loopSubstatus == kInnerWhileFade) { setExitLoop(true); @@ -997,7 +997,7 @@ int Game::dialogueDraw() { dialogueLine = reinterpret_cast<Text *>(anim->getCurrentFrame()); dialogueLine->setText(_dialogueBlocks[i]._title); - dialogueLine->setColour(kLineInactiveColour); + dialogueLine->setColor(kLineInactiveColor); _lines[_dialogueLinesNum] = i; _dialogueLinesNum++; } @@ -1114,8 +1114,8 @@ int Game::playHeroAnimation(int anim_index) { return anim->currentFrameNum(); } -void Game::redrawWalkingPath(Animation *anim, byte colour, const WalkingPath &path) { - Sprite *ov = _walkingMap.newOverlayFromPath(path, colour); +void Game::redrawWalkingPath(Animation *anim, byte color, const WalkingPath &path) { + Sprite *ov = _walkingMap.newOverlayFromPath(path, color); delete anim->getFrame(0); anim->replaceFrame(0, ov, NULL); anim->markDirtyRect(_vm->_screen->getSurface()); @@ -1148,8 +1148,8 @@ void Game::walkHero(int x, int y, SightDirection dir) { _walkingMap.obliquePath(shortestPath, &obliquePath); debugC(2, kDraciWalkingDebugLevel, "Walking path lengths: shortest=%d oblique=%d", shortestPath.size(), obliquePath.size()); if (_vm->_showWalkingMap) { - redrawWalkingPath(_walkingShortestPathOverlay, kWalkingShortestPathOverlayColour, shortestPath); - redrawWalkingPath(_walkingObliquePathOverlay, kWalkingObliquePathOverlayColour, obliquePath); + redrawWalkingPath(_walkingShortestPathOverlay, kWalkingShortestPathOverlayColor, shortestPath); + redrawWalkingPath(_walkingObliquePathOverlay, kWalkingObliquePathOverlayColor, obliquePath); } // Start walking. Walking will be gradually advanced by @@ -1211,7 +1211,7 @@ void Game::loadWalkingMap(int mapID) { f = _vm->_walkingMapsArchive->getFile(mapID); _walkingMap.load(f->_data, f->_length); - Sprite *ov = _walkingMap.newOverlayFromMap(kWalkingMapOverlayColour); + Sprite *ov = _walkingMap.newOverlayFromMap(kWalkingMapOverlayColor); delete _walkingMapOverlay->getFrame(0); _walkingMapOverlay->replaceFrame(0, ov, NULL); _walkingMapOverlay->markDirtyRect(_vm->_screen->getSurface()); @@ -1385,7 +1385,7 @@ void Game::enterNewRoom() { loadOverlays(); // Draw the scene with the black palette and slowly fade into the right palette. - _vm->_screen->setPalette(NULL, 0, kNumColours); + _vm->_screen->setPalette(NULL, 0, kNumColors); _vm->_anims->drawScene(_vm->_screen->getSurface()); _vm->_screen->copyToScreen(); fadePalette(false); diff --git a/engines/draci/game.h b/engines/draci/game.h index 21baaed5cc..0ecbcf68f0 100644 --- a/engines/draci/game.h +++ b/engines/draci/game.h @@ -145,7 +145,7 @@ public: struct Person { uint _x, _y; - byte _fontColour; + byte _fontColor; }; struct Dialogue { @@ -348,7 +348,7 @@ private: void enterNewRoom(); void initWalkingOverlays(); void loadRoomObjects(); - void redrawWalkingPath(Animation *anim, byte colour, const WalkingPath &path); + void redrawWalkingPath(Animation *anim, byte color, const WalkingPath &path); DraciEngine *_vm; diff --git a/engines/draci/mouse.cpp b/engines/draci/mouse.cpp index 14d1162fed..d493fe192f 100644 --- a/engines/draci/mouse.cpp +++ b/engines/draci/mouse.cpp @@ -106,7 +106,7 @@ void Mouse::setCursorType(CursorType cur) { f = _vm->_iconsArchive->getFile(cur); Sprite sp(f->_data, f->_length, 0, 0, true); - CursorMan.replaceCursorPalette(_vm->_screen->getPalette(), 0, kNumColours); + CursorMan.replaceCursorPalette(_vm->_screen->getPalette(), 0, kNumColors); CursorMan.replaceCursor(sp.getBuffer(), sp.getWidth(), sp.getHeight(), sp.getWidth() / 2, sp.getHeight() / 2, 255); } @@ -124,7 +124,7 @@ void Mouse::loadItemCursor(const GameItem *item, bool highlighted) { f = _vm->_itemImagesArchive->getFile(archiveIndex); Sprite sp(f->_data, f->_length, 0, 0, true); - CursorMan.replaceCursorPalette(_vm->_screen->getPalette(), 0, kNumColours); + CursorMan.replaceCursorPalette(_vm->_screen->getPalette(), 0, kNumColors); CursorMan.replaceCursor(sp.getBuffer(), sp.getWidth(), sp.getHeight(), sp.getWidth() / 2, sp.getHeight() / 2, 255); } diff --git a/engines/draci/screen.cpp b/engines/draci/screen.cpp index dbe3fd98b8..c04f0668bb 100644 --- a/engines/draci/screen.cpp +++ b/engines/draci/screen.cpp @@ -36,12 +36,12 @@ namespace Draci { Screen::Screen(DraciEngine *vm) : _vm(vm) { _surface = new Surface(kScreenWidth, kScreenHeight); - _palette = new byte[3 * kNumColours]; - _blackPalette = new byte[3 * kNumColours]; - for (int i = 0; i < 3 * kNumColours; ++i) { + _palette = new byte[3 * kNumColors]; + _blackPalette = new byte[3 * kNumColors]; + for (int i = 0; i < 3 * kNumColors; ++i) { _blackPalette[i] = 0; } - setPalette(NULL, 0, kNumColours); + setPalette(NULL, 0, kNumColors); this->clearScreen(); } @@ -54,11 +54,11 @@ Screen::~Screen() { /** * @brief Sets a part of the palette * @param data Pointer to a buffer containing new palette data - * start Index of the colour where replacement should start - * num Number of colours to replace + * start Index of the color where replacement should start + * num Number of colors to replace */ void Screen::setPalette(const byte *data, uint16 start, uint16 num) { - Common::MemoryReadStream pal(data ? data : _blackPalette, 3 * kNumColours); + Common::MemoryReadStream pal(data ? data : _blackPalette, 3 * kNumColors); pal.seek(start * 3); // Copy the palette @@ -78,8 +78,8 @@ void Screen::setPalette(const byte *data, uint16 start, uint16 num) { } void Screen::interpolatePalettes(const byte *first, const byte *second, uint16 start, uint16 num, int index, int number) { - Common::MemoryReadStream firstPal(first ? first : _blackPalette, 3 * kNumColours); - Common::MemoryReadStream secondPal(second ? second : _blackPalette, 3 * kNumColours); + Common::MemoryReadStream firstPal(first ? first : _blackPalette, 3 * kNumColors); + Common::MemoryReadStream secondPal(second ? second : _blackPalette, 3 * kNumColors); firstPal.seek(start * 3); secondPal.seek(start * 3); diff --git a/engines/draci/screen.h b/engines/draci/screen.h index dc1aca092d..e4e910475a 100644 --- a/engines/draci/screen.h +++ b/engines/draci/screen.h @@ -33,7 +33,7 @@ namespace Draci { enum ScreenParameters { kScreenWidth = 320, kScreenHeight = 200, - kNumColours = 256, + kNumColors = 256, kDefaultTransparent = 255 }; diff --git a/engines/draci/script.cpp b/engines/draci/script.cpp index 2a27541ad9..a7ce8b27d9 100644 --- a/engines/draci/script.cpp +++ b/engines/draci/script.cpp @@ -716,14 +716,14 @@ void Script::talk(const Common::Array<int> ¶ms) { SoundSample *sample = _vm->_sound->isMutedVoice() ? NULL : _vm->_dubbingArchive->getSample(sentenceID, 0); - // Set the string and text colour + // Set the string and text color surface->markDirtyRect(speechFrame->getRect(kNoDisplacement)); if (_vm->_sound->showSubtitles() || !sample) { speechFrame->setText(Common::String((const char *)f->_data+1, f->_length-1)); } else { speechFrame->setText(""); } - speechFrame->setColour(person->_fontColour); + speechFrame->setColor(person->_fontColor); speechFrame->repeatedlySplitLongLines(kScreenWidth); // Speak the dubbing if possible @@ -873,11 +873,11 @@ void Script::fadePalettePlay(const Common::Array<int> ¶ms) { void Script::setPalette(const Common::Array<int> ¶ms) { if (_vm->_game->getScheduledPalette() == -1) { - _vm->_screen->setPalette(NULL, 0, kNumColours); + _vm->_screen->setPalette(NULL, 0, kNumColors); } else { const BAFile *f; f = _vm->_paletteArchive->getFile(_vm->_game->getScheduledPalette()); - _vm->_screen->setPalette(f->_data, 0, kNumColours); + _vm->_screen->setPalette(f->_data, 0, kNumColors); } // Immediately update the palette _vm->_screen->copyToScreen(); diff --git a/engines/draci/sprite.cpp b/engines/draci/sprite.cpp index 65c6e21ee4..b4296375f2 100644 --- a/engines/draci/sprite.cpp +++ b/engines/draci/sprite.cpp @@ -144,7 +144,7 @@ void Sprite::drawReScaled(Surface *surface, bool markDirty, const Displacement & // Get pointers to source and destination buffers byte *dst = (byte *)surface->getBasePtr(clippedDestRect.left, clippedDestRect.top); - const int transparent = surface->getTransparentColour(); + const int transparent = surface->getTransparentColor(); // Calculate how many rows and columns we need to draw const int rows = clippedDestRect.height(); @@ -212,7 +212,7 @@ void Sprite::draw(Surface *surface, bool markDirty, int relX, int relY) const { const byte *src = _data + croppedBy.y * _width + (!_mirror ? croppedBy.x : _width - 1 - croppedBy.x); - const int transparent = surface->getTransparentColour(); + const int transparent = surface->getTransparentColor(); // Calculate how many rows and columns we need to draw const int rows = clippedDestRect.height(); @@ -252,7 +252,7 @@ Common::Rect Sprite::getRect(const Displacement &displacement) const { _y + displacement.relY + scummvm_lround(_scaledHeight * displacement.extraScaleY)); } -Text::Text(const Common::String &str, const Font *font, byte fontColour, +Text::Text(const Common::String &str, const Font *font, byte fontColor, int x, int y, uint spacing) { _x = x; _y = y; @@ -268,7 +268,7 @@ Text::Text(const Common::String &str, const Font *font, byte fontColour, } _spacing = spacing; - _colour = fontColour; + _color = fontColor; _font = font; @@ -294,7 +294,7 @@ void Text::setText(const Common::String &str) { } void Text::draw(Surface *surface, bool markDirty, int relX, int relY) const { - _font->drawString(surface, _text, _x + relX, _y + relY, _colour, _spacing, true); + _font->drawString(surface, _text, _x + relX, _y + relY, _color, _spacing, true); } Common::Rect Text::getRect(const Displacement &displacement) const { diff --git a/engines/draci/sprite.h b/engines/draci/sprite.h index ddc56ecd80..15e1cf80ca 100644 --- a/engines/draci/sprite.h +++ b/engines/draci/sprite.h @@ -139,12 +139,12 @@ private: class Text : public Drawable { public: - Text(const Common::String &str, const Font *font, byte fontColour, + Text(const Common::String &str, const Font *font, byte fontColor, int x, int y, uint spacing); ~Text() {} void setText(const Common::String &str); - void setColour(byte fontColour) { _colour = fontColour; } + void setColor(byte fontColor) { _color = fontColor; } void setSpacing(uint spacing) { _spacing = spacing; } void setFont(const Font *font); @@ -165,7 +165,7 @@ private: Common::String _text; uint _length; - uint8 _colour; + uint8 _color; uint _spacing; const Font *_font; }; diff --git a/engines/draci/surface.cpp b/engines/draci/surface.cpp index 1c7ecfb23b..532d87a19f 100644 --- a/engines/draci/surface.cpp +++ b/engines/draci/surface.cpp @@ -31,7 +31,7 @@ namespace Draci { Surface::Surface(int width, int height) { this->create(width, height, 1); this->markClean(); - _transparentColour = kDefaultTransparent; + _transparentColor = kDefaultTransparent; } Surface::~Surface() { @@ -80,12 +80,12 @@ void Surface::markClean() { } /** - * @brief Fills the surface with the specified colour + * @brief Fills the surface with the specified color */ -void Surface::fill(uint colour) { +void Surface::fill(uint color) { byte *ptr = (byte *)getBasePtr(0, 0); - memset(ptr, colour, w * h); + memset(ptr, color, w * h); } /** diff --git a/engines/draci/surface.h b/engines/draci/surface.h index a5c9ddb597..b00abcd943 100644 --- a/engines/draci/surface.h +++ b/engines/draci/surface.h @@ -43,18 +43,18 @@ public: void markDirty(); void markClean(); bool needsFullUpdate() const { return _fullUpdate; } - uint getTransparentColour() const { return _transparentColour; } - void setTransparentColour(uint colour) { _transparentColour = colour; } - void fill(uint colour); + uint getTransparentColor() const { return _transparentColor; } + void setTransparentColor(uint color) { _transparentColor = color; } + void fill(uint color); uint putAboveY(int y, int height) const; uint centerOnX(int x, int width) const; Common::Rect getDimensions() const { return Common::Rect(w, h); } private: - /** The current transparent colour of the surface. See getTransparentColour() and - * setTransparentColour(). + /** The current transparent color of the surface. See getTransparentColor() and + * setTransparentColor(). */ - uint _transparentColour; + uint _transparentColor; /** Set when the surface is scheduled for a full update. * See markDirty(), markClean(). Accessed via needsFullUpdate(). diff --git a/engines/draci/walking.cpp b/engines/draci/walking.cpp index c6f9a58a85..d72e50be07 100644 --- a/engines/draci/walking.cpp +++ b/engines/draci/walking.cpp @@ -58,7 +58,7 @@ bool WalkingMap::isWalkable(const Common::Point &p) const { return getPixel(p.x / _deltaX, p.y / _deltaY); } -Sprite *WalkingMap::newOverlayFromMap(byte colour) const { +Sprite *WalkingMap::newOverlayFromMap(byte color) const { // HACK: Create a visible overlay from the walking map so we can test it byte *wlk = new byte[_realWidth * _realHeight]; memset(wlk, 255, _realWidth * _realHeight); @@ -66,7 +66,7 @@ Sprite *WalkingMap::newOverlayFromMap(byte colour) const { for (int i = 0; i < _mapWidth; ++i) { for (int j = 0; j < _mapHeight; ++j) { if (getPixel(i, j)) { - drawOverlayRectangle(Common::Point(i, j), colour, wlk); + drawOverlayRectangle(Common::Point(i, j), color, wlk); } } } @@ -285,7 +285,7 @@ void WalkingMap::obliquePath(const WalkingPath& path, WalkingPath *obliquedPath) while (managedToOblique(obliquedPath)) {} } -Sprite *WalkingMap::newOverlayFromPath(const WalkingPath &path, byte colour) const { +Sprite *WalkingMap::newOverlayFromPath(const WalkingPath &path, byte color) const { // HACK: Create a visible overlay from the walking map so we can test it byte *wlk = new byte[_realWidth * _realHeight]; memset(wlk, 255, _realWidth * _realHeight); @@ -297,14 +297,14 @@ Sprite *WalkingMap::newOverlayFromPath(const WalkingPath &path, byte colour) con // Draw only points in the interval [v1, v2). These half-open // half-closed intervals connect all the way to the last point. for (int step = 0; step < steps; ++step) { - drawOverlayRectangle(interpolate(v1, v2, step, steps), colour, wlk); + drawOverlayRectangle(interpolate(v1, v2, step, steps), color, wlk); } } // Draw the last point. This works also when the path has no segment, // but just one point. if (path.size() > 0) { const Common::Point &vLast = path[path.size()-1]; - drawOverlayRectangle(vLast, colour, wlk); + drawOverlayRectangle(vLast, color, wlk); } Sprite *ov = new Sprite(_realWidth, _realHeight, wlk, 0, 0, false); @@ -313,10 +313,10 @@ Sprite *WalkingMap::newOverlayFromPath(const WalkingPath &path, byte colour) con return ov; } -void WalkingMap::drawOverlayRectangle(const Common::Point &p, byte colour, byte *buf) const { +void WalkingMap::drawOverlayRectangle(const Common::Point &p, byte color, byte *buf) const { for (int i = 0; i < _deltaX; ++i) { for (int j = 0; j < _deltaY; ++j) { - buf[(p.y * _deltaY + j) * _realWidth + (p.x * _deltaX + i)] = colour; + buf[(p.y * _deltaY + j) * _realWidth + (p.x * _deltaX + i)] = color; } } } diff --git a/engines/draci/walking.h b/engines/draci/walking.h index 55b39792f1..d6c7f0691d 100644 --- a/engines/draci/walking.h +++ b/engines/draci/walking.h @@ -45,12 +45,12 @@ public: bool getPixel(int x, int y) const; bool isWalkable(const Common::Point &p) const; - Sprite *newOverlayFromMap(byte colour) const; + Sprite *newOverlayFromMap(byte color) const; Common::Point findNearestWalkable(int x, int y) const; bool findShortestPath(Common::Point p1, Common::Point p2, WalkingPath *path) const; void obliquePath(const WalkingPath& path, WalkingPath *obliquedPath); - Sprite *newOverlayFromPath(const WalkingPath &path, byte colour) const; + Sprite *newOverlayFromPath(const WalkingPath &path, byte color) const; Common::Point getDelta() const { return Common::Point(_deltaX, _deltaY); } static int pointsBetween(const Common::Point &p1, const Common::Point &p2); @@ -68,7 +68,7 @@ private: // 4 possible directions to walk from a pixel. static const int kDirections[][2]; - void drawOverlayRectangle(const Common::Point &p, byte colour, byte *buf) const; + void drawOverlayRectangle(const Common::Point &p, byte color, byte *buf) const; bool lineIsCovered(const Common::Point &p1, const Common::Point &p2) const; // Returns true if the number of vertices on the path was decreased. diff --git a/engines/groovie/vdx.cpp b/engines/groovie/vdx.cpp index 1b4a2b7800..6643177328 100644 --- a/engines/groovie/vdx.cpp +++ b/engines/groovie/vdx.cpp @@ -70,7 +70,7 @@ uint16 VDXPlayer::loadInternal() { } // Flags: // - 1 Puzzle piece? Skip palette, don't redraw full screen, draw still to b/ack buffer - // - 2 Transparent colour is 0xFF + // - 2 Transparent color is 0xFF // - 5 Skip still chunks // - 7 // - 8 Just show the first frame @@ -251,26 +251,26 @@ void VDXPlayer::getDelta(Common::ReadStream *in) { uint16 currentLine = 0; uint32 offset = 0; while (!in->eos()) { - byte colours[16]; + byte colors[16]; if (currOpCode < 0x60) { param1 = in->readByte(); param2 = in->readByte(); - expandColourMap(colours, vdxBlockMapLookup[currOpCode], param1, param2); - decodeBlockDelta(offset, colours, 640); + expandColorMap(colors, vdxBlockMapLookup[currOpCode], param1, param2); + decodeBlockDelta(offset, colors, 640); offset += TILE_SIZE; } else if (currOpCode > 0x7f) { param1 = in->readByte(); param2 = in->readByte(); param3 = in->readByte(); - expandColourMap(colours, (param1 << 8) + currOpCode, param2, param3); - decodeBlockDelta(offset, colours, 640); + expandColorMap(colors, (param1 << 8) + currOpCode, param2, param3); + decodeBlockDelta(offset, colors, 640); offset += TILE_SIZE; } else switch (currOpCode) { - case 0x60: /* Fill tile with the 16 colours given as parameters */ + case 0x60: /* Fill tile with the 16 colors given as parameters */ for (l = 0; l < 16; l++) { - colours[l] = in->readByte(); + colors[l] = in->readByte(); } - decodeBlockDelta(offset, colours, 640); + decodeBlockDelta(offset, colors, 640); offset += TILE_SIZE; break; case 0x61: /* Skip to the end of this line, next block is start of next */ @@ -299,14 +299,14 @@ void VDXPlayer::getDelta(Common::ReadStream *in) { case 0x72: case 0x73: case 0x74: - case 0x75: /* Next param1 blocks are filled with colour param2 */ + case 0x75: /* Next param1 blocks are filled with color param2 */ param1 = currOpCode - 0x6b; param2 = in->readByte(); for (l = 0; l < 16; l++) { - colours[l] = param2; + colors[l] = param2; } for (k = 0; k < param1; k++) { - decodeBlockDelta(offset, colours, 640); + decodeBlockDelta(offset, colors, 640); offset += TILE_SIZE; } break; @@ -319,14 +319,14 @@ void VDXPlayer::getDelta(Common::ReadStream *in) { case 0x7c: case 0x7d: case 0x7e: - case 0x7f: /* Next bytes contain colours to fill the next param1 blocks in the current line*/ + case 0x7f: /* Next bytes contain colors to fill the next param1 blocks in the current line*/ param1 = currOpCode - 0x75; for (k = 0; k < param1; k++) { param2 = in->readByte(); for (l = 0; l < 16; l++) { - colours[l] = param2; + colors[l] = param2; } - decodeBlockDelta(offset, colours, 640); + decodeBlockDelta(offset, colors, 640); offset += TILE_SIZE; } break; @@ -344,8 +344,8 @@ void VDXPlayer::getStill(Common::ReadStream *in) { debugC(5, kGroovieDebugVideo | kGroovieDebugAll, "Groovie::VDX: numYTiles=%d", numYTiles); // It's skipped in the original: - uint16 colourDepth = in->readUint16LE(); - debugC(5, kGroovieDebugVideo | kGroovieDebugAll, "Groovie::VDX: colourDepth=%d", colourDepth); + uint16 colorDepth = in->readUint16LE(); + debugC(5, kGroovieDebugVideo | kGroovieDebugAll, "Groovie::VDX: colorDepth=%d", colorDepth); uint16 imageWidth = TILE_SIZE * numXTiles; @@ -378,15 +378,15 @@ void VDXPlayer::getStill(Common::ReadStream *in) { // Skip the frame when flag 5 is set, unless flag 1 is set if (!_flagFive || _flagOne) { - byte colours[16]; + byte colors[16]; for (uint16 j = 0; j < numYTiles; j++) { byte *currentTile = buf + j * TILE_SIZE * imageWidth; for (uint16 i = numXTiles; i; i--) { - uint8 colour1 = in->readByte(); - uint8 colour0 = in->readByte(); - uint16 colourMap = in->readUint16LE(); - expandColourMap(colours, colourMap, colour1, colour0); - decodeBlockStill(currentTile, colours, 640, mask); + uint8 color1 = in->readByte(); + uint8 color0 = in->readByte(); + uint16 colorMap = in->readUint16LE(); + expandColorMap(colors, colorMap, color1, color0); + decodeBlockStill(currentTile, colors, 640, mask); currentTile += TILE_SIZE; } @@ -425,22 +425,22 @@ void VDXPlayer::getStill(Common::ReadStream *in) { } } -void VDXPlayer::expandColourMap(byte *out, uint16 colourMap, uint8 colour1, uint8 colour0) { +void VDXPlayer::expandColorMap(byte *out, uint16 colorMap, uint8 color1, uint8 color0) { // It's a bit faster to start from the end out += 16; for (int i = 16; i; i--) { - // Set the corresponding colour + // Set the corresponding color // The following is an optimized version of: - // *--out = (colourMap & 1) ? colour1 : colour0; - uint8 selector = -(colourMap & 1); - *--out = (selector & colour1) | (~selector & colour0); + // *--out = (colorMap & 1) ? color1 : color0; + uint8 selector = -(colorMap & 1); + *--out = (selector & color1) | (~selector & color0); - // Update the flag map to test the next colour - colourMap >>= 1; + // Update the flag map to test the next color + colorMap >>= 1; } } -void VDXPlayer::decodeBlockStill(byte *buf, byte *colours, uint16 imageWidth, uint8 mask) { +void VDXPlayer::decodeBlockStill(byte *buf, byte *colors, uint16 imageWidth, uint8 mask) { assert(TILE_SIZE == 4); for (int y = TILE_SIZE; y; y--) { @@ -448,15 +448,15 @@ void VDXPlayer::decodeBlockStill(byte *buf, byte *colours, uint16 imageWidth, ui // TODO: optimize with bit logic? for (int x = 0; x < TILE_SIZE; x++) { // 0xff pixels don't modify the buffer - if (*colours != 0xff) { - // Write the colour - *buf = *colours | mask; + if (*colors != 0xff) { + // Write the color + *buf = *colors | mask; // Note: if the mask is 0, it paints the image // else, it paints the image's mask using 0xff } - // Point to the next colour - colours++; + // Point to the next color + colors++; // Point to the next pixel buf++; @@ -465,8 +465,8 @@ void VDXPlayer::decodeBlockStill(byte *buf, byte *colours, uint16 imageWidth, ui // Point to the start of the next line buf += imageWidth - TILE_SIZE; } else { - *((uint32 *)buf) = *((uint32 *)colours); - colours += 4; + *((uint32 *)buf) = *((uint32 *)colors); + colors += 4; // Point to the start of the next line buf += imageWidth; @@ -474,7 +474,7 @@ void VDXPlayer::decodeBlockStill(byte *buf, byte *colours, uint16 imageWidth, ui } } -void VDXPlayer::decodeBlockDelta(uint32 offset, byte *colours, uint16 imageWidth) { +void VDXPlayer::decodeBlockDelta(uint32 offset, byte *colors, uint16 imageWidth) { assert(TILE_SIZE == 4); byte *dest; @@ -501,19 +501,19 @@ void VDXPlayer::decodeBlockDelta(uint32 offset, byte *colours, uint16 imageWidth for (int x = 0; x < TILE_SIZE; x++) { // TODO: this can probably be optimized with bit logic if (fgBuf[x] != 0xff) { - if (*colours == 0xff) { + if (*colors == 0xff) { dest[x] = fgBuf[x]; } else { - dest[x] = *colours; + dest[x] = *colors; } } - colours++; + colors++; } fgBuf += imageWidth; } else { // Paint directly - *((uint32 *)dest) = *((uint32 *)colours); - colours += 4; + *((uint32 *)dest) = *((uint32 *)colors); + colors += 4; } // Move to the next line diff --git a/engines/groovie/vdx.h b/engines/groovie/vdx.h index 0b29493108..38dd030bcb 100644 --- a/engines/groovie/vdx.h +++ b/engines/groovie/vdx.h @@ -73,9 +73,9 @@ private: void getStill(Common::ReadStream *in); void getDelta(Common::ReadStream *in); - void expandColourMap(byte *out, uint16 colourMap, uint8 colour1, uint8 colour0); - void decodeBlockStill(byte *buf, byte *colours, uint16 imageWidth, uint8 mask); - void decodeBlockDelta(uint32 offset, byte *colours, uint16 imageWidth); + void expandColorMap(byte *out, uint16 colorMap, uint8 color1, uint8 color0); + void decodeBlockStill(byte *buf, byte *colors, uint16 imageWidth, uint8 mask); + void decodeBlockDelta(uint32 offset, byte *colors, uint16 imageWidth); void chunkSound(Common::ReadStream *in); void setPalette(uint8 *palette); void fadeIn(uint8 *palette); diff --git a/engines/lure/debugger.cpp b/engines/lure/debugger.cpp index 9b1bb743e4..fc2029c6c4 100644 --- a/engines/lure/debugger.cpp +++ b/engines/lure/debugger.cpp @@ -312,7 +312,7 @@ bool Debugger::cmd_hotspot(int argc, const char **argv) { hs->width, hs->height, hs->widthCopy, hs->heightCopy, hs->yCorrection); DebugPrintf("Talk bubble offset = %d,%d\n", hs->talkX, hs->talkY); DebugPrintf("load offset = %xh, script load = %d\n", hs->loadOffset, hs->scriptLoadFlag); - DebugPrintf("Animation Id = %xh, Colour offset = %d\n", hs->animRecordId, hs->colourOffset); + DebugPrintf("Animation Id = %xh, Color offset = %d\n", hs->animRecordId, hs->colorOffset); DebugPrintf("Talk Script offset = %xh, Tick Script offset = %xh\n", hs->talkScriptOffset, hs->tickScriptOffset); DebugPrintf("Tick Proc offset = %xh\n", hs->tickProcId); @@ -543,7 +543,7 @@ bool Debugger::cmd_showAnim(int argc, const char **argv) { hotspot->setSize(width, height); Hotspot *player = res.activateHotspot(PLAYER_ID); - hotspot->setColourOffset(player->resource()->colourOffset); + hotspot->setColorOffset(player->resource()->colorOffset); hotspot->setAnimation(animId); diff --git a/engines/lure/decode.cpp b/engines/lure/decode.cpp index ae91cc1c52..5ffdcf1884 100644 --- a/engines/lure/decode.cpp +++ b/engines/lure/decode.cpp @@ -111,7 +111,7 @@ MemoryBlock *PictureDecoder::egaDecode(MemoryBlock *src, uint32 maxOutputSize) { dataPos += sizeof(uint16); int bitCtr = 8; - // Decode the colour popularity table + // Decode the color popularity table for (int nibbleCtr = 0; nibbleCtr < 32; ++nibbleCtr) { for (int byteCtr = 0; byteCtr < 128; byteCtr += 32) { @@ -134,7 +134,7 @@ MemoryBlock *PictureDecoder::egaDecode(MemoryBlock *src, uint32 maxOutputSize) { READ_BIT_DX if (!bitFlag) { - // Get the favourite colour + // Get the favourite color v = popTable[tableOffset]; } else { @@ -182,7 +182,7 @@ MemoryBlock *PictureDecoder::egaDecode(MemoryBlock *src, uint32 maxOutputSize) { continue; } else { - // It's a new colour + // It's a new color v = al; } diff --git a/engines/lure/fights.cpp b/engines/lure/fights.cpp index 789c9d924e..983033281a 100644 --- a/engines/lure/fights.cpp +++ b/engines/lure/fights.cpp @@ -74,7 +74,7 @@ void FightsManager::setupPigFight() { Resources &res = Resources::getReference(); Hotspot *player = res.getActiveHotspot(PLAYER_ID); player->setSkipFlag(false); - player->resource()->colourOffset = 16; + player->resource()->colorOffset = 16; player->setTickProc(PLAYER_FIGHT_TICK_PROC_ID); player->setSize(48, 53); player->setAnimationIndex(PLAYER_FIGHT_ANIM_INDEX); @@ -103,7 +103,7 @@ void FightsManager::setupSkorlFight() { rec.fwtrue_x = 282; rec.fwtrue_y = 136; player->setPosition(282, 136); - player->resource()->colourOffset = 96; + player->resource()->colorOffset = 96; } bool FightsManager::isFighting() { @@ -598,7 +598,7 @@ void FightsManager::enemyKilled() { playerHotspot->setTickProc(PLAYER_TICK_PROC_ID); playerRec.fwhits = GENERAL_MAGIC_ID; - playerHotspot->resource()->colourOffset = 128; + playerHotspot->resource()->colorOffset = 128; playerHotspot->setSize(32, 48); playerHotspot->resource()->width = 32; playerHotspot->resource()->height = 48; diff --git a/engines/lure/hotspots.cpp b/engines/lure/hotspots.cpp index bce98b28fd..5644ef798c 100644 --- a/engines/lure/hotspots.cpp +++ b/engines/lure/hotspots.cpp @@ -73,7 +73,7 @@ Hotspot::Hotspot(HotspotData *res): _pathFinder(this) { _hotspotScriptOffset = res->hotspotScriptOffset; _frameCtr = res->tickTimeout; _tempDest.counter = 0; - _colourOffset = isEGA ? 0 : res->colourOffset; + _colorOffset = isEGA ? 0 : res->colorOffset; _override = resources.getHotspotOverride(res->hotspotId); setAnimation(_data->animRecordId); @@ -103,7 +103,7 @@ Hotspot::Hotspot(Hotspot *character, uint16 objType): _pathFinder(this) { _persistant = false; _hotspotId = 0xffff; _override = NULL; - _colourOffset = 0; + _colorOffset = 0; _destHotspotId = character->hotspotId(); _blockedOffset = 0; _exitCtr = 0; @@ -174,7 +174,7 @@ Hotspot::Hotspot(): _pathFinder(NULL) { _persistant = false; _hotspotId = 0xffff; _override = NULL; - _colourOffset = 0; + _colorOffset = 0; _destHotspotId = 0; _blockedOffset = 0; _exitCtr = 0; @@ -303,7 +303,7 @@ void Hotspot::setAnimation(HotspotAnimData *newRecord) { _frames = new Surface(_width * _numFrames, _height); _frameStartsUsed = false; } - _frames->data().setBytes(_colourOffset, 0, _frames->data().size()); + _frames->data().setBytes(_colorOffset, 0, _frames->data().size()); byte *pSrc = dest->data() + 0x40; byte *pDest; @@ -353,13 +353,13 @@ void Hotspot::setAnimation(HotspotAnimData *newRecord) { xStart = frameNumCtr * _width; } - // Copy over the frame, applying the colour offset to each nibble + // Copy over the frame, applying the color offset to each nibble for (uint16 yPos = 0; yPos < tempHeight; ++yPos) { pDest = mDest.data() + yPos * _frames->width() + xStart; for (uint16 xPos = 0; xPos < tempWidth / 2; ++xPos) { - *pDest++ = _colourOffset + (*pSrc >> 4); - *pDest++ = _colourOffset + (*pSrc & 0xf); + *pDest++ = _colorOffset + (*pSrc >> 4); + *pDest++ = _colorOffset + (*pSrc & 0xf); ++pSrc; } } @@ -421,7 +421,7 @@ void Hotspot::copyTo(Surface *dest) { if ((r.top >= r.bottom) || (r.left >= r.right)) return; - _frames->copyTo(dest, r, (uint16) xPos, (uint16) yPos, _colourOffset); + _frames->copyTo(dest, r, (uint16) xPos, (uint16) yPos, _colorOffset); } void Hotspot::incFrameNumber() { @@ -2313,7 +2313,7 @@ void Hotspot::saveToStream(Common::WriteStream *stream) { stream->writeUint16LE(_talkY); stream->writeByte(_layer); stream->writeUint16LE(_hotspotScriptOffset); - stream->writeByte(_colourOffset); + stream->writeByte(_colorOffset); stream->writeByte((byte)_direction); stream->writeUint16LE(_animId); stream->writeUint16LE(_frameNumber); @@ -2358,7 +2358,7 @@ void Hotspot::loadFromStream(Common::ReadStream *stream) { _talkY = stream->readUint16LE(); _layer = stream->readByte(); _hotspotScriptOffset = stream->readUint16LE(); - _colourOffset = stream->readByte(); + _colorOffset = stream->readByte(); _direction = (Direction)stream->readByte(); setAnimation(stream->readUint16LE()); setFrameNumber(stream->readUint16LE()); @@ -3505,10 +3505,10 @@ void HotspotTickHandlers::talkAnimHandler(Hotspot &h) { screen.screen().fillRect(r, 0); // Display line - byte colour = LureEngine::getReference().isEGA() ? - ((lineNum + 1 == selectedLine) ? EGA_DIALOG_WHITE_COLOUR : EGA_DIALOG_TEXT_COLOUR) : - ((lineNum + 1 == selectedLine) ? VGA_DIALOG_WHITE_COLOUR : VGA_DIALOG_TEXT_COLOUR); - screen.screen().writeString(r.left, r.top, buffer, false, colour); + byte color = LureEngine::getReference().isEGA() ? + ((lineNum + 1 == selectedLine) ? EGA_DIALOG_WHITE_COLOR : EGA_DIALOG_TEXT_COLOR) : + ((lineNum + 1 == selectedLine) ? VGA_DIALOG_WHITE_COLOR : VGA_DIALOG_TEXT_COLOR); + screen.screen().writeString(r.left, r.top, buffer, false, color); } if (mouse.mButton() || mouse.rButton()) { diff --git a/engines/lure/hotspots.h b/engines/lure/hotspots.h index 2ae2e91ecf..e9f5d56edd 100644 --- a/engines/lure/hotspots.h +++ b/engines/lure/hotspots.h @@ -203,7 +203,7 @@ private: Direction _direction; uint8 _layer; uint16 _hotspotScriptOffset; - uint8 _colourOffset; + uint8 _colorOffset; bool _persistant; HotspotOverrideData *_override; bool _skipFlag; @@ -324,8 +324,8 @@ public: void setTickProc(uint16 newVal); bool persistant() { return _persistant; } void setPersistant(bool value) { _persistant = value; } - uint8 colourOffset() { return _colourOffset; } - void setColourOffset(uint8 value) { _colourOffset = value; } + uint8 colorOffset() { return _colorOffset; } + void setColorOffset(uint8 value) { _colorOffset = value; } void setRoomNumber(uint16 roomNum) { _roomNumber = roomNum; if (_data) _data->roomNumber = roomNum; diff --git a/engines/lure/luredefs.h b/engines/lure/luredefs.h index b13c4a0724..0ef7a73b7e 100644 --- a/engines/lure/luredefs.h +++ b/engines/lure/luredefs.h @@ -111,7 +111,7 @@ enum Action { // Basic game dimensions #define FULL_SCREEN_WIDTH 320 #define FULL_SCREEN_HEIGHT 200 -#define GAME_COLOURS 256 +#define GAME_COLORS 256 #define SCREEN_SIZE (FULL_SCREEN_HEIGHT * FULL_SCREEN_WIDTH) // Some resources include multiple packed palettes of 64 entries each @@ -120,7 +120,7 @@ enum Action { #define RES_PALETTE_ENTRIES 220 // Main working palette size #define MAIN_PALETTE_SIZE 228 -// Palette colour increment amouns for palette fade in/outs +// Palette color increment amouns for palette fade in/outs #define PALETTE_FADE_INC_SIZE 4 // EGA constants @@ -189,11 +189,11 @@ enum CursorType {CURSOR_ARROW = 0, CURSOR_DISK = 1, CURSOR_TIME_START = 2, #define POPMENU_CHANGE_SENSITIVITY 5 // Dialog related defines -#define EGA_DIALOG_TEXT_COLOUR 6 -#define EGA_DIALOG_WHITE_COLOUR 2 -#define VGA_DIALOG_TEXT_COLOUR 0xe2 -#define VGA_DIALOG_WHITE_COLOUR 0xe3 -#define EGA_DIALOG_BG_COLOUR 13 +#define EGA_DIALOG_TEXT_COLOR 6 +#define EGA_DIALOG_WHITE_COLOR 2 +#define VGA_DIALOG_TEXT_COLOR 0xe2 +#define VGA_DIALOG_WHITE_COLOR 0xe3 +#define EGA_DIALOG_BG_COLOR 13 #define INFO_DIALOG_X 69 #define INFO_DIALOG_Y 61 #define INFO_DIALOG_WIDTH 191 diff --git a/engines/lure/menu.cpp b/engines/lure/menu.cpp index 7d0816ee79..c4654c3e93 100644 --- a/engines/lure/menu.cpp +++ b/engines/lure/menu.cpp @@ -153,7 +153,7 @@ uint8 Menu::execute() { toggleHighlight(_selectedMenu); _surfaceMenu = Surface::newDialog( _selectedMenu->width(), _selectedMenu->numEntries(), - _selectedMenu->entries(), false, DEFAULT_TEXT_COLOUR, false); + _selectedMenu->entries(), false, DEFAULT_TEXT_COLOR, false); _surfaceMenu->copyToScreen(_selectedMenu->xstart(), MENUBAR_Y_SIZE); } @@ -230,26 +230,26 @@ uint8 Menu::getIndexAt(uint16 x, uint16 y) { return index; } -#define MENUBAR_SELECTED_COLOUR 0xf7 +#define MENUBAR_SELECTED_COLOR 0xf7 void Menu::toggleHighlight(MenuRecord *menuRec) { - const byte colourList[4] = {4, 2, 0, 0xf7}; - const byte *colours = LureEngine::getReference().isEGA() ? &colourList[0] : &colourList[2]; + const byte colorList[4] = {4, 2, 0, 0xf7}; + const byte *colors = LureEngine::getReference().isEGA() ? &colorList[0] : &colorList[2]; byte *addr = _menu->data(); for (uint16 y=0; y<MENUBAR_Y_SIZE; ++y) { for (uint16 x=menuRec->hsxstart(); x<=menuRec->hsxend(); ++x) { - if (addr[x] == colours[0]) addr[x] = colours[1]; - else if (addr[x] == colours[1]) addr[x] = colours[0]; + if (addr[x] == colors[0]) addr[x] = colors[1]; + else if (addr[x] == colors[1]) addr[x] = colors[0]; } addr += FULL_SCREEN_WIDTH; } } void Menu::toggleHighlightItem(uint8 index) { - const byte colourList[4] = {EGA_DIALOG_TEXT_COLOUR, EGA_DIALOG_WHITE_COLOUR, - VGA_DIALOG_TEXT_COLOUR, VGA_DIALOG_WHITE_COLOUR}; - const byte *colours = LureEngine::getReference().isEGA() ? &colourList[0] : &colourList[2]; + const byte colorList[4] = {EGA_DIALOG_TEXT_COLOR, EGA_DIALOG_WHITE_COLOR, + VGA_DIALOG_TEXT_COLOR, VGA_DIALOG_WHITE_COLOR}; + const byte *colors = LureEngine::getReference().isEGA() ? &colorList[0] : &colorList[2]; byte *p = _surfaceMenu->data().data() + (Surface::textY() + ((index - 1) * FONT_HEIGHT)) * _surfaceMenu->width() + Surface::textX(); int numBytes =_surfaceMenu->width() - Surface::textX() * 2; @@ -258,8 +258,8 @@ void Menu::toggleHighlightItem(uint8 index) { byte *pTemp = p; for (int x = 0; x < numBytes; ++x, ++pTemp) { - if (*pTemp == colours[0]) *pTemp = colours[1]; - else if (*pTemp == colours[1]) *pTemp = colours[0]; + if (*pTemp == colors[0]) *pTemp = colors[1]; + else if (*pTemp == colors[1]) *pTemp = colors[0]; } } @@ -475,9 +475,9 @@ uint16 PopupMenu::Show(int numEntries, const char *actions[]) { Screen &screen = Screen::getReference(); Common::Rect r; bool isEGA = LureEngine::getReference().isEGA(); - byte bgColour = isEGA ? EGA_DIALOG_BG_COLOUR : 0; - byte textColour = isEGA ? EGA_DIALOG_TEXT_COLOUR : VGA_DIALOG_TEXT_COLOUR; - byte whiteColour = isEGA ? EGA_DIALOG_WHITE_COLOUR : VGA_DIALOG_WHITE_COLOUR; + byte bgColor = isEGA ? EGA_DIALOG_BG_COLOR : 0; + byte textColor = isEGA ? EGA_DIALOG_TEXT_COLOR : VGA_DIALOG_TEXT_COLOR; + byte whiteColor = isEGA ? EGA_DIALOG_WHITE_COLOR : VGA_DIALOG_WHITE_COLOR; const uint16 yMiddle = FULL_SCREEN_HEIGHT / 2; @@ -521,7 +521,7 @@ uint16 PopupMenu::Show(int numEntries, const char *actions[]) { for (;;) { if (refreshFlag) { // Set up the contents of the menu - s->fillRect(r, bgColour); + s->fillRect(r, bgColor); for (int index = 0; index < numLines; ++index) { #ifndef LURE_CLICKABLE_MENUS @@ -533,9 +533,9 @@ uint16 PopupMenu::Show(int numEntries, const char *actions[]) { s->writeString(Surface::textX(), Surface::textY() + index * FONT_HEIGHT, actions[actionIndex], true, #ifndef LURE_CLICKABLE_MENUS - (index == (numLines / 2)) ? whiteColour : textColour, + (index == (numLines / 2)) ? whiteColor : textColor, #else - (index == selectedIndex) ? whiteColour : textColour, + (index == selectedIndex) ? whiteColor : textColor, #endif false); } diff --git a/engines/lure/palette.cpp b/engines/lure/palette.cpp index d77f64f00a..b08ca64dfb 100644 --- a/engines/lure/palette.cpp +++ b/engines/lure/palette.cpp @@ -33,7 +33,7 @@ namespace Lure { // Defaults the palette to a full 256 entry palette Palette::Palette() { - _numEntries = GAME_COLOURS; + _numEntries = GAME_COLORS; _palette = Memory::allocate(_numEntries * 4); _palette->empty(); } @@ -91,7 +91,7 @@ Palette::Palette(uint16 resourceId, PaletteSource paletteSource) { break; case RGB64: - if (((srcData->size() % 3) != 0) || ((srcData->size() / 3) > GAME_COLOURS)) + if (((srcData->size() % 3) != 0) || ((srcData->size() / 3) > GAME_COLORS)) error("Specified resource %d is not a palette", resourceId); _numEntries = srcData->size() / 3; diff --git a/engines/lure/res.cpp b/engines/lure/res.cpp index 90c2b67b85..01b0bd0d4a 100644 --- a/engines/lure/res.cpp +++ b/engines/lure/res.cpp @@ -432,7 +432,7 @@ byte *Resources::getCursor(uint8 cursorNum) { } } - // Post-process the cells to adjust the colour + // Post-process the cells to adjust the color for (int index = 0; index < CURSOR_SIZE; ++index) { if (_cursor[index] == 3) _cursor[index] = 15; } diff --git a/engines/lure/res_struct.cpp b/engines/lure/res_struct.cpp index f6a2092ddc..39beb2729e 100644 --- a/engines/lure/res_struct.cpp +++ b/engines/lure/res_struct.cpp @@ -406,7 +406,7 @@ HotspotData::HotspotData(HotspotResource *rec) { walkY = READ_LE_UINT16(&rec->walkY); talkX = rec->talkX; talkY = rec->talkY; - colourOffset = READ_LE_UINT16(&rec->colourOffset); + colorOffset = READ_LE_UINT16(&rec->colorOffset); animRecordId = READ_LE_UINT16(&rec->animRecordId); hotspotScriptOffset = READ_LE_UINT16(&rec->hotspotScriptOffset); talkScriptOffset = READ_LE_UINT16(&rec->talkScriptOffset); diff --git a/engines/lure/res_struct.h b/engines/lure/res_struct.h index e4b8c02f6a..6e2c11cb24 100644 --- a/engines/lure/res_struct.h +++ b/engines/lure/res_struct.h @@ -88,7 +88,7 @@ struct HotspotResource { uint16 walkY; int8 talkX; int8 talkY; - uint16 colourOffset; + uint16 colorOffset; uint16 animRecordId; uint16 hotspotScriptOffset; uint16 talkScriptOffset; @@ -538,7 +538,7 @@ public: uint16 walkY; int8 talkX; int8 talkY; - uint16 colourOffset; + uint16 colorOffset; uint16 animRecordId; uint16 hotspotScriptOffset; uint16 talkScriptOffset; diff --git a/engines/lure/room.cpp b/engines/lure/room.cpp index 746d6ef094..4cefe1fabb 100644 --- a/engines/lure/room.cpp +++ b/engines/lure/room.cpp @@ -432,7 +432,7 @@ void Room::update() { Surface &s = _screen.screen(); Resources &res = Resources::getReference(); HotspotList &hotspots = res.activeHotspots(); - byte white = LureEngine::getReference().isEGA() ? EGA_DIALOG_WHITE_COLOUR : VGA_DIALOG_WHITE_COLOUR; + byte white = LureEngine::getReference().isEGA() ? EGA_DIALOG_WHITE_COLOR : VGA_DIALOG_WHITE_COLOR; HotspotList::iterator i; // Copy the background to the temporary screen surface @@ -564,9 +564,9 @@ void Room::setRoomNumber(uint16 newRoomNumber, bool showOverlay) { if (isEGA) _screen.setPaletteEmpty(); else - // Fade out all the colours except the high index 0FFh, which is used to show the + // Fade out all the colors except the high index 0FFh, which is used to show the // disk cursor as a room changes - _screen.paletteFadeOut(GAME_COLOURS - 1); + _screen.paletteFadeOut(GAME_COLORS - 1); // Deallocate graphical layers from the room for (int layerNum = 0; layerNum < _numLayers; ++layerNum) { diff --git a/engines/lure/screen.cpp b/engines/lure/screen.cpp index 282e382bba..b64ef6393b 100644 --- a/engines/lure/screen.cpp +++ b/engines/lure/screen.cpp @@ -44,7 +44,7 @@ Screen::Screen(OSystem &system): _system(system), _palette(new Palette(GAME_PALETTE_RESOURCE_ID, RGB64)) { int_disk = this; _screen->empty(); - _system.getPaletteManager()->setPalette(_palette->data(), 0, GAME_COLOURS); + _system.getPaletteManager()->setPalette(_palette->data(), 0, GAME_COLORS); } Screen::~Screen() { @@ -87,7 +87,7 @@ void Screen::setPaletteEmpty(int numEntries) { void Screen::setPalette(Palette *p) { _palette->copyFrom(p); - setSystemPalette(_palette, 0, GAME_COLOURS); + setSystemPalette(_palette, 0, GAME_COLORS); _system.updateScreen(); } @@ -138,7 +138,7 @@ void Screen::paletteFadeIn(Palette *p) { } // paletteFadeOut -// Fades the screen to black by gradually decreasing the palette colours +// Fades the screen to black by gradually decreasing the palette colors void Screen::paletteFadeOut(int numEntries) { assert((uint32)numEntries <= _palette->palette()->size()); diff --git a/engines/lure/surface.cpp b/engines/lure/surface.cpp index c4ee0f7dad..783401fde2 100644 --- a/engines/lure/surface.cpp +++ b/engines/lure/surface.cpp @@ -123,21 +123,21 @@ void Surface::getDialogBounds(Common::Point &size, int charWidth, int numLines, // Forms a dialog encompassing the entire surface void Surface::egaCreateDialog(bool blackFlag) { - byte lineColours1[3] = {6, 0, 9}; - byte lineColours2[3] = {7, 0, 12}; + byte lineColors1[3] = {6, 0, 9}; + byte lineColors2[3] = {7, 0, 12}; // Surface contents - data().setBytes(blackFlag ? 0 : EGA_DIALOG_BG_COLOUR, 0, data().size()); + data().setBytes(blackFlag ? 0 : EGA_DIALOG_BG_COLOR, 0, data().size()); // Top/bottom lines for (int y = 2; y >= 0; --y) { - data().setBytes(lineColours1[y], y * width(), width()); - data().setBytes(lineColours2[y], (height() - y - 1) * width(), width()); + data().setBytes(lineColors1[y], y * width(), width()); + data().setBytes(lineColors2[y], (height() - y - 1) * width(), width()); for (int p = y + 1; p < height() - y; ++p) { byte *line = data().data() + p * width(); - *(line + y) = lineColours2[y]; - *(line + width() - y - 1) = lineColours1[y]; + *(line + y) = lineColors2[y]; + *(line + width() - y - 1) = lineColors1[y]; } } } @@ -220,10 +220,10 @@ void Surface::loadScreen(MemoryBlock *rawData) { delete tmpScreen; } -int Surface::writeChar(uint16 x, uint16 y, uint8 ascii, bool transparent, int colour) { +int Surface::writeChar(uint16 x, uint16 y, uint8 ascii, bool transparent, int color) { byte *const addr = _data->data() + (y * _width) + x; - if (colour == DEFAULT_TEXT_COLOUR) - colour = LureEngine::getReference().isEGA() ? EGA_DIALOG_TEXT_COLOUR : VGA_DIALOG_TEXT_COLOUR; + if (color == DEFAULT_TEXT_COLOR) + color = LureEngine::getReference().isEGA() ? EGA_DIALOG_TEXT_COLOR : VGA_DIALOG_TEXT_COLOR; if ((ascii < 32) || (ascii >= 32 + numFontChars)) error("Invalid ascii character passed for display '%d'", ascii); @@ -239,7 +239,7 @@ int Surface::writeChar(uint16 x, uint16 y, uint8 ascii, bool transparent, int co for (int x1 = 0; x1 < 8; ++x1, ++pDest) { if (v & 0x80) { - *pDest = colour; + *pDest = color; if (x1+1 > charWidth) charWidth = x1 + 1; } else if (!transparent) *pDest = 0; @@ -251,16 +251,16 @@ int Surface::writeChar(uint16 x, uint16 y, uint8 ascii, bool transparent, int co } void Surface::writeString(uint16 x, uint16 y, Common::String line, bool transparent, - int colour, bool varLength) { - writeSubstring(x, y, line, line.size(), transparent, colour, varLength); + int color, bool varLength) { + writeSubstring(x, y, line, line.size(), transparent, color, varLength); } void Surface::writeSubstring(uint16 x, uint16 y, Common::String line, int len, - bool transparent, int colour, bool varLength) { + bool transparent, int color, bool varLength) { const char *sPtr = line.c_str(); - if (colour == DEFAULT_TEXT_COLOUR) - colour = LureEngine::getReference().isEGA() ? EGA_DIALOG_TEXT_COLOUR : VGA_DIALOG_TEXT_COLOUR; + if (color == DEFAULT_TEXT_COLOR) + color = LureEngine::getReference().isEGA() ? EGA_DIALOG_TEXT_COLOR : VGA_DIALOG_TEXT_COLOR; for (int index = 0; (index < len) && (*sPtr != '\0'); ++index, ++sPtr) { int charSize = varLength ? fontSize[(uint8)*sPtr - 32] + 2 : FONT_WIDTH; @@ -269,7 +269,7 @@ void Surface::writeSubstring(uint16 x, uint16 y, Common::String line, int len, break; // Write next character - writeChar(x, y, (uint8) *sPtr, transparent, colour); + writeChar(x, y, (uint8) *sPtr, transparent, color); // Move to after the character in preparation for the next character x += charSize; @@ -312,7 +312,7 @@ void Surface::copyTo(Surface *dest, uint16 x, uint16 y) { } void Surface::copyTo(Surface *dest, const Common::Rect &srcBounds, - uint16 destX, uint16 destY, int transparentColour) { + uint16 destX, uint16 destY, int transparentColor) { int numBytes = srcBounds.right - srcBounds.left + 1; if (destX + numBytes > dest->width()) numBytes = dest->width() - destX; @@ -322,8 +322,8 @@ void Surface::copyTo(Surface *dest, const Common::Rect &srcBounds, const uint32 srcPos = (srcBounds.top + y) * _width + srcBounds.left; const uint32 destPos = (destY+y) * dest->width() + destX; - if (transparentColour == -1) { - // No trnnsparent colour, so copy all the bytes of the line + if (transparentColor == -1) { + // No trnnsparent color, so copy all the bytes of the line dest->data().copyFrom(_data, srcPos, destPos, numBytes); } else { byte *pSrc = _data->data() + srcPos; @@ -331,7 +331,7 @@ void Surface::copyTo(Surface *dest, const Common::Rect &srcBounds, int bytesCtr = numBytes; while (bytesCtr-- > 0) { - if (*pSrc != (uint8) transparentColour) + if (*pSrc != (uint8) transparentColor) *pDest = *pSrc; ++pSrc; ++pDest; @@ -347,12 +347,12 @@ void Surface::copyFrom(MemoryBlock *src, uint32 destOffset) { } // fillRect -// Fills a rectangular area with a colour +// Fills a rectangular area with a color -void Surface::fillRect(const Common::Rect &r, uint8 colour) { +void Surface::fillRect(const Common::Rect &r, uint8 color) { for (int yp = r.top; yp <= r.bottom; ++yp) { byte *const addr = _data->data() + (yp * _width) + r.left; - memset(addr, colour, r.width()); + memset(addr, color, r.width()); } } @@ -464,7 +464,7 @@ void Surface::wordWrap(char *text, uint16 width, char **&lines, uint8 &numLines) } Surface *Surface::newDialog(uint16 width, uint8 numLines, const char **lines, bool varLength, - int colour, bool squashedLines) { + int color, bool squashedLines) { Common::Point size; Surface::getDialogBounds(size, 0, numLines, squashedLines); @@ -473,21 +473,21 @@ Surface *Surface::newDialog(uint16 width, uint8 numLines, const char **lines, bo uint16 yP = Surface::textY(); for (uint8 ctr = 0; ctr < numLines; ++ctr) { - s->writeString(Surface::textX(), yP, lines[ctr], true, colour, varLength); + s->writeString(Surface::textX(), yP, lines[ctr], true, color, varLength); yP += squashedLines ? FONT_HEIGHT - 1 : FONT_HEIGHT; } return s; } -Surface *Surface::newDialog(uint16 width, const char *line, int colour) { +Surface *Surface::newDialog(uint16 width, const char *line, int color) { char **lines; char *lineCopy = strdup(line); uint8 numLines; wordWrap(lineCopy, width - (Surface::textX() * 2), lines, numLines); // Create the dialog - Surface *result = newDialog(width, numLines, const_cast<const char **>(lines), true, colour); + Surface *result = newDialog(width, numLines, const_cast<const char **>(lines), true, color); // Deallocate used resources free(lines); @@ -510,7 +510,7 @@ bool Surface::getString(Common::String &line, int maxSize, bool isNumeric, bool Mouse &mouse = Mouse::getReference(); Events &events = Events::getReference(); Screen &screen = Screen::getReference(); - uint8 bgColour = *(screen.screen().data().data() + (y * FULL_SCREEN_WIDTH) + x); + uint8 bgColor = *(screen.screen().data().data() + (y * FULL_SCREEN_WIDTH) + x); Common::String newLine(line); bool abortFlag = false; bool refreshFlag = false; @@ -527,7 +527,7 @@ bool Surface::getString(Common::String &line, int maxSize, bool isNumeric, bool while (!abortFlag) { // Display the string - screen.screen().writeString(x, y, newLine, true, DEFAULT_TEXT_COLOUR, varLength); + screen.screen().writeString(x, y, newLine, true, DEFAULT_TEXT_COLOR, varLength); screen.update(); int stringSize = textWidth(newLine.c_str()); @@ -545,7 +545,7 @@ bool Surface::getString(Common::String &line, int maxSize, bool isNumeric, bool if ((keycode == Common::KEYCODE_RETURN) || (keycode == Common::KEYCODE_KP_ENTER)) { // Return character screen.screen().fillRect( - Common::Rect(x, y, x + maxSize - 1, y + FONT_HEIGHT), bgColour); + Common::Rect(x, y, x + maxSize - 1, y + FONT_HEIGHT), bgColor); screen.update(); newLine.deleteLastChar(); line = newLine; @@ -556,7 +556,7 @@ bool Surface::getString(Common::String &line, int maxSize, bool isNumeric, bool else if (keycode == Common::KEYCODE_ESCAPE) { // Escape character screen.screen().fillRect( - Common::Rect(x, y, x + maxSize - 1, y + FONT_HEIGHT), bgColour); + Common::Rect(x, y, x + maxSize - 1, y + FONT_HEIGHT), bgColor); screen.update(); abortFlag = true; } else if (keycode == Common::KEYCODE_BACKSPACE) { @@ -564,14 +564,14 @@ bool Surface::getString(Common::String &line, int maxSize, bool isNumeric, bool if (newLine.size() == 1) continue; screen.screen().fillRect( - Common::Rect(x, y, x + maxSize - 1, y + FONT_HEIGHT), bgColour); + Common::Rect(x, y, x + maxSize - 1, y + FONT_HEIGHT), bgColor); newLine.deleteChar(newLine.size() - 2); refreshFlag = true; } else if ((ch >= ' ') && (stringSize + 8 < maxSize)) { if (((ch >= '0') && (ch <= '9')) || !isNumeric) { screen.screen().fillRect( - Common::Rect(x, y, x + maxSize - 1, y + FONT_HEIGHT), bgColour); + Common::Rect(x, y, x + maxSize - 1, y + FONT_HEIGHT), bgColor); newLine.insertChar(ch, newLine.size() - 1); refreshFlag = true; } @@ -818,7 +818,7 @@ TalkDialog::TalkDialog(uint16 characterId, uint16 destCharacterId, uint16 active // Write out the character name uint16 charWidth = Surface::textWidth(srcCharName); - byte white = LureEngine::getReference().isEGA() ? EGA_DIALOG_WHITE_COLOUR : VGA_DIALOG_WHITE_COLOUR; + byte white = LureEngine::getReference().isEGA() ? EGA_DIALOG_WHITE_COLOR : VGA_DIALOG_WHITE_COLOR; _surface->writeString((TALK_DIALOG_WIDTH - charWidth) / 2, TALK_DIALOG_EDGE_SIZE + 2, srcCharName, true, white); debugC(ERROR_DETAILED, kLureDebugAnimations, "TalkDialog end"); @@ -903,14 +903,14 @@ TalkDialog *TalkDialog::loadFromStream(Common::ReadStream *stream) { void SaveRestoreDialog::toggleHightlight(int xs, int xe, int ys, int ye) { Screen &screen = Screen::getReference(); byte *addr = screen.screen().data().data() + FULL_SCREEN_WIDTH * ys + xs; - const byte colourList[4] = {EGA_DIALOG_TEXT_COLOUR, EGA_DIALOG_WHITE_COLOUR, - VGA_DIALOG_TEXT_COLOUR, VGA_DIALOG_WHITE_COLOUR}; - const byte *colours = LureEngine::getReference().isEGA() ? &colourList[0] : &colourList[2]; + const byte colorList[4] = {EGA_DIALOG_TEXT_COLOR, EGA_DIALOG_WHITE_COLOR, + VGA_DIALOG_TEXT_COLOR, VGA_DIALOG_WHITE_COLOR}; + const byte *colors = LureEngine::getReference().isEGA() ? &colorList[0] : &colorList[2]; for (int y = 0; y < ye - ys + 1; ++y, addr += FULL_SCREEN_WIDTH) { for (int x = 0; x < xe - xs + 1; ++x) { - if (addr[x] == colours[0]) addr[x] = colours[1]; - else if (addr[x] == colours[1]) addr[x] = colours[0]; + if (addr[x] == colors[0]) addr[x] = colors[1]; + else if (addr[x] == colors[1]) addr[x] = colors[0]; } } @@ -951,9 +951,9 @@ bool SaveRestoreDialog::show(bool saveDialog) { // Create the outer dialog and dividing line s->createDialog(); byte *pDest = s->data().data() + (s->width() * SR_SEPARATOR_Y) + SR_SEPARATOR_X; - uint8 rowColours[5] = {*(pDest-2), *(pDest-1), *(pDest-1), *(pDest-2), *(pDest+1)}; + uint8 rowColors[5] = {*(pDest-2), *(pDest-1), *(pDest-1), *(pDest-2), *(pDest+1)}; for (int y = 0; y < SR_SEPARATOR_HEIGHT; ++y, pDest += s->width()) - memset(pDest, rowColours[y], s->width() - 12); + memset(pDest, rowColors[y], s->width() - 12); // Create title line Common::String title(res.stringList().getString( @@ -1248,7 +1248,7 @@ struct ItemDesc { int16 x, y; uint16 width, height; uint16 animId; - uint8 startColour; + uint8 startColor; }; #define PROT_SPR_HEADER 0x1830 @@ -1286,7 +1286,7 @@ CopyProtectionDialog::CopyProtectionDialog() { Hotspot *h = new Hotspot(); h->setPosition(ptr->x, ptr->y); h->setSize(ptr->width, ptr->height); - h->setColourOffset(ptr->startColour); + h->setColorOffset(ptr->startColor); h->setAnimation(ptr->animId); _hotspots.push_back(HotspotsList::value_type(h)); diff --git a/engines/lure/surface.h b/engines/lure/surface.h index 8fd8ae49a6..9a677cf749 100644 --- a/engines/lure/surface.h +++ b/engines/lure/surface.h @@ -34,7 +34,7 @@ namespace Lure { -#define DEFAULT_TEXT_COLOUR -1 +#define DEFAULT_TEXT_COLOR -1 class Surface { private: @@ -61,20 +61,20 @@ public: void loadScreen(uint16 resourceId); void loadScreen(MemoryBlock *data); - int writeChar(uint16 x, uint16 y, uint8 ascii, bool transparent, int colour); + int writeChar(uint16 x, uint16 y, uint8 ascii, bool transparent, int color); void writeString(uint16 x, uint16 y, Common::String line, bool transparent, - int colour = DEFAULT_TEXT_COLOUR, bool varLength = true); + int color = DEFAULT_TEXT_COLOR, bool varLength = true); void writeSubstring(uint16 x, uint16 y, Common::String line, int len, - bool transparent, int colour = DEFAULT_TEXT_COLOUR, bool varLength = true); + bool transparent, int color = DEFAULT_TEXT_COLOR, bool varLength = true); void transparentCopyTo(Surface *dest); void copyTo(Surface *dest); void copyTo(Surface *dest, uint16 x, uint16 y); void copyTo(Surface *dest, const Common::Rect &srcBounds, uint16 destX, uint16 destY, - int transparentColour = -1); + int transparentColor = -1); void copyFrom(MemoryBlock *src) { _data->copyFrom(src); } void copyFrom(MemoryBlock *src, uint32 destOffset); void empty() { _data->empty(); } - void fillRect(const Common::Rect &r, uint8 colour); + void fillRect(const Common::Rect &r, uint8 color); void createDialog(bool blackFlag = false); void copyToScreen(uint16 x, uint16 y); void centerOnScreen(); @@ -82,8 +82,8 @@ public: static uint16 textWidth(const char *s, int numChars = 0); static void wordWrap(char *text, uint16 width, char **&lines, uint8 &numLines); static Surface *newDialog(uint16 width, uint8 numLines, const char **lines, bool varLength = true, - int colour = DEFAULT_TEXT_COLOUR, bool squashedLines = true); - static Surface *newDialog(uint16 width, const char *lines, int colour = DEFAULT_TEXT_COLOUR); + int color = DEFAULT_TEXT_COLOR, bool squashedLines = true); + static Surface *newDialog(uint16 width, const char *lines, int color = DEFAULT_TEXT_COLOR); static Surface *getScreen(uint16 resourceId); bool getString(Common::String &line, int maxSize, bool isNumeric, bool varLength, int16 x, int16 y); }; diff --git a/engines/m4/actor.cpp b/engines/m4/actor.cpp index f342ca6b46..ce8574a134 100644 --- a/engines/m4/actor.cpp +++ b/engines/m4/actor.cpp @@ -59,7 +59,7 @@ void Actor::placeWalkerSpriteAt(int spriteNum, int x, int y) { info.height = info.sprite->height(); info.scaleX = info.scaleY = _scaling; info.palette = _walkerSprites[_direction]->getPalette(); - info.inverseColourTable = _m4Vm->scene()->getInverseColourTable(); + info.inverseColorTable = _m4Vm->scene()->getInverseColorTable(); _vm->_scene->drawSprite(x, y, info, Common::Rect(640, 400)); } diff --git a/engines/m4/animation.cpp b/engines/m4/animation.cpp index 37314eff44..26de121611 100644 --- a/engines/m4/animation.cpp +++ b/engines/m4/animation.cpp @@ -426,7 +426,7 @@ void MadsAnimation::update() { // Start displaying the message AnimMessage &me = _messages[idx]; - // The colour index to use is dependant on how many messages are currently on-screen + // The color index to use is dependant on how many messages are currently on-screen uint8 colIndex; switch (_messageCtr) { case 1: diff --git a/engines/m4/converse.cpp b/engines/m4/converse.cpp index 2d1b8e7e4f..f67291f0a6 100644 --- a/engines/m4/converse.cpp +++ b/engines/m4/converse.cpp @@ -97,7 +97,7 @@ void ConversationView::setNode(int32 nodeIndex) { _vm->_font->setFont(FONT_CONVERSATION); // TODO: Conversation styles and colors - _vm->_font->current()->setColours(2, 1, 3); + _vm->_font->current()->setColors(2, 1, 3); _currentNodeIndex = nodeIndex; @@ -164,7 +164,7 @@ void ConversationView::onRefresh(RectList *rects, M4Surface *destSurface) { if (i > CONV_MAX_SHOWN_ENTRIES - 1) break; - _vm->_font->current()->setColour((_highlightedIndex == i) ? CONVERSATION_ENTRY_HIGHLIGHTED : + _vm->_font->current()->setColor((_highlightedIndex == i) ? CONVERSATION_ENTRY_HIGHLIGHTED : CONVERSATION_ENTRY_NORMAL); _vm->_font->current()->writeString(this, _activeItems[i]->text, CONV_ENTRIES_X_OFFSET, diff --git a/engines/m4/dialogs.cpp b/engines/m4/dialogs.cpp index da828ccf5b..7efbc523f8 100644 --- a/engines/m4/dialogs.cpp +++ b/engines/m4/dialogs.cpp @@ -452,7 +452,7 @@ void Dialog::draw() { // Set up the dialog fillRect(Common::Rect(0, 0, width(), height()), 3); - setColour(2); + setColor(2); hLine(1, width() - 1, height() - 2); // Bottom edge hLine(0, width(), height() - 1); vLine(width() - 2, 2, height()); // Right edge @@ -480,8 +480,8 @@ void Dialog::draw() { } // Handle drawing the text contents - _vm->_font->current()->setColours(7, 7, 7); - setColour(7); + _vm->_font->current()->setColors(7, 7, 7); + setColor(7); for (uint lineCtr = 0, yp = 5; lineCtr < _lines.size(); ++lineCtr, yp += _vm->_font->current()->getHeight() + 1) { diff --git a/engines/m4/events.cpp b/engines/m4/events.cpp index 29b243aceb..a9641eb542 100644 --- a/engines/m4/events.cpp +++ b/engines/m4/events.cpp @@ -257,7 +257,7 @@ bool Mouse::setCursorNum(int cursorIndex) { // Set the cursor to the sprite CursorMan.replaceCursor((const byte *)_cursor->getBasePtr(), _cursor->width(), _cursor->height(), - _cursor->xOffset, _cursor->yOffset, TRANSPARENT_COLOUR_INDEX); + _cursor->xOffset, _cursor->yOffset, TRANSPARENT_COLOR_INDEX); return true; } diff --git a/engines/m4/font.cpp b/engines/m4/font.cpp index 3ed419675d..582fbaebc7 100644 --- a/engines/m4/font.cpp +++ b/engines/m4/font.cpp @@ -159,14 +159,14 @@ Font::~Font() { } } -void Font::setColour(uint8 colour) { +void Font::setColor(uint8 color) { if (_sysFont) - _fontColors[1] = colour; + _fontColors[1] = color; else - _fontColors[3] = colour; + _fontColors[3] = color; } -void Font::setColours(uint8 col1, uint8 col2, uint8 col3) { +void Font::setColors(uint8 col1, uint8 col2, uint8 col3) { if (_sysFont) _fontColors[1] = col3; else { diff --git a/engines/m4/font.h b/engines/m4/font.h index 19d15faa1e..64e54f35b5 100644 --- a/engines/m4/font.h +++ b/engines/m4/font.h @@ -62,8 +62,8 @@ public: Font(MadsM4Engine *vm, const char *filename); ~Font(); - void setColour(uint8 colour); - void setColours(uint8 col1, uint8 col2, uint8 col3); + void setColor(uint8 color); + void setColors(uint8 col1, uint8 col2, uint8 col3); int32 getWidth(const char *text, int spaceWidth = -1); int32 getHeight() const { return _maxHeight; } diff --git a/engines/m4/graphics.cpp b/engines/m4/graphics.cpp index 5fc46d3881..a3eca13e1e 100644 --- a/engines/m4/graphics.cpp +++ b/engines/m4/graphics.cpp @@ -300,7 +300,7 @@ void M4Surface::drawSprite(int x, int y, SpriteInfo &info, const Common::Rect &c r = CLIP((info.palette[destPixel].r * pixel) >> 10, 0, 31); g = CLIP((info.palette[destPixel].g * pixel) >> 10, 0, 31); b = CLIP((info.palette[destPixel].b * pixel) >> 10, 0, 31); - pixel = info.inverseColourTable[(b << 10) | (g << 5) | r]; + pixel = info.inverseColorTable[(b << 10) | (g << 5) | r]; } } @@ -361,7 +361,7 @@ void M4Surface::fillRect(const Common::Rect &r, uint8 color) { } void M4Surface::copyFrom(M4Surface *src, const Common::Rect &srcBounds, int destX, int destY, - int transparentColour) { + int transparentColor) { // Validation of the rectangle and position if ((destX >= w) || (destY >= h)) return; @@ -390,13 +390,13 @@ void M4Surface::copyFrom(M4Surface *src, const Common::Rect &srcBounds, int dest byte *destPtr = (byte *)pixels + (destY * width()) + destX; for (int rowCtr = 0; rowCtr < copyRect.height(); ++rowCtr) { - if (transparentColour == -1) + if (transparentColor == -1) // No transparency, so copy line over Common::copy(srcPtr, srcPtr + copyRect.width(), destPtr); else { // Copy each byte one at a time checking for the transparency color for (int xCtr = 0; xCtr < copyRect.width(); ++xCtr) - if (srcPtr[xCtr] != transparentColour) destPtr[xCtr] = srcPtr[xCtr]; + if (srcPtr[xCtr] != transparentColor) destPtr[xCtr] = srcPtr[xCtr]; } srcPtr += src->width(); @@ -411,7 +411,7 @@ void M4Surface::copyFrom(M4Surface *src, const Common::Rect &srcBounds, int dest * the specified depth requirement on a secondary surface contain depth information */ void M4Surface::copyFrom(M4Surface *src, int destX, int destY, int depth, - M4Surface *depthsSurface, int scale, int transparentColour) { + M4Surface *depthsSurface, int scale, int transparentColor) { if (scale == 100) { // Copy the specified area @@ -443,7 +443,7 @@ void M4Surface::copyFrom(M4Surface *src, int destX, int destY, int depth, for (int rowCtr = 0; rowCtr < copyRect.height(); ++rowCtr) { // Copy each byte one at a time checking against the depth for (int xCtr = 0; xCtr < copyRect.width(); ++xCtr) { - if ((depth <= (depthsPtr[xCtr] & 0x7f)) && (srcPtr[xCtr] != transparentColour)) + if ((depth <= (depthsPtr[xCtr] & 0x7f)) && (srcPtr[xCtr] != transparentColor)) destPtr[xCtr] = srcPtr[xCtr]; } @@ -557,7 +557,7 @@ void M4Surface::copyFrom(M4Surface *src, int destX, int destY, int depth, // Not a display pixel continue; - if ((*srcP != transparentColour) && (depth <= (*depthP & 0x7f))) + if ((*srcP != transparentColor) && (depth <= (*depthP & 0x7f))) *destP = *srcP; ++destP; @@ -933,7 +933,7 @@ void M4Surface::translate(RGBList *list, bool isTransparent) { byte *palIndexes = list->palIndexes(); for (int i = 0; i < width() * height(); ++i, ++p) { - if (!isTransparent || (*p != TRANSPARENT_COLOUR_INDEX)) { + if (!isTransparent || (*p != TRANSPARENT_COLOR_INDEX)) { if (*p < list->size()) *p = palIndexes[*p]; else diff --git a/engines/m4/graphics.h b/engines/m4/graphics.h index d58ed69403..dbf6fac8c8 100644 --- a/engines/m4/graphics.h +++ b/engines/m4/graphics.h @@ -40,7 +40,7 @@ namespace M4 { #define MADS_SCREEN_HEIGHT 200 #define MADS_Y_OFFSET ((MADS_SCREEN_HEIGHT - MADS_SURFACE_HEIGHT) / 2) -#define TRANSPARENT_COLOUR_INDEX 0xFF +#define TRANSPARENT_COLOR_INDEX 0xFF struct BGR8 { uint8 b, g, r; @@ -89,7 +89,7 @@ struct SpriteInfo { int width, height; int scaleX, scaleY; uint8 encoding; - byte *inverseColourTable; + byte *inverseColorTable; RGB8 *palette; }; @@ -141,7 +141,6 @@ public: void madsLoadInterface(const Common::String &filename); void setColor(byte value) { _color = value; } - void setColour(byte value) { _color = value; } inline byte getColor() const { return _color; } void vLine(int x, int y1, int y2); void hLine(int x1, int x2, int y); @@ -173,9 +172,9 @@ public: void reset(); void frameRect(const Common::Rect &r, uint8 color); void fillRect(const Common::Rect &r, uint8 color); - void copyFrom(M4Surface *src, const Common::Rect &srcBounds, int destX, int destY, int transparentColour = -1); + void copyFrom(M4Surface *src, const Common::Rect &srcBounds, int destX, int destY, int transparentColor = -1); void copyFrom(M4Surface *src, int destX, int destY, int depth, M4Surface *depthSurface, - int scale, int transparentColour = -1); + int scale, int transparentColor = -1); void update() { if (_isScreen) { @@ -185,19 +184,19 @@ public: } // copyTo methods - inline void copyTo(M4Surface *dest, int transparentColour = -1) { - dest->copyFrom(this, Common::Rect(width(), height()), 0, 0, transparentColour); + inline void copyTo(M4Surface *dest, int transparentColor = -1) { + dest->copyFrom(this, Common::Rect(width(), height()), 0, 0, transparentColor); } - inline void copyTo(M4Surface *dest, int x, int y, int transparentColour = -1) { - dest->copyFrom(this, Common::Rect(width(), height()), x, y, transparentColour); + inline void copyTo(M4Surface *dest, int x, int y, int transparentColor = -1) { + dest->copyFrom(this, Common::Rect(width(), height()), x, y, transparentColor); } inline void copyTo(M4Surface *dest, const Common::Rect &srcBounds, int destX, int destY, - int transparentColour = -1) { - dest->copyFrom(this, srcBounds, destX, destY, transparentColour); + int transparentColor = -1) { + dest->copyFrom(this, srcBounds, destX, destY, transparentColor); } inline void copyTo(M4Surface *dest, int destX, int destY, int depth, M4Surface *depthsSurface, int scale, - int transparentColour = -1) { - dest->copyFrom(this, destX, destY, depth, depthsSurface, scale, transparentColour); + int transparentColor = -1) { + dest->copyFrom(this, destX, destY, depth, depthsSurface, scale, transparentColor); } void scrollX(int xAmount); diff --git a/engines/m4/gui.cpp b/engines/m4/gui.cpp index 8665b4e767..6619b37707 100644 --- a/engines/m4/gui.cpp +++ b/engines/m4/gui.cpp @@ -290,26 +290,26 @@ void MenuButton::onRefresh() { case OBJTYPE_SL_TEXT: switch (_objectState) { case OS_MOUSEOVER: - _vm->_font->current()->setColours(TEXT_COLOR_MOUSEOVER_SHADOW, TEXT_COLOR_MOUSEOVER_FOREGROUND, + _vm->_font->current()->setColors(TEXT_COLOR_MOUSEOVER_SHADOW, TEXT_COLOR_MOUSEOVER_FOREGROUND, TEXT_COLOR_MOUSEOVER_HILIGHT); sprite = sprites[SL_LINE_MOUSEOVER]; break; case OS_PRESSED: - _vm->_font->current()->setColours(TEXT_COLOR_PRESSED_SHADOW, TEXT_COLOR_PRESSED_FOREGROUND, + _vm->_font->current()->setColors(TEXT_COLOR_PRESSED_SHADOW, TEXT_COLOR_PRESSED_FOREGROUND, TEXT_COLOR_PRESSED_HILIGHT); sprite = sprites[SL_LINE_PRESSED]; break; case OS_GREYED: - _vm->_font->current()->setColours(TEXT_COLOR_GREYED_SHADOW, TEXT_COLOR_GREYED_FOREGROUND, + _vm->_font->current()->setColors(TEXT_COLOR_GREYED_SHADOW, TEXT_COLOR_GREYED_FOREGROUND, TEXT_COLOR_GREYED_HILIGHT); sprite = sprites[SL_LINE_NORMAL]; break; default: case OS_NORMAL: - _vm->_font->current()->setColours(TEXT_COLOR_NORMAL_SHADOW, TEXT_COLOR_NORMAL_FOREGROUND, + _vm->_font->current()->setColors(TEXT_COLOR_NORMAL_SHADOW, TEXT_COLOR_NORMAL_FOREGROUND, TEXT_COLOR_NORMAL_HILIGHT); sprite = sprites[SL_LINE_NORMAL]; break; @@ -955,7 +955,7 @@ void MenuTextField::onRefresh() { // Draw the text _vm->_font->setFont(FONT_MENU); - _vm->_font->current()->setColours(TEXT_COLOR_NORMAL_SHADOW, TEXT_COLOR_NORMAL_FOREGROUND, + _vm->_font->current()->setColors(TEXT_COLOR_NORMAL_SHADOW, TEXT_COLOR_NORMAL_FOREGROUND, TEXT_COLOR_NORMAL_HILIGHT); int xp = _bounds.left + 4; @@ -1140,7 +1140,7 @@ GUITextField::GUITextField(View *owner, const Common::Rect &bounds): GUIRect(own void GUITextField::onRefresh() { _parent->fillRect(_bounds, _vm->_palette->BLACK); - _vm->_font->current()->setColours(3, 3, 3); + _vm->_font->current()->setColors(3, 3, 3); _vm->_font->setFont(FONT_INTERFACE); _vm->_font->current()->writeString(_parent, _text.c_str(), _bounds.left, _bounds.top, 0, 1); } diff --git a/engines/m4/m4.cpp b/engines/m4/m4.cpp index 4cc2bf8783..d9a1bf940f 100644 --- a/engines/m4/m4.cpp +++ b/engines/m4/m4.cpp @@ -416,7 +416,7 @@ Common::Error M4Engine::run() { _scene->loadScene(_kernel->currentRoom); _ws->setBackgroundSurface(_scene->getBackgroundSurface()); - _ws->setInverseColourTable(scene()->getInverseColourTable()); + _ws->setInverseColorTable(scene()->getInverseColorTable()); _kernel->loadSectionScriptFunctions(); _kernel->loadRoomScriptFunctions(); @@ -554,7 +554,7 @@ Common::Error MadsEngine::run() { _scene->show(); _font->setFont(FONT_MAIN_MADS); - _font->current()->setColours(2, 1, 3); + _font->current()->setColors(2, 1, 3); _font->current()->writeString(_scene->getBackgroundSurface(), "Testing the M4/MADS ScummVM engine", 5, 160, 310, 2); _font->current()->writeString(_scene->getBackgroundSurface(), "ABCDEFGHIJKLMNOPQRSTUVWXYZ", 5, 180, 310, 2); diff --git a/engines/m4/m4_scene.cpp b/engines/m4/m4_scene.cpp index 738f414add..0ace40bfc5 100644 --- a/engines/m4/m4_scene.cpp +++ b/engines/m4/m4_scene.cpp @@ -41,7 +41,7 @@ namespace M4 { M4Scene::M4Scene(M4Engine *vm): _sceneResources(), Scene(vm, &_sceneResources) { _vm = vm; _sceneSprites = NULL; - _inverseColourTable = NULL; + _inverseColorTable = NULL; _sceneResources.hotspots = new HotSpotList(); _sceneResources.parallax = new HotSpotList(); @@ -110,15 +110,15 @@ void M4Scene::loadSceneResources(int sceneNumber) { } } -void M4Scene::loadSceneInverseColourTable(int sceneNumber) { +void M4Scene::loadSceneInverseColorTable(int sceneNumber) { char filename[kM4MaxFilenameSize]; Common::SeekableReadStream *iplS; sprintf(filename, "%i.ipl", sceneNumber); iplS = _vm->res()->openFile(filename); - delete[] _inverseColourTable; - _inverseColourTable = new byte[iplS->size()]; - iplS->read(_inverseColourTable, iplS->size()); + delete[] _inverseColorTable; + _inverseColorTable = new byte[iplS->size()]; + iplS->read(_inverseColorTable, iplS->size()); _vm->res()->toss(filename); } @@ -163,7 +163,7 @@ void M4Scene::loadScene(int sceneNumber) { loadSceneCodes(sceneNumber); // Load inverse color table file (*.IPL) - loadSceneInverseColourTable(sceneNumber); + loadSceneInverseColorTable(sceneNumber); if (_vm->getGameType() != GType_Burger) { // Load scene sprites file (*.SSB) @@ -202,7 +202,7 @@ void M4Scene::leaveScene() { _sceneResources.parallax->clear(); delete _sceneResources.parallax; - delete[] _inverseColourTable; + delete[] _inverseColorTable; Scene::leaveScene(); } diff --git a/engines/m4/m4_scene.h b/engines/m4/m4_scene.h index 2216779a3e..9c2edbc06c 100644 --- a/engines/m4/m4_scene.h +++ b/engines/m4/m4_scene.h @@ -53,11 +53,11 @@ private: M4SceneResources _sceneResources; SpriteAsset *_sceneSprites; SpriteAsset *_walkerSprite; - byte *_inverseColourTable; + byte *_inverseColorTable; void loadSceneSprites(int sceneNumber); void loadSceneResources(int sceneNumber); - void loadSceneInverseColourTable(int sceneNumber); + void loadSceneInverseColorTable(int sceneNumber); void loadSceneSpriteCodes(int sceneNumber); void nextCommonCursor(); public: @@ -75,7 +75,7 @@ public: virtual void update(); virtual void showHotSpots(); - byte *getInverseColourTable() const { return _inverseColourTable; } + byte *getInverseColorTable() const { return _inverseColorTable; } M4InterfaceView *getInterface() { return (M4InterfaceView *)_interfaceSurface; } M4SceneResources &getSceneResources() { return _sceneResources; } void setStatusText(const char *text); diff --git a/engines/m4/mads_anim.cpp b/engines/m4/mads_anim.cpp index 1d15cbbaf7..571a6fa899 100644 --- a/engines/m4/mads_anim.cpp +++ b/engines/m4/mads_anim.cpp @@ -60,7 +60,7 @@ TextviewView::TextviewView(MadsM4Engine *vm): _vm->_palette->setPalette(&palData[0], 4, 3); _vm->_palette->blockRange(4, 3); - _vm->_font->current()->setColours(5, 6, 4); + _vm->_font->current()->setColors(5, 6, 4); clear(); _bgSurface.clear(); diff --git a/engines/m4/mads_menus.cpp b/engines/m4/mads_menus.cpp index 91db7d343a..ba5e3fcb45 100644 --- a/engines/m4/mads_menus.cpp +++ b/engines/m4/mads_menus.cpp @@ -695,7 +695,7 @@ void RexDialogView::updateState() { void RexDialogView::onRefresh(RectList *rects, M4Surface *destSurface) { // Draw the framed base area fillRect(this->bounds(), _madsVm->_palette->BLACK); - setColour(2); + setColor(2); hLine(0, width(), MADS_Y_OFFSET - 2); hLine(0, width(), MADS_Y_OFFSET + MADS_SURFACE_HEIGHT + 2); @@ -943,20 +943,20 @@ void RexDialogView::refreshText() { if (!_dialogText[i].in_use) continue; - // Get the item's colours - uint colour; + // Get the item's colors + uint color; if (_dialogText[i].state == STATE_DESELECTED) - colour = 0xB0A; + color = 0xB0A; else if (_dialogText[i].state == STATE_SELECTED) - colour = 0xD0C; + color = 0xD0C; else - colour = 0xF0E; + color = 0xF0E; - // If there's an associated text display entry, check to see if it's colour needs to change + // If there's an associated text display entry, check to see if it's color needs to change if (_dialogText[i].textDisplay_index >= 0) { MadsTextDisplayEntry &tdEntry = _textDisplay[_dialogText[i].textDisplay_index]; - if ((tdEntry.colour1 == (colour & 0xff)) && (tdEntry.colour2 == (colour >> 8))) + if ((tdEntry.color1 == (color & 0xff)) && (tdEntry.color2 == (color >> 8))) // It's still the same, so no further action needed continue; @@ -967,7 +967,7 @@ void RexDialogView::refreshText() { // Create a new text display entry for the dialog text line _dialogText[i].textDisplay_index = _textDisplay.add(_dialogText[i].pos.x, _dialogText[i].pos.y, - colour, _dialogText[i].widthAdjust, _dialogText[i].text, _dialogText[i].font); + color, _dialogText[i].widthAdjust, _dialogText[i].text, _dialogText[i].font); } } diff --git a/engines/m4/mads_scene.cpp b/engines/m4/mads_scene.cpp index fd8a609b53..fd972cc6ea 100644 --- a/engines/m4/mads_scene.cpp +++ b/engines/m4/mads_scene.cpp @@ -855,13 +855,13 @@ MadsInterfaceView::~MadsInterfaceView() { void MadsInterfaceView::setFontMode(InterfaceFontMode newMode) { switch (newMode) { case ITEM_NORMAL: - _vm->_font->current()->setColours(4, 4, 0xff); + _vm->_font->current()->setColors(4, 4, 0xff); break; case ITEM_HIGHLIGHTED: - _vm->_font->current()->setColours(5, 5, 0xff); + _vm->_font->current()->setColors(5, 5, 0xff); break; case ITEM_SELECTED: - _vm->_font->current()->setColours(6, 6, 0xff); + _vm->_font->current()->setColors(6, 6, 0xff); break; } } @@ -939,7 +939,7 @@ void MadsInterfaceView::onRefresh(RectList *rects, M4Surface *destSurface) { int actionIndex = 0; for (int x = 0; x < 2; ++x) { for (int y = 0; y < 5; ++y, ++actionIndex) { - // Determine the font colour depending on whether an item is selected. Note that the first action, + // Determine the font color depending on whether an item is selected. Note that the first action, // 'Look', is always 'selected', even when another action is clicked on setFontMode((_highlightedElement == actionIndex) ? ITEM_HIGHLIGHTED : ((actionIndex == 0) ? ITEM_SELECTED : ITEM_NORMAL)); @@ -994,7 +994,7 @@ void MadsInterfaceView::onRefresh(RectList *rects, M4Surface *destSurface) { // Display object sprite. Note that the frame number isn't used directly, because it would result // in too fast an animation M4Sprite *spr = _objectSprites->getFrame(_objectFrameNumber / INV_ANIM_FRAME_SPEED); - spr->copyTo(destSurface, INVENTORY_X, INVENTORY_Y, TRANSPARENT_COLOUR_INDEX); + spr->copyTo(destSurface, INVENTORY_X, INVENTORY_Y, TRANSPARENT_COLOR_INDEX); if (!_madsVm->globals()->_config.invObjectsStill && !dialogVisible) { // If objects need to be animated, move to the next frame diff --git a/engines/m4/mads_views.cpp b/engines/m4/mads_views.cpp index cc127032eb..b4385dbead 100644 --- a/engines/m4/mads_views.cpp +++ b/engines/m4/mads_views.cpp @@ -244,10 +244,10 @@ void MadsAction::refresh() { } // Add a new text display entry to display the status text at the bottom of the screen area - uint colours = (_vm->getGameType() == GType_DragonSphere) ? 0x0300 : 0x0003; + uint colors = (_vm->getGameType() == GType_DragonSphere) ? 0x0300 : 0x0003; _statusTextIndex = _owner._textDisplay.add(160 - (strWidth / 2), - MADS_SURFACE_HEIGHT + _owner._posAdjust.y - 13, colours, textSpacing, _statusText, font); + MADS_SURFACE_HEIGHT + _owner._posAdjust.y - 13, colors, textSpacing, _statusText, font); } } @@ -616,7 +616,7 @@ void MadsTextDisplay::clear() { _entries[i].active = false; } -int MadsTextDisplay::add(int xp, int yp, uint fontColour, int charSpacing, const char *msg, Font *font) { +int MadsTextDisplay::add(int xp, int yp, uint fontColor, int charSpacing, const char *msg, Font *font) { int usedSlot = -1; for (int idx = 0; idx < TEXT_DISPLAY_SIZE; ++idx) { @@ -629,8 +629,8 @@ int MadsTextDisplay::add(int xp, int yp, uint fontColour, int charSpacing, const _entries[idx].msg = msg; _entries[idx].bounds.setWidth(font->getWidth(msg, charSpacing)); _entries[idx].bounds.setHeight(font->getHeight()); - _entries[idx].colour1 = fontColour & 0xff; - _entries[idx].colour2 = fontColour >> 8; + _entries[idx].color1 = fontColor & 0xff; + _entries[idx].color2 = fontColor >> 8; _entries[idx].spacing = charSpacing; _entries[idx].expire = 1; _entries[idx].active = true; @@ -666,7 +666,7 @@ void MadsTextDisplay::setDirtyAreas2() { void MadsTextDisplay::draw(M4Surface *view) { for (uint idx = 0; idx < _entries.size(); ++idx) { if (_entries[idx].active && (_entries[idx].expire >= 0)) { - _entries[idx].font->setColours(_entries[idx].colour1, _entries[idx].colour2, 0); + _entries[idx].font->setColors(_entries[idx].color1, _entries[idx].color2, 0); _entries[idx].font->writeString(view, _entries[idx].msg, _entries[idx].bounds.left, _entries[idx].bounds.top, _entries[idx].bounds.width(), _entries[idx].spacing); @@ -707,7 +707,7 @@ void MadsKernelMessageList::clear() { _talkFont = _vm->_font->getFont(FONT_CONVERSATION_MADS); } -int MadsKernelMessageList::add(const Common::Point &pt, uint fontColour, uint8 flags, uint8 abortTimers, uint32 timeout, const char *msg) { +int MadsKernelMessageList::add(const Common::Point &pt, uint fontColor, uint8 flags, uint8 abortTimers, uint32 timeout, const char *msg) { // Find a free slot uint idx = 0; while ((idx < _entries.size()) && ((_entries[idx].flags & KMSG_ACTIVE) != 0)) @@ -722,8 +722,8 @@ int MadsKernelMessageList::add(const Common::Point &pt, uint fontColour, uint8 f MadsKernelMessageEntry &rec = _entries[idx]; strcpy(rec.msg, msg); rec.flags = flags | KMSG_ACTIVE; - rec.colour1 = fontColour & 0xff; - rec.colour2 = fontColour >> 8; + rec.color1 = fontColor & 0xff; + rec.color2 = fontColor >> 8; rec.position = pt; rec.textDisplayIndex = -1; rec.timeout = timeout; @@ -918,7 +918,7 @@ void MadsKernelMessageList::processText(int msgIndex) { if (msg.textDisplayIndex < 0) { // Need to create a new text display entry for this message - int idx = _owner._textDisplay.add(x1, y1, msg.colour1 | (msg.colour2 << 8), _owner._textSpacing, msg.msg, _talkFont); + int idx = _owner._textDisplay.add(x1, y1, msg.color1 | (msg.color2 << 8), _owner._textSpacing, msg.msg, _talkFont); if (idx >= 0) msg.textDisplayIndex = idx; } diff --git a/engines/m4/mads_views.h b/engines/m4/mads_views.h index c93d0beda3..ce5ba9c4e5 100644 --- a/engines/m4/mads_views.h +++ b/engines/m4/mads_views.h @@ -174,8 +174,8 @@ public: int expire; int spacing; Common::Rect bounds; - uint8 colour1; - uint8 colour2; + uint8 color1; + uint8 color2; Font *font; const char *msg; @@ -201,7 +201,7 @@ public: _entries[idx].expire = -1; } - int add(int xp, int yp, uint fontColour, int charSpacing, const char *msg, Font *font); + int add(int xp, int yp, uint fontColor, int charSpacing, const char *msg, Font *font); void clear(); void draw(M4Surface *view); void setDirtyAreas(); @@ -221,8 +221,8 @@ public: int sequenceIndex; char asciiChar; char asciiChar2; - int colour1; - int colour2; + int color1; + int color2; Common::Point position; int textDisplayIndex; int msgOffset; @@ -251,7 +251,7 @@ public: MadsKernelMessageList(MadsView &owner); void clear(); - int add(const Common::Point &pt, uint fontColour, uint8 flags, uint8 abortTimers, uint32 timeout, const char *msg); + int add(const Common::Point &pt, uint fontColor, uint8 flags, uint8 abortTimers, uint32 timeout, const char *msg); int addQuote(int quoteId, int abortTimers, uint32 timeout); void scrollMessage(int msgIndex, int numTicks, bool quoted); void setSeqIndex(int msgIndex, int seqIndex); diff --git a/engines/m4/scene.cpp b/engines/m4/scene.cpp index 0f684ebced..c0cbd879b2 100644 --- a/engines/m4/scene.cpp +++ b/engines/m4/scene.cpp @@ -163,7 +163,7 @@ void Scene::showCodes() { // Show all the scene's walk nodes SceneNodeList &nodeList = _madsVm->scene()->getSceneResources()._nodes; - _backgroundSurface->setColour(_madsVm->_palette->WHITE); + _backgroundSurface->setColor(_madsVm->_palette->WHITE); for (uint i = 0; i < nodeList.size() - 2; ++i) { // Draw a little cross at the node's position _backgroundSurface->hLine(nodeList[i].pt.x - 2, nodeList[i].pt.x + 2, nodeList[i].pt.y); diff --git a/engines/m4/sprite.cpp b/engines/m4/sprite.cpp index 641b93baea..77528ec8a6 100644 --- a/engines/m4/sprite.cpp +++ b/engines/m4/sprite.cpp @@ -124,7 +124,7 @@ void M4Sprite::loadMadsSprite(Common::SeekableReadStream* source) { bool spriteEnd = false; // Set entire sprite contents to transparent pixels - fillRect(bounds(), TRANSPARENT_COLOUR_INDEX); + fillRect(bounds(), TRANSPARENT_COLOR_INDEX); // Major line loop for (int yp = 0; yp < h; ++yp) { @@ -153,7 +153,7 @@ void M4Sprite::loadMadsSprite(Common::SeekableReadStream* source) { byte v = source->readByte(); while (cmd-- > 0) { if (x2 < w) - *destP++ = (v == 0xFD) ? TRANSPARENT_COLOUR_INDEX : v; + *destP++ = (v == 0xFD) ? TRANSPARENT_COLOR_INDEX : v; ++x2; } } @@ -173,13 +173,13 @@ void M4Sprite::loadMadsSprite(Common::SeekableReadStream* source) { byte v = source->readByte(); while (cmd-- > 0) { if (x2 < w) { - *destP++ = (v == 0xFD) ? TRANSPARENT_COLOUR_INDEX : v; + *destP++ = (v == 0xFD) ? TRANSPARENT_COLOR_INDEX : v; } ++x2; } } else { // Handle writing out single pixel - *destP++ = (cmd == 0xFD) ? TRANSPARENT_COLOUR_INDEX : cmd; + *destP++ = (cmd == 0xFD) ? TRANSPARENT_COLOR_INDEX : cmd; ++x2; } } @@ -203,7 +203,7 @@ void M4Sprite::loadMadsSprite(Common::SeekableReadStream* source) { } byte M4Sprite::getTransparencyIndex() const { - return TRANSPARENT_COLOUR_INDEX; + return TRANSPARENT_COLOR_INDEX; } } // End of namespace M4 diff --git a/engines/m4/woodscript.h b/engines/m4/woodscript.h index 4b0f457193..a9a884a4b0 100644 --- a/engines/m4/woodscript.h +++ b/engines/m4/woodscript.h @@ -319,8 +319,8 @@ public: RGB8 *getMainPalette() const; - void setInverseColourTable(byte *inverseColourTable) { _inverseColourTable = inverseColourTable; } - byte *getInverseColourTable() const { return _inverseColourTable; } + void setInverseColorTable(byte *inverseColorTable) { _inverseColorTable = inverseColorTable; } + byte *getInverseColorTable() const { return _inverseColorTable; } protected: MadsM4Engine *_vm; @@ -338,7 +338,7 @@ protected: /* Misc */ int16 *_depthTable; - byte *_inverseColourTable; + byte *_inverseColorTable; M4Surface *_backgroundSurface; View *_surfaceView; diff --git a/engines/m4/ws_sequence.cpp b/engines/m4/ws_sequence.cpp index bb6230d041..3ee496da0d 100644 --- a/engines/m4/ws_sequence.cpp +++ b/engines/m4/ws_sequence.cpp @@ -291,7 +291,7 @@ void Sequence::draw(M4Surface *surface, const Common::Rect &clipRect, Common::Re info.hotX = _curFrame->xOffset; info.hotY = _curFrame->yOffset; info.encoding = _curFrame->encoding; - info.inverseColourTable = _m4Vm->scene()->getInverseColourTable(); + info.inverseColorTable = _m4Vm->scene()->getInverseColorTable(); info.palette = _ws->getMainPalette(); info.width = _curFrame->width(); info.height = _curFrame->height(); diff --git a/engines/sky/compact.cpp b/engines/sky/compact.cpp index 78884e96dc..08184adcdb 100644 --- a/engines/sky/compact.cpp +++ b/engines/sky/compact.cpp @@ -85,7 +85,7 @@ static const uint32 compactOffsets[] = { MK16(Compact, alt), MK16(Compact, request), MK16(Compact, spWidth_xx), - MK16(Compact, spColour), + MK16(Compact, spColor), MK16(Compact, spTextId), MK16(Compact, spTime), MK16(Compact, arAnimIndex), diff --git a/engines/sky/control.cpp b/engines/sky/control.cpp index 55ba6039c3..8a5409a488 100644 --- a/engines/sky/control.cpp +++ b/engines/sky/control.cpp @@ -1275,7 +1275,7 @@ void Control::importOldCompact(Compact* destCpt, uint8 **srcPos, uint16 numElems LODSW(*srcPos, destCpt->alt); LODSW(*srcPos, destCpt->request); LODSW(*srcPos, destCpt->spWidth_xx); - LODSW(*srcPos, destCpt->spColour); + LODSW(*srcPos, destCpt->spColor); LODSW(*srcPos, destCpt->spTextId); LODSW(*srcPos, destCpt->spTime); LODSW(*srcPos, destCpt->arAnimIndex); diff --git a/engines/sky/logic.cpp b/engines/sky/logic.cpp index 1c1e2c9682..b52e908455 100644 --- a/engines/sky/logic.cpp +++ b/engines/sky/logic.cpp @@ -1823,7 +1823,7 @@ bool Logic::fnHighlight(uint32 itemNo, uint32 pen, uint32 c) { pen += 241; Compact *textCompact = _skyCompact->fetchCpt(itemNo); uint8 *sprData = (uint8 *)SkyEngine::fetchItem(textCompact->flag); - _skyText->changeTextSpriteColour(sprData, (uint8)pen); + _skyText->changeTextSpriteColor(sprData, (uint8)pen); return true; } @@ -2547,7 +2547,7 @@ void Logic::stdSpeak(Compact *target, uint32 textNum, uint32 animNum, uint32 bas // form the text sprite, if player wants subtitles or // if we couldn't find the speech file DisplayedText textInfo; - textInfo = _skyText->lowTextManager(textNum, FIXED_TEXT_WIDTH, 0, (uint8)target->spColour, true); + textInfo = _skyText->lowTextManager(textNum, FIXED_TEXT_WIDTH, 0, (uint8)target->spColor, true); Compact *textCompact = _skyCompact->fetchCpt(textInfo.compactNum); target->spTextId = textInfo.compactNum; //So we know what text to kill byte *textGfx = textInfo.textData; diff --git a/engines/sky/screen.cpp b/engines/sky/screen.cpp index a77017de38..1b815b9c38 100644 --- a/engines/sky/screen.cpp +++ b/engines/sky/screen.cpp @@ -38,7 +38,7 @@ namespace Sky { -uint8 Screen::_top16Colours[16*3] = { +uint8 Screen::_top16Colors[16*3] = { 0, 0, 0, 38, 38, 38, 63, 63, 63, @@ -63,7 +63,7 @@ Screen::Screen(OSystem *pSystem, Disk *pDisk, SkyCompact *skyCompact) { _skyCompact = skyCompact; int i; - uint8 tmpPal[VGA_COLOURS * 3]; + uint8 tmpPal[VGA_COLORS * 3]; _gameGrid = (uint8 *)malloc(GRID_X * GRID_Y * 2); forceRefresh(); @@ -72,17 +72,17 @@ Screen::Screen(OSystem *pSystem, Disk *pDisk, SkyCompact *skyCompact) { _scrollScreen = NULL; //blank the first 240 colors of the palette - memset(tmpPal, 0, GAME_COLOURS * 3); + memset(tmpPal, 0, GAME_COLORS * 3); //set the remaining colors - for (i = 0; i < (VGA_COLOURS-GAME_COLOURS); i++) { - tmpPal[3 * GAME_COLOURS + i * 3 + 0] = (_top16Colours[i * 3 + 0] << 2) + (_top16Colours[i * 3 + 0] >> 4); - tmpPal[3 * GAME_COLOURS + i * 3 + 1] = (_top16Colours[i * 3 + 1] << 2) + (_top16Colours[i * 3 + 1] >> 4); - tmpPal[3 * GAME_COLOURS + i * 3 + 2] = (_top16Colours[i * 3 + 2] << 2) + (_top16Colours[i * 3 + 2] >> 4); + for (i = 0; i < (VGA_COLORS-GAME_COLORS); i++) { + tmpPal[3 * GAME_COLORS + i * 3 + 0] = (_top16Colors[i * 3 + 0] << 2) + (_top16Colors[i * 3 + 0] >> 4); + tmpPal[3 * GAME_COLORS + i * 3 + 1] = (_top16Colors[i * 3 + 1] << 2) + (_top16Colors[i * 3 + 1] >> 4); + tmpPal[3 * GAME_COLORS + i * 3 + 2] = (_top16Colors[i * 3 + 2] << 2) + (_top16Colors[i * 3 + 2] >> 4); } //set the palette - _system->getPaletteManager()->setPalette(tmpPal, 0, VGA_COLOURS); + _system->getPaletteManager()->setPalette(tmpPal, 0, VGA_COLORS); _currentPalette = 0; _seqInfo.nextFrame = _seqInfo.framesLeft = 0; @@ -109,32 +109,32 @@ void Screen::setFocusRectangle(const Common::Rect& rect) { //set a new palette, pal is a pointer to dos vga rgb components 0..63 void Screen::setPalette(uint8 *pal) { convertPalette(pal, _palette); - _system->getPaletteManager()->setPalette(_palette, 0, GAME_COLOURS); + _system->getPaletteManager()->setPalette(_palette, 0, GAME_COLORS); _system->updateScreen(); } void Screen::setPaletteEndian(uint8 *pal) { #ifdef SCUMM_BIG_ENDIAN - uint8 endPalette[VGA_COLOURS * 3]; - for (uint16 cnt = 0; cnt < VGA_COLOURS * 3; cnt++) + uint8 endPalette[VGA_COLORS * 3]; + for (uint16 cnt = 0; cnt < VGA_COLORS * 3; cnt++) endPalette[cnt] = pal[cnt ^ 1]; convertPalette(endPalette, _palette); #else convertPalette(pal, _palette); #endif - _system->getPaletteManager()->setPalette(_palette, 0, GAME_COLOURS); + _system->getPaletteManager()->setPalette(_palette, 0, GAME_COLORS); _system->updateScreen(); } void Screen::halvePalette() { - uint8 halfPalette[VGA_COLOURS * 3]; + uint8 halfPalette[VGA_COLORS * 3]; - for (uint8 cnt = 0; cnt < GAME_COLOURS; cnt++) { + for (uint8 cnt = 0; cnt < GAME_COLORS; cnt++) { halfPalette[cnt * 3 + 0] = _palette[cnt * 3 + 0] >> 1; halfPalette[cnt * 3 + 1] = _palette[cnt * 3 + 1] >> 1; halfPalette[cnt * 3 + 2] = _palette[cnt * 3 + 2] >> 1; } - _system->getPaletteManager()->setPalette(halfPalette, 0, GAME_COLOURS); + _system->getPaletteManager()->setPalette(halfPalette, 0, GAME_COLORS); } void Screen::setPalette(uint16 fileNum) { @@ -168,7 +168,7 @@ void Screen::showScreen(uint8 *pScreen) { void Screen::convertPalette(uint8 *inPal, uint8* outPal) { int i; - for (i = 0; i < VGA_COLOURS; i++) { + for (i = 0; i < VGA_COLORS; i++) { outPal[3 * i + 0] = (inPal[3 * i + 0] << 2) + (inPal[3 * i + 0] >> 4); outPal[3 * i + 1] = (inPal[3 * i + 1] << 2) + (inPal[3 * i + 1] >> 4); outPal[3 * i + 2] = (inPal[3 * i + 2] << 2) + (inPal[3 * i + 2] >> 4); @@ -247,8 +247,8 @@ void Screen::fnFadeDown(uint32 scroll) { uint32 delayTime = _system->getMillis(); for (uint8 cnt = 0; cnt < 32; cnt++) { delayTime += 20; - palette_fadedown_helper(_palette, GAME_COLOURS); - _system->getPaletteManager()->setPalette(_palette, 0, GAME_COLOURS); + palette_fadedown_helper(_palette, GAME_COLORS); + _system->getPaletteManager()->setPalette(_palette, 0, GAME_COLORS); _system->updateScreen(); int32 waitTime = (int32)delayTime - _system->getMillis(); if (waitTime < 0) @@ -296,7 +296,7 @@ void Screen::paletteFadeUp(uint16 fileNr) { } void Screen::paletteFadeUp(uint8 *pal) { - byte tmpPal[VGA_COLOURS * 3]; + byte tmpPal[VGA_COLORS * 3]; convertPalette(pal, tmpPal); @@ -304,13 +304,13 @@ void Screen::paletteFadeUp(uint8 *pal) { for (uint8 cnt = 1; cnt <= 32; cnt++) { delayTime += 20; - for (uint8 colCnt = 0; colCnt < GAME_COLOURS; colCnt++) { + for (uint8 colCnt = 0; colCnt < GAME_COLORS; colCnt++) { _palette[colCnt * 3 + 0] = (tmpPal[colCnt * 3 + 0] * cnt) >> 5; _palette[colCnt * 3 + 1] = (tmpPal[colCnt * 3 + 1] * cnt) >> 5; _palette[colCnt * 3 + 2] = (tmpPal[colCnt * 3 + 2] * cnt) >> 5; } - _system->getPaletteManager()->setPalette(_palette, 0, GAME_COLOURS); + _system->getPaletteManager()->setPalette(_palette, 0, GAME_COLORS); _system->updateScreen(); int32 waitTime = (int32)delayTime - _system->getMillis(); @@ -331,8 +331,8 @@ void Screen::fnFadeUp(uint32 palNum, uint32 scroll) { if (palette == NULL) error("Screen::fnFadeUp: can't fetch compact %X", palNum); #ifdef SCUMM_BIG_ENDIAN - byte tmpPal[VGA_COLOURS * 3]; - for (uint16 cnt = 0; cnt < VGA_COLOURS * 3; cnt++) + byte tmpPal[VGA_COLORS * 3]; + for (uint16 cnt = 0; cnt < VGA_COLORS * 3; cnt++) tmpPal[cnt] = palette[cnt ^ 1]; paletteFadeUp(tmpPal); #else diff --git a/engines/sky/screen.h b/engines/sky/screen.h index 69a9a2fc8f..2c870ebd89 100644 --- a/engines/sky/screen.h +++ b/engines/sky/screen.h @@ -44,8 +44,8 @@ struct Compact; struct DataFileHeader; #define SCROLL_JUMP 16 -#define VGA_COLOURS 256 -#define GAME_COLOURS 240 +#define VGA_COLORS 256 +#define GAME_COLORS 240 #define FORE 1 #define BACK 0 @@ -100,8 +100,8 @@ private: OSystem *_system; Disk *_skyDisk; SkyCompact *_skyCompact; - static uint8 _top16Colours[16 * 3]; - uint8 _palette[VGA_COLOURS * 3]; + static uint8 _top16Colors[16 * 3]; + uint8 _palette[VGA_COLORS * 3]; uint32 _currentPalette; uint8 _seqGrid[20 * 12]; diff --git a/engines/sky/skydefs.h b/engines/sky/skydefs.h index f68c0f826b..e3f3f3101f 100644 --- a/engines/sky/skydefs.h +++ b/engines/sky/skydefs.h @@ -92,7 +92,7 @@ namespace Sky { #define C_BASE_MODE 0 #define C_BASE_MODE56 56 #define C_ACTION_MODE 4 -#define C_SP_COLOUR 90 +#define C_SP_COLOR 90 #define C_MEGA_SET 112 #define C_GRID_WIDTH 114 #define C_ANIM_UP 122 @@ -141,7 +141,7 @@ namespace Sky { #define L_WAIT_SYNC 15 #define L_SIMPLE_MOD 16 -// characters with own colour set +// characters with own color set #define SP_COL_FOSTER 194 #define SP_COL_JOEY 216 #define SP_COL_JOBS 209 diff --git a/engines/sky/struc.h b/engines/sky/struc.h index 295e31d9b0..987f074ed1 100644 --- a/engines/sky/struc.h +++ b/engines/sky/struc.h @@ -37,9 +37,9 @@ struct DisplayedText { #include "common/pack-start.h" // START STRUCT PACKING struct DataFileHeader { - uint16 flag; // bit 0: set for colour data, clear for not + uint16 flag; // bit 0: set for color data, clear for not // bit 1: set for compressed, clear for uncompressed - // bit 2: set for 32 colours, clear for 16 colours + // bit 2: set for 32 colors, clear for 16 colors uint16 s_x; uint16 s_y; uint16 s_width; @@ -139,7 +139,7 @@ struct Compact { uint16 request; // 42 uint16 spWidth_xx; // 43 - uint16 spColour; // 44 + uint16 spColor; // 44 uint16 spTextId; // 45 uint16 spTime; // 46 diff --git a/engines/sky/text.cpp b/engines/sky/text.cpp index 73c376dbbe..7abece594a 100644 --- a/engines/sky/text.cpp +++ b/engines/sky/text.cpp @@ -405,7 +405,7 @@ DisplayedText Text::lowTextManager(uint32 textNum, uint16 width, uint16 logicNum return textInfo; } -void Text::changeTextSpriteColour(uint8 *sprData, uint8 newCol) { +void Text::changeTextSpriteColor(uint8 *sprData, uint8 newCol) { DataFileHeader *header = (DataFileHeader *)sprData; sprData += sizeof(DataFileHeader); for (uint16 cnt = 0; cnt < header->s_sp_size; cnt++) diff --git a/engines/sky/text.h b/engines/sky/text.h index 890cfb2e47..c48d92d24b 100644 --- a/engines/sky/text.h +++ b/engines/sky/text.h @@ -59,7 +59,7 @@ public: void fnTextModule(uint32 textInfoId, uint32 textNo); void fnPointerText(uint32 pointedId, uint16 mouseX, uint16 mouseY); void logicCursor(Compact *textCompact, uint16 mouseX, uint16 mouseY); - void changeTextSpriteColour(uint8 *sprData, uint8 newCol); + void changeTextSpriteColor(uint8 *sprData, uint8 newCol); uint32 giveCurrentCharSet(); uint32 _numLetters; //no of chars in message diff --git a/engines/sword1/menu.cpp b/engines/sword1/menu.cpp index 34f6daf276..582bea82f8 100644 --- a/engines/sword1/menu.cpp +++ b/engines/sword1/menu.cpp @@ -309,7 +309,7 @@ void Menu::buildMenu() { if (Logic::_scriptVars[MENU_LOOKING] || _subjectBarStatus == MENU_OPEN) { // either we're in the chooser or we're doing a 'LOOK AT' if ((!objHeld) || (objHeld == _menuList[menuSlot])) _objects[menuSlot]->setSelect(true); - } else if (Logic::_scriptVars[SECOND_ITEM]) { // clicked luggage onto 2nd icon - we need to colour-highlight the 2 relevant icons & grey out the rest + } else if (Logic::_scriptVars[SECOND_ITEM]) { // clicked luggage onto 2nd icon - we need to color-highlight the 2 relevant icons & grey out the rest if ((_menuList[menuSlot] == objHeld) || (_menuList[menuSlot] == Logic::_scriptVars[SECOND_ITEM])) _objects[menuSlot]->setSelect(true); } else { // this object is selected - ie. GREYED OUT 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; } diff --git a/engines/tinsel/actors.cpp b/engines/tinsel/actors.cpp index 7a1f9fbf55..1d25723a35 100644 --- a/engines/tinsel/actors.cpp +++ b/engines/tinsel/actors.cpp @@ -108,7 +108,7 @@ struct ACTORINFO { bool bEscOn; int escEvent; - COLORREF textColour; // Text colour + COLORREF textColor; // Text color SCNHANDLE playFilm; // revert to this after talks SCNHANDLE talkFilm; // this be deleted in the future! @@ -140,7 +140,7 @@ typedef TAGACTOR *PTAGACTOR; static ACTORINFO *actorInfo = NULL; -static COLORREF defaultColour = 0; // Text colour +static COLORREF defaultColor = 0; // Text color static bool bActorsOn = false; @@ -479,13 +479,13 @@ void DropActors() { for (int i = 0; i < NumActors; i++) { if (TinselV2) { - // Save text colour - COLORREF tColour = actorInfo[i].textColour; + // Save text color + COLORREF tColor = actorInfo[i].textColor; memset(&actorInfo[i], 0, sizeof(ACTORINFO)); - // Restor text colour - actorInfo[i].textColour = tColour; + // Restor text color + actorInfo[i].textColor = tColor; // Clear extra arrays memset(zFactors, 0, NumActors); @@ -1278,7 +1278,7 @@ void SetMoverZ(PMOVER pMover, int y, int32 zFactor) { /** * Stores actor's attributes. - * Currently only the speech colours. + * Currently only the speech colors. */ void storeActorAttr(int ano, int r1, int g1, int b1) { assert((ano > 0 && ano <= NumActors) || ano == -1); // illegal actor number @@ -1288,36 +1288,36 @@ void storeActorAttr(int ano, int r1, int g1, int b1) { if (b1 > MAX_INTENSITY) b1 = MAX_INTENSITY; // } if (ano == -1) - defaultColour = TINSEL_RGB(r1, g1, b1); + defaultColor = TINSEL_RGB(r1, g1, b1); else - actorInfo[ano - 1].textColour = TINSEL_RGB(r1, g1, b1); + actorInfo[ano - 1].textColor = TINSEL_RGB(r1, g1, b1); } /** - * Called from ActorRGB() - Stores actor's speech colour. + * Called from ActorRGB() - Stores actor's speech color. */ -void SetActorRGB(int ano, COLORREF colour) { +void SetActorRGB(int ano, COLORREF color) { assert(ano >= 0 && ano <= NumActors); if (ano) - actorInfo[ano - 1].textColour = TO_LE_32(colour); + actorInfo[ano - 1].textColor = TO_LE_32(color); else - defaultColour = TO_LE_32(colour); + defaultColor = TO_LE_32(color); } /** - * Get the actor's stored speech colour. + * Get the actor's stored speech color. * @param ano Actor Id */ COLORREF GetActorRGB(int ano) { // Not used in JAPAN version assert((ano >= -1) && (ano <= NumActors)); // illegal actor number - if ((ano == -1) || !actorInfo[ano - 1].textColour) - return defaultColour; + if ((ano == -1) || !actorInfo[ano - 1].textColor) + return defaultColor; else - return actorInfo[ano - 1].textColour; + return actorInfo[ano - 1].textColor; } /** diff --git a/engines/tinsel/actors.h b/engines/tinsel/actors.h index fbad5d9955..2be42b00e6 100644 --- a/engines/tinsel/actors.h +++ b/engines/tinsel/actors.h @@ -109,7 +109,7 @@ void ActorEvent(int ano, TINSEL_EVENT event, PLR_EVENT be); void storeActorAttr(int ano, int r1, int g1, int b1); COLORREF GetActorRGB(int ano); -void SetActorRGB(int ano, COLORREF colour); +void SetActorRGB(int ano, COLORREF color); void SetActorZfactor(int ano, uint32 zFactor); uint32 GetActorZfactor(int ano); diff --git a/engines/tinsel/background.cpp b/engines/tinsel/background.cpp index f895ecd2da..50b7ff90f5 100644 --- a/engines/tinsel/background.cpp +++ b/engines/tinsel/background.cpp @@ -51,8 +51,8 @@ void InitBackground(const BACKGND *pBgnd) { // set current background pCurBgnd = pBgnd; - // init background sky colour - SetBgndColour(pBgnd->rgbSkyColour); + // init background sky color + SetBgndColor(pBgnd->rgbSkyColor); // start of playfield array pPlayfield = pBgnd->fieldArray; diff --git a/engines/tinsel/background.h b/engines/tinsel/background.h index d0b27e6e40..774a7b286d 100644 --- a/engines/tinsel/background.h +++ b/engines/tinsel/background.h @@ -60,7 +60,7 @@ struct PLAYFIELD { /** multi-playfield background structure - a backgnd is a container of playfields */ struct BACKGND { - COLORREF rgbSkyColour; ///< background sky colour + COLORREF rgbSkyColor; ///< background sky color Common::Point ptInitWorld; ///< initial world position Common::Rect rcScrollLimits; ///< scroll limits int refreshRate; ///< background update process refresh rate diff --git a/engines/tinsel/bg.cpp b/engines/tinsel/bg.cpp index 68653b16f4..747fdfe93c 100644 --- a/engines/tinsel/bg.cpp +++ b/engines/tinsel/bg.cpp @@ -158,7 +158,7 @@ static void BGmainProcess(CORO_PARAM, const void *param) { FadeInFast(NULL); bDoFadeIn = false; } else if (TinselV2) - PokeInTagColour(); + PokeInTagColor(); for (;;) { for (int i = 0; i < bgReels; i++) { diff --git a/engines/tinsel/bmv.cpp b/engines/tinsel/bmv.cpp index b5b84ceaee..bbccb079b6 100644 --- a/engines/tinsel/bmv.cpp +++ b/engines/tinsel/bmv.cpp @@ -81,7 +81,7 @@ namespace Tinsel { #define BIT0 0x01 #define CD_XSCR 0x04 // Screen has a scroll offset -#define CD_CMAP 0x08 // Colour map is included +#define CD_CMAP 0x08 // Color map is included #define CD_CMND 0x10 // Command is included #define CD_AUDIO 0x20 // Audio data is included #define CD_EXTEND 0x40 // Extended modes "A"-"z" @@ -350,7 +350,7 @@ BMVPlayer::BMVPlayer() { memset(texts, 0, sizeof(texts)); - talkColour = 0; + talkColor = 0; bigProblemCount = 0; bIsText = 0; movieTick = 0; @@ -382,8 +382,8 @@ void BMVPlayer::MoviePalette(int paletteOffset) { UpdateDACqueue(1, 255, &moviePal[1]); // Don't clobber talk - if (talkColour != 0) - SetTextPal(talkColour); + if (talkColor != 0) + SetTextPal(talkColor); } void BMVPlayer::InitialiseMovieSound() { @@ -490,7 +490,7 @@ void BMVPlayer::BmvDrawText(bool bDraw) { |-------------------------------------------------------| \*-----------------------------------------------------*/ -void BMVPlayer::MovieText(CORO_PARAM, int stringId, int x, int y, int fontId, COLORREF *pTalkColour, int duration) { +void BMVPlayer::MovieText(CORO_PARAM, int stringId, int x, int y, int fontId, COLORREF *pTalkColor, int duration) { SCNHANDLE hFont; int index; @@ -502,8 +502,8 @@ void BMVPlayer::MovieText(CORO_PARAM, int stringId, int x, int y, int fontId, CO } else { // It's a 'talk' - if (pTalkColour != NULL) - SetTextPal(*pTalkColour); + if (pTalkColor != NULL) + SetTextPal(*pTalkColor); hFont = GetTalkFontHandle(); index = 1; } @@ -541,13 +541,13 @@ int BMVPlayer::MovieCommand(char cmd, int commandOffset) { } else { if (_vm->_config->_useSubtitles) { TALK_CMD *pCmd = (TALK_CMD *)(bigBuffer + commandOffset); - talkColour = TINSEL_RGB(pCmd->r, pCmd->g, pCmd->b); + talkColor = TINSEL_RGB(pCmd->r, pCmd->g, pCmd->b); MovieText(nullContext, (int16)READ_LE_UINT16(&pCmd->stringId), (int16)READ_LE_UINT16(&pCmd->x), (int16)READ_LE_UINT16(&pCmd->y), 0, - &talkColour, + &talkColor, pCmd->duration); } return sz_CMD_TALK_pkt; @@ -693,7 +693,7 @@ void BMVPlayer::InitialiseBMV() { bFileEnd = false; blobsInBuffer = 0; memset(texts, 0, sizeof(texts)); - talkColour = 0; + talkColor = 0; bigProblemCount = 0; movieTick = 0; diff --git a/engines/tinsel/bmv.h b/engines/tinsel/bmv.h index 99a43e0740..d90d68fc13 100644 --- a/engines/tinsel/bmv.h +++ b/engines/tinsel/bmv.h @@ -96,7 +96,7 @@ class BMVPlayer { int dieFrame; } texts[2]; - COLORREF talkColour; + COLORREF talkColor; int bigProblemCount; @@ -143,7 +143,7 @@ private: void MovieAudio(int audioOffset, int blobs); void FettleMovieText(); void BmvDrawText(bool bDraw); - void MovieText(CORO_PARAM, int stringId, int x, int y, int fontId, COLORREF *pTalkColour, int duration); + void MovieText(CORO_PARAM, int stringId, int x, int y, int fontId, COLORREF *pTalkColor, int duration); int MovieCommand(char cmd, int commandOffset); int FollowingPacket(int thisPacket, bool bReallyImportant); void LoadSlots(int number); diff --git a/engines/tinsel/dialogs.cpp b/engines/tinsel/dialogs.cpp index 73cad7a68f..64e54ada72 100644 --- a/engines/tinsel/dialogs.cpp +++ b/engines/tinsel/dialogs.cpp @@ -449,7 +449,7 @@ static bool bMoveOnUnHide; // Set before start of conversation //----- Data pertinant to configure (incl. load/save game) ----- -#define COL_MAINBOX TBLUE1 // Base blue colour +#define COL_MAINBOX TBLUE1 // Base blue color #define COL_BOX TBLUE1 #define COL_HILIGHT TBLUE4 @@ -1639,7 +1639,7 @@ static void Select(int i, bool force) { switch (cd.box[i].boxType) { case RGROUP: iconArray[HL2] = RectangleObject(BgPal(), - (TinselV2 ? HighlightColour() : COL_HILIGHT), cd.box[i].w, cd.box[i].h); + (TinselV2 ? HighlightColor() : COL_HILIGHT), cd.box[i].w, cd.box[i].h); MultiInsertObject(GetPlayfieldList(FIELD_STATUS), iconArray[HL2]); MultiSetAniXY(iconArray[HL2], InvD[ino].inventoryX + cd.box[i].xpos, @@ -2277,7 +2277,7 @@ static void InvBoxes(bool InBody, int curX, int curY) { cd.box[cd.pointBox].boxType == AATBUT || cd.box[cd.pointBox].boxType == AABUT) { iconArray[HL1] = RectangleObject(BgPal(), - (TinselV2 ? HighlightColour() : COL_HILIGHT), + (TinselV2 ? HighlightColor() : COL_HILIGHT), cd.box[cd.pointBox].w, cd.box[cd.pointBox].h); MultiInsertObject(GetPlayfieldList(FIELD_STATUS), iconArray[HL1]); MultiSetAniXY(iconArray[HL1], @@ -2736,7 +2736,7 @@ static void AddBox(int *pi, const int i) { break; // Give us a box - iconArray[*pi] = RectangleObject(BgPal(), TinselV2 ? BoxColour() : COL_BOX, + iconArray[*pi] = RectangleObject(BgPal(), TinselV2 ? BoxColor() : COL_BOX, cd.box[i].w, cd.box[i].h); MultiInsertObject(GetPlayfieldList(FIELD_STATUS), iconArray[*pi]); MultiSetAniXY(iconArray[*pi], x, y); diff --git a/engines/tinsel/faders.cpp b/engines/tinsel/faders.cpp index a82285b12f..99a8b9ff14 100644 --- a/engines/tinsel/faders.cpp +++ b/engines/tinsel/faders.cpp @@ -37,7 +37,7 @@ namespace Tinsel { /** structure used by the "FadeProcess" process */ struct FADE { - const long *pColourMultTable; // list of fixed point colour multipliers - terminated with negative entry + const long *pColorMultTable; // list of fixed point color multipliers - terminated with negative entry PALQ *pPalQ; // palette queue entry to fade }; @@ -46,42 +46,42 @@ struct FADE { //const long fadein[] = {0, 0x1000, 0x3000, 0x5000, 0x7000, 0x9000, 0xb000, 0xd000, 0x10000L, -1}; /** - * Scale 'colour' by the fixed point colour multiplier 'colourMult' - * @param colour Colour to scale - * @param colourMult Fixed point multiplier + * Scale 'color' by the fixed point color multiplier 'colorMult' + * @param color Color to scale + * @param colorMult Fixed point multiplier */ -static COLORREF ScaleColour(COLORREF colour, uint32 colourMult) { +static COLORREF ScaleColor(COLORREF color, uint32 colorMult) { // apply multiplier to RGB components - uint32 red = ((TINSEL_GetRValue(colour) * colourMult) << 8) >> 24; - uint32 green = ((TINSEL_GetGValue(colour) * colourMult) << 8) >> 24; - uint32 blue = ((TINSEL_GetBValue(colour) * colourMult) << 8) >> 24; + uint32 red = ((TINSEL_GetRValue(color) * colorMult) << 8) >> 24; + uint32 green = ((TINSEL_GetGValue(color) * colorMult) << 8) >> 24; + uint32 blue = ((TINSEL_GetBValue(color) * colorMult) << 8) >> 24; - // return new colour + // return new color return TINSEL_RGB(red, green, blue); } /** - * Applies the fixed point multiplier 'mult' to all colours in - * 'pOrig' to produce 'pNew'. Each colour in the palette will be + * Applies the fixed point multiplier 'mult' to all colors in + * 'pOrig' to produce 'pNew'. Each color in the palette will be * multiplied by 'mult'. * @param pNew Pointer to new palette * @param pOrig Pointer to original palette - * @param numColours Number of colours in the above palettes + * @param numColors Number of colors in the above palettes * @param mult Fixed point multiplier */ -static void FadePalette(COLORREF *pNew, COLORREF *pOrig, int numColours, uint32 mult) { - for (int i = 0; i < numColours; i++, pNew++, pOrig++) { +static void FadePalette(COLORREF *pNew, COLORREF *pOrig, int numColors, uint32 mult) { + for (int i = 0; i < numColors; i++, pNew++, pOrig++) { if (!TinselV2) // apply multiplier to RGB components - *pNew = ScaleColour(*pOrig, mult); - else if (i == (TalkColour() - 1)) { - *pNew = GetTalkColourRef(); - *pNew = ScaleColour(*pNew, mult); - } else if (SysVar(SV_TAGCOLOUR) && i == (SysVar(SV_TAGCOLOUR) - 1)) { + *pNew = ScaleColor(*pOrig, mult); + else if (i == (TalkColor() - 1)) { + *pNew = GetTalkColorRef(); + *pNew = ScaleColor(*pNew, mult); + } else if (SysVar(SV_TAGCOLOR) && i == (SysVar(SV_TAGCOLOR) - 1)) { *pNew = GetTagColorRef(); - *pNew = ScaleColour(*pNew, mult); + *pNew = ScaleColor(*pNew, mult); } else { - *pNew = ScaleColour(*pOrig, mult); + *pNew = ScaleColor(*pOrig, mult); } } } @@ -94,8 +94,8 @@ static void FadePalette(COLORREF *pNew, COLORREF *pOrig, int numColours, uint32 static void FadeProcess(CORO_PARAM, const void *param) { // COROUTINE CORO_BEGIN_CONTEXT; - COLORREF fadeRGB[MAX_COLOURS]; // local copy of palette - const long *pColMult; // pointer to colour multiplier table + COLORREF fadeRGB[MAX_COLORS]; // local copy of palette + const long *pColMult; // pointer to color multiplier table PALETTE *pPalette; // pointer to palette CORO_END_CONTEXT(_ctx); @@ -111,19 +111,19 @@ static void FadeProcess(CORO_PARAM, const void *param) { // get pointer to palette - reduce pointer indirection a bit _ctx->pPalette = (PALETTE *)LockMem(pFade->pPalQ->hPal); - for (_ctx->pColMult = pFade->pColourMultTable; *_ctx->pColMult >= 0; _ctx->pColMult++) { + for (_ctx->pColMult = pFade->pColorMultTable; *_ctx->pColMult >= 0; _ctx->pColMult++) { // go through all multipliers in table - until a negative entry // fade palette using next multiplier if (TinselV2) FadePalette(_ctx->fadeRGB, pFade->pPalQ->palRGB, - pFade->pPalQ->numColours, (uint32) *_ctx->pColMult); + pFade->pPalQ->numColors, (uint32) *_ctx->pColMult); else FadePalette(_ctx->fadeRGB, _ctx->pPalette->palRGB, - FROM_LE_32(_ctx->pPalette->numColours), (uint32) *_ctx->pColMult); + FROM_LE_32(_ctx->pPalette->numColors), (uint32) *_ctx->pColMult); // send new palette to video DAC - UpdateDACqueue(pFade->pPalQ->posInDAC, FROM_LE_32(_ctx->pPalette->numColours), _ctx->fadeRGB); + UpdateDACqueue(pFade->pPalQ->posInDAC, FROM_LE_32(_ctx->pPalette->numColors), _ctx->fadeRGB); // allow time for video DAC to be updated CORO_SLEEP(1); @@ -139,7 +139,7 @@ static void FadeProcess(CORO_PARAM, const void *param) { /** * Generic palette fader/unfader. Creates a 'FadeProcess' process * for each palette that is to fade. - * @param multTable Fixed point colour multiplier table + * @param multTable Fixed point color multiplier table * @param noFadeTable List of palettes not to fade */ static void Fader(const long multTable[], SCNHANDLE noFadeTable[]) { @@ -175,7 +175,7 @@ static void Fader(const long multTable[], SCNHANDLE noFadeTable[]) { FADE fade; // fill in FADE struct - fade.pColourMultTable = multTable; + fade.pColorMultTable = multTable; fade.pPalQ = pPal; // create a fader process for this palette @@ -210,7 +210,7 @@ void FadeOutFast(SCNHANDLE noFadeTable[]) { } /** - * Fades a list of palettes from black to their current colours. + * Fades a list of palettes from black to their current colors. * 'noFadeTable' is a NULL terminated list of palettes not to fade. */ void FadeInMedium(SCNHANDLE noFadeTable[]) { @@ -223,7 +223,7 @@ void FadeInMedium(SCNHANDLE noFadeTable[]) { } /** - * Fades a list of palettes from black to their current colours. + * Fades a list of palettes from black to their current colors. * @param noFadeTable A NULL terminated list of palettes not to fade. */ void FadeInFast(SCNHANDLE noFadeTable[]) { @@ -234,10 +234,10 @@ void FadeInFast(SCNHANDLE noFadeTable[]) { Fader(fadein, noFadeTable); } -void PokeInTagColour() { - if (SysVar(SV_TAGCOLOUR)) { +void PokeInTagColor() { + if (SysVar(SV_TAGCOLOR)) { const COLORREF c = GetActorRGB(-1); - UpdateDACqueue(SysVar(SV_TAGCOLOUR), c); + UpdateDACqueue(SysVar(SV_TAGCOLOR), c); } } diff --git a/engines/tinsel/faders.h b/engines/tinsel/faders.h index e77bff2661..b30a26d893 100644 --- a/engines/tinsel/faders.h +++ b/engines/tinsel/faders.h @@ -50,7 +50,7 @@ void FadeOutMedium(SCNHANDLE noFadeTable[]); void FadeOutFast(SCNHANDLE noFadeTable[]); void FadeInMedium(SCNHANDLE noFadeTable[]); void FadeInFast(SCNHANDLE noFadeTable[]); -void PokeInTagColour(); +void PokeInTagColor(); } // End of namespace Tinsel diff --git a/engines/tinsel/font.cpp b/engines/tinsel/font.cpp index 4c76d12400..f57a6d5d54 100644 --- a/engines/tinsel/font.cpp +++ b/engines/tinsel/font.cpp @@ -118,10 +118,10 @@ void FettleFontPal(SCNHANDLE fontPal) { else pImg->hImgPal = 0; - if (TinselV2 && SysVar(SV_TAGCOLOUR)) { + if (TinselV2 && SysVar(SV_TAGCOLOR)) { const COLORREF c = GetActorRGB(-1); SetTagColorRef(c); - UpdateDACqueue(SysVar(SV_TAGCOLOUR), c); + UpdateDACqueue(SysVar(SV_TAGCOLOR), c); } } diff --git a/engines/tinsel/graphics.cpp b/engines/tinsel/graphics.cpp index aefc6e6144..0b550f50f3 100644 --- a/engines/tinsel/graphics.cpp +++ b/engines/tinsel/graphics.cpp @@ -41,7 +41,7 @@ namespace Tinsel { #define CHAR_WIDTH 4 #define CHAR_HEIGHT 4 -extern uint8 transPalette[MAX_COLOURS]; +extern uint8 transPalette[MAX_COLORS]; //----------------- SUPPORT FUNCTIONS --------------------- @@ -175,14 +175,14 @@ static void t0WrtNonZero(DRAWOBJECT *pObj, uint8 *srcP, uint8 *destP, bool apply x += clipAmount; if (repeatFlag) { - // Repeat of a given colour - uint8 colour = (numBytes >> 8) & 0xff; + // Repeat of a given color + uint8 color = (numBytes >> 8) & 0xff; int runLength = (numBytes & 0xff) - clipAmount; int rptLength = MAX(MIN(runLength, pObj->width - rightClip - x), 0); if (yClip == 0) { - if (colour != 0) - memset(tempDest, colour, rptLength); + if (color != 0) + memset(tempDest, color, rptLength); tempDest += rptLength; } @@ -470,18 +470,18 @@ static void t2WrtNonZero(DRAWOBJECT *pObj, uint8 *srcP, uint8 *destP, bool apply x+= clipAmount; int runLength = numBytes - clipAmount; - uint8 colour = *srcP++; + uint8 color = *srcP++; - if ((yClip == 0) && (runLength > 0) && (colour != 0)) { + if ((yClip == 0) && (runLength > 0) && (color != 0)) { runLength = MIN(runLength, pObj->width - rightClip - x); if (runLength > 0) { // Non-transparent run length - colour += pObj->constant; + color += pObj->constant; if (horizFlipped) - Common::set_to(tempP - runLength + 1, tempP + 1, colour); + Common::set_to(tempP - runLength + 1, tempP + 1, color); else - Common::set_to(tempP, tempP + runLength, colour); + Common::set_to(tempP, tempP + runLength, color); } } @@ -521,7 +521,7 @@ static void t2WrtNonZero(DRAWOBJECT *pObj, uint8 *srcP, uint8 *destP, bool apply } /** - * Fill the destination area with a constant colour + * Fill the destination area with a constant color */ static void WrtConst(DRAWOBJECT *pObj, uint8 *destP, bool applyClipping) { if (applyClipping) { @@ -595,11 +595,11 @@ static void WrtAll(DRAWOBJECT *pObj, uint8 *srcP, uint8 *destP, bool applyClippi */ static void PackedWrtNonZero(DRAWOBJECT *pObj, uint8 *srcP, uint8 *destP, bool applyClipping, bool horizFlipped, int packingType) { - uint8 numColours = 0; - uint8 *colourTable = NULL; + uint8 numColors = 0; + uint8 *colorTable = NULL; int topClip = 0; int xOffset = 0; - int numBytes, colour; + int numBytes, color; int v; if (_vm->getLanguage() == Common::RU_RUS) { @@ -625,10 +625,10 @@ static void PackedWrtNonZero(DRAWOBJECT *pObj, uint8 *srcP, uint8 *destP, } if (packingType == 3) { - // Variable colours - numColours = *srcP++; - colourTable = srcP; - srcP += numColours; + // Variable colors + numColors = *srcP++; + colorTable = srcP; + srcP += numColors; } for (int y = 0; y < pObj->height; ++y) { @@ -646,7 +646,7 @@ static void PackedWrtNonZero(DRAWOBJECT *pObj, uint8 *srcP, uint8 *destP, int x = 0; while (x < pObj->width) { - // Get next run size and colour to use + // Get next run size and color to use for (;;) { if (xOffset > 0) { x += xOffset; @@ -663,9 +663,9 @@ static void PackedWrtNonZero(DRAWOBJECT *pObj, uint8 *srcP, uint8 *destP, v = *srcP++; numBytes = v & 0xf; // No. bytes 1-15 if (packingType == 3) - colour = colourTable[v >> 4]; + color = colorTable[v >> 4]; else - colour = pObj->baseCol + (v >> 4); + color = pObj->baseCol + (v >> 4); if (numBytes != 0) break; @@ -693,7 +693,7 @@ static void PackedWrtNonZero(DRAWOBJECT *pObj, uint8 *srcP, uint8 *destP, while (numBytes-- > 0) { if ((topClip == 0) && (x < (pObj->width - rightClip))) { - *tempP = colour; + *tempP = color; if (horizFlipped) --tempP; else ++tempP; } ++x; @@ -830,7 +830,7 @@ void DrawObject(DRAWOBJECT *pObj) { int packType = pObj->flags >> 14; if (packType == 0) { - // No colour packing + // No color packing switch (typeId) { case 0x01: case 0x11: @@ -865,7 +865,7 @@ void DrawObject(DRAWOBJECT *pObj) { } else { // 1 = 16 from 240 // 2 = 16 from 224 - // 3 = variable colour + // 3 = variable color if (packType == 1) pObj->baseCol = 0xF0; else if (packType == 2) pObj->baseCol = 0xE0; diff --git a/engines/tinsel/graphics.h b/engines/tinsel/graphics.h index 8b8bb6488d..de16082441 100644 --- a/engines/tinsel/graphics.h +++ b/engines/tinsel/graphics.h @@ -43,7 +43,7 @@ struct DRAWOBJECT { int transOffset; // transparent character offset int flags; // object flags - see above for list PALQ *pPal; // objects palette Q position - int constant; // which colour in palette for monochrome objects + int constant; // which color in palette for monochrome objects int width; // width of object int height; // height of object SCNHANDLE hBits; // image bitmap handle diff --git a/engines/tinsel/object.cpp b/engines/tinsel/object.cpp index bf31cdfa25..1aac68c7f0 100644 --- a/engines/tinsel/object.cpp +++ b/engines/tinsel/object.cpp @@ -482,11 +482,11 @@ void AnimateObject(OBJECT *pAniObj, SCNHANDLE hNewImg) { * Creates a rectangle object of the given dimensions and returns * a pointer to the object. * @param hPal Palette for the rectangle object - * @param colour Which colour offset from the above palette + * @param color Which color offset from the above palette * @param width Width of rectangle * @param height Height of rectangle */ -OBJECT *RectangleObject(SCNHANDLE hPal, int colour, int width, int height) { +OBJECT *RectangleObject(SCNHANDLE hPal, int color, int width, int height) { // template for initialising the rectangle object static const OBJ_INIT rectObj = {0, DMA_CONST, OID_EFFECTS, 0, 0, 0}; PALQ *pPalQ; // palette queue pointer @@ -503,8 +503,8 @@ OBJECT *RectangleObject(SCNHANDLE hPal, int colour, int width, int height) { // assign palette to object pRect->pPal = pPalQ; - // set colour in the palette - pRect->constant = colour; + // set color in the palette + pRect->constant = color; // set rectangle width pRect->width = width; diff --git a/engines/tinsel/object.h b/engines/tinsel/object.h index a000dee72c..9f10c06cd2 100644 --- a/engines/tinsel/object.h +++ b/engines/tinsel/object.h @@ -87,7 +87,7 @@ struct OBJECT { Common::Rect rcPrev; ///< previous screen coordinates of object bounding rectangle int flags; ///< object flags - see above for list PALQ *pPal; ///< objects palette Q position - int constant; ///< which colour in palette for monochrome objects + int constant; ///< which color in palette for monochrome objects int width; ///< width of object int height; ///< height of object SCNHANDLE hBits; ///< image bitmap handle @@ -184,7 +184,7 @@ void HideObject( // Hides a object by giving it a "NullImage" image pointer OBJECT *RectangleObject( // create a rectangle object of the given dimensions SCNHANDLE hPal, // palette for the rectangle object - int colour, // which colour offset from the above palette + int color, // which color offset from the above palette int width, // width of rectangle int height); // height of rectangle diff --git a/engines/tinsel/palette.cpp b/engines/tinsel/palette.cpp index a0ceec54eb..2d2ebd6f60 100644 --- a/engines/tinsel/palette.cpp +++ b/engines/tinsel/palette.cpp @@ -41,12 +41,12 @@ namespace Tinsel { struct VIDEO_DAC_Q { union { SCNHANDLE hRGBarray; ///< handle of palette or - COLORREF *pRGBarray; ///< list of palette colours + COLORREF *pRGBarray; ///< list of palette colors COLORREF singleRGB; } pal; bool bHandle; ///< when set - use handle of palette int destDACindex; ///< start index of palette in video DAC - int numColours; ///< number of colours in "hRGBarray" + int numColors; ///< number of colors in "hRGBarray" }; @@ -67,13 +67,13 @@ static VIDEO_DAC_Q vidDACdata[VDACQLENGTH]; /** video DAC transfer Q head pointer */ static VIDEO_DAC_Q *pDAChead; -/** colour index of the 4 colours used for the translucent palette */ +/** color index of the 4 colors used for the translucent palette */ #define COL_HILIGHT TBLUE1 /** the translucent palette lookup table */ -uint8 transPalette[MAX_COLOURS]; // used in graphics.cpp +uint8 transPalette[MAX_COLORS]; // used in graphics.cpp -uint8 ghostPalette[MAX_COLOURS]; +uint8 ghostPalette[MAX_COLORS]; static int translucentIndex = 228; @@ -111,7 +111,7 @@ void psxPaletteMapper(PALQ *originalPal, uint8 *psxClut, byte *mapperTable) { } // Check for correspondent color - for (uint i = 0; (i < FROM_LE_32(pal->numColours)) && !colorFound; i++) { + for (uint i = 0; (i < FROM_LE_32(pal->numColors)) && !colorFound; i++) { // get R G B values in the same way as psx format converters uint16 psxEquivalent = TINSEL_PSX_RGB(TINSEL_GetRValue(pal->palRGB[i]) >> 3, TINSEL_GetGValue(pal->palRGB[i]) >> 3, TINSEL_GetBValue(pal->palRGB[i]) >> 3); @@ -138,15 +138,15 @@ void PalettesToVideoDAC() { // while Q is not empty while (pDAChead != pDACtail) { const PALETTE *pPalette; // pointer to hardware palette - const COLORREF *pColours; // pointer to list of RGB triples + const COLORREF *pColors; // pointer to list of RGB triples #ifdef DEBUG // make sure palette does not overlap - assert(pDACtail->destDACindex + pDACtail->numColours <= MAX_COLOURS); + assert(pDACtail->destDACindex + pDACtail->numColors <= MAX_COLORS); #else // make sure palette does not overlap - if (pDACtail->destDACindex + pDACtail->numColours > MAX_COLOURS) - pDACtail->numColours = MAX_COLOURS - pDACtail->destDACindex; + if (pDACtail->destDACindex + pDACtail->numColors > MAX_COLORS) + pDACtail->numColors = MAX_COLORS - pDACtail->destDACindex; #endif if (pDACtail->bHandle) { @@ -156,23 +156,23 @@ void PalettesToVideoDAC() { pPalette = (const PALETTE *)LockMem(pDACtail->pal.hRGBarray); // get RGB pointer - pColours = pPalette->palRGB; - } else if (pDACtail->numColours == 1) { + pColors = pPalette->palRGB; + } else if (pDACtail->numColors == 1) { // we are using a single color palette - pColours = &pDACtail->pal.singleRGB; + pColors = &pDACtail->pal.singleRGB; } else { // we are using a palette pointer - pColours = pDACtail->pal.pRGBarray; + pColors = pDACtail->pal.pRGBarray; } - for (int i = 0; i < pDACtail->numColours; ++i) { - pal[i * 3 + 0] = TINSEL_GetRValue(pColours[i]); - pal[i * 3 + 1] = TINSEL_GetGValue(pColours[i]); - pal[i * 3 + 2] = TINSEL_GetBValue(pColours[i]); + for (int i = 0; i < pDACtail->numColors; ++i) { + pal[i * 3 + 0] = TINSEL_GetRValue(pColors[i]); + pal[i * 3 + 1] = TINSEL_GetGValue(pColors[i]); + pal[i * 3 + 2] = TINSEL_GetBValue(pColors[i]); } // update the system palette - g_system->getPaletteManager()->setPalette(pal, pDACtail->destDACindex, pDACtail->numColours); + g_system->getPaletteManager()->setPalette(pal, pDACtail->destDACindex, pDACtail->numColors); // update tail pointer pDACtail++; @@ -216,15 +216,15 @@ void PaletteStats() { /** * Places a palette in the video DAC queue. * @param posInDAC Position in video DAC - * @param numColours Number of colours in palette + * @param numColors Number of colors in palette * @param hPalette Handle to palette */ -void UpdateDACqueueHandle(int posInDAC, int numColours, SCNHANDLE hPalette) { +void UpdateDACqueueHandle(int posInDAC, int numColors, SCNHANDLE hPalette) { // check Q overflow assert(pDAChead < vidDACdata + VDACQLENGTH); pDAChead->destDACindex = posInDAC & ~PALETTE_MOVED; // set index in video DAC - pDAChead->numColours = numColours; // set number of colours + pDAChead->numColors = numColors; // set number of colors pDAChead->pal.hRGBarray = hPalette; // set handle of palette pDAChead->bHandle = true; // we are using a palette handle @@ -240,19 +240,19 @@ void UpdateDACqueueHandle(int posInDAC, int numColours, SCNHANDLE hPalette) { /** * Places a palette in the video DAC queue. * @param posInDAC Position in video DAC - * @param numColours Number of colours in palette - * @param pColours List of RGB triples + * @param numColors Number of colors in palette + * @param pColors List of RGB triples */ -void UpdateDACqueue(int posInDAC, int numColours, COLORREF *pColours) { +void UpdateDACqueue(int posInDAC, int numColors, COLORREF *pColors) { // check Q overflow assert(pDAChead < vidDACdata + NUM_PALETTES); pDAChead->destDACindex = posInDAC & ~PALETTE_MOVED; // set index in video DAC - pDAChead->numColours = numColours; // set number of colours - if (numColours == 1) - pDAChead->pal.singleRGB = *pColours; // set single color of which the "palette" consists + pDAChead->numColors = numColors; // set number of colors + if (numColors == 1) + pDAChead->pal.singleRGB = *pColors; // set single color of which the "palette" consists else - pDAChead->pal.pRGBarray = pColours; // set addr of palette + pDAChead->pal.pRGBarray = pColors; // set addr of palette pDAChead->bHandle = false; // we are not using a palette handle // update head pointer @@ -275,7 +275,7 @@ void UpdateDACqueue(int posInDAC, COLORREF color) { assert(pDAChead < vidDACdata + NUM_PALETTES); pDAChead->destDACindex = posInDAC & ~PALETTE_MOVED; // set index in video DAC - pDAChead->numColours = 1; // set number of colours + pDAChead->numColors = 1; // set number of colors pDAChead->pal.singleRGB = color; // set single color of which the "palette" consists pDAChead->bHandle = false; // we are not using a palette handle @@ -294,7 +294,7 @@ void UpdateDACqueue(int posInDAC, COLORREF color) { */ PALQ *AllocPalette(SCNHANDLE hNewPal) { PALQ *pPrev, *p; // walks palAllocData - int iDAC; // colour index in video DAC + int iDAC; // color index in video DAC PALQ *pNxtPal; // next PALQ struct in palette allocator PALETTE *pNewPal; @@ -311,7 +311,7 @@ PALQ *AllocPalette(SCNHANDLE hNewPal) { } // search all structs in palette allocator - find a free slot - iDAC = FGND_DAC_INDEX; // init DAC index to first available foreground colour + iDAC = FGND_DAC_INDEX; // init DAC index to first available foreground color for (p = palAllocData; p < palAllocData + NUM_PALETTES; p++) { if (p->hPal == 0) { @@ -319,11 +319,11 @@ PALQ *AllocPalette(SCNHANDLE hNewPal) { p->objCount = 1; // init number of objects using palette p->posInDAC = iDAC; // set palettes start pos in video DAC p->hPal = hNewPal; // set hardware palette data - p->numColours = FROM_LE_32(pNewPal->numColours); // set number of colours in palette + p->numColors = FROM_LE_32(pNewPal->numColors); // set number of colors in palette if (TinselV2) - // Copy all the colours - memcpy(p->palRGB, pNewPal->palRGB, p->numColours * sizeof(COLORREF)); + // Copy all the colors + memcpy(p->palRGB, pNewPal->palRGB, p->numColors * sizeof(COLORREF)); #ifdef DEBUG // one more palette in use @@ -333,30 +333,30 @@ PALQ *AllocPalette(SCNHANDLE hNewPal) { // Q the change to the video DAC if (TinselV2) - UpdateDACqueue(p->posInDAC, p->numColours, p->palRGB); + UpdateDACqueue(p->posInDAC, p->numColors, p->palRGB); else - UpdateDACqueueHandle(p->posInDAC, p->numColours, p->hPal); + UpdateDACqueueHandle(p->posInDAC, p->numColors, p->hPal); // move all palettes after this one down (if necessary) for (pPrev = p, pNxtPal = pPrev + 1; pNxtPal < palAllocData + NUM_PALETTES; pNxtPal++) { if (pNxtPal->hPal != 0) { // palette slot is in use - if (pNxtPal->posInDAC >= pPrev->posInDAC + pPrev->numColours) + if (pNxtPal->posInDAC >= pPrev->posInDAC + pPrev->numColors) // no need to move palettes down break; // move palette down - indicate change pNxtPal->posInDAC = (pPrev->posInDAC - + pPrev->numColours) | PALETTE_MOVED; + + pPrev->numColors) | PALETTE_MOVED; // Q the palette change in position to the video DAC if (!TinselV2) UpdateDACqueueHandle(pNxtPal->posInDAC, - pNxtPal->numColours, + pNxtPal->numColors, pNxtPal->hPal); else if (!pNxtPal->bFading) UpdateDACqueue(pNxtPal->posInDAC, - pNxtPal->numColours, + pNxtPal->numColors, pNxtPal->palRGB); // update previous palette to current palette @@ -369,7 +369,7 @@ PALQ *AllocPalette(SCNHANDLE hNewPal) { } // set new DAC index - iDAC = p->posInDAC + p->numColours; + iDAC = p->posInDAC + p->numColors; } // no free palettes @@ -431,43 +431,43 @@ void SwapPalette(PALQ *pPalQ, SCNHANDLE hNewPal) { // validate palette Q pointer assert(pPalQ >= palAllocData && pPalQ <= palAllocData + NUM_PALETTES - 1); - if (pPalQ->numColours >= (int)FROM_LE_32(pNewPal->numColours)) { + if (pPalQ->numColors >= (int)FROM_LE_32(pNewPal->numColors)) { // new palette will fit the slot // install new palette pPalQ->hPal = hNewPal; if (TinselV2) { - pPalQ->numColours = FROM_LE_32(pNewPal->numColours); + pPalQ->numColors = FROM_LE_32(pNewPal->numColors); - // Copy all the colours - memcpy(pPalQ->palRGB, pNewPal->palRGB, FROM_LE_32(pNewPal->numColours) * sizeof(COLORREF)); + // Copy all the colors + memcpy(pPalQ->palRGB, pNewPal->palRGB, FROM_LE_32(pNewPal->numColors) * sizeof(COLORREF)); if (!pPalQ->bFading) // Q the change to the video DAC - UpdateDACqueue(pPalQ->posInDAC, FROM_LE_32(pNewPal->numColours), pPalQ->palRGB); + UpdateDACqueue(pPalQ->posInDAC, FROM_LE_32(pNewPal->numColors), pPalQ->palRGB); } else { // Q the change to the video DAC - UpdateDACqueueHandle(pPalQ->posInDAC, FROM_LE_32(pNewPal->numColours), hNewPal); + UpdateDACqueueHandle(pPalQ->posInDAC, FROM_LE_32(pNewPal->numColors), hNewPal); } } else { - // # colours are different - will have to update all following palette entries + // # colors are different - will have to update all following palette entries assert(!TinselV2); // Fatal error for Tinsel 2 PALQ *pNxtPalQ; // next palette queue position for (pNxtPalQ = pPalQ + 1; pNxtPalQ < palAllocData + NUM_PALETTES; pNxtPalQ++) { - if (pNxtPalQ->posInDAC >= pPalQ->posInDAC + pPalQ->numColours) + if (pNxtPalQ->posInDAC >= pPalQ->posInDAC + pPalQ->numColors) // no need to move palettes down break; // move palette down pNxtPalQ->posInDAC = (pPalQ->posInDAC - + pPalQ->numColours) | PALETTE_MOVED; + + pPalQ->numColors) | PALETTE_MOVED; // Q the palette change in position to the video DAC UpdateDACqueueHandle(pNxtPalQ->posInDAC, - pNxtPalQ->numColours, + pNxtPalQ->numColors, pNxtPalQ->hPal); // update previous palette to current palette @@ -501,12 +501,12 @@ PALQ *GetNextPalette(PALQ *pStrtPal) { } /** - * Sets the current background colour. - * @param colour Colour to set the background to + * Sets the current background color. + * @param color Color to set the background to */ -void SetBgndColour(COLORREF colour) { - // update background colour struct by queuing the change to the video DAC - UpdateDACqueue(BGND_DAC_INDEX, colour); +void SetBgndColor(COLORREF color) { + // update background color struct by queuing the change to the video DAC + UpdateDACqueue(BGND_DAC_INDEX, color); } /** @@ -544,23 +544,23 @@ void CreateTranslucentPalette(SCNHANDLE hPalette) { // get a pointer to the palette PALETTE *pPal = (PALETTE *)LockMem(hPalette); - // leave background colour alone + // leave background color alone transPalette[0] = 0; - for (uint i = 0; i < FROM_LE_32(pPal->numColours); i++) { - // get the RGB colour model values + for (uint i = 0; i < FROM_LE_32(pPal->numColors); i++) { + // get the RGB color model values uint8 red = TINSEL_GetRValue(pPal->palRGB[i]); uint8 green = TINSEL_GetGValue(pPal->palRGB[i]); uint8 blue = TINSEL_GetBValue(pPal->palRGB[i]); - // calculate the Value field of the HSV colour model + // calculate the Value field of the HSV color model unsigned val = (red > green) ? red : green; val = (val > blue) ? val : blue; - // map the Value field to one of the 4 colours reserved for the translucent palette + // map the Value field to one of the 4 colors reserved for the translucent palette val /= 63; transPalette[i + 1] = (uint8)((val == 0) ? 0 : val + - (TinselV2 ? TranslucentColour() : COL_HILIGHT) - 1); + (TinselV2 ? TranslucentColor() : COL_HILIGHT) - 1); } } @@ -572,20 +572,20 @@ void CreateGhostPalette(SCNHANDLE hPalette) { PALETTE *pPal = (PALETTE *)LockMem(hPalette); int i; - // leave background colour alone + // leave background color alone ghostPalette[0] = 0; - for (i = 0; i < (int)FROM_LE_32(pPal->numColours); i++) { - // get the RGB colour model values + for (i = 0; i < (int)FROM_LE_32(pPal->numColors); i++) { + // get the RGB color model values uint8 red = TINSEL_GetRValue(pPal->palRGB[i]); uint8 green = TINSEL_GetGValue(pPal->palRGB[i]); uint8 blue = TINSEL_GetBValue(pPal->palRGB[i]); - // calculate the Value field of the HSV colour model + // calculate the Value field of the HSV color model unsigned val = (red > green) ? red : green; val = (val > blue) ? val : blue; - // map the Value field to one of the 4 colours reserved for the translucent palette + // map the Value field to one of the 4 colors reserved for the translucent palette val /= 64; assert(/*val >= 0 &&*/ val <= 3); ghostPalette[i + 1] = (uint8)(val + SysVar(ISV_GHOST_BASE)); @@ -594,25 +594,25 @@ void CreateGhostPalette(SCNHANDLE hPalette) { /** - * Returns an adjusted colour RGB - * @param colour Colour to scale + * Returns an adjusted color RGB + * @param color Color to scale */ -static COLORREF DimColour(COLORREF colour, int factor) { +static COLORREF DimColor(COLORREF color, int factor) { uint32 red, green, blue; if (factor == 10) { // No change - return colour; + return color; } else if (factor == 0) { // No brightness return 0; } else { // apply multiplier to RGB components - red = TINSEL_GetRValue(colour) * factor / 10; - green = TINSEL_GetGValue(colour) * factor / 10; - blue = TINSEL_GetBValue(colour) * factor / 10; + red = TINSEL_GetRValue(color) * factor / 10; + green = TINSEL_GetGValue(color) * factor / 10; + blue = TINSEL_GetBValue(color) * factor / 10; - // return new colour + // return new color return TINSEL_RGB(red, green, blue); } } @@ -620,10 +620,10 @@ static COLORREF DimColour(COLORREF colour, int factor) { /** * DimPartPalette */ -void DimPartPalette(SCNHANDLE hDimPal, int startColour, int length, int brightness) { +void DimPartPalette(SCNHANDLE hDimPal, int startColor, int length, int brightness) { PALQ *pPalQ; PALETTE *pDimPal; - int iColour; + int iColor; pPalQ = FindPalette(hDimPal); assert(pPalQ); @@ -631,42 +631,42 @@ void DimPartPalette(SCNHANDLE hDimPal, int startColour, int length, int brightne // get pointer to dim palette pDimPal = (PALETTE *)LockMem(hDimPal); - // Adjust for the fact that palettes don't contain colour 0 - startColour -= 1; + // Adjust for the fact that palettes don't contain color 0 + startColor -= 1; // Check some other things - if (startColour + length > pPalQ->numColours) - error("DimPartPalette(): colour overrun"); + if (startColor + length > pPalQ->numColors) + error("DimPartPalette(): color overrun"); - for (iColour = startColour; iColour < startColour + length; iColour++) { - pPalQ->palRGB[iColour] = DimColour(pDimPal->palRGB[iColour], brightness); + for (iColor = startColor; iColor < startColor + length; iColor++) { + pPalQ->palRGB[iColor] = DimColor(pDimPal->palRGB[iColor], brightness); } if (!pPalQ->bFading) { // Q the change to the video DAC - UpdateDACqueue(pPalQ->posInDAC + startColour, length, &pPalQ->palRGB[startColour]); + UpdateDACqueue(pPalQ->posInDAC + startColor, length, &pPalQ->palRGB[startColor]); } } -int TranslucentColour() { +int TranslucentColor() { return translucentIndex; } -int HighlightColour() { +int HighlightColor() { UpdateDACqueue(talkIndex, (COLORREF)SysVar(SYS_HighlightRGB)); return talkIndex; } -int TalkColour() { +int TalkColor() { return TinselV2 ? talkIndex : TALKFONT_COL; } -void SetTalkColourRef(COLORREF colRef) { +void SetTalkColorRef(COLORREF colRef) { talkColRef = colRef; } -COLORREF GetTalkColourRef() { +COLORREF GetTalkColorRef() { return talkColRef; } diff --git a/engines/tinsel/palette.h b/engines/tinsel/palette.h index 9743ee53aa..694eff504d 100644 --- a/engines/tinsel/palette.h +++ b/engines/tinsel/palette.h @@ -42,14 +42,14 @@ typedef uint32 COLORREF; #define TINSEL_PSX_RGB(r,g,b) ((uint16)(((uint8)(r))|((uint16)(g)<<5)|(((uint16)(b))<<10))) enum { - MAX_COLOURS = 256, ///< maximum number of colours - for VGA 256 + MAX_COLORS = 256, ///< maximum number of colors - for VGA 256 BITS_PER_PIXEL = 8, ///< number of bits per pixel for VGA 256 MAX_INTENSITY = 255, ///< the biggest value R, G or B can have NUM_PALETTES = 32, ///< number of palettes // Discworld has some fixed apportioned bits in the palette. - BGND_DAC_INDEX = 0, ///< index of background colour in Video DAC - FGND_DAC_INDEX = 1, ///< index of first foreground colour in Video DAC + BGND_DAC_INDEX = 0, ///< index of background color in Video DAC + FGND_DAC_INDEX = 1, ///< index of first foreground color in Video DAC TBLUE1 = 228, ///< Blue used in translucent rectangles TBLUE2 = 229, ///< Blue used in translucent rectangles TBLUE3 = 230, ///< Blue used in translucent rectangles @@ -57,7 +57,7 @@ enum { TALKFONT_COL = 233 }; -// some common colours +// some common colors #define BLACK (TINSEL_RGB(0, 0, 0)) #define WHITE (TINSEL_RGB(MAX_INTENSITY, MAX_INTENSITY, MAX_INTENSITY)) @@ -73,8 +73,8 @@ enum { /** hardware palette structure */ struct PALETTE { - int32 numColours; ///< number of colours in the palette - COLORREF palRGB[MAX_COLOURS]; ///< actual palette colours + int32 numColors; ///< number of colors in the palette + COLORREF palRGB[MAX_COLORS]; ///< actual palette colors } PACKED_STRUCT; #include "common/pack-end.h" // END STRUCT PACKING @@ -85,10 +85,10 @@ struct PALQ { SCNHANDLE hPal; ///< handle to palette data struct int objCount; ///< number of objects using this palette int posInDAC; ///< palette position in the video DAC - int numColours; ///< number of colours in the palette + int numColors; ///< number of colors in the palette // Discworld 2 fields bool bFading; // Whether or not fading - COLORREF palRGB[MAX_COLOURS]; // actual palette colours + COLORREF palRGB[MAX_COLORS]; // actual palette colors }; #define PALETTE_MOVED 0x8000 // when this bit is set in the "posInDAC" @@ -114,13 +114,13 @@ void PalettesToVideoDAC(); // Update the video DAC with palettes currently the t void UpdateDACqueueHandle( int posInDAC, // position in video DAC - int numColours, // number of colours in palette + int numColors, // number of colors in palette SCNHANDLE hPalette); // handle to palette void UpdateDACqueue( // places a palette in the video DAC queue int posInDAC, // position in video DAC - int numColours, // number of colours in palette - COLORREF *pColours); // list of RGB tripples + int numColors, // number of colors in palette + COLORREF *pColors); // list of RGB tripples void UpdateDACqueue(int posInDAC, COLORREF color); @@ -140,10 +140,10 @@ void SwapPalette( // swaps palettes at the specified palette queue position PALQ *GetNextPalette( // returns the next palette in the queue PALQ *pStrtPal); // queue position to start from - when NULL will start from beginning of queue -COLORREF GetBgndColour(); // returns current background colour +COLORREF GetBgndColor(); // returns current background color -void SetBgndColour( // sets current background colour - COLORREF colour); // colour to set the background to +void SetBgndColor( // sets current background color + COLORREF color); // color to set the background to void FadingPalette(PALQ *pPalQ, bool bFading); @@ -155,22 +155,22 @@ void NoFadingPalettes(); // All fading processes have just been killed void DimPartPalette( SCNHANDLE hPal, - int startColour, + int startColor, int length, int brightness); // 0 = black, 10 == 100% -int TranslucentColour(); +int TranslucentColor(); -#define BoxColour TranslucentColour +#define BoxColor TranslucentColor -int HighlightColour(); +int HighlightColor(); -int TalkColour(); +int TalkColor(); -void SetTalkColourRef(COLORREF colRef); +void SetTalkColorRef(COLORREF colRef); -COLORREF GetTalkColourRef(); +COLORREF GetTalkColorRef(); void SetTagColorRef(COLORREF colRef); diff --git a/engines/tinsel/pid.h b/engines/tinsel/pid.h index 786ccc6327..d6f87bdf98 100644 --- a/engines/tinsel/pid.h +++ b/engines/tinsel/pid.h @@ -32,11 +32,11 @@ namespace Tinsel { #define PID_DESTROY 0x8000 // process id of any process that is to be destroyed between scenes #define PID_EFFECTS (0x0010 | PID_DESTROY) // generic special effects process id -#define PID_FLASH (PID_EFFECTS + 1) // flash colour process -#define PID_CYCLE (PID_EFFECTS + 2) // cycle colour range process +#define PID_FLASH (PID_EFFECTS + 1) // flash color process +#define PID_CYCLE (PID_EFFECTS + 2) // cycle color range process #define PID_MORPH (PID_EFFECTS + 3) // morph process #define PID_FADER (PID_EFFECTS + 4) // fader process -#define PID_FADE_BGND (PID_EFFECTS + 5) // fade background colour process +#define PID_FADE_BGND (PID_EFFECTS + 5) // fade background color process #define PID_BACKGND (0x0020 | PID_DESTROY) // background update process id diff --git a/engines/tinsel/rince.cpp b/engines/tinsel/rince.cpp index 6ea1dd7464..c0878b6849 100644 --- a/engines/tinsel/rince.cpp +++ b/engines/tinsel/rince.cpp @@ -60,8 +60,8 @@ static MOVER Movers[MAX_MOVERS]; // FIXME: Avoid non-const global vars /** * Called from ActorPalette(), normally once just after the beginning of time. */ -void StoreMoverPalette(PMOVER pMover, int startColour, int length) { - pMover->startColour = startColour; +void StoreMoverPalette(PMOVER pMover, int startColor, int length) { + pMover->startColor = startColor; pMover->paletteLength = length; } @@ -88,7 +88,7 @@ static void CheckBrightness(PMOVER pMover) { pMover->brightness--; // ramp down DimPartPalette(BgPal(), - pMover->startColour, + pMover->startColor, pMover->paletteLength, pMover->brightness); } @@ -107,7 +107,7 @@ void MoverBrightness(PMOVER pMover, int brightness) { assert(BgPal()); // Do it all immediately - DimPartPalette(BgPal(), pMover->startColour, pMover->paletteLength, brightness); + DimPartPalette(BgPal(), pMover->startColor, pMover->paletteLength, brightness); // The actor is probably hidden at this point, pMover->brightness = brightness; @@ -924,7 +924,7 @@ void SaveMovers(SAVED_MOVER *sMoverInfo) { if (TinselV2) { sMoverInfo[i].bHidden = Movers[i].bHidden; sMoverInfo[i].brightness = Movers[i].brightness; - sMoverInfo[i].startColour = Movers[i].startColour; + sMoverInfo[i].startColor = Movers[i].startColor; sMoverInfo[i].paletteLength = Movers[i].paletteLength; } diff --git a/engines/tinsel/rince.h b/engines/tinsel/rince.h index 57eac00fa4..b7b621af47 100644 --- a/engines/tinsel/rince.h +++ b/engines/tinsel/rince.h @@ -119,7 +119,7 @@ struct MOVER { int32 zOverride; bool bHidden; int brightness; // Current brightness - int startColour; + int startColor; int paletteLength; HPOLYGON hRpath; // Recent path }; @@ -140,7 +140,7 @@ void MoverProcessCreate(int X, int Y, int id, PMOVER pMover); enum AR_FUNCTION { AR_NORMAL, AR_PUSHREEL, AR_POPREEL, AR_WALKREEL }; -void StoreMoverPalette(PMOVER pMover, int startColour, int length); +void StoreMoverPalette(PMOVER pMover, int startColor, int length); void MoverBrightness(PMOVER pMover, int brightness); @@ -204,7 +204,7 @@ struct SAVED_MOVER { bool bActive; bool bHidden; int brightness; - int startColour; + int startColor; int paletteLength; }; diff --git a/engines/tinsel/saveload.cpp b/engines/tinsel/saveload.cpp index 3182593a88..7a6b5877e8 100644 --- a/engines/tinsel/saveload.cpp +++ b/engines/tinsel/saveload.cpp @@ -183,7 +183,7 @@ static void syncSavedMover(Common::Serializer &s, SAVED_MOVER &sm) { s.syncAsByte(sm.bHidden); s.syncAsSint32LE(sm.brightness); - s.syncAsSint32LE(sm.startColour); + s.syncAsSint32LE(sm.startColor); s.syncAsSint32LE(sm.paletteLength); } } diff --git a/engines/tinsel/savescn.cpp b/engines/tinsel/savescn.cpp index a3fe393b79..ef0f5cdc25 100644 --- a/engines/tinsel/savescn.cpp +++ b/engines/tinsel/savescn.cpp @@ -226,7 +226,7 @@ static void SortMAProcess(CORO_PARAM, const void *) { } ActorPalette(rsd->SavedMoverInfo[_ctx->i].actorID, - rsd->SavedMoverInfo[_ctx->i].startColour, rsd->SavedMoverInfo[_ctx->i].paletteLength); + rsd->SavedMoverInfo[_ctx->i].startColor, rsd->SavedMoverInfo[_ctx->i].paletteLength); if (rsd->SavedMoverInfo[_ctx->i].brightness != BOGUS_BRIGHTNESS) ActorBrightness(rsd->SavedMoverInfo[_ctx->i].actorID, rsd->SavedMoverInfo[_ctx->i].brightness); diff --git a/engines/tinsel/scene.cpp b/engines/tinsel/scene.cpp index 67e0ea9ffd..80f4c585a7 100644 --- a/engines/tinsel/scene.cpp +++ b/engines/tinsel/scene.cpp @@ -381,7 +381,7 @@ void PrimeBackground() { // structure for background static const BACKGND backgnd = { - BLACK, // sky colour + BLACK, // sky color Common::Point(0, 0), // initial world pos Common::Rect(0, 0, SCREEN_WIDTH, SCREEN_HEIGHT), // scroll limits 0, // no background update process diff --git a/engines/tinsel/sysvar.cpp b/engines/tinsel/sysvar.cpp index 7003d34feb..ed4c99a560 100644 --- a/engines/tinsel/sysvar.cpp +++ b/engines/tinsel/sysvar.cpp @@ -77,7 +77,7 @@ static int systemVars[SV_TOPVALID] = { 2, // Speech Delay 2, // Music dim factor - 0, // if set, default actor's text colour gets poked in here + 0, // if set, default actor's text color gets poked in here 0, // user 1 0, // user 2 @@ -103,7 +103,7 @@ static int systemVars[SV_TOPVALID] = { 0, // ISV_GHOST_ACTOR 0, // ISV_GHOST_BASE - 0 // ISV_GHOST_COLOUR + 0 // ISV_GHOST_COLOR }; static SCNHANDLE systemStrings[SS_MAX_VALID]; // FIXME: Avoid non-const global vars diff --git a/engines/tinsel/sysvar.h b/engines/tinsel/sysvar.h index e407e6ffa3..4cdb1364b4 100644 --- a/engines/tinsel/sysvar.h +++ b/engines/tinsel/sysvar.h @@ -60,7 +60,7 @@ typedef enum { SV_DEFAULT_INV, SV_SPEECHDELAY, // Delay 'twixt text/animation and sample SV_MUSICDIMFACTOR, // dimVolume = volume - volume/SV_MDF - SV_TAGCOLOUR, // if set, default actor's text colour gets poked in here + SV_TAGCOLOR, // if set, default actor's text color gets poked in here SV_USER1, SV_USER2, @@ -85,7 +85,7 @@ typedef enum { SV_DEFAULT_INV, ISV_NO_BLOCKING, ISV_GHOST_ACTOR, ISV_GHOST_BASE, - ISV_GHOST_COLOUR, + ISV_GHOST_COLOR, SV_TOPVALID } SYSVARS; diff --git a/engines/tinsel/text.cpp b/engines/tinsel/text.cpp index d2939281eb..6df7992946 100644 --- a/engines/tinsel/text.cpp +++ b/engines/tinsel/text.cpp @@ -100,14 +100,14 @@ int JustifyText(char *szStr, int xPos, const FONT *pFont, int mode) { * of the list is returned. * @param pList Object list to add text to * @param szStr String to output - * @param colour Colour for monochrome text + * @param color Color for monochrome text * @param xPos X position of string * @param yPos Y position of string * @param hFont Which font to use * @param mode Mode flags for the string * @param sleepTime Sleep time between each character (if non-zero) */ -OBJECT *ObjectTextOut(OBJECT *pList, char *szStr, int colour, +OBJECT *ObjectTextOut(OBJECT *pList, char *szStr, int color, int xPos, int yPos, SCNHANDLE hFont, int mode, int sleepTime) { int xJustify; // x position of text after justification int yOffset; // offset to next line of text @@ -183,8 +183,8 @@ OBJECT *ObjectTextOut(OBJECT *pList, char *szStr, int colour, if (mode & TXT_ABSOLUTE) pChar->flags |= DMA_ABS; - // set characters colour - only effective for mono fonts - pChar->constant = colour; + // set characters color - only effective for mono fonts + pChar->constant = color; // get Y animation offset GetAniOffset(hImg, pChar->flags, &aniX, &aniY); diff --git a/engines/tinsel/text.h b/engines/tinsel/text.h index a849e286ec..58cc32a593 100644 --- a/engines/tinsel/text.h +++ b/engines/tinsel/text.h @@ -72,7 +72,7 @@ struct FONT { struct TEXTOUT { OBJECT *pList; ///< object list to add text to char *szStr; ///< string to output - int colour; ///< colour for monochrome text + int color; ///< color for monochrome text int xPos; ///< x position of string int yPos; ///< y position of string SCNHANDLE hFont; ///< which font to use @@ -91,14 +91,14 @@ struct TEXTOUT { * of the list is returned. * @param pList object list to add text to * @param szStr string to output - * @param colour colour for monochrome text + * @param color color for monochrome text * @param xPos x position of string * @param yPos y position of string * @param hFont which font to use * @param mode mode flags for the string * @param sleepTime Sleep time between each character (if non-zero) */ -OBJECT *ObjectTextOut(OBJECT *pList, char *szStr, int colour, +OBJECT *ObjectTextOut(OBJECT *pList, char *szStr, int color, int xPos, int yPos, SCNHANDLE hFont, int mode, int sleepTime = 0); OBJECT *ObjectTextOutIndirect( // output a string of text diff --git a/engines/tinsel/tinlib.cpp b/engines/tinsel/tinlib.cpp index fda6958814..bf90110b3c 100644 --- a/engines/tinsel/tinlib.cpp +++ b/engines/tinsel/tinlib.cpp @@ -426,11 +426,11 @@ static void ScrollMonitorProcess(CORO_PARAM, const void *param) { /** * NOT A LIBRARY FUNCTION * - * Poke supplied colour into the DAC queue. + * Poke supplied color into the DAC queue. */ void SetTextPal(COLORREF col) { - SetTalkColourRef(col); - UpdateDACqueue(TalkColour(), col); + SetTalkColorRef(col); + UpdateDACqueue(TalkColor(), col); } /** @@ -522,7 +522,7 @@ void TinGetVersion(WHICH_VER which, char *buffer, int length) { /** * Set actor's attributes. - * - currently only the text colour. + * - currently only the text color. */ static void ActorAttr(int actor, int r1, int g1, int b1) { storeActorAttr(actor, r1, g1, b1); @@ -553,11 +553,11 @@ static int ActorDirection(int actor) { /** * Set actor's palette details for path brightnesses */ -void ActorPalette(int actor, int startColour, int length) { +void ActorPalette(int actor, int startColor, int length) { PMOVER pMover = GetMover(actor); assert(pMover); - StoreMoverPalette(pMover, startColour, length); + StoreMoverPalette(pMover, startColor, length); } /** @@ -568,10 +568,10 @@ static void ActorPriority(int actor, int zFactor) { } /** - * Set actor's text colour. + * Set actor's text color. */ -static void ActorRGB(int actor, COLORREF colour) { - SetActorRGB(actor, colour); +static void ActorRGB(int actor, COLORREF color) { + SetActorRGB(actor, color); } /** @@ -1196,9 +1196,9 @@ static int GetInvLimit(int invno) { /** * Ghost */ -static void Ghost(int actor, int tColour, int tPalOffset) { +static void Ghost(int actor, int tColor, int tPalOffset) { SetSysVar(ISV_GHOST_ACTOR, actor); - SetSysVar(ISV_GHOST_COLOUR, tColour); + SetSysVar(ISV_GHOST_COLOR, tColor); SetSysVar(ISV_GHOST_BASE, tPalOffset); CreateGhostPalette(BgPal()); } @@ -3595,12 +3595,12 @@ static void TalkPaletteIndex(unsigned index) { /** * Set talk font's palette entry. */ -static void TalkRGB(COLORREF colour, int myescEvent) { +static void TalkRGB(COLORREF color, int myescEvent) { // Don't do it if it's not wanted if (myescEvent && myescEvent != GetEscEvents()) return; - SetTextPal(colour); + SetTextPal(color); } /** diff --git a/engines/tinsel/tinlib.h b/engines/tinsel/tinlib.h index 11e59f380d..7bd2a19d55 100644 --- a/engines/tinsel/tinlib.h +++ b/engines/tinsel/tinlib.h @@ -48,7 +48,7 @@ void TinGetVersion(WHICH_VER which, char *buffer, int length); // Library functions in TINLIB.C void ActorBrightness(int actor, int brightness); -void ActorPalette(int actor, int startColour, int length); +void ActorPalette(int actor, int startColor, int length); void Control(int param); void HookScene(SCNHANDLE scene, int entrance, int transition); void NewScene(CORO_PARAM, SCNHANDLE scene, int entrance, int transition); diff --git a/engines/tsage/converse.cpp b/engines/tsage/converse.cpp index bcda6dbdcd..aea195a5ac 100644 --- a/engines/tsage/converse.cpp +++ b/engines/tsage/converse.cpp @@ -150,11 +150,11 @@ void SequenceManager::signal() { case 10: { int resNum= getNextValue(); int lineNum = getNextValue(); - int colour = getNextValue(); + int color = getNextValue(); int xp = getNextValue(); int yp = getNextValue(); int width = getNextValue(); - setMessage(resNum, lineNum, colour, Common::Point(xp, yp), width); + setMessage(resNum, lineNum, color, Common::Point(xp, yp), width); break; } case 11: @@ -332,10 +332,10 @@ uint16 SequenceManager::getNextValue() { return result; } -void SequenceManager::setMessage(int resNum, int lineNum, int colour, const Common::Point &pt, int width) { - _sceneText._colour1 = colour; - _sceneText._colour2 = 0; - _sceneText._colour3 = 0; +void SequenceManager::setMessage(int resNum, int lineNum, int color, const Common::Point &pt, int width) { + _sceneText._color1 = color; + _sceneText._color2 = 0; + _sceneText._color3 = 0; _sceneText._fontNumber = 2; _sceneText._width = width; @@ -374,8 +374,8 @@ SequenceManager *SequenceManager::globalManager() { /*--------------------------------------------------------------------------*/ ConversationChoiceDialog::ConversationChoiceDialog() { - _stdColour = 23; - _highlightColour = _globals->_scenePalette._colours.background; + _stdColor = 23; + _highlightColor = _globals->_scenePalette._colors.background; _fontNumber = 1; } @@ -438,7 +438,7 @@ int ConversationChoiceDialog::execute(const Common::StringArray &choiceList) { if (idx != _selectedIndex) { if (_selectedIndex != _choiceList.size()) { // De-highlight previously selected item - _gfxManager._font._colours.foreground = _stdColour; + _gfxManager._font._colors.foreground = _stdColor; _gfxManager._font.writeLines(_choiceList[_selectedIndex]._msg.c_str(), _choiceList[_selectedIndex]._bounds, ALIGN_LEFT); } @@ -447,7 +447,7 @@ int ConversationChoiceDialog::execute(const Common::StringArray &choiceList) { if (_selectedIndex != _choiceList.size()) { // Highlight the new item - _gfxManager._font._colours.foreground = _highlightColour; + _gfxManager._font._colors.foreground = _highlightColor; _gfxManager._font.writeLines(_choiceList[idx]._msg.c_str(), _choiceList[idx]._bounds, ALIGN_LEFT); } @@ -472,7 +472,7 @@ void ConversationChoiceDialog::draw() { drawFrame(); _gfxManager._bounds = tempRect; - _gfxManager._font._colours.foreground = _stdColour; + _gfxManager._font._colors.foreground = _stdColor; _gfxManager.activate(); // Loop through writing the conversation choices @@ -790,7 +790,7 @@ Speaker::Speaker() : EventHandler() { _textPos = Common::Point(10, 20); _fontNumber = 2; _textMode = ALIGN_LEFT; - _colour1 = _colour2 = _colour3 = _globals->_scenePalette._colours.foreground; + _color1 = _color2 = _color3 = _globals->_scenePalette._colors.foreground; _action = NULL; _speakerName = "SPEAKER"; } @@ -806,9 +806,9 @@ void Speaker::synchronise(Serialiser &s) { s.syncAsSint16LE(_textPos.x); s.syncAsSint16LE(_textPos.y); s.syncAsSint32LE(_fontNumber); SYNC_ENUM(_textMode, TextAlign); - s.syncAsSint16LE(_colour1); - s.syncAsSint16LE(_colour2); - s.syncAsSint16LE(_colour3); + s.syncAsSint16LE(_color1); + s.syncAsSint16LE(_color2); + s.syncAsSint16LE(_color3); s.syncAsByte(_hideObjects); } @@ -839,9 +839,9 @@ void Speaker::proc12(Action *action) { void Speaker::setText(const Common::String &msg) { _globals->_sceneObjects->draw(); - _sceneText._colour1 = _colour1; - _sceneText._colour2 = _colour2; - _sceneText._colour3 = _colour3; + _sceneText._color1 = _color1; + _sceneText._color2 = _color2; + _sceneText._color3 = _color3; _sceneText._width = _textWidth; _sceneText._fontNumber = _fontNumber; _sceneText._textMode = _textMode; @@ -872,7 +872,7 @@ SpeakerGameText::SpeakerGameText() : Speaker() { _speakerName = "GAMETEXT"; _textPos = Common::Point(40, 40); _textMode = ALIGN_CENTRE; - _colour1 = 7; + _color1 = 7; _textWidth = 230; _hideObjects = false; } diff --git a/engines/tsage/converse.h b/engines/tsage/converse.h index 4d6e51a6b8..7b8d944647 100644 --- a/engines/tsage/converse.h +++ b/engines/tsage/converse.h @@ -40,7 +40,7 @@ class SequenceManager : public Action { private: void setup(); uint16 getNextValue(); - void setMessage(int resNum, int lineNum, int colour, const Common::Point &pt, int width); + void setMessage(int resNum, int lineNum, int color, const Common::Point &pt, int width); SequenceManager *globalManager(); public: SceneText _sceneText; @@ -80,7 +80,7 @@ public: Common::Point _textPos; int _fontNumber; TextAlign _textMode; - int _colour1, _colour2, _colour3; + int _color1, _color2, _color3; bool _hideObjects; public: Speaker(); @@ -143,19 +143,19 @@ public: class ConversationChoiceDialog : public ModalDialog { public: - int _stdColour; - int _highlightColour; + int _stdColor; + int _highlightColor; int _fontNumber; - int _savedFgColour; + int _savedFgColor; int _savedFontNumber; Common::Array<ChoiceEntry> _choiceList; uint _selectedIndex; public: ConversationChoiceDialog(); - void setColours(int stdColour, int highlightColour) { - _stdColour = stdColour; - _highlightColour = highlightColour; + void setColors(int stdColor, int highlightColor) { + _stdColor = stdColor; + _highlightColor = highlightColor; } void setFontNumber(int fontNum) { _fontNumber = fontNum; } int execute(const Common::StringArray &choiceList); @@ -219,7 +219,7 @@ public: void start(int stripNum, EventHandler *owner, StripCallback *callback = NULL); void setCallback(StripCallback *callback) { _callbackObject = callback; } - void setColours(int stdColour, int highlightColour) { _choiceDialog.setColours(stdColour, highlightColour); } + void setColors(int stdColor, int highlightColor) { _choiceDialog.setColors(stdColor, highlightColor); } void setFontNumber(int fontNum) { _choiceDialog.setFontNumber(fontNum); } void addSpeaker(Speaker *speaker); }; diff --git a/engines/tsage/core.cpp b/engines/tsage/core.cpp index 4043c42fed..818f8b7b5c 100644 --- a/engines/tsage/core.cpp +++ b/engines/tsage/core.cpp @@ -65,7 +65,7 @@ void InvObject::setCursor() { GfxSurface s = surfaceFromRes(_iconResNum, _rlbNum, _cursorNum); Graphics::Surface src = s.lockSurface(); - _globals->_events.setCursor(src, s._transColour, s._centroid, _cursorId); + _globals->_events.setCursor(src, s._transColor, s._centroid, _cursorId); } } @@ -1263,15 +1263,15 @@ bool ScenePalette::loadPalette(int paletteNum) { } void ScenePalette::refresh() { - // Set indexes for standard colours to closest colour in the palette - _colours.background = indexOf(255, 255, 255); // White background - _colours.foreground = indexOf(0, 0, 0); // Black foreground - _redColour = indexOf(180, 0, 0); // Red-ish - _greenColour = indexOf(0, 180, 0); // Green-ish - _blueColour = indexOf(0, 0, 180); // Blue-ish - _aquaColour = indexOf(0, 180, 180); // Aqua - _purpleColour = indexOf(180, 0, 180); // Purple - _limeColour = indexOf(180, 180, 0); // Lime + // Set indexes for standard colors to closest color in the palette + _colors.background = indexOf(255, 255, 255); // White background + _colors.foreground = indexOf(0, 0, 0); // Black foreground + _redColor = indexOf(180, 0, 0); // Red-ish + _greenColor = indexOf(0, 180, 0); // Green-ish + _blueColor = indexOf(0, 0, 180); // Blue-ish + _aquaColor = indexOf(0, 180, 180); // Aqua + _purpleColor = indexOf(180, 0, 180); // Purple + _limeColor = indexOf(180, 180, 0); // Lime // Refresh the palette g_system->getPaletteManager()->setPalette((const byte *)&_palette[0], 0, 256); @@ -1285,12 +1285,12 @@ void ScenePalette::setPalette(int index, int count) { } /** - * Returns the palette index with the closest matching colour to that specified + * Returns the palette index with the closest matching color to that specified * @param r R component * @param g G component * @param b B component * @param threshold Closeness threshold. - * @remarks A threshold may be provided to specify how close the matching colour must be + * @remarks A threshold may be provided to specify how close the matching color must be */ uint8 ScenePalette::indexOf(uint r, uint g, uint b, int threshold) { int palIndex = -1; @@ -1419,16 +1419,16 @@ void ScenePalette::synchronise(Serialiser &s) { s.syncAsByte(_palette[i].g); s.syncAsByte(_palette[i].b); } - s.syncAsSint32LE(_colours.foreground); - s.syncAsSint32LE(_colours.background); + s.syncAsSint32LE(_colors.foreground); + s.syncAsSint32LE(_colors.background); s.syncAsSint32LE(_field412); - s.syncAsByte(_redColour); - s.syncAsByte(_greenColour); - s.syncAsByte(_blueColour); - s.syncAsByte(_aquaColour); - s.syncAsByte(_purpleColour); - s.syncAsByte(_limeColour); + s.syncAsByte(_redColor); + s.syncAsByte(_greenColor); + s.syncAsByte(_blueColor); + s.syncAsByte(_aquaColor); + s.syncAsByte(_purpleColor); + s.syncAsByte(_limeColor); } /*--------------------------------------------------------------------------*/ @@ -1526,35 +1526,35 @@ void SceneItem::display(int resNum, int lineNum, ...) { _globals->_sceneText._fontNumber = va_arg(va, int); _globals->gfxManager()._font.setFontNumber(_globals->_sceneText._fontNumber); break; - case SET_BG_COLOUR: { - // Set the background colour - int bgColour = va_arg(va, int); - _globals->gfxManager()._font._colours.background = bgColour; - if (!bgColour) + case SET_BG_COLOR: { + // Set the background color + int bgColor = va_arg(va, int); + _globals->gfxManager()._font._colors.background = bgColor; + if (!bgColor) _globals->gfxManager().setFillFlag(false); break; } - case SET_FG_COLOUR: - // Set the foreground colour - _globals->_sceneText._colour1 = va_arg(va, int); - _globals->gfxManager()._font._colours.foreground = _globals->_sceneText._colour1; + case SET_FG_COLOR: + // Set the foreground color + _globals->_sceneText._color1 = va_arg(va, int); + _globals->gfxManager()._font._colors.foreground = _globals->_sceneText._color1; break; case SET_KEEP_ONSCREEN: // Suppresses immediate display keepOnscreen = va_arg(va, int) != 0; break; - case SET_EXT_BGCOLOUR: { - // Set secondary bg colour + case SET_EXT_BGCOLOR: { + // Set secondary bg color int v = va_arg(va, int); - _globals->_sceneText._colour2 = v; - _globals->gfxManager()._font._colours2.background = v; + _globals->_sceneText._color2 = v; + _globals->gfxManager()._font._colors2.background = v; break; } - case SET_EXT_FGCOLOUR: { - // Set secondary fg colour + case SET_EXT_FGCOLOR: { + // Set secondary fg color int v = va_arg(va, int); - _globals->_sceneText._colour3 = v; - _globals->gfxManager()._font._colours.foreground = v; + _globals->_sceneText._color3 = v; + _globals->gfxManager()._font._colors.foreground = v; break; } case SET_POS_MODE: @@ -1580,9 +1580,9 @@ void SceneItem::display(int resNum, int lineNum, ...) { textRect.contain(_globals->gfxManager()._bounds); if (centreText) { - _globals->_sceneText._colour1 = _globals->_sceneText._colour2; - _globals->_sceneText._colour2 = 0; - _globals->_sceneText._colour3 = 0; + _globals->_sceneText._color1 = _globals->_sceneText._color2; + _globals->_sceneText._color2 = 0; + _globals->_sceneText._color3 = 0; } _globals->_sceneText.setup(msg); @@ -1618,18 +1618,18 @@ void SceneItem::display(int resNum, int lineNum, ...) { void SceneHotspot::doAction(int action) { switch ((int)action) { case CURSOR_LOOK: - display(1, 0, SET_Y, 20, SET_WIDTH, 200, SET_EXT_BGCOLOUR, 7, LIST_END); + display(1, 0, SET_Y, 20, SET_WIDTH, 200, SET_EXT_BGCOLOR, 7, LIST_END); break; case CURSOR_USE: - display(1, 5, SET_Y, 20, SET_WIDTH, 200, SET_EXT_BGCOLOUR, 7, LIST_END); + display(1, 5, SET_Y, 20, SET_WIDTH, 200, SET_EXT_BGCOLOR, 7, LIST_END); break; case CURSOR_TALK: - display(1, 15, SET_Y, 20, SET_WIDTH, 200, SET_EXT_BGCOLOUR, 7, LIST_END); + display(1, 15, SET_Y, 20, SET_WIDTH, 200, SET_EXT_BGCOLOR, 7, LIST_END); break; case CURSOR_WALK: break; default: - display(2, action, SET_Y, 20, SET_WIDTH, 200, SET_EXT_BGCOLOUR, 7, LIST_END); + display(2, action, SET_Y, 20, SET_WIDTH, 200, SET_EXT_BGCOLOR, 7, LIST_END); break; } } @@ -1645,13 +1645,13 @@ void NamedHotspot::doAction(int action) { if (_lookLineNum == -1) SceneHotspot::doAction(action); else - SceneItem::display(_resnum, _lookLineNum, SET_Y, 20, SET_WIDTH, 200, SET_EXT_BGCOLOUR, 7, LIST_END); + SceneItem::display(_resnum, _lookLineNum, SET_Y, 20, SET_WIDTH, 200, SET_EXT_BGCOLOR, 7, LIST_END); break; case CURSOR_USE: if (_useLineNum == -1) SceneHotspot::doAction(action); else - SceneItem::display(_resnum, _useLineNum, SET_Y, 20, SET_WIDTH, 200, SET_EXT_BGCOLOUR, 7, LIST_END); + SceneItem::display(_resnum, _useLineNum, SET_Y, 20, SET_WIDTH, 200, SET_EXT_BGCOLOR, 7, LIST_END); break; default: SceneHotspot::doAction(action); @@ -2574,8 +2574,8 @@ SceneText::SceneText() : SceneObject() { _fontNumber = 2; _width = 160; _textMode = ALIGN_LEFT; - _colour2 = 0; - _colour3 = 0; + _color2 = 0; + _color3 = 0; } SceneText::~SceneText() { @@ -2587,16 +2587,16 @@ void SceneText::setup(const Common::String &msg) { Rect textRect; gfxMan._font.setFontNumber(_fontNumber); - gfxMan._font._colours.foreground = _colour1; - gfxMan._font._colours2.background = _colour2; - gfxMan._font._colours2.foreground = _colour3; + gfxMan._font._colors.foreground = _color1; + gfxMan._font._colors2.background = _color2; + gfxMan._font._colors2.foreground = _color3; gfxMan.getStringBounds(msg.c_str(), textRect, _width); // Set up a new blank surface to hold the text _textSurface.create(textRect.width(), textRect.height()); - _textSurface._transColour = 0xff; - _textSurface.fillRect(textRect, _textSurface._transColour); + _textSurface._transColor = 0xff; + _textSurface.fillRect(textRect, _textSurface._transColor); // Write the text to the surface gfxMan._bounds = textRect; @@ -2612,9 +2612,9 @@ void SceneText::synchronise(Serialiser &s) { s.syncAsSint16LE(_fontNumber); s.syncAsSint16LE(_width); - s.syncAsSint16LE(_colour1); - s.syncAsSint16LE(_colour2); - s.syncAsSint16LE(_colour3); + s.syncAsSint16LE(_color1); + s.syncAsSint16LE(_color2); + s.syncAsSint16LE(_color3); SYNC_ENUM(_textMode, TextAlign); } diff --git a/engines/tsage/core.h b/engines/tsage/core.h index 2e3e5365a9..13ab361ed1 100644 --- a/engines/tsage/core.h +++ b/engines/tsage/core.h @@ -370,16 +370,16 @@ enum FadeMode {FADEMODE_NONE = 0, FADEMODE_GRADUAL = 1, FADEMODE_IMMEDIATE = 2}; class ScenePalette : public SavedObject { public: RGB8 _palette[256]; - GfxColours _colours; + GfxColors _colors; SynchronisedList<PaletteModifier *> _listeners; int _field412; - uint8 _redColour; - uint8 _greenColour; - uint8 _blueColour; - uint8 _aquaColour; - uint8 _purpleColour; - uint8 _limeColour; + uint8 _redColor; + uint8 _greenColor; + uint8 _blueColor; + uint8 _aquaColor; + uint8 _purpleColor; + uint8 _limeColor; public: ScenePalette(); ScenePalette(int paletteNum); @@ -406,11 +406,11 @@ const int SET_WIDTH = 0; const int SET_X = 1; const int SET_Y = 2; const int SET_FONT = 3; -const int SET_BG_COLOUR = 4; -const int SET_FG_COLOUR = 5; +const int SET_BG_COLOR = 4; +const int SET_FG_COLOR = 5; const int SET_KEEP_ONSCREEN = 6; -const int SET_EXT_BGCOLOUR = 7; -const int SET_EXT_FGCOLOUR = 8; +const int SET_EXT_BGCOLOR = 7; +const int SET_EXT_FGCOLOR = 8; const int SET_POS_MODE = 9; const int SET_TEXT_MODE = 10; const int LIST_END = -999; @@ -438,7 +438,7 @@ public: void setBounds(const int ys, const int xe, const int ye, const int xs) { _bounds = Rect(MIN(xs, xe), MIN(ys, ye), MAX(xs, xe), MAX(ys, ye)); } static void display(int resNum, int lineNum, ...); static void display2(int resNum, int lineNum) { - display(resNum, lineNum, SET_WIDTH, 200, SET_EXT_BGCOLOUR, 7, LIST_END); + display(resNum, lineNum, SET_WIDTH, 200, SET_EXT_BGCOLOR, 7, LIST_END); } }; @@ -610,9 +610,9 @@ public: int _fontNumber; int _width; TextAlign _textMode; - int _colour1; - int _colour2; - int _colour3; + int _color1; + int _color2; + int _color3; GfxSurface _textSurface; public: SceneText(); diff --git a/engines/tsage/debugger.cpp b/engines/tsage/debugger.cpp index d04fd71461..9f4d197377 100644 --- a/engines/tsage/debugger.cpp +++ b/engines/tsage/debugger.cpp @@ -81,14 +81,14 @@ bool Debugger::Cmd_WalkRegions(int argc, const char **argv) { return true; } - // Colour index to use for the first walk region - int colour = 16; + // Color index to use for the first walk region + int color = 16; // Lock the background surface for access Graphics::Surface destSurface = _globals->_sceneManager._scene->_backSurface.lockSurface(); - // Loop through drawing each walk region in a different colour to the background surface - for (uint regionIndex = 0; regionIndex < _globals->_walkRegions._regionList.size(); ++regionIndex, ++colour) { + // Loop through drawing each walk region in a different color to the background surface + for (uint regionIndex = 0; regionIndex < _globals->_walkRegions._regionList.size(); ++regionIndex, ++color) { WalkRegion &wr = _globals->_walkRegions._regionList[regionIndex]; for (int yp = wr._bounds.top; yp < wr._bounds.bottom; ++yp) { @@ -96,7 +96,7 @@ bool Debugger::Cmd_WalkRegions(int argc, const char **argv) { for (uint idx = 0; idx < sliceSet.items.size(); ++idx) destSurface.hLine(sliceSet.items[idx].xs - _globals->_sceneOffset.x, yp, - sliceSet.items[idx].xe - _globals->_sceneOffset.x, colour); + sliceSet.items[idx].xe - _globals->_sceneOffset.x, color); } } @@ -119,8 +119,8 @@ bool Debugger::Cmd_PriorityRegions(int argc, const char **argv) { if (argc == 2) regionNum = strToInt(argv[1]); - // Colour index to use for the first priority region - int colour = 16; + // Color index to use for the first priority region + int color = 16; int count = 0; // Lock the background surface for access @@ -129,7 +129,7 @@ bool Debugger::Cmd_PriorityRegions(int argc, const char **argv) { Common::List<Region>::iterator i = _globals->_sceneManager._scene->_priorities.begin(); Common::String regionsDesc; - for (; i != _globals->_sceneManager._scene->_priorities.end(); ++i, ++colour, ++count) { + for (; i != _globals->_sceneManager._scene->_priorities.end(); ++i, ++color, ++count) { Region &r = *i; if ((regionNum == 0) || (regionNum == (count + 1))) { @@ -139,7 +139,7 @@ bool Debugger::Cmd_PriorityRegions(int argc, const char **argv) { for (int x = 0; x < destSurface.w; ++x) { if (r.contains(Common::Point(_globals->_sceneManager._scene->_sceneBounds.left + x, _globals->_sceneManager._scene->_sceneBounds.top + y))) - *destP = colour; + *destP = color; ++destP; } } diff --git a/engines/tsage/events.cpp b/engines/tsage/events.cpp index fa5ecdcde6..83cafcaac5 100644 --- a/engines/tsage/events.cpp +++ b/engines/tsage/events.cpp @@ -201,16 +201,16 @@ void EventsClass::setCursor(CursorType cursorType) { Graphics::Surface surface = s.lockSurface(); const byte *cursorData = (const byte *)surface.getBasePtr(0, 0); - CursorMan.replaceCursor(cursorData, surface.w, surface.h, s._centroid.x, s._centroid.y, s._transColour); + CursorMan.replaceCursor(cursorData, surface.w, surface.h, s._centroid.x, s._centroid.y, s._transColor); s.unlockSurface(); if (delFlag) DEALLOCATE(cursor); } -void EventsClass::setCursor(Graphics::Surface &cursor, int transColour, const Common::Point &hotspot, CursorType cursorId) { +void EventsClass::setCursor(Graphics::Surface &cursor, int transColor, const Common::Point &hotspot, CursorType cursorId) { const byte *cursorData = (const byte *)cursor.getBasePtr(0, 0); - CursorMan.replaceCursor(cursorData, cursor.w, cursor.h, hotspot.x, hotspot.y, transColour); + CursorMan.replaceCursor(cursorData, cursor.w, cursor.h, hotspot.x, hotspot.y, transColor); _currentCursor = cursorId; } diff --git a/engines/tsage/events.h b/engines/tsage/events.h index 202ac9ccd2..ef0256e81f 100644 --- a/engines/tsage/events.h +++ b/engines/tsage/events.h @@ -82,7 +82,7 @@ public: CursorType _currentCursor; void setCursor(CursorType cursorType); - void setCursor(Graphics::Surface &cursor, int transColour, const Common::Point &hotspot, CursorType cursorId); + void setCursor(Graphics::Surface &cursor, int transColor, const Common::Point &hotspot, CursorType cursorId); void setCursorFromFlag(); CursorType getCursor() const { return _currentCursor; } void showCursor(); diff --git a/engines/tsage/globals.cpp b/engines/tsage/globals.cpp index b9abb9d751..fc764172f5 100644 --- a/engines/tsage/globals.cpp +++ b/engines/tsage/globals.cpp @@ -52,10 +52,10 @@ Globals::Globals() : reset(); _stripNum = 0; _gfxFontNumber = 50; - _gfxColours.background = 53; - _gfxColours.foreground = 18; - _fontColours.background = 51; - _fontColours.foreground = 54; + _gfxColors.background = 53; + _gfxColors.foreground = 18; + _fontColors.background = 51; + _fontColors.foreground = 54; _screenSurface.setScreenSurface(); _gfxManagers.push_back(&_gfxManagerInstance); @@ -84,10 +84,10 @@ void Globals::synchronise(Serialiser &s) { SYNC_POINTER(_sceneObjects); _sceneObjects_queue.synchronise(s); s.syncAsSint32LE(_gfxFontNumber); - s.syncAsSint32LE(_gfxColours.background); - s.syncAsSint32LE(_gfxColours.foreground); - s.syncAsSint32LE(_fontColours.background); - s.syncAsSint32LE(_fontColours.foreground); + s.syncAsSint32LE(_gfxColors.background); + s.syncAsSint32LE(_gfxColors.foreground); + s.syncAsSint32LE(_fontColors.background); + s.syncAsSint32LE(_fontColors.foreground); s.syncAsSint16LE(_dialogCentre.x); s.syncAsSint16LE(_dialogCentre.y); _sceneListeners.synchronise(s); diff --git a/engines/tsage/globals.h b/engines/tsage/globals.h index 59afe140a0..bd60d25bf8 100644 --- a/engines/tsage/globals.h +++ b/engines/tsage/globals.h @@ -52,8 +52,8 @@ public: SynchronisedList<SceneObjectList *> _sceneObjects_queue; SceneText _sceneText; int _gfxFontNumber; - GfxColours _gfxColours; - GfxColours _fontColours; + GfxColors _gfxColors; + GfxColors _fontColors; SoundManager _soundManager; Common::Point _dialogCentre; WalkRegions _walkRegions; diff --git a/engines/tsage/graphics.cpp b/engines/tsage/graphics.cpp index 641e10b3e9..0dbb48eb63 100644 --- a/engines/tsage/graphics.cpp +++ b/engines/tsage/graphics.cpp @@ -72,7 +72,7 @@ GfxSurface surfaceFromRes(const byte *imgData) { s.create(r.width(), r.height()); s._centroid.x = READ_LE_UINT16(imgData + 4); s._centroid.y = READ_LE_UINT16(imgData + 6); - s._transColour = *(imgData + 8); + s._transColor = *(imgData + 8); bool rleEncoded = (imgData[9] & 2) != 0; @@ -83,7 +83,7 @@ GfxSurface surfaceFromRes(const byte *imgData) { if (!rleEncoded) { Common::copy(srcP, srcP + (r.width() * r.height()), destP); } else { - Common::set_to(destP, destP + (r.width() * r.height()), s._transColour); + Common::set_to(destP, destP + (r.width() * r.height()), s._transColor); for (int yp = 0; yp < r.height(); ++yp) { int width = r.width(); @@ -301,14 +301,14 @@ void GfxSurface::unlockSurface() { } /** - * Fills a specified rectangle on the surface with the specified colour + * Fills a specified rectangle on the surface with the specified color * * @bounds Area to fill - * @colour Colour to use + * @color Color to use */ -void GfxSurface::fillRect(const Rect &bounds, int colour) { +void GfxSurface::fillRect(const Rect &bounds, int color) { Graphics::Surface surface = lockSurface(); - surface.fillRect(bounds, colour); + surface.fillRect(bounds, color); unlockSurface(); } @@ -326,7 +326,7 @@ GfxSurface &GfxSurface::operator=(const GfxSurface &s) { _disableUpdates = s._disableUpdates; _bounds = s._bounds; _centroid = s._centroid; - _transColour = s._transColour; + _transColor = s._transColor; if (_customSurface) { // Surface owns the internal data, so replicate it so new surface owns it's own @@ -348,8 +348,8 @@ bool GfxSurface::displayText(const Common::String &msg, const Common::Point &pt) // Set up a new graphics manager GfxManager gfxManager; gfxManager.activate(); - gfxManager._font._colours.background = 0; - gfxManager._font._colours.foreground = 7; + gfxManager._font._colors.background = 0; + gfxManager._font._colors.foreground = 7; gfxManager._font.setFontNumber(2); // Get the area for text display @@ -519,7 +519,7 @@ void GfxSurface::copyFrom(GfxSurface &src, Rect srcBounds, Rect destBounds, Regi for (int y = 0; y < destBounds.height(); ++y, pSrc += srcSurface.pitch, pDest += destSurface.pitch) { - if (!priorityRegion && (src._transColour == -1)) + if (!priorityRegion && (src._transColor == -1)) Common::copy(pSrc, pSrc + destBounds.width(), pDest); else { const byte *tempSrc = pSrc; @@ -530,7 +530,7 @@ void GfxSurface::copyFrom(GfxSurface &src, Rect srcBounds, Rect destBounds, Regi if (!priorityRegion || !priorityRegion->contains(Common::Point( xp + _globals->_sceneManager._scene->_sceneBounds.left, destBounds.top + y + _globals->_sceneManager._scene->_sceneBounds.top))) { - if (*tempSrc != src._transColour) + if (*tempSrc != src._transColor) *tempDest = *tempSrc; } ++tempSrc; @@ -570,8 +570,8 @@ GfxElement::GfxElement() { void GfxElement::setDefaults() { _flags = 0; _fontNumber = _globals->_gfxFontNumber; - _colours = _globals->_gfxColours; - _fontColours = _globals->_fontColours; + _colors = _globals->_gfxColors; + _fontColors = _globals->_fontColors; } /** @@ -583,15 +583,15 @@ void GfxElement::highlight() { Graphics::Surface surface = gfxManager.lockSurface(); // Scan through the contents of the element, switching any occurances of the foreground - // colour with the background colour and vice versa + // color with the background color and vice versa Rect tempRect(_bounds); tempRect.collapse(2, 2); for (int yp = tempRect.top; yp < tempRect.bottom; ++yp) { byte *lineP = (byte *)surface.getBasePtr(tempRect.left, yp); for (int xp = tempRect.left; xp < tempRect.right; ++xp, ++lineP) { - if (*lineP == _colours.background) *lineP = _colours.foreground; - else if (*lineP == _colours.foreground) *lineP = _colours.background; + if (*lineP == _colors.background) *lineP = _colors.foreground; + else if (*lineP == _colors.foreground) *lineP = _colors.background; } } @@ -607,31 +607,31 @@ void GfxElement::drawFrame() { GfxManager &gfxManager = _globals->gfxManager(); gfxManager.lockSurface(); - uint8 bgColour, fgColour; + uint8 bgColor, fgColor; if (_flags & GFXFLAG_THICK_FRAME) { - bgColour = 0; - fgColour = 0; + bgColor = 0; + fgColor = 0; } else { - bgColour = _fontColours.background; - fgColour = _fontColours.foreground; + bgColor = _fontColors.background; + fgColor = _fontColors.foreground; } Rect tempRect = _bounds; tempRect.collapse(3, 3); tempRect.collapse(-1, -1); - gfxManager.fillRect(tempRect, _colours.background); + gfxManager.fillRect(tempRect, _colors.background); --tempRect.bottom; --tempRect.right; - gfxManager.fillArea(tempRect.left, tempRect.top, bgColour); - gfxManager.fillArea(tempRect.left, tempRect.bottom, fgColour); - gfxManager.fillArea(tempRect.right, tempRect.top, fgColour); - gfxManager.fillArea(tempRect.right, tempRect.bottom, fgColour); + gfxManager.fillArea(tempRect.left, tempRect.top, bgColor); + gfxManager.fillArea(tempRect.left, tempRect.bottom, fgColor); + gfxManager.fillArea(tempRect.right, tempRect.top, fgColor); + gfxManager.fillArea(tempRect.right, tempRect.bottom, fgColor); tempRect.collapse(-1, -1); - gfxManager.fillRect2(tempRect.left + 1, tempRect.top, tempRect.width() - 1, 1, bgColour); - gfxManager.fillRect2(tempRect.left, tempRect.top + 1, 1, tempRect.height() - 1, bgColour); - gfxManager.fillRect2(tempRect.left + 1, tempRect.bottom, tempRect.width() - 1, 1, fgColour); - gfxManager.fillRect2(tempRect.right, tempRect.top + 1, 1, tempRect.height() - 1, fgColour); + gfxManager.fillRect2(tempRect.left + 1, tempRect.top, tempRect.width() - 1, 1, bgColor); + gfxManager.fillRect2(tempRect.left, tempRect.top + 1, 1, tempRect.height() - 1, bgColor); + gfxManager.fillRect2(tempRect.left + 1, tempRect.bottom, tempRect.width() - 1, 1, fgColor); + gfxManager.fillRect2(tempRect.right, tempRect.top + 1, 1, tempRect.height() - 1, fgColor); gfxManager.fillArea(tempRect.left, tempRect.top, 0); gfxManager.fillArea(tempRect.left, tempRect.bottom, 0); @@ -753,10 +753,10 @@ void GfxMessage::draw() { GfxFontBackup font; GfxManager &gfxManager = _globals->gfxManager(); - // Set the font and colour + // Set the font and color gfxManager.setFillFlag(false); gfxManager._font.setFontNumber(_fontNumber); - gfxManager._font._colours.foreground = this->_colours.foreground; + gfxManager._font._colors.foreground = this->_colors.foreground; // Display the text gfxManager._font.writeLines(_message.c_str(), _bounds, _textAlign); @@ -791,9 +791,9 @@ void GfxButton::draw() { // Draw a basic frame for the button drawFrame(); - // Set the font and colour + // Set the font and color gfxManager._font.setFontNumber(_fontNumber); - gfxManager._font._colours.foreground = this->_colours.foreground; + gfxManager._font._colors.foreground = this->_colors.foreground; // Display the button's text Rect tempRect(_bounds); @@ -986,9 +986,9 @@ GfxButton *GfxDialog::execute(GfxButton *defaultButton) { void GfxDialog::setPalette() { _globals->_scenePalette.loadPalette(0); _globals->_scenePalette.setPalette(0, 1); - _globals->_scenePalette.setPalette(_globals->_scenePalette._colours.foreground, 1); - _globals->_scenePalette.setPalette(_globals->_fontColours.background, 1); - _globals->_scenePalette.setPalette(_globals->_fontColours.foreground, 1); + _globals->_scenePalette.setPalette(_globals->_scenePalette._colors.foreground, 1); + _globals->_scenePalette.setPalette(_globals->_fontColors.background, 1); + _globals->_scenePalette.setPalette(_globals->_fontColors.foreground, 1); _globals->_scenePalette.setPalette(255, 1); } @@ -1013,7 +1013,7 @@ void GfxManager::setDefaults() { _pane0Rect4 = screenBounds; _font._edgeSize = Common::Point(1, 1); - _font._colours = _globals->_fontColours; + _font._colors = _globals->_fontColors; _font.setFontNumber(_globals->_gfxFontNumber); } @@ -1040,20 +1040,20 @@ void GfxManager::getStringBounds(const char *s, Rect &bounds, int maxWidth) { _font.getStringBounds(s, bounds, maxWidth); } -void GfxManager::fillArea(int xp, int yp, int colour) { +void GfxManager::fillArea(int xp, int yp, int color) { _surface.setBounds(_bounds); Rect tempRect(xp, yp, xp + _font._edgeSize.x, yp + _font._edgeSize.y); - _surface.fillRect(tempRect, colour); + _surface.fillRect(tempRect, color); } -void GfxManager::fillRect(const Rect &bounds, int colour) { +void GfxManager::fillRect(const Rect &bounds, int color) { _surface.setBounds(_bounds); - _surface.fillRect(bounds, colour); + _surface.fillRect(bounds, color); } -void GfxManager::fillRect2(int xs, int ys, int width, int height, int colour) { +void GfxManager::fillRect2(int xs, int ys, int width, int height, int color) { _surface.setBounds(_bounds); - _surface.fillRect(Rect(xs, ys, xs + width, ys + height), colour); + _surface.fillRect(Rect(xs, ys, xs + width, ys + height), color); } /** @@ -1268,7 +1268,7 @@ int GfxFont::writeChar(const char ch) { charRect.translate(_topLeft.x + _position.x, _topLeft.y + _position.y + yOffset); if (_fillFlag) - surfacePtr.fillRect(charRect, _colours.background); + surfacePtr.fillRect(charRect, _colors.background); charRect.bottom = charRect.top + charHeight; @@ -1279,7 +1279,7 @@ int GfxFont::writeChar(const char ch) { byte *destP = (byte *)surfacePtr.getBasePtr(charRect.left, yp); for (int xs = 0; xs < charRect.width(); ++xs, ++destP) { - // Get the next colour index to use + // Get the next color index to use if ((bitCtr % 8) == 0) v = *dataP++; int colIndex = 0; for (int subCtr = 0; subCtr < _bpp; ++subCtr, ++bitCtr) { @@ -1288,10 +1288,10 @@ int GfxFont::writeChar(const char ch) { } switch (colIndex) { - //case 0: *destP = _colours.background; break; - case 1: *destP = _colours.foreground; break; - case 2: *destP = _colours2.background; break; - case 3: *destP = _colours2.foreground; break; + //case 0: *destP = _colors.background; break; + case 1: *destP = _colors.foreground; break; + case 2: *destP = _colors2.background; break; + case 3: *destP = _colors2.foreground; break; } } } @@ -1415,7 +1415,7 @@ void GfxFont::writeLines(const char *s, const Rect &bounds, TextAlign align) { GfxFontBackup::GfxFontBackup() { _edgeSize = _globals->gfxManager()._font._edgeSize; _position = _globals->gfxManager()._font._position; - _colours = _globals->gfxManager()._font._colours; + _colors = _globals->gfxManager()._font._colors; _fontNumber = _globals->gfxManager()._font._fontNumber; } @@ -1423,7 +1423,7 @@ GfxFontBackup::~GfxFontBackup() { _globals->gfxManager()._font.setFontNumber(_fontNumber); _globals->gfxManager()._font._edgeSize = _edgeSize; _globals->gfxManager()._font._position = _position; - _globals->gfxManager()._font._colours = _colours; + _globals->gfxManager()._font._colors = _colors; } diff --git a/engines/tsage/graphics.h b/engines/tsage/graphics.h index 0ad76772b3..b4ae20227e 100644 --- a/engines/tsage/graphics.h +++ b/engines/tsage/graphics.h @@ -58,12 +58,12 @@ public: virtual void synchronise(Serialiser &s); }; -class GfxColours { +class GfxColors { public: uint8 foreground; uint8 background; - GfxColours() : foreground(0), background(0) {}; + GfxColors() : foreground(0), background(0) {}; }; class LineSlice { @@ -85,7 +85,7 @@ private: Rect _bounds; public: Common::Point _centroid; - int _transColour; + int _transColor; public: GfxSurface(); GfxSurface(const GfxSurface &s); @@ -108,7 +108,7 @@ public: copyFrom(src, tempRect, priorityRegion); } void draw(const Common::Point &pt, Rect *rect = NULL); - void fillRect(const Rect &bounds, int colour); + void fillRect(const Rect &bounds, int color); GfxSurface &operator=(const GfxSurface &s); static void loadScreenSection(Graphics::Surface &dest, int xHalf, int yHalf, int xSection, int ySection); @@ -131,8 +131,8 @@ public: Common::Point _edgeSize; Common::Point _position; bool _fillFlag; - GfxColours _colours; - GfxColours _colours2; + GfxColors _colors; + GfxColors _colors2; uint32 _fontNumber; Common::Point _topLeft; public: @@ -160,7 +160,7 @@ private: GfxSurface *_surface; Common::Point _edgeSize; Common::Point _position; - GfxColours _colours; + GfxColors _colors; uint32 _fontNumber; public: GfxFontBackup(); @@ -177,8 +177,8 @@ public: Rect _bounds; uint16 _flags; uint16 _fontNumber; - GfxColours _colours; - GfxColours _fontColours; + GfxColors _colors; + GfxColors _fontColors; uint16 _keycode; public: GfxElement(); @@ -275,19 +275,19 @@ public: return _surface.lockSurface(); } void unlockSurface() { _surface.unlockSurface(); }; - void fillArea(int xp, int yp, int colour); - void fillRect(const Rect &bounds, int colour); - void fillRect2(int xs, int ys, int width, int height, int colour); + void fillArea(int xp, int yp, int color); + void fillRect(const Rect &bounds, int color); + void fillRect2(int xs, int ys, int width, int height, int color); void setFillFlag(bool v) { _font._fillFlag = v; } static int getAngle(const Common::Point &p1, const Common::Point &p2); // Virtual method table - virtual void xorArea(const Common::Rect &r, int colour, int fillMode) { - //_surface->xorArea(r, colour, fillMode); + virtual void xorArea(const Common::Rect &r, int color, int fillMode) { + //_surface->xorArea(r, color, fillMode); } - virtual void draw(const Common::Rect &r, void *gfxData, int v1, GfxColours *colours) { - //_surface->draw(r, gfxData, v1, colours); + virtual void draw(const Common::Rect &r, void *gfxData, int v1, GfxColors *colors) { + //_surface->draw(r, gfxData, v1, colors); } virtual void copy(const byte *src, byte *dest, int size) { Common::copy(src, src + size, dest); diff --git a/engines/tsage/ringworld_logic.cpp b/engines/tsage/ringworld_logic.cpp index 32f62bea76..ac92134393 100644 --- a/engines/tsage/ringworld_logic.cpp +++ b/engines/tsage/ringworld_logic.cpp @@ -196,7 +196,7 @@ DisplayHotspot::DisplayHotspot(int regionId, ...) { bool DisplayHotspot::performAction(int action) { for (uint i = 0; i < _actions.size(); i += 3) { if (_actions[i] == action) { - display(_actions[i + 1], _actions[i + 2], SET_WIDTH, 200, SET_EXT_BGCOLOUR, 7, LIST_END); + display(_actions[i + 1], _actions[i + 2], SET_WIDTH, 200, SET_EXT_BGCOLOR, 7, LIST_END); return true; } } @@ -223,7 +223,7 @@ DisplayObject::DisplayObject(int firstAction, ...) { bool DisplayObject::performAction(int action) { for (uint i = 0; i < _actions.size(); i += 3) { if (_actions[i] == action) { - display(_actions[i + 1], _actions[i + 2], SET_WIDTH, 200, SET_EXT_BGCOLOUR, 7, LIST_END); + display(_actions[i + 1], _actions[i + 2], SET_WIDTH, 200, SET_EXT_BGCOLOR, 7, LIST_END); return true; } } @@ -313,7 +313,7 @@ SpeakerGText::SpeakerGText() { _speakerName = "GTEXT"; _textWidth = 160; _textPos = Common::Point(130, 10); - _colour1 = 42; + _color1 = 42; _hideObjects = false; } @@ -347,7 +347,7 @@ SpeakerPOR::SpeakerPOR() { _speakerName = "POR"; _newSceneNumber = 7221; _textPos = Common::Point(10, 30); - _colour1 = 41; + _color1 = 41; } void SpeakerPOR::SpeakerAction1::signal(){ @@ -395,7 +395,7 @@ SpeakerOR::SpeakerOR() { _speakerName = "OR"; _newSceneNumber = 9430; _textPos = Common::Point(8, 36); - _colour1 = 42; + _color1 = 42; _textWidth = 136; } @@ -427,7 +427,7 @@ SpeakerOText::SpeakerOText() : SpeakerGText() { _speakerName = "OTEXT"; _textWidth = 240; _textPos = Common::Point(130, 10); - _colour1 = 42; + _color1 = 42; _hideObjects = false; } @@ -436,7 +436,7 @@ SpeakerOText::SpeakerOText() : SpeakerGText() { SpeakerQText::SpeakerQText() : ScreenSpeaker() { _speakerName = "QTEXT"; _textPos = Common::Point(160, 40); - _colour1 = 35; + _color1 = 35; _textWidth = 240; _textMode = ALIGN_CENTRE; _hideObjects = false; @@ -446,7 +446,7 @@ SpeakerQText::SpeakerQText() : ScreenSpeaker() { SpeakerSText::SpeakerSText() : ScreenSpeaker() { _speakerName = "STEXT"; - _colour1 = 13; + _color1 = 13; _textWidth = 240; _textMode = ALIGN_CENTRE; _hideObjects = false; @@ -458,7 +458,7 @@ SpeakerPOText::SpeakerPOText() : ScreenSpeaker() { _speakerName = "POTEXT"; _textWidth = 240; _textMode = ALIGN_CENTRE; - _colour1 = 41; + _color1 = 41; _hideObjects = false; } @@ -466,7 +466,7 @@ SpeakerPOText::SpeakerPOText() : ScreenSpeaker() { SpeakerMText::SpeakerMText() { _speakerName = "MTEXT"; - _colour1 = 11; + _color1 = 11; _textWidth = 160; _textMode = ALIGN_CENTRE; _hideObjects = false; @@ -476,7 +476,7 @@ SpeakerMText::SpeakerMText() { SpeakerCText::SpeakerCText() { _speakerName = "CTEXT"; - _colour1 = 4; + _color1 = 4; _textWidth = 240; _textMode = ALIGN_CENTRE; _hideObjects = false; @@ -487,7 +487,7 @@ SpeakerCText::SpeakerCText() { SpeakerEText::SpeakerEText() { _speakerName = "ETEXT"; _textPos = Common::Point(20, 20); - _colour1 = 22; + _color1 = 22; _hideObjects = false; } @@ -498,7 +498,7 @@ SpeakerGR::SpeakerGR() { _newSceneNumber = 9220; _textWidth = 136; _textPos = Common::Point(168, 36); - _colour1 = 14; + _color1 = 14; } /*--------------------------------------------------------------------------*/ @@ -506,7 +506,7 @@ SpeakerGR::SpeakerGR() { SpeakerHText::SpeakerHText() { _speakerName = "HTEXT"; _textPos = Common::Point(160, 40); - _colour1 = 52; + _color1 = 52; _hideObjects = false; } @@ -516,7 +516,7 @@ SpeakerSKText::SpeakerSKText() : ScreenSpeaker() { _speakerName = "SKTEXT"; _textWidth = 240; _textMode = ALIGN_CENTRE; - _colour1 = 5; + _color1 = 5; _hideObjects = false; } @@ -526,7 +526,7 @@ SpeakerPText::SpeakerPText() { _speakerName = "PTEXT"; _textWidth = 240; _textMode = ALIGN_CENTRE; - _colour1 = 5; + _color1 = 5; _hideObjects = false; } @@ -536,7 +536,7 @@ SpeakerCHFText::SpeakerCHFText() { _speakerName = "CHFTEXT"; _textWidth = 240; _textMode = ALIGN_CENTRE; - _colour1 = 56; + _color1 = 56; _hideObjects = false; } @@ -546,7 +546,7 @@ SpeakerCDRText::SpeakerCDRText() { _speakerName = "CDRTEXT"; _textWidth = 240; _textMode = ALIGN_CENTRE; - _colour1 = 52; + _color1 = 52; _hideObjects = false; } @@ -555,7 +555,7 @@ SpeakerCDRText::SpeakerCDRText() { SpeakerFLText::SpeakerFLText() { _speakerName = "FLTEXT"; _textPos = Common::Point(10, 40); - _colour1 = 17; + _color1 = 17; _hideObjects = false; } @@ -565,7 +565,7 @@ SpeakerBatText::SpeakerBatText() { _speakerName = "BATTEXT"; _textWidth = 240; _textMode = ALIGN_CENTRE; - _colour1 = 3; + _color1 = 3; _hideObjects = false; } @@ -575,7 +575,7 @@ SpeakerSKL::SpeakerSKL() : AnimatedSpeaker() { _speakerName = "SKL"; _newSceneNumber = 7011; _textPos = Common::Point(10, 30); - _colour1 = 10; + _color1 = 10; } void SpeakerSKL::setText(const Common::String &msg) { @@ -606,7 +606,7 @@ SpeakerQL::SpeakerQL() : AnimatedSpeaker() { _speakerName = "QL"; _newSceneNumber = 2610; _textPos = Common::Point(160, 30); - _colour1 = 35; + _color1 = 35; _textMode = ALIGN_CENTRE; } @@ -638,7 +638,7 @@ SpeakerSR::SpeakerSR() { _speakerName = "SR"; _newSceneNumber = 2811; _textPos = Common::Point(10, 30); - _colour1 = 13; + _color1 = 13; _textMode = ALIGN_CENTRE; } @@ -679,7 +679,7 @@ SpeakerSL::SpeakerSL() { _newSceneNumber = 2810; _textPos = Common::Point(140, 30); _textWidth = 160; - _colour1 = 13; + _color1 = 13; _textMode = ALIGN_CENTRE; } @@ -711,7 +711,7 @@ SpeakerQR::SpeakerQR() { _speakerName = "QR"; _newSceneNumber = 2611; _textPos = Common::Point(10, 30); - _colour1 = 13; + _color1 = 13; _textMode = ALIGN_CENTRE; } @@ -743,7 +743,7 @@ SpeakerQU::SpeakerQU() { _speakerName = "QU"; _newSceneNumber = 7020; _textPos = Common::Point(160, 30); - _colour1 = 35; + _color1 = 35; _textMode = ALIGN_CENTRE; } @@ -775,7 +775,7 @@ SpeakerCR::SpeakerCR() { _speakerName = "CR"; _newSceneNumber = 9010; _textPos = Common::Point(20, 40); - _colour1 = 4; + _color1 = 4; } void SpeakerCR::setText(const Common::String &msg) { @@ -802,7 +802,7 @@ SpeakerMR::SpeakerMR() { _speakerName = "MR"; _newSceneNumber = 2711; _textPos = Common::Point(40, 10); - _colour1 = 22; + _color1 = 22; } void SpeakerMR::setText(const Common::String &msg) { @@ -832,7 +832,7 @@ SpeakerSAL::SpeakerSAL() { _speakerName = "SAL"; _newSceneNumber = 2851; _textPos = Common::Point(10, 30); - _colour1 = 13; + _color1 = 13; _textMode = ALIGN_CENTRE; } @@ -863,7 +863,7 @@ SpeakerML::SpeakerML() { _speakerName = "ML"; _newSceneNumber = 2710; _textPos = Common::Point(160, 40); - _colour1 = 22; + _color1 = 22; } void SpeakerML::setText(const Common::String &msg) { @@ -893,7 +893,7 @@ SpeakerCHFL::SpeakerCHFL() { _speakerName = "CHFL"; _newSceneNumber = 4111; _textPos = Common::Point(10, 40); - _colour1 = 56; + _color1 = 56; } void SpeakerCHFL::setText(const Common::String &msg) { @@ -923,7 +923,7 @@ SpeakerCHFR::SpeakerCHFR() { _speakerName = "CHFR"; _newSceneNumber = 4110; _textPos = Common::Point(160, 40); - _colour1 = 56; + _color1 = 56; } void SpeakerCHFR::setText(const Common::String &msg) { @@ -953,7 +953,7 @@ SpeakerPL::SpeakerPL() { _speakerName = "PL"; _newSceneNumber = 4060; _textPos = Common::Point(160, 40); - _colour1 = 5; + _color1 = 5; } void SpeakerPL::setText(const Common::String &msg) { @@ -996,7 +996,7 @@ SpeakerPR::SpeakerPR() { _speakerName = "PR"; _newSceneNumber = 4061; _textPos = Common::Point(10, 40); - _colour1 = 5; + _color1 = 5; } void SpeakerPR::setText(const Common::String &msg) { @@ -1041,7 +1041,7 @@ SpeakerCDR::SpeakerCDR() { _speakerName = "CDR"; _newSceneNumber = 4161; _textPos = Common::Point(10, 40); - _colour1 = 52; + _color1 = 52; } void SpeakerCDR::setText(const Common::String &msg) { @@ -1072,7 +1072,7 @@ SpeakerCDL::SpeakerCDL() { _speakerName = "CDL"; _newSceneNumber = 4160; _textPos = Common::Point(160, 40); - _colour1 = 52; + _color1 = 52; } void SpeakerCDL::setText(const Common::String &msg) { @@ -1103,7 +1103,7 @@ SpeakerFLL::SpeakerFLL() { _speakerName = "FLL"; _newSceneNumber = 5221; _textPos = Common::Point(10, 40); - _colour1 = 17; + _color1 = 17; } void SpeakerFLL::setText(const Common::String &msg) { @@ -1134,7 +1134,7 @@ SpeakerBatR::SpeakerBatR() { _speakerName = "BATR"; _newSceneNumber = 5360; _textPos = Common::Point(140, 40); - _colour1 = 3; + _color1 = 3; } void SpeakerBatR::setText(const Common::String &msg) { diff --git a/engines/tsage/ringworld_scenes1.cpp b/engines/tsage/ringworld_scenes1.cpp index c78bc12d94..7b9c315721 100644 --- a/engines/tsage/ringworld_scenes1.cpp +++ b/engines/tsage/ringworld_scenes1.cpp @@ -48,7 +48,7 @@ void Scene10::Action1::signal() { break; case 2: scene->_speakerSText.setTextPos(Common::Point(20, 20)); - scene->_speakerSText._colour1 = 10; + scene->_speakerSText._color1 = 10; scene->_speakerSText._textWidth = 160; scene->_stripManager.start(11, this, scene); break; @@ -138,10 +138,10 @@ void Scene10::postInit(SceneObjectList *OwnerList) { _speakerSText._hideObjects = false; _speakerQText._hideObjects = false; _speakerQText.setTextPos(Common::Point(140, 120)); - _speakerQText._colour1 = 4; + _speakerQText._color1 = 4; _speakerQText._textWidth = 160; _speakerSText.setTextPos(Common::Point(20, 20)); - _speakerSText._colour1 = 7; + _speakerSText._color1 = 7; _speakerSText._textWidth = 320; _stripManager.setCallback(this); @@ -221,12 +221,12 @@ void Scene15::Action1::signal() { setDelay(60); break; case 1: - SceneItem::display(15, 0, SET_Y, 20, SET_FONT, 2, SET_BG_COLOUR, -1, SET_EXT_BGCOLOUR, 7, + SceneItem::display(15, 0, SET_Y, 20, SET_FONT, 2, SET_BG_COLOR, -1, SET_EXT_BGCOLOR, 7, SET_WIDTH, 320, SET_KEEP_ONSCREEN, 1, LIST_END); setDelay(300); break; case 2: { - SceneItem::display(15, 1, SET_Y, 20, SET_FONT, 2, SET_BG_COLOUR, -1, SET_EXT_BGCOLOUR, 7, + SceneItem::display(15, 1, SET_Y, 20, SET_FONT, 2, SET_BG_COLOR, -1, SET_EXT_BGCOLOR, 7, SET_WIDTH, 320, SET_KEEP_ONSCREEN, 1, LIST_END); scene->_object1.postInit(); scene->_object1.setVisage(15); @@ -300,7 +300,7 @@ void Scene20::Action2::signal() { break; case 1: SceneItem::display(20, 1, SET_WIDTH, 200, SET_Y, 20, SET_X, 160, SET_KEEP_ONSCREEN, true, - SET_EXT_BGCOLOUR, 4, LIST_END); + SET_EXT_BGCOLOR, 4, LIST_END); setDelay(120); break; case 2: { @@ -624,9 +624,9 @@ void Scene20::signal() { void Scene30::BeamObject::doAction(int action) { if (action == OBJECT_SCANNER) - display(30, 14, SET_WIDTH, 200, SET_EXT_BGCOLOUR, 7, LIST_END); + display(30, 14, SET_WIDTH, 200, SET_EXT_BGCOLOR, 7, LIST_END); else if (action == CURSOR_LOOK) - display(30, 2, SET_WIDTH, 200, SET_EXT_BGCOLOUR, 7, LIST_END); + display(30, 2, SET_WIDTH, 200, SET_EXT_BGCOLOR, 7, LIST_END); else if (action == CURSOR_USE) { Scene30 *parent = (Scene30 *)_globals->_sceneManager._scene; parent->setAction(&parent->_beamAction); @@ -636,11 +636,11 @@ void Scene30::BeamObject::doAction(int action) { void Scene30::DoorObject::doAction(int action) { if (action == OBJECT_SCANNER) - display(30, 13, SET_WIDTH, 200, SET_EXT_BGCOLOUR, 7, LIST_END); + display(30, 13, SET_WIDTH, 200, SET_EXT_BGCOLOR, 7, LIST_END); else if (action == CURSOR_LOOK) - display(30, 1, SET_WIDTH, 200, SET_EXT_BGCOLOUR, 7, LIST_END); + display(30, 1, SET_WIDTH, 200, SET_EXT_BGCOLOR, 7, LIST_END); else if (action == CURSOR_USE) - display(30, 7, SET_WIDTH, 200, SET_EXT_BGCOLOUR, 7, LIST_END); + display(30, 7, SET_WIDTH, 200, SET_EXT_BGCOLOR, 7, LIST_END); else SceneObject::doAction(action); } @@ -1460,7 +1460,7 @@ void Scene40::postInit(SceneObjectList *OwnerList) { _stripManager.addSpeaker(&_speakerSText); _stripManager.addSpeaker(&_speakerGameText); - _speakerGameText._colour1 = 9; + _speakerGameText._color1 = 9; _speakerGameText.setTextPos(Common::Point(160, 30)); _speakerQText._npc = &_globals->_player; _speakerSText._npc = &_object1; @@ -1936,7 +1936,7 @@ void Scene60::Action1::signal() { case 6: case 7: SceneItem::display(60, _actionIndex - 4, SET_Y, 40, SET_X, 25, SET_FONT, 75, - SET_EXT_BGCOLOUR, -1, SET_FG_COLOUR, 34, SET_POS_MODE, 0, + SET_EXT_BGCOLOR, -1, SET_FG_COLOR, 34, SET_POS_MODE, 0, SET_WIDTH, 280, SET_KEEP_ONSCREEN, 1, LIST_END); _globals->_events.setCursor(CURSOR_USE); break; @@ -2497,7 +2497,7 @@ void Scene90::Action1::signal() { scene->_object3.animate(ANIM_MODE_6, NULL); SceneItem::display(90, _globals->getFlag(104) ? 15 : 14, - SET_EXT_BGCOLOUR, 13, SET_KEEP_ONSCREEN, -1, SET_X, 120, SET_Y, 20, LIST_END); + SET_EXT_BGCOLOR, 13, SET_KEEP_ONSCREEN, -1, SET_X, 120, SET_Y, 20, LIST_END); break; case 12: SceneItem::display(0, 0); @@ -2690,7 +2690,7 @@ void Scene95::Action1::signal() { case 1: if (_state) { SceneItem::display(95, _state % 2, SET_FONT, 2, - SET_EXT_BGCOLOUR, -1, SET_EXT_BGCOLOUR, 20, + SET_EXT_BGCOLOR, -1, SET_EXT_BGCOLOR, 20, SET_WIDTH, 200, SET_KEEP_ONSCREEN, 1, SET_TEXT_MODE, 1, LIST_END); --_state; _actionIndex = 1; @@ -2724,7 +2724,7 @@ void Scene95::Action1::signal() { scene->_object1.addMover(mover2, &pt2, NULL); SceneItem::display(95, 2, SET_Y, 45, SET_FONT, 2, - SET_BG_COLOUR, -1, SET_EXT_BGCOLOUR, 13, SET_WIDTH, 200, + SET_BG_COLOR, -1, SET_EXT_BGCOLOR, 13, SET_WIDTH, 200, SET_KEEP_ONSCREEN, 1, LIST_END); setDelay(240); break; @@ -2733,13 +2733,13 @@ void Scene95::Action1::signal() { scene->_object3.remove(); SceneItem::display(95, 3, SET_Y, 45, SET_FONT, 2, - SET_BG_COLOUR, -1, SET_EXT_BGCOLOUR, 35, SET_WIDTH, 200, + SET_BG_COLOR, -1, SET_EXT_BGCOLOR, 35, SET_WIDTH, 200, SET_KEEP_ONSCREEN, 1, LIST_END); setDelay(240); break; case 5: SceneItem::display(95, 4, SET_Y, 45, SET_FONT, 2, - SET_BG_COLOUR, -1, SET_EXT_BGCOLOUR, 35, SET_WIDTH, 200, + SET_BG_COLOR, -1, SET_EXT_BGCOLOR, 35, SET_WIDTH, 200, SET_KEEP_ONSCREEN, 1, LIST_END); setDelay(240); break; @@ -3254,7 +3254,7 @@ void Scene6100::dispatch() { _sceneText.setPosition(Common::Point(24, 160)); _sceneText._fontNumber = 0; - _sceneText._colour1 = 35; + _sceneText._color1 = 35; _sceneText.setup(s); } @@ -3267,7 +3267,7 @@ void Scene6100::dispatch() { } } -void Scene6100::showMessage(const Common::String &msg, int colour, Action *action) { +void Scene6100::showMessage(const Common::String &msg, int color, Action *action) { if (_msgActive) { _msgActive = false; _speaker1.removeText(); @@ -3277,7 +3277,7 @@ void Scene6100::showMessage(const Common::String &msg, int colour, Action *actio _msgActive = true; _speaker1._textPos.x = 20; _speaker1._textWidth = 280; - _speaker1._colour1 = colour; + _speaker1._color1 = color; _speaker1._action = action; _speaker1.setText(msg); } diff --git a/engines/tsage/ringworld_scenes1.h b/engines/tsage/ringworld_scenes1.h index 66f7282684..4e95edcbbb 100644 --- a/engines/tsage/ringworld_scenes1.h +++ b/engines/tsage/ringworld_scenes1.h @@ -527,7 +527,7 @@ public: virtual void remove(); virtual void process(Event &event); virtual void dispatch(); - void showMessage(const Common::String &msg, int colour, Action *action); + void showMessage(const Common::String &msg, int color, Action *action); }; diff --git a/engines/tsage/ringworld_scenes10.cpp b/engines/tsage/ringworld_scenes10.cpp index 9930f047dc..56d6bd9101 100644 --- a/engines/tsage/ringworld_scenes10.cpp +++ b/engines/tsage/ringworld_scenes10.cpp @@ -859,13 +859,13 @@ void Scene9450::Hotspot3::doAction(int action) { setAction(&scene->_sequenceManager1, scene, 9460, &_globals->_player, &scene->_object2, &scene->_object1, 0); break; case OBJECT_TUNIC: - SceneItem::display(9450, 49, SET_Y, 20, SET_WIDTH, 200, SET_EXT_BGCOLOUR, 7, LIST_END); + SceneItem::display(9450, 49, SET_Y, 20, SET_WIDTH, 200, SET_EXT_BGCOLOR, 7, LIST_END); break; case CURSOR_WALK: // nothing break; case CURSOR_LOOK: - SceneItem::display(9450, 41, SET_Y, 20, SET_WIDTH, 200, SET_EXT_BGCOLOUR, 7, LIST_END); + SceneItem::display(9450, 41, SET_Y, 20, SET_WIDTH, 200, SET_EXT_BGCOLOR, 7, LIST_END); break; case CURSOR_USE: case CURSOR_TALK: @@ -876,7 +876,7 @@ void Scene9450::Hotspot3::doAction(int action) { _globals->_player.disableControl(); setAction(&scene->_sequenceManager1, scene, 9459, &scene->_object2, &scene->_object1, &scene->_object3, &_globals->_player, 0); } else if ((_globals->_inventory._cloak._sceneNumber != 1) && (_globals->_inventory._jacket._sceneNumber != 1) && (_globals->_inventory._tunic2._sceneNumber != 1)) { - SceneItem::display(9450, 38, SET_Y, 20, SET_WIDTH, 200, SET_EXT_BGCOLOUR, 7, LIST_END); + SceneItem::display(9450, 38, SET_Y, 20, SET_WIDTH, 200, SET_EXT_BGCOLOR, 7, LIST_END); } else { scene->_sceneMode = 9460; _globals->_player.disableControl(); @@ -884,7 +884,7 @@ void Scene9450::Hotspot3::doAction(int action) { } break; default: - SceneItem::display(9450, 45, SET_Y, 20, SET_WIDTH, 200, SET_EXT_BGCOLOUR, 7, LIST_END); + SceneItem::display(9450, 45, SET_Y, 20, SET_WIDTH, 200, SET_EXT_BGCOLOR, 7, LIST_END); break; } } @@ -1330,7 +1330,7 @@ void Scene9750::postInit(SceneObjectList *OwnerList) { void Scene9850::Object6::doAction(int action) { if ((_flags & OBJFLAG_HIDE) == 0) { if (action == CURSOR_LOOK) { - SceneItem::display(9850, 27, SET_Y, 20, SET_WIDTH, 200, SET_EXT_BGCOLOUR, 7, LIST_END); + SceneItem::display(9850, 27, SET_Y, 20, SET_WIDTH, 200, SET_EXT_BGCOLOR, 7, LIST_END); } else if (action == CURSOR_USE) { _globals->_inventory._scimitar._sceneNumber = 1; hide(); @@ -1342,7 +1342,7 @@ void Scene9850::Object6::doAction(int action) { void Scene9850::Object7::doAction(int action) { if ((_flags & OBJFLAG_HIDE) == 0) { if (action == CURSOR_LOOK) { - SceneItem::display(9850, 28, SET_Y, 20, SET_WIDTH, 200, SET_EXT_BGCOLOUR, 7, LIST_END); + SceneItem::display(9850, 28, SET_Y, 20, SET_WIDTH, 200, SET_EXT_BGCOLOR, 7, LIST_END); } else if (action == CURSOR_USE) { _globals->_inventory._sword._sceneNumber = 1; hide(); @@ -1371,7 +1371,7 @@ void Scene9850::Hotspot12::doAction(int action) { } else if ((action != CURSOR_LOOK) || (_globals->_inventory._tunic2._sceneNumber != 1)) { NamedHotspot::doAction(action); } else { - SceneItem::display(9850, 30, SET_Y, 20, SET_WIDTH, 200, SET_EXT_BGCOLOUR, 7, LIST_END); + SceneItem::display(9850, 30, SET_Y, 20, SET_WIDTH, 200, SET_EXT_BGCOLOR, 7, LIST_END); } } @@ -1393,7 +1393,7 @@ void Scene9850::Hotspot14::doAction(int action) { } else if ((action != CURSOR_LOOK) || (_globals->_inventory._jacket._sceneNumber != 1)) { NamedHotspot::doAction(action); } else { - SceneItem::display(9850, 30, SET_Y, 20, SET_WIDTH, 200, SET_EXT_BGCOLOUR, 7, LIST_END); + SceneItem::display(9850, 30, SET_Y, 20, SET_WIDTH, 200, SET_EXT_BGCOLOR, 7, LIST_END); } } @@ -1415,7 +1415,7 @@ void Scene9850::Hotspot16::doAction(int action) { } else if ((action != CURSOR_LOOK) || (_globals->_inventory._cloak._sceneNumber != 1)) { NamedHotspot::doAction(action); } else { - SceneItem::display(9850, 30, SET_Y, 20, SET_WIDTH, 200, SET_EXT_BGCOLOUR, 7, LIST_END); + SceneItem::display(9850, 30, SET_Y, 20, SET_WIDTH, 200, SET_EXT_BGCOLOR, 7, LIST_END); } } @@ -1423,7 +1423,7 @@ void Scene9850::Hotspot17::doAction(int action) { Scene9850 *scene = (Scene9850 *)_globals->_sceneManager._scene; if (action == OBJECT_SCANNER) { - SceneItem::display(9850, 32, SET_Y, 20, SET_WIDTH, 200, SET_EXT_BGCOLOUR, 7, LIST_END); + SceneItem::display(9850, 32, SET_Y, 20, SET_WIDTH, 200, SET_EXT_BGCOLOR, 7, LIST_END); } else { if (action == CURSOR_USE) scene->_soundHandler.startSound(306, 0, 127); @@ -1435,7 +1435,7 @@ void Scene9850::Hotspot18::doAction(int action) { Scene9850 *scene = (Scene9850 *)_globals->_sceneManager._scene; if (action == OBJECT_SCANNER) { - SceneItem::display(9850, 32, SET_Y, 20, SET_WIDTH, 200, SET_EXT_BGCOLOUR, 7, LIST_END); + SceneItem::display(9850, 32, SET_Y, 20, SET_WIDTH, 200, SET_EXT_BGCOLOR, 7, LIST_END); } else { if (action == CURSOR_USE) scene->_soundHandler.startSound(306, 0, 127); @@ -1447,7 +1447,7 @@ void Scene9850::Hotspot19::doAction(int action) { Scene9850 *scene = (Scene9850 *)_globals->_sceneManager._scene; if (action == OBJECT_SCANNER) { - SceneItem::display(9850, 31, SET_Y, 20, SET_WIDTH, 200, SET_EXT_BGCOLOUR, 7, LIST_END); + SceneItem::display(9850, 31, SET_Y, 20, SET_WIDTH, 200, SET_EXT_BGCOLOR, 7, LIST_END); } else { if (action == CURSOR_USE) scene->_soundHandler.startSound(313, 0, 127); @@ -1705,7 +1705,7 @@ void Scene9900::strAction2::signal() { _txtArray1[_txtArray1Index]._textMode = ALIGN_CENTRE; _txtArray1[_txtArray1Index]._width = 240; _txtArray1[_txtArray1Index]._fontNumber = 2; - _txtArray1[_txtArray1Index]._colour1 = 7; + _txtArray1[_txtArray1Index]._color1 = 7; _txtArray1[_txtArray1Index].setup(msg); _txtArray1[_txtArray1Index]._field7A = 20; _txtArray1[_txtArray1Index]._moveDiff.y = 2; @@ -1720,7 +1720,7 @@ void Scene9900::strAction2::signal() { _txtArray2[_txtArray1Index]._textMode = ALIGN_CENTRE; _txtArray2[_txtArray1Index]._width = 240; _txtArray2[_txtArray1Index]._fontNumber = 2; - _txtArray2[_txtArray1Index]._colour1 = 23; + _txtArray2[_txtArray1Index]._color1 = 23; msg = _vm->_dataManager->getMessage(8030, _lineNum++); _txtArray2[_txtArray1Index].setup(msg); @@ -1999,7 +1999,7 @@ void Scene9999::Action2::signal() { setDelay(10); break; case 1: - SceneItem::display(9999, 0, SET_Y, 10, SET_X, 30, SET_FONT, 2, SET_BG_COLOUR, -1, SET_EXT_BGCOLOUR, 23, SET_WIDTH, 260, SET_KEEP_ONSCREEN, 1, LIST_END); + SceneItem::display(9999, 0, SET_Y, 10, SET_X, 30, SET_FONT, 2, SET_BG_COLOR, -1, SET_EXT_BGCOLOR, 23, SET_WIDTH, 260, SET_KEEP_ONSCREEN, 1, LIST_END); setDelay(300); break; case 2: diff --git a/engines/tsage/ringworld_scenes2.cpp b/engines/tsage/ringworld_scenes2.cpp index 8d95460615..c0b2fbb966 100644 --- a/engines/tsage/ringworld_scenes2.cpp +++ b/engines/tsage/ringworld_scenes2.cpp @@ -76,8 +76,8 @@ void Scene1000::Action2::signal() { setDelay(10); break; case 1: - SceneItem::display(1000, 0, SET_Y, 20, SET_FONT, 2, SET_BG_COLOUR, -1, - SET_EXT_BGCOLOUR, 35, SET_WIDTH, 200, SET_KEEP_ONSCREEN, 1, LIST_END); + SceneItem::display(1000, 0, SET_Y, 20, SET_FONT, 2, SET_BG_COLOR, -1, + SET_EXT_BGCOLOR, 35, SET_WIDTH, 200, SET_KEEP_ONSCREEN, 1, LIST_END); setDelay(180); break; case 2: @@ -521,7 +521,7 @@ void Scene1001::postInit(SceneObjectList *OwnerList) { _stripManager.addSpeaker(&_speakerCText); _stripManager.addSpeaker(&_speakerCR); _stripManager.addSpeaker(&_speakerSL); - _speakerQText._colour1 = 11; + _speakerQText._color1 = 11; _object3.postInit(); _object3.setVisage(16); @@ -666,7 +666,7 @@ void Scene1400::Action1::signal() { setDelay(5); break; case 1: { - SceneItem::display(1400, 0, SET_X, 120, SET_Y, 610, SET_FONT, 2, SET_EXT_BGCOLOUR, 23, SET_KEEP_ONSCREEN, -1, LIST_END); + SceneItem::display(1400, 0, SET_X, 120, SET_Y, 610, SET_FONT, 2, SET_EXT_BGCOLOR, 23, SET_KEEP_ONSCREEN, -1, LIST_END); Common::Point pt(160, 700); NpcMover *mover = new NpcMover(); @@ -687,7 +687,7 @@ void Scene1400::Action1::signal() { } case 3: SceneItem::display(1400, 2, SET_X, 60, SET_Y, _globals->_sceneManager._scene->_sceneBounds.bottom - 80, - SET_FONT, 2, SET_FG_COLOUR, 13, SET_POS_MODE, 0, SET_KEEP_ONSCREEN, -1, LIST_END); + SET_FONT, 2, SET_FG_COLOR, 13, SET_POS_MODE, 0, SET_KEEP_ONSCREEN, -1, LIST_END); setDelay(420); break; case 4: @@ -696,7 +696,7 @@ void Scene1400::Action1::signal() { break; case 5: SceneItem::display(1400, 3, SET_X, 60, SET_Y, _globals->_sceneManager._scene->_sceneBounds.bottom - 80, - SET_FONT, 2, SET_FG_COLOUR, 23, SET_POS_MODE, 0, SET_KEEP_ONSCREEN, -1, LIST_END); + SET_FONT, 2, SET_FG_COLOR, 23, SET_POS_MODE, 0, SET_KEEP_ONSCREEN, -1, LIST_END); setDelay(360); break; case 6: @@ -722,7 +722,7 @@ void Scene1400::Action1::signal() { _globals->_player.animate(ANIM_MODE_2, NULL); SceneItem::display(1400, 4, SET_X, 30, SET_Y, _globals->_player._position.y + 10, SET_FONT, 2, - SET_FG_COLOUR, 13, SET_POS_MODE, 0, SET_KEEP_ONSCREEN, -1, LIST_END); + SET_FG_COLOR, 13, SET_POS_MODE, 0, SET_KEEP_ONSCREEN, -1, LIST_END); setDelay(300); break; case 9: { diff --git a/engines/tsage/ringworld_scenes3.cpp b/engines/tsage/ringworld_scenes3.cpp index b37b156907..6895c3b669 100644 --- a/engines/tsage/ringworld_scenes3.cpp +++ b/engines/tsage/ringworld_scenes3.cpp @@ -226,8 +226,8 @@ void Scene2000::Action10::signal() { error("Old stuff"); break; case 2: - SceneItem::display(2000, 17, SET_Y, 20, SET_X, 110, SET_FONT, 2, SET_BG_COLOUR, -1, - SET_FG_COLOUR, 17, SET_WIDTH, 200, SET_POS_MODE, 0, SET_KEEP_ONSCREEN, 1, LIST_END); + SceneItem::display(2000, 17, SET_Y, 20, SET_X, 110, SET_FONT, 2, SET_BG_COLOR, -1, + SET_FG_COLOR, 17, SET_WIDTH, 200, SET_POS_MODE, 0, SET_KEEP_ONSCREEN, 1, LIST_END); break; case 3: SceneItem::display(0, 0); @@ -1995,12 +1995,12 @@ void Scene2120::Action1::signal() { break; case 1: // First page of index - SceneItem::display(2120, 0, SET_X, 120, SET_FONT, 1, SET_EXT_BGCOLOUR, 7, SET_BG_COLOUR, -1, + SceneItem::display(2120, 0, SET_X, 120, SET_FONT, 1, SET_EXT_BGCOLOR, 7, SET_BG_COLOR, -1, SET_WIDTH, 200, SET_KEEP_ONSCREEN, -1, SET_TEXT_MODE, 0, LIST_END); break; case 2: // Second page of index - SceneItem::display(2120, 1, SET_X, 120, SET_FONT, 1, SET_EXT_BGCOLOUR, 7, SET_BG_COLOUR, -1, + SceneItem::display(2120, 1, SET_X, 120, SET_FONT, 1, SET_EXT_BGCOLOR, 7, SET_BG_COLOR, -1, SET_WIDTH, 200, SET_KEEP_ONSCREEN, -1, SET_TEXT_MODE, 0, LIST_END); break; case 3: @@ -2016,7 +2016,7 @@ void Scene2120::Action1::signal() { case 4: // Display page of text SceneItem::display(2121, _entries[scene->_subjectIndex]._lineNum + scene->_lineOffset, - SET_X, 130, SET_FONT, 1, SET_EXT_BGCOLOUR, 7, SET_BG_COLOUR, -1, SET_WIDTH, 200, + SET_X, 130, SET_FONT, 1, SET_EXT_BGCOLOR, 7, SET_BG_COLOR, -1, SET_WIDTH, 200, SET_KEEP_ONSCREEN, -1, SET_TEXT_MODE, 0, LIST_END); _actionIndex = 4; break; @@ -2731,7 +2731,7 @@ void Scene2200::Action3::signal() { scene->_hotspot7.setFrame(1); scene->_hotspot7.setPosition(Common::Point(145, 165)); - SceneItem::display(60, 1, SET_Y, 40, SET_X, 25, SET_FONT, 75, SET_BG_COLOUR, -1, SET_FG_COLOUR, 34, + SceneItem::display(60, 1, SET_Y, 40, SET_X, 25, SET_FONT, 75, SET_BG_COLOR, -1, SET_FG_COLOR, 34, SET_POS_MODE, 0, SET_WIDTH, 280, SET_KEEP_ONSCREEN, 1, LIST_END); _state = 1; setDelay(1800); @@ -2740,7 +2740,7 @@ void Scene2200::Action3::signal() { case 3: case 4: case 5: - SceneItem::display(60, _actionIndex - 2, SET_Y, 40, SET_X, 25, SET_FONT, 75, SET_BG_COLOUR, -1, SET_FG_COLOUR, 34, + SceneItem::display(60, _actionIndex - 2, SET_Y, 40, SET_X, 25, SET_FONT, 75, SET_BG_COLOR, -1, SET_FG_COLOR, 34, SET_POS_MODE, 0, SET_WIDTH, 280, SET_KEEP_ONSCREEN, 1, LIST_END); setDelay(1800); break; @@ -4876,7 +4876,7 @@ void Scene2310::signal() { _sceneText._width = 280; _sceneText._textMode = ALIGN_CENTRE; - _sceneText._colour1 = 35; + _sceneText._color1 = 35; _sceneText._fontNumber = 2; _sceneText.setup(msg); _sceneText.setPriority2(255); diff --git a/engines/tsage/ringworld_scenes8.cpp b/engines/tsage/ringworld_scenes8.cpp index 416b7fe0fd..e437662774 100644 --- a/engines/tsage/ringworld_scenes8.cpp +++ b/engines/tsage/ringworld_scenes8.cpp @@ -340,7 +340,7 @@ void Scene7000::Action7::signal() { void Scene7000::SceneItem1::doAction(int action) { if (action == CURSOR_LOOK) - SceneItem::display(7000, 2, SET_WIDTH, 200, SET_EXT_BGCOLOUR, 7, LIST_END); + SceneItem::display(7000, 2, SET_WIDTH, 200, SET_EXT_BGCOLOR, 7, LIST_END); SceneItem::doAction(action); } @@ -406,9 +406,9 @@ void Scene7000::Object1::doAction(int action) { break; case CURSOR_LOOK: if (_globals->getFlag(81)) - SceneItem::display(7000, 1, SET_WIDTH, 200, SET_EXT_BGCOLOUR, 7, LIST_END); + SceneItem::display(7000, 1, SET_WIDTH, 200, SET_EXT_BGCOLOR, 7, LIST_END); else - SceneItem::display(7000, 0, SET_WIDTH, 200, SET_EXT_BGCOLOUR, 7, LIST_END); + SceneItem::display(7000, 0, SET_WIDTH, 200, SET_EXT_BGCOLOR, 7, LIST_END); break; case CURSOR_USE: if (_globals->getFlag(81)) { @@ -416,7 +416,7 @@ void Scene7000::Object1::doAction(int action) { _globals->_player.disableControl(); scene->setAction(&scene->_action5); } else { - SceneItem::display(7000, 5, SET_WIDTH, 200, SET_EXT_BGCOLOUR, 7, LIST_END); + SceneItem::display(7000, 5, SET_WIDTH, 200, SET_EXT_BGCOLOR, 7, LIST_END); } break; case CURSOR_TALK: @@ -451,7 +451,7 @@ void Scene7000::dispatch() { if (!_globals->getFlag(13)) { _globals->_player.disableControl(); _globals->_player.addMover(0); - SceneItem::display(7000, 3, SET_WIDTH, 200, SET_EXT_BGCOLOUR, 7, LIST_END); + SceneItem::display(7000, 3, SET_WIDTH, 200, SET_EXT_BGCOLOR, 7, LIST_END); _sceneMode = 7001; setAction(&scene->_sequenceManager, this, 7001, &_globals->_player, NULL); } else if (!_globals->getFlag(52)) { @@ -1677,7 +1677,7 @@ void Scene7700::Action4::signal() { break; case 3: CursorMan.showMouse(true); - SceneItem::display(7700, 11, SET_WIDTH, 200, SET_EXT_BGCOLOUR, 7, LIST_END); + SceneItem::display(7700, 11, SET_WIDTH, 200, SET_EXT_BGCOLOR, 7, LIST_END); _globals->_player.enableControl(); remove(); break; @@ -1737,14 +1737,14 @@ void Scene7700::Action6::signal() { void Scene7700::SceneHotspot1::doAction(int action) { if (action == CURSOR_LOOK) - SceneItem::display(7700, 4, SET_WIDTH, 200, SET_EXT_BGCOLOUR, 7, LIST_END); + SceneItem::display(7700, 4, SET_WIDTH, 200, SET_EXT_BGCOLOR, 7, LIST_END); else SceneHotspot::doAction(action); } void Scene7700::SceneHotspot2::doAction(int action) { if (action == CURSOR_LOOK) - SceneItem::display(7700, 6, SET_WIDTH, 200, SET_EXT_BGCOLOUR, 7, LIST_END); + SceneItem::display(7700, 6, SET_WIDTH, 200, SET_EXT_BGCOLOR, 7, LIST_END); else SceneHotspot::doAction(action); } @@ -1754,14 +1754,14 @@ void Scene7700::SceneHotspot3::doAction(int action) { switch (action) { case OBJECT_KEY: - SceneItem::display(7702, 3, SET_WIDTH, 200, SET_EXT_BGCOLOUR, 7, LIST_END); + SceneItem::display(7702, 3, SET_WIDTH, 200, SET_EXT_BGCOLOR, 7, LIST_END); _globals->_inventory._key._sceneNumber = 7700; break; case CURSOR_LOOK: if (_globals->_inventory._key._sceneNumber == 7700) scene->setAction(&scene->_action4, 0); else - SceneItem::display(7700, 53, SET_WIDTH, 200, SET_EXT_BGCOLOUR, 7, LIST_END); + SceneItem::display(7700, 53, SET_WIDTH, 200, SET_EXT_BGCOLOR, 7, LIST_END); break; case CURSOR_USE: if (!_globals->getFlag(78)) { @@ -1784,14 +1784,14 @@ void Scene7700::SceneHotspot4::doAction(int action) { switch (action) { case CURSOR_LOOK: - SceneItem::display(7700, 12, SET_WIDTH, 200, SET_EXT_BGCOLOUR, 7, LIST_END); + SceneItem::display(7700, 12, SET_WIDTH, 200, SET_EXT_BGCOLOR, 7, LIST_END); break; case CURSOR_USE: if (!_globals->getFlag(78)) { scene->_sceneMode = 7712; scene->setAction(&scene->_sequenceManager, scene, 7715, 0); } else { - SceneItem::display(7700, 12, SET_WIDTH, 200, SET_EXT_BGCOLOUR, 7, LIST_END); + SceneItem::display(7700, 12, SET_WIDTH, 200, SET_EXT_BGCOLOR, 7, LIST_END); } break; default: @@ -1805,7 +1805,7 @@ void Scene7700::SceneHotspot5::doAction(int action) { switch (action) { case CURSOR_LOOK: - SceneItem::display(7700, 28, SET_WIDTH, 200, SET_EXT_BGCOLOUR, 7, LIST_END); + SceneItem::display(7700, 28, SET_WIDTH, 200, SET_EXT_BGCOLOR, 7, LIST_END); break; case CURSOR_USE: if (_globals->getFlag(78)) { @@ -1828,10 +1828,10 @@ void Scene7700::SceneHotspot5::doAction(int action) { void Scene7700::SceneHotspot6::doAction(int action) { switch (action) { case CURSOR_LOOK: - SceneItem::display(7700, 43, SET_WIDTH, 200, SET_EXT_BGCOLOUR, 7, LIST_END); + SceneItem::display(7700, 43, SET_WIDTH, 200, SET_EXT_BGCOLOR, 7, LIST_END); break; case CURSOR_USE: - SceneItem::display(7700, 56, SET_WIDTH, 200, SET_EXT_BGCOLOUR, 7, LIST_END); + SceneItem::display(7700, 56, SET_WIDTH, 200, SET_EXT_BGCOLOR, 7, LIST_END); break; default: SceneHotspot::doAction(action); @@ -1841,7 +1841,7 @@ void Scene7700::SceneHotspot6::doAction(int action) { void Scene7700::SceneItem7::doAction(int action) { if (action == CURSOR_LOOK) - SceneItem::display(7700, 51, SET_WIDTH, 200, SET_EXT_BGCOLOUR, 7, LIST_END); + SceneItem::display(7700, 51, SET_WIDTH, 200, SET_EXT_BGCOLOR, 7, LIST_END); } void Scene7700::SceneHotspot8::doAction(int action) { @@ -1849,7 +1849,7 @@ void Scene7700::SceneHotspot8::doAction(int action) { switch (action) { case CURSOR_LOOK: - SceneItem::display(7700, 48, SET_WIDTH, 200, SET_EXT_BGCOLOUR, 7, LIST_END); + SceneItem::display(7700, 48, SET_WIDTH, 200, SET_EXT_BGCOLOR, 7, LIST_END); break; case CURSOR_USE: scene->_sceneMode = 7709; @@ -1875,7 +1875,7 @@ void Scene7700::SceneHotspot9::doAction(int action) { switch (action) { case CURSOR_LOOK: - SceneItem::display(7700, 48, SET_WIDTH, 200, SET_EXT_BGCOLOUR, 7, LIST_END); + SceneItem::display(7700, 48, SET_WIDTH, 200, SET_EXT_BGCOLOR, 7, LIST_END); break; case CURSOR_USE: scene->_sceneMode = 7709; @@ -1917,7 +1917,7 @@ void Scene7700::Object1::doAction(int action) { Scene7700 *scene = (Scene7700 *)_globals->_sceneManager._scene; if (action == CURSOR_LOOK) { - SceneItem::display(7700, _lookLineNum, SET_WIDTH, 200, SET_EXT_BGCOLOUR, 7, LIST_END); + SceneItem::display(7700, _lookLineNum, SET_WIDTH, 200, SET_EXT_BGCOLOR, 7, LIST_END); } else if (action == CURSOR_USE) { if (_globals->getFlag(78)) { _globals->_player.disableControl(); @@ -1934,10 +1934,10 @@ void Scene7700::Object1::doAction(int action) { void Scene7700::SceneHotspot11::doAction(int action) { switch (action) { case CURSOR_LOOK: - SceneItem::display(7700, _lookLineNum, SET_WIDTH, 200, SET_EXT_BGCOLOUR, 7, LIST_END); + SceneItem::display(7700, _lookLineNum, SET_WIDTH, 200, SET_EXT_BGCOLOR, 7, LIST_END); break; case CURSOR_USE: - SceneItem::display(7701, _useLineNum, SET_WIDTH, 200, SET_EXT_BGCOLOUR, 7, LIST_END); + SceneItem::display(7701, _useLineNum, SET_WIDTH, 200, SET_EXT_BGCOLOR, 7, LIST_END); break; default: SceneHotspot::doAction(action); @@ -1948,7 +1948,7 @@ void Scene7700::SceneHotspot11::doAction(int action) { void Scene7700::Object1::signal() { if (_state == 0) { _state = 1; - SceneItem::display(7701, _defltLineNum, SET_WIDTH, 200, SET_EXT_BGCOLOUR, 7, LIST_END); + SceneItem::display(7701, _defltLineNum, SET_WIDTH, 200, SET_EXT_BGCOLOR, 7, LIST_END); } else { _state = 0; } @@ -1959,7 +1959,7 @@ void Scene7700::Object3::doAction(int action) { Scene7700 *scene = (Scene7700 *)_globals->_sceneManager._scene; if (action == CURSOR_LOOK) { - SceneItem::display(7700, 34, SET_WIDTH, 200, SET_EXT_BGCOLOUR, 7, LIST_END); + SceneItem::display(7700, 34, SET_WIDTH, 200, SET_EXT_BGCOLOR, 7, LIST_END); } else if (action == CURSOR_USE) { if (_globals->getFlag(78)) { if (scene->_object3._frame == 1) { @@ -1967,7 +1967,7 @@ void Scene7700::Object3::doAction(int action) { scene->_sceneMode = 7707; scene->setAction(&scene->_sequenceManager, scene, 7707, &_globals->_player, this, 0); } else { - SceneItem::display(7700, 60, SET_WIDTH, 200, SET_EXT_BGCOLOUR, 7, LIST_END); + SceneItem::display(7700, 60, SET_WIDTH, 200, SET_EXT_BGCOLOR, 7, LIST_END); } } else { scene->_sceneMode = 7712; @@ -1984,13 +1984,13 @@ void Scene7700::Object7::doAction(int action) { switch (action) { case CURSOR_LOOK: if (_globals->getFlag(78)) - SceneItem::display(7700, 45, SET_WIDTH, 200, SET_EXT_BGCOLOUR, 7, LIST_END); + SceneItem::display(7700, 45, SET_WIDTH, 200, SET_EXT_BGCOLOR, 7, LIST_END); else - SceneItem::display(7700, 44, SET_WIDTH, 200, SET_EXT_BGCOLOUR, 7, LIST_END); + SceneItem::display(7700, 44, SET_WIDTH, 200, SET_EXT_BGCOLOR, 7, LIST_END); break; case CURSOR_USE: if (_globals->getFlag(78)) { - SceneItem::display(7701, 41, SET_WIDTH, 200, SET_EXT_BGCOLOUR, 7, LIST_END); + SceneItem::display(7701, 41, SET_WIDTH, 200, SET_EXT_BGCOLOR, 7, LIST_END); } else { scene->_sceneMode = 7712; scene->setAction(&scene->_sequenceManager, scene, 7714, 0); @@ -1998,7 +1998,7 @@ void Scene7700::Object7::doAction(int action) { break; case CURSOR_TALK: if (_globals->getFlag(78)) { - SceneItem::display(7702, 1, SET_WIDTH, 200, SET_EXT_BGCOLOUR, 7, LIST_END); + SceneItem::display(7702, 1, SET_WIDTH, 200, SET_EXT_BGCOLOR, 7, LIST_END); } else { _globals->_player.disableControl(); if (_state == 0) { @@ -2084,13 +2084,13 @@ void Scene7700::Object9::doAction(int action) { switch (action) { case CURSOR_LOOK: - SceneItem::display(7700, 49, SET_WIDTH, 200, SET_EXT_BGCOLOUR, 7, LIST_END); + SceneItem::display(7700, 49, SET_WIDTH, 200, SET_EXT_BGCOLOR, 7, LIST_END); break; case CURSOR_USE: - SceneItem::display(7701, 42, SET_WIDTH, 200, SET_EXT_BGCOLOUR, 7, LIST_END); + SceneItem::display(7701, 42, SET_WIDTH, 200, SET_EXT_BGCOLOR, 7, LIST_END); break; case CURSOR_TALK: - SceneItem::display(7702, 4, SET_WIDTH, 200, SET_EXT_BGCOLOUR, 7, LIST_END); + SceneItem::display(7702, 4, SET_WIDTH, 200, SET_EXT_BGCOLOR, 7, LIST_END); break; case OBJECT_KEY: if (_frame == 1) { @@ -2116,7 +2116,7 @@ void Scene7700::Object10::doAction(int action) { Scene7700 *scene = (Scene7700 *)_globals->_sceneManager._scene; if (action == CURSOR_LOOK) { - SceneItem::display(7700, 50, SET_WIDTH, 200, SET_EXT_BGCOLOUR, 7, LIST_END); + SceneItem::display(7700, 50, SET_WIDTH, 200, SET_EXT_BGCOLOR, 7, LIST_END); } else if (action == CURSOR_USE) { _globals->setFlag(80); scene->_sceneItem10.remove(); @@ -2135,19 +2135,19 @@ void Scene7700::Object11::doAction(int action) { switch (action) { case OBJECT_SCANNER: if (_frame != 1) - SceneItem::display(7701, 44, SET_WIDTH, 200, SET_EXT_BGCOLOUR, 7, LIST_END); + SceneItem::display(7701, 44, SET_WIDTH, 200, SET_EXT_BGCOLOR, 7, LIST_END); else SceneItem::doAction(action); break; case CURSOR_LOOK: if (_frame != 1) - SceneItem::display(7700, 9, SET_WIDTH, 200, SET_EXT_BGCOLOUR, 7, LIST_END); + SceneItem::display(7700, 9, SET_WIDTH, 200, SET_EXT_BGCOLOR, 7, LIST_END); else - SceneItem::display(7700, 52, SET_WIDTH, 200, SET_EXT_BGCOLOUR, 7, LIST_END); + SceneItem::display(7700, 52, SET_WIDTH, 200, SET_EXT_BGCOLOR, 7, LIST_END); break; case CURSOR_USE: if (_frame != 1) { - SceneItem::display(7701, 8, SET_WIDTH, 200, SET_EXT_BGCOLOUR, 7, LIST_END); + SceneItem::display(7701, 8, SET_WIDTH, 200, SET_EXT_BGCOLOR, 7, LIST_END); } else { _globals->setFlag(49); _globals->_player.disableControl(); @@ -2171,7 +2171,7 @@ void Scene7700::Object12::doAction(int action) { Scene7700 *scene = (Scene7700 *)_globals->_sceneManager._scene; if (action == CURSOR_LOOK) { - SceneItem::display(7700, 15, SET_WIDTH, 200, SET_EXT_BGCOLOUR, 7, LIST_END); + SceneItem::display(7700, 15, SET_WIDTH, 200, SET_EXT_BGCOLOR, 7, LIST_END); } else if (action == CURSOR_USE) { if (_globals->getFlag(78)) { scene->_sceneMode = 7713; @@ -2225,7 +2225,7 @@ void Scene7700::signal() { break; case 7710: _globals->_player.enableControl(); - SceneItem::display(7700, 62, SET_WIDTH, 200, SET_EXT_BGCOLOUR, 7, LIST_END); + SceneItem::display(7700, 62, SET_WIDTH, 200, SET_EXT_BGCOLOR, 7, LIST_END); break; case 7713: _emptyJar.remove(); |