diff options
author | Benjamin Haisch | 2008-09-16 06:57:23 +0000 |
---|---|---|
committer | Willem Jan Palenstijn | 2011-11-20 22:43:06 +0100 |
commit | 20d60e6286fdaa1ffd62bcc5deae3b69e281047d (patch) | |
tree | 3e49977e990e8eeb85cef273a1e1f74333d60dd5 | |
parent | 398d0daac0c41cdd3db7c7ba8e865a791df170ff (diff) | |
download | scummvm-rg350-20d60e6286fdaa1ffd62bcc5deae3b69e281047d.tar.gz scummvm-rg350-20d60e6286fdaa1ffd62bcc5deae3b69e281047d.tar.bz2 scummvm-rg350-20d60e6286fdaa1ffd62bcc5deae3b69e281047d.zip |
TOLTECS: Renamed some functions.
-rw-r--r-- | engines/toltecs/screen.cpp | 24 | ||||
-rw-r--r-- | engines/toltecs/screen.h | 6 |
2 files changed, 15 insertions, 15 deletions
diff --git a/engines/toltecs/screen.cpp b/engines/toltecs/screen.cpp index 8427757371..988e9316ee 100644 --- a/engines/toltecs/screen.cpp +++ b/engines/toltecs/screen.cpp @@ -488,7 +488,7 @@ void Screen::drawSprite(SpriteDrawItem *sprite) { SpriteReader spriteReader(source, sprite); if (sprite->flags & 0x40) { - // TODO: Shadow sprites + // Shadow sprites if (sprite->flags & 1) { SpriteFilterScaleDown spriteScaler(sprite, &spriteReader); drawSpriteCore(dest, spriteScaler, sprite); @@ -640,14 +640,14 @@ void Screen::updateVerbLine(int16 slotIndex, int16 slotOffset) { for (int16 i = 0; i <= _verbLineNum; i++) { sourceString = _vm->_script->getSlotData(_verbLineItems[i].slotIndex) + _verbLineItems[i].slotOffset; - preprocessText(_fontResIndexArray[0], _verbLineWidth, width, sourceString, destString, len); + wrapGuiText(_fontResIndexArray[0], _verbLineWidth, width, sourceString, destString, len); _tempStringLen1 += len; } if (_verbLineCount != 1) { int16 charWidth; if (*sourceString < 0xF0) { - while (*sourceString > 0x20 && *sourceString < 0xF0 && len > 0/*CHECKME, len check added*/) { + while (*sourceString > 0x20 && *sourceString < 0xF0 && len > 0) { byte ch = *sourceString--; _tempStringLen1--; len--; @@ -659,11 +659,11 @@ void Screen::updateVerbLine(int16 slotIndex, int16 slotOffset) { _tempStringLen1 -= len; _tempStringLen2 = len + 1; - drawStringEx(_verbLineX - 1 - (width / 2), y, 0xF9, 0xFF, _fontResIndexArray[0]); + drawGuiText(_verbLineX - 1 - (width / 2), y, 0xF9, 0xFF, _fontResIndexArray[0]); destString = _tempString; width = 0; - preprocessText(_fontResIndexArray[0], _verbLineWidth, width, sourceString, destString, len); + wrapGuiText(_fontResIndexArray[0], _verbLineWidth, width, sourceString, destString, len); _tempStringLen1 += len; y += 9; @@ -674,7 +674,7 @@ void Screen::updateVerbLine(int16 slotIndex, int16 slotOffset) { _tempStringLen1 -= len; _tempStringLen2 = len; - drawStringEx(_verbLineX - 1 - (width / 2), y, 0xF9, 0xFF, _fontResIndexArray[0]); + drawGuiText(_verbLineX - 1 - (width / 2), y, 0xF9, 0xFF, _fontResIndexArray[0]); } @@ -838,7 +838,7 @@ void Screen::registerFont(uint fontIndex, uint resIndex) { _fontResIndexArray[fontIndex] = resIndex; } -void Screen::printText(byte *textData) { +void Screen::drawGuiTextMulti(byte *textData) { int16 x = 0, y = 0; @@ -866,15 +866,15 @@ void Screen::printText(byte *textData) { byte *destString = _tempString; int width = 0; _tempStringLen1 = 0; - preprocessText(_fontResIndexArray[1], 640, width, textData, destString, _tempStringLen2); - drawStringEx(x - width / 2, y, _fontColor1, _fontColor2, _fontResIndexArray[1]); + wrapGuiText(_fontResIndexArray[1], 640, width, textData, destString, _tempStringLen2); + drawGuiText(x - width / 2, y, _fontColor1, _fontColor2, _fontResIndexArray[1]); } } while (*textData != 0xFF); } -void Screen::preprocessText(uint fontResIndex, int maxWidth, int &width, byte *&sourceString, byte *&destString, byte &len) { +void Screen::wrapGuiText(uint fontResIndex, int maxWidth, int &width, byte *&sourceString, byte *&destString, byte &len) { Font font(_vm->_res->load(fontResIndex)); @@ -894,9 +894,9 @@ void Screen::preprocessText(uint fontResIndex, int maxWidth, int &width, byte *& } } -void Screen::drawStringEx(int16 x, int16 y, byte fontColor1, byte fontColor2, uint fontResIndex) { +void Screen::drawGuiText(int16 x, int16 y, byte fontColor1, byte fontColor2, uint fontResIndex) { - debug(0, "Screen::drawStringEx(%d, %d, %d, %d, %d) _tempStringLen1 = %d; _tempStringLen2 = %d", x, y, fontColor1, fontColor2, fontResIndex, _tempStringLen1, _tempStringLen2); + debug(0, "Screen::drawGuiText(%d, %d, %d, %d, %d) _tempStringLen1 = %d; _tempStringLen2 = %d", x, y, fontColor1, fontColor2, fontResIndex, _tempStringLen1, _tempStringLen2); int16 ywobble = 1; diff --git a/engines/toltecs/screen.h b/engines/toltecs/screen.h index 655256bc51..f7adc22f26 100644 --- a/engines/toltecs/screen.h +++ b/engines/toltecs/screen.h @@ -345,9 +345,9 @@ public: // Font/text void registerFont(uint fontIndex, uint resIndex); - void printText(byte *textData); - void preprocessText(uint fontResIndex, int maxWidth, int &width, byte *&sourceString, byte *&destString, byte &len); - void drawStringEx(int16 x, int16 y, byte fontColor1, byte fontColor2, uint fontResIndex); + void drawGuiTextMulti(byte *textData); + void wrapGuiText(uint fontResIndex, int maxWidth, int &width, byte *&sourceString, byte *&destString, byte &len); + void drawGuiText(int16 x, int16 y, byte fontColor1, byte fontColor2, uint fontResIndex); int16 drawString(int16 x, int16 y, byte color, uint fontResIndex, byte *text, int len = -1, int16 *ywobble = NULL, bool outline = false); void drawChar(const Font &font, byte *dest, int16 x, int16 y, byte ch, byte color, bool outline); |