[Scummvm-cvs-logs] CVS: residual driver_tinygl.cpp,1.25,1.26
Pawel Kolodziejski
aquadran at users.sourceforge.net
Thu Aug 11 06:50:31 CEST 2005
Update of /cvsroot/scummvm/residual
In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv27316
Modified Files:
driver_tinygl.cpp
Log Message:
cleanup
Index: driver_tinygl.cpp
===================================================================
RCS file: /cvsroot/scummvm/residual/driver_tinygl.cpp,v
retrieving revision 1.25
retrieving revision 1.26
diff -u -d -r1.25 -r1.26
--- driver_tinygl.cpp 10 Aug 2005 21:06:54 -0000 1.25
+++ driver_tinygl.cpp 11 Aug 2005 13:49:49 -0000 1.26
@@ -304,6 +304,9 @@
int srcX, srcY;
int l, r;
+ if (x > 639 || y > 479)
+ return;
+
if (x < 0) {
x = 0;
srcX = -x;
@@ -336,7 +339,7 @@
}
} else {
for (l = 0; l < height; l++) {
- for (r = 0; r < width * 2; r += 2) {
+ for (r = 0; r < copyWidth; r += 2) {
uint16 pixel = READ_LE_UINT16(src + r);
if (pixel != 0xf81f)
WRITE_LE_UINT16(dst + r, pixel);
@@ -392,9 +395,6 @@
}
void DriverTinyGL::selectMaterial(const Material *material) {
-#ifdef TURN_ON_LIGTHS_WITHOUT_TEXTURES
- return;
-#endif
TGLuint *textures = (TGLuint *)material->_textures;
tglBindTexture(TGL_TEXTURE_2D, textures[material->_currImage]);
tglPushMatrix();
@@ -420,8 +420,7 @@
if (_smushWidth == 640 && _smushHeight == 480) {
memcpy(_zb->pbuf, _smushBitmap, 640 * 480 * 2);
} else {
- TinyGLBlit((byte *)_zb->pbuf, _smushBitmap, offsetX, offsetY,
- _smushWidth, _smushHeight, false);
+ TinyGLBlit((byte *)_zb->pbuf, _smushBitmap, offsetX, offsetY, _smushWidth, _smushHeight, false);
}
}
More information about the Scummvm-git-logs
mailing list