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/draci | |
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/draci')
-rw-r--r-- | engines/draci/animation.cpp | 6 | ||||
-rw-r--r-- | engines/draci/font.cpp | 30 | ||||
-rw-r--r-- | engines/draci/font.h | 26 | ||||
-rw-r--r-- | engines/draci/game.cpp | 36 | ||||
-rw-r--r-- | engines/draci/game.h | 4 | ||||
-rw-r--r-- | engines/draci/mouse.cpp | 4 | ||||
-rw-r--r-- | engines/draci/screen.cpp | 18 | ||||
-rw-r--r-- | engines/draci/screen.h | 2 | ||||
-rw-r--r-- | engines/draci/script.cpp | 8 | ||||
-rw-r--r-- | engines/draci/sprite.cpp | 10 | ||||
-rw-r--r-- | engines/draci/sprite.h | 6 | ||||
-rw-r--r-- | engines/draci/surface.cpp | 8 | ||||
-rw-r--r-- | engines/draci/surface.h | 12 | ||||
-rw-r--r-- | engines/draci/walking.cpp | 14 | ||||
-rw-r--r-- | engines/draci/walking.h | 6 |
15 files changed, 95 insertions, 95 deletions
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. |