[Scummvm-cvs-logs] CVS: scummvm/backends/ps2 systemps2.cpp,1.2,1.3
Robert Göffringmann
lavosspawn at users.sourceforge.net
Thu Mar 31 19:01:22 CEST 2005
- Previous message: [Scummvm-cvs-logs] CVS: scummvm/scumm costume.cpp,1.172,1.173
- Next message: [Scummvm-cvs-logs] CVS: scummvm/scumm intern.h,2.408,2.409 script_v100he.cpp,2.105,2.106 script_v72he.cpp,2.228,2.229 script_v80he.cpp,2.82,2.83 script_v90he.cpp,2.203,2.204 sprite_he.cpp,1.112,1.113 sprite_he.h,1.28,1.29 wiz_he.cpp,2.32,2.33
- Messages sorted by:
[ date ]
[ thread ]
[ subject ]
[ author ]
Update of /cvsroot/scummvm/scummvm/backends/ps2
In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv18908/backends/ps2
Modified Files:
systemps2.cpp
Log Message:
ps2: clip coordinates in copyRectToScreen, necessary for The Dig
Index: systemps2.cpp
===================================================================
RCS file: /cvsroot/scummvm/scummvm/backends/ps2/systemps2.cpp,v
retrieving revision 1.2
retrieving revision 1.3
diff -u -d -r1.2 -r1.3
--- systemps2.cpp 31 Mar 2005 07:50:33 -0000 1.2
+++ systemps2.cpp 1 Apr 2005 03:00:51 -0000 1.3
@@ -367,7 +367,22 @@
}
void OSystem_PS2::copyRectToScreen(const byte *buf, int pitch, int x, int y, int w, int h) {
- _screen->copyScreenRect((const uint8*)buf, (uint16)pitch, (uint16)x, (uint16)y, (uint16)w, (uint16)h);
+ if (x < 0) {
+ w += x;
+ buf -= x;
+ x = 0;
+ }
+ if (y < 0) {
+ h += y;
+ buf -= y * pitch;
+ y = 0;
+ }
+ if (w > x + _width)
+ w = _width - x;
+ if (h > y + _height)
+ h = _height - y;
+ if ((w > 0) && (h > 0))
+ _screen->copyScreenRect((const uint8*)buf, (uint16)pitch, (uint16)x, (uint16)y, (uint16)w, (uint16)h);
}
void OSystem_PS2::updateScreen(void) {
- Previous message: [Scummvm-cvs-logs] CVS: scummvm/scumm costume.cpp,1.172,1.173
- Next message: [Scummvm-cvs-logs] CVS: scummvm/scumm intern.h,2.408,2.409 script_v100he.cpp,2.105,2.106 script_v72he.cpp,2.228,2.229 script_v80he.cpp,2.82,2.83 script_v90he.cpp,2.203,2.204 sprite_he.cpp,1.112,1.113 sprite_he.h,1.28,1.29 wiz_he.cpp,2.32,2.33
- Messages sorted by:
[ date ]
[ thread ]
[ subject ]
[ author ]
More information about the Scummvm-git-logs
mailing list