[Scummvm-cvs-logs] scummvm master -> cf071732b12c5e8b27166c1841709cd2b3089a5b
bluegr
md5 at scummvm.org
Mon Sep 26 11:18:01 CEST 2011
This automated email contains information about 1 new commit which have been
pushed to the 'scummvm' repo located at https://github.com/scummvm/scummvm .
Summary:
cf071732b1 AGI: Cleanup, added some comments, removed an obsolete FIXME
Commit: cf071732b12c5e8b27166c1841709cd2b3089a5b
https://github.com/scummvm/scummvm/commit/cf071732b12c5e8b27166c1841709cd2b3089a5b
Author: Filippos Karapetis (md5 at scummvm.org)
Date: 2011-09-26T02:11:55-07:00
Commit Message:
AGI: Cleanup, added some comments, removed an obsolete FIXME
Changed paths:
engines/agi/text.cpp
diff --git a/engines/agi/text.cpp b/engines/agi/text.cpp
index 27488c5..9116d5a 100644
--- a/engines/agi/text.cpp
+++ b/engines/agi/text.cpp
@@ -63,21 +63,14 @@ void AgiEngine::printText2(int l, const char *msg, int foff, int xoff, int yoff,
for (m = (const unsigned char *)msg, x1 = y1 = 0; *m; m++) {
if (*m >= 0x20 || *m == 1 || *m == 2 || *m == 3) {
- // FIXME: Fingolfin asks: why is there a FIXME here? Please either clarify what
- // needs fixing, or remove it!
- // FIXME
- int ypos;
-
- ypos = (y1 * CHAR_LINES) + yoff;
+ int ypos = (y1 * CHAR_LINES) + yoff;
if ((x1 != (len - 1) || x1 == 39) && (ypos <= (GFX_HEIGHT - CHAR_LINES))) {
- int xpos;
-
- xpos = (x1 * CHAR_COLS) + xoff + foff;
+ int xpos = (x1 * CHAR_COLS) + xoff + foff;
if (xpos >= GFX_WIDTH)
continue;
-
+
_gfx->putTextCharacter(l, xpos, ypos, *m, fg, bg, checkerboard);
if (x1 > maxx)
@@ -88,7 +81,7 @@ void AgiEngine::printText2(int l, const char *msg, int foff, int xoff, int yoff,
x1++;
- // DF: changed the len-1 to len...
+ // Change line if we've reached the end of this one
if (x1 == len && m[len - 1] != '\n') {
y1++;
x1 = foff = 0;
@@ -249,6 +242,8 @@ char *AgiEngine::wordWrapString(const char *s, int *len) {
wLen--;
if (wLen + lnLen >= maxWidth) {
+ // Check if outStr isn't msgBuf. If this is the case, outStr hasn't advanced
+ // yet, so no output has been written yet
if (outStr != msgBuf) {
if (outStr[-1] == ' ')
outStr[-1] = '\n';
More information about the Scummvm-git-logs
mailing list