From 884b753c7362b25356f427f4f15abe90bf411032 Mon Sep 17 00:00:00 2001 From: Nicola Mettifogo Date: Tue, 29 Jul 2008 09:44:05 +0000 Subject: Added dialogue text rendering for BRA. svn-id: r33402 --- engines/parallaction/graphics.cpp | 43 --------------------------------------- 1 file changed, 43 deletions(-) (limited to 'engines/parallaction/graphics.cpp') 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) { -- cgit v1.2.3