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/graphics.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/graphics.cpp')
-rw-r--r-- | engines/parallaction/graphics.cpp | 43 |
1 files changed, 0 insertions, 43 deletions
diff --git a/engines/parallaction/graphics.cpp b/engines/parallaction/graphics.cpp index 50bf059145..a31b7f4994 100644 --- a/engines/parallaction/graphics.cpp +++ b/engines/parallaction/graphics.cpp @@ -707,49 +707,6 @@ void Gfx::drawLabels() { } -void Gfx::getStringExtent(Font *font, char *text, uint16 maxwidth, int16* width, int16* height) { - - uint16 lines = 0; - uint16 w = 0; - *width = 0; - - uint16 blankWidth = font->getStringWidth(" "); - uint16 tokenWidth = 0; - - char token[MAX_TOKEN_LEN]; - - while (strlen(text) != 0) { - - text = parseNextToken(text, token, MAX_TOKEN_LEN, " ", true); - tokenWidth = font->getStringWidth(token); - - w += tokenWidth; - - if (!scumm_stricmp(token, "%p")) { - lines++; - } else { - if (w > maxwidth) { - w -= tokenWidth; - lines++; - if (w > *width) - *width = w; - - w = tokenWidth; - } - } - - w += blankWidth; - text = Common::ltrim(text); - } - - if (*width < w) *width = w; - *width += 10; - - *height = lines * 10 + 20; - - return; -} - void Gfx::copyRect(const Common::Rect &r, Graphics::Surface &src, Graphics::Surface &dst) { |