diff options
author | Nicola Mettifogo | 2008-07-29 09:44:05 +0000 |
---|---|---|
committer | Nicola Mettifogo | 2008-07-29 09:44:05 +0000 |
commit | 884b753c7362b25356f427f4f15abe90bf411032 (patch) | |
tree | d1f3d291586c514f72e9be1101e4e3739a6cc1cb /engines/parallaction/gfxbase.cpp | |
parent | a1f48b91eae7d61be15d1235a653402dea291d13 (diff) | |
download | scummvm-rg350-884b753c7362b25356f427f4f15abe90bf411032.tar.gz scummvm-rg350-884b753c7362b25356f427f4f15abe90bf411032.tar.bz2 scummvm-rg350-884b753c7362b25356f427f4f15abe90bf411032.zip |
Added dialogue text rendering for BRA.
svn-id: r33402
Diffstat (limited to 'engines/parallaction/gfxbase.cpp')
-rw-r--r-- | engines/parallaction/gfxbase.cpp | 57 |
1 files changed, 0 insertions, 57 deletions
diff --git a/engines/parallaction/gfxbase.cpp b/engines/parallaction/gfxbase.cpp index e8250ac8fd..7c02205e69 100644 --- a/engines/parallaction/gfxbase.cpp +++ b/engines/parallaction/gfxbase.cpp @@ -209,63 +209,6 @@ void Gfx::drawText(Font *font, Graphics::Surface* surf, uint16 x, uint16 y, cons font->drawString(dst, surf->w, text); } -void Gfx::drawWrappedText(Font *font, Graphics::Surface* surf, char *text, byte color, int16 wrapwidth) { - - uint16 lines = 0; - uint16 linewidth = 0; - - uint16 rx = 10; - uint16 ry = 4; - - uint16 blankWidth = font->getStringWidth(" "); - uint16 tokenWidth = 0; - - char token[MAX_TOKEN_LEN]; - - if (wrapwidth == -1) - wrapwidth = _vm->_screenWidth; - - while (strlen(text) > 0) { - - text = parseNextToken(text, token, MAX_TOKEN_LEN, " ", true); - - if (!scumm_stricmp(token, "%p")) { - lines++; - rx = 10; - ry = 4 + lines*10; // y - - strcpy(token, "> ......."); - strncpy(token+2, _password, strlen(_password)); - tokenWidth = font->getStringWidth(token); - } else { - tokenWidth = font->getStringWidth(token); - - linewidth += tokenWidth; - - if (linewidth > wrapwidth) { - // wrap line - lines++; - rx = 10; // x - ry = 4 + lines*10; // y - linewidth = tokenWidth; - } - - if (!scumm_stricmp(token, "%s")) { - sprintf(token, "%d", _score); - } - - } - - drawText(font, surf, rx, ry, token, color); - - rx += tokenWidth + blankWidth; - linewidth += blankWidth; - - text = Common::ltrim(text); - } - -} - #if 0 void Gfx::unpackBlt(const Common::Rect& r, byte *data, uint size, Graphics::Surface *surf, uint16 z, byte transparentColor) { |