[Scummvm-cvs-logs] CVS: scummvm/scumm charset.cpp,2.116,2.117
Travis Howell
kirben at users.sourceforge.net
Tue Oct 5 16:39:20 CEST 2004
Update of /cvsroot/scummvm/scummvm/scumm
In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv17826/scumm
Modified Files:
charset.cpp
Log Message:
Better clipping code.
Index: charset.cpp
===================================================================
RCS file: /cvsroot/scummvm/scummvm/scumm/charset.cpp,v
retrieving revision 2.116
retrieving revision 2.117
diff -u -d -r2.116 -r2.117
--- charset.cpp 5 Oct 2004 14:40:22 -0000 2.116
+++ charset.cpp 5 Oct 2004 23:37:59 -0000 2.117
@@ -1213,7 +1213,7 @@
_vm->_charsetColorMap[1] = _color;
- int charUnk = *_fontPtr;
+ int type = *_fontPtr;
if (is2byte) {
_dropShadow = true;
charPtr = _vm->get2byteCharPtr(chr);
@@ -1312,19 +1312,20 @@
drawTop = _top - _vm->_screenTop;
}
- if ((_vm->_heversion >= 71 && charUnk >= 8) || (_vm->_heversion >= 90 && charUnk == 0)) {
- Common::Rect clip, src, dst;
-
- clip.top = clip.left = 0;
- clip.right = vs->w - 1;
- clip.bottom = vs->h - 1;
+ if ((_vm->_heversion >= 71 && type >= 8) || (_vm->_heversion >= 90 && type == 0)) {
+ Common::Rect src, dst;
dst.left = _left;
dst.top = _top;
dst.right = dst.left + width;
dst.bottom = dst.top + height;
- dst.clip(clip);
+ if (dst.left < 0)
+ dst.left = 0;
+
+ if (dst.top < 0)
+ dst.top = 0;
+
if ((dst.left >= dst.right) || (dst.top >= dst.bottom))
return;
More information about the Scummvm-git-logs
mailing list