aboutsummaryrefslogtreecommitdiff
path: root/engines/parallaction/graphics.cpp
diff options
context:
space:
mode:
authorNicola Mettifogo2007-07-02 07:32:06 +0000
committerNicola Mettifogo2007-07-02 07:32:06 +0000
commit99df4dd7e29541e1af7bee6ab67439af73c0c263 (patch)
tree7f4704fbb64d548a03f1be455aad31b6817854a1 /engines/parallaction/graphics.cpp
parent3a0e0916d63e3d6e4c2fc00d48fad80cfaa6f028 (diff)
downloadscummvm-rg350-99df4dd7e29541e1af7bee6ab67439af73c0c263.tar.gz
scummvm-rg350-99df4dd7e29541e1af7bee6ab67439af73c0c263.tar.bz2
scummvm-rg350-99df4dd7e29541e1af7bee6ab67439af73c0c263.zip
Removed special displayBalloonString routine.
svn-id: r27850
Diffstat (limited to 'engines/parallaction/graphics.cpp')
-rw-r--r--engines/parallaction/graphics.cpp25
1 files changed, 7 insertions, 18 deletions
diff --git a/engines/parallaction/graphics.cpp b/engines/parallaction/graphics.cpp
index ebdc4187f5..aca02a68bf 100644
--- a/engines/parallaction/graphics.cpp
+++ b/engines/parallaction/graphics.cpp
@@ -583,30 +583,19 @@ void Gfx::makeCnvFromString(StaticCnv *cnv, char *text) {
}
-void Gfx::displayString(uint16 x, uint16 y, const char *text) {
- assert(_font == _fonts[kFontMenu]);
-
+void Gfx::displayString(uint16 x, uint16 y, const char *text, byte color) {
byte *dst = _buffers[kBitFront] + x + y*SCREEN_WIDTH;
- _font->setColor(1);
+ _font->setColor(color);
_font->drawString(dst, SCREEN_WIDTH, text);
}
void Gfx::displayCenteredString(uint16 y, const char *text) {
uint16 x = (SCREEN_WIDTH - getStringWidth(text)) / 2;
- displayString(x, y, text);
-}
-
-void Gfx::displayBalloonString(uint16 x, uint16 y, const char *text, byte color) {
- assert(_font == _fonts[kFontDialogue]);
-
- byte *dst = _buffers[kBitFront] + x + y*SCREEN_WIDTH;
-
- _font->setColor(color);
- _font->drawString(dst, SCREEN_WIDTH, text);
+ displayString(x, y, text, 1);
}
-bool Gfx::displayWrappedString(char *text, uint16 x, uint16 y, uint16 maxwidth, byte color) {
-// printf("Gfx::displayWrappedString(%s, %i, %i, %i, %i)...", text, x, y, maxwidth, color);
+bool Gfx::displayWrappedString(char *text, uint16 x, uint16 y, byte color, uint16 wrapwidth) {
+// printf("Gfx::displayWrappedString(%s, %i, %i, %i, %i)...", text, x, y, color, wrapwidth);
uint16 lines = 0;
bool rv = false;
@@ -622,7 +611,7 @@ bool Gfx::displayWrappedString(char *text, uint16 x, uint16 y, uint16 maxwidth,
text = parseNextToken(text, token, 40, " ");
linewidth += getStringWidth(token);
- if (linewidth > maxwidth) {
+ if (linewidth > wrapwidth) {
// wrap line
lines++;
rx = x + 10; // x
@@ -636,7 +625,7 @@ bool Gfx::displayWrappedString(char *text, uint16 x, uint16 y, uint16 maxwidth,
if (!scumm_stricmp(token, "%p")) {
rv = true;
} else
- displayBalloonString(rx, ry, token, color);
+ displayString(rx, ry, token, color);
rx += getStringWidth(token) + getStringWidth(" ");
linewidth += getStringWidth(" ");