diff options
Diffstat (limited to 'engines/m4')
-rw-r--r-- | engines/m4/actor.cpp | 2 | ||||
-rw-r--r-- | engines/m4/animation.cpp | 2 | ||||
-rw-r--r-- | engines/m4/converse.cpp | 4 | ||||
-rw-r--r-- | engines/m4/dialogs.cpp | 6 | ||||
-rw-r--r-- | engines/m4/events.cpp | 2 | ||||
-rw-r--r-- | engines/m4/font.cpp | 8 | ||||
-rw-r--r-- | engines/m4/font.h | 4 | ||||
-rw-r--r-- | engines/m4/graphics.cpp | 16 | ||||
-rw-r--r-- | engines/m4/graphics.h | 25 | ||||
-rw-r--r-- | engines/m4/gui.cpp | 12 | ||||
-rw-r--r-- | engines/m4/m4.cpp | 4 | ||||
-rw-r--r-- | engines/m4/m4_scene.cpp | 14 | ||||
-rw-r--r-- | engines/m4/m4_scene.h | 6 | ||||
-rw-r--r-- | engines/m4/mads_anim.cpp | 2 | ||||
-rw-r--r-- | engines/m4/mads_menus.cpp | 18 | ||||
-rw-r--r-- | engines/m4/mads_scene.cpp | 10 | ||||
-rw-r--r-- | engines/m4/mads_views.cpp | 20 | ||||
-rw-r--r-- | engines/m4/mads_views.h | 12 | ||||
-rw-r--r-- | engines/m4/scene.cpp | 2 | ||||
-rw-r--r-- | engines/m4/sprite.cpp | 10 | ||||
-rw-r--r-- | engines/m4/woodscript.h | 6 | ||||
-rw-r--r-- | engines/m4/ws_sequence.cpp | 2 |
22 files changed, 93 insertions, 94 deletions
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(); |