[Scummvm-cvs-logs] CVS: scummvm/scumm/smush frenderer.cpp,1.12,1.13
Pawel Kolodziejski
aquadran at users.sourceforge.net
Sun Jan 19 01:04:01 CET 2003
Update of /cvsroot/scummvm/scummvm/scumm/smush
In directory sc8-pr-cvs1:/tmp/cvs-serv22987
Modified Files:
frenderer.cpp
Log Message:
fixed subtitles placement
Index: frenderer.cpp
===================================================================
RCS file: /cvsroot/scummvm/scummvm/scumm/smush/frenderer.cpp,v
retrieving revision 1.12
retrieving revision 1.13
diff -u -d -r1.12 -r1.13
--- frenderer.cpp 18 Jan 2003 21:51:00 -0000 1.12
+++ frenderer.cpp 19 Jan 2003 09:03:07 -0000 1.13
@@ -367,15 +367,11 @@
y = size.getY() - height;
}
- if(x - max_substr_width / 2 < 0) {
- x = max_substr_width / 2;
- } else if (x + max_substr_width / 2 >= size.getX()) {
- x = size.getX() - 1 - max_substr_width / 2;
- }
+ x = (size.getX() - max_substr_width) / 2;
for(i = 0; i < nb_subs; i++) {
int32 substr_width = substr_widths[i];
- drawSubstring((const byte *)substrings[i], buffer, size, x - substr_width / 2, y);
+ drawSubstring((const byte *)substrings[i], buffer, size, x + (max_substr_width - substr_width) / 2, y);
y += stringHeight(substrings[i]);
delete []substrings[i];
}
More information about the Scummvm-git-logs
mailing list