[Scummvm-cvs-logs] CVS: scummvm/simon debug.cpp,1.9,1.10
Travis Howell
kirben at users.sourceforge.net
Fri Nov 29 08:07:02 CET 2002
Update of /cvsroot/scummvm/scummvm/simon
In directory sc8-pr-cvs1:/tmp/cvs-serv8467/simon
Modified Files:
debug.cpp
Log Message:
Fix dump_vga_bitmaps and restrict to win32 only
Index: debug.cpp
===================================================================
RCS file: /cvsroot/scummvm/scummvm/simon/debug.cpp,v
retrieving revision 1.9
retrieving revision 1.10
diff -u -d -r1.9 -r1.10
--- debug.cpp 20 Nov 2002 14:44:59 -0000 1.9
+++ debug.cpp 29 Nov 2002 16:06:15 -0000 1.10
@@ -401,9 +401,8 @@
}
void SimonState::dump_vga_bitmaps(byte *vga, byte *vga1, int res) {
-#if 0
- // FIXME - this whole function doesn't compile on OS X and contains obvious bugs.
- // E.g. offs is read but never set, same for width.
+/* Only supported for win32 atm. mkdir doesn't work otherwise. */
+#if defined (WIN32) && !defined(_WIN32_WCE)
int i;
uint32 offs;
@@ -419,32 +418,26 @@
pal_load(pal, vga1, 5, 3);
}
-#if 0
{
char buf[255], buf2[255];
sprintf(buf, "bmp_%d", res);
- mkdir(buf2); // FIXME - WTF is this ???
- // First off, mkdir() is not very portable.
- // Secondly, the Unix version of mkdir() has two arguments.
- // Third, the buf2 is *never* set to anything.
- // Fourth, why not use a sizeof 256 instead of 255?
+ mkdir(buf2);
}
-#endif
int width, height, flags;
-// i = 538;
+ i = 538;
for(i=1; ; i++) {
p2 = vga + i * 8;
- //offs = swap32(*(uint32*)p2);
+ offs = TO_BE_32(*(uint32*)p2);
/* try to detect end of images.
* assume the end when offset >= 200kb */
if (offs >= 200*1024)
return;
- //width = swap16(*(uint16*)(p2+6));
+ width = TO_BE_16(*(uint16*)(p2+6));
height = p2[5];
flags = p2[4];
More information about the Scummvm-git-logs
mailing list