[Scummvm-cvs-logs] CVS: residual bitmap.cpp,1.23,1.24 driver_gl.cpp,1.14,1.15
Joost Peters
joostp at users.sourceforge.net
Wed Apr 14 16:05:15 CEST 2004
Update of /cvsroot/scummvm/residual
In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv28776
Modified Files:
bitmap.cpp driver_gl.cpp
Log Message:
'Fix' -zbuffer crash on OSX.
If anyone has a rational explanation.. please step forward :)
Also, depth bitmaps shouldn't be converted. (fixes the graphical glitches when using -zbuffer on Big Endian)
Index: bitmap.cpp
===================================================================
RCS file: /cvsroot/scummvm/residual/bitmap.cpp,v
retrieving revision 1.23
retrieving revision 1.24
diff -u -d -r1.23 -r1.24
--- bitmap.cpp 24 Mar 2004 14:02:47 -0000 1.23
+++ bitmap.cpp 14 Apr 2004 23:04:32 -0000 1.24
@@ -57,9 +57,10 @@
}
#ifdef SYSTEM_BIG_ENDIAN
- for (int j = 0; j < width_ * height_; ++j) {
- ((uint16 *)data_[i])[j] = SWAP_BYTES_16(((uint16 *)data_[i])[j]);
- }
+ if (format_ == 1)
+ for (int j = 0; j < width_ * height_; ++j) {
+ ((uint16 *)data_[i])[j] = SWAP_BYTES_16(((uint16 *)data_[i])[j]);
+ }
#endif
}
Index: driver_gl.cpp
===================================================================
RCS file: /cvsroot/scummvm/residual/driver_gl.cpp,v
retrieving revision 1.14
retrieving revision 1.15
diff -u -d -r1.14 -r1.15
--- driver_gl.cpp 28 Mar 2004 11:00:16 -0000 1.14
+++ driver_gl.cpp 14 Apr 2004 23:04:33 -0000 1.15
@@ -98,6 +98,18 @@
// }
if (y + h == 480) {
+
+ //For some mysterious reason residual crashes
+ //on this glRasterPos2i(...) call on Mac.
+ //However, if we issue some dummy gl* calls beforehand
+ //(either this or some nonsensical state change) then
+ //everything works fine... how odd.
+ //Use this workaround for now.
+
+ #ifdef MACOSX
+ glBegin(GL_POINTS); glEnd();
+ #endif
+
glRasterPos2i(x, 479);
glBitmap(0, 0, 0, 0, 0, -1, NULL);
}
More information about the Scummvm-git-logs
mailing list