[Scummvm-cvs-logs] CVS: scummvm/saga font.cpp,1.33,1.34
Eugene Sandulenko
sev at users.sourceforge.net
Fri Sep 2 01:53:12 CEST 2005
Update of /cvsroot/scummvm/scummvm/saga
In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv25242
Modified Files:
font.cpp
Log Message:
Fix bug #1257110 "ITE: Subtitles get striped"
Index: font.cpp
===================================================================
RCS file: /cvsroot/scummvm/scummvm/saga/font.cpp,v
retrieving revision 1.33
retrieving revision 1.34
diff -u -d -r1.33 -r1.34
--- font.cpp 29 Jul 2005 17:57:40 -0000 1.33
+++ font.cpp 2 Sep 2005 08:52:37 -0000 1.34
@@ -302,7 +302,7 @@
}
}
-void Font::outFont(const FontStyle & drawFont, Surface *ds, const char *text, size_t count, const Common::Point &point, int color, FontEffectFlags flags) {
+void Font::outFont(const FontStyle &drawFont, Surface *ds, const char *text, size_t count, const Common::Point &point, int color, FontEffectFlags flags) {
const byte *textPointer;
byte *c_dataPointer;
int c_code;
@@ -326,7 +326,7 @@
return;
}
- textPointer = (const byte *) text;
+ textPointer = (const byte *)text;
ct = count;
// Draw string one character at a time, maximum of 'draw_str'_ct
@@ -382,7 +382,7 @@
// Check each bit, draw pixel if bit is set
for (c_bit = 7; c_bit >= 0 && (outputPointer < outputPointer_max); c_bit--) {
if ((*c_dataPointer >> c_bit) & 0x01) {
- *outputPointer = (byte) color;
+ *outputPointer = (byte)color;
}
outputPointer++;
} // end per-bit processing
@@ -499,8 +499,8 @@
if ((w_total + w) > fitWidth) {
// This word won't fit
if (wc == 0) {
- // The first word in the line didn't fit. abort
- return textPoint.y;
+ // The first word in the line didn't fit. Still print it
+ searchPointer = measurePointer + 1;
}
// Wrap what we've got and restart
textPoint.y += h + TEXT_LINESPACING;
@@ -582,8 +582,8 @@
if ((w_total + w) > fitWidth) {
// This word won't fit
if (wc == 0) {
- // The first word in the line didn't fit. abort
- return;
+ w_total = fitWidth;
+ len_total = len;
}
// Wrap what we've got and restart
@@ -596,6 +596,9 @@
}
w_total = 0;
len_total = 0;
+ if (wc == 0) {
+ searchPointer = measurePointer + 1;
+ }
wc = 0;
measurePointer = searchPointer;
startPointer = searchPointer;
More information about the Scummvm-git-logs
mailing list