[Scummvm-cvs-logs] CVS: scummvm/simon debug.cpp,1.24,1.25 simon.cpp,1.361,1.362 simon.h,1.107,1.108 vga.cpp,1.94,1.95
Travis Howell
kirben at users.sourceforge.net
Thu Dec 11 01:15:02 CET 2003
Update of /cvsroot/scummvm/scummvm/simon
In directory sc8-pr-cvs1:/tmp/cvs-serv19805/simon
Modified Files:
debug.cpp simon.cpp simon.h vga.cpp
Log Message:
Change another debug define to key
Dump options should now work on non-win32
Index: debug.cpp
===================================================================
RCS file: /cvsroot/scummvm/scummvm/simon/debug.cpp,v
retrieving revision 1.24
retrieving revision 1.25
diff -u -d -r1.24 -r1.25
--- debug.cpp 1 Dec 2003 00:45:16 -0000 1.24
+++ debug.cpp 11 Dec 2003 09:14:10 -0000 1.25
@@ -354,21 +354,19 @@
}
void SimonEngine::dump_single_bitmap(int file, int image, byte *offs, int w, int h, byte base) {
-/* Only supported for win32 atm. mkdir doesn't work otherwise. */
-#if defined (WIN32) && !defined(_WIN32_WCE)
- char buf[255], buf2[255];
+ char buf[255];
struct stat statbuf;
- sprintf(buf, "bmp_%d\\%d.bmp", file, image);
+#if defined(MACOS_CARBON)
+ sprintf(buf, ":dumps:File%d_Image%d.bmp", file, image);
+#else
+ sprintf(buf, "dumps/File%d_Image%d.bmp", file, image);
+#endif
if (stat(buf, &statbuf) == 0)
return;
- sprintf(buf2, "bmp_%d", file);
- mkdir(buf2);
-
dump_bitmap(buf, offs, w, h, 0, _palette, base);
-#endif
}
void pal_load(byte *pal, const byte *vga1, int a, int b) {
@@ -391,8 +389,6 @@
}
void SimonEngine::dump_vga_bitmaps(byte *vga, byte *vga1, int res) {
-/* Only supported for win32 atm. mkdir doesn't work otherwise. */
-#if defined (WIN32) && !defined(_WIN32_WCE)
int i;
uint32 offs;
@@ -436,12 +432,15 @@
/* dump bitmap */
{
char buf[255];
- sprintf(buf, "bmp_%d\\%d.bmp", res, i);
+#if defined(MACOS_CARBON)
+ sprintf(buf, ":dumps:Res%d_Image%d.bmp", res, i);
+#else
+ sprintf(buf, "dumps/Res%d_Image%d.bmp", res, i);
+#endif
dump_bitmap(buf, vga + offs, width, height, flags, pal, 0);
}
}
-#endif
}
void SimonEngine::dump_vga_script_always(byte *ptr, uint res, uint sprite_id) {
Index: simon.cpp
===================================================================
RCS file: /cvsroot/scummvm/scummvm/simon/simon.cpp,v
retrieving revision 1.361
retrieving revision 1.362
diff -u -d -r1.361 -r1.362
--- simon.cpp 11 Dec 2003 05:20:01 -0000 1.361
+++ simon.cpp 11 Dec 2003 09:14:10 -0000 1.362
@@ -321,6 +321,7 @@
_continous_mainscript = 0;
_continous_vgascript = 0;
_draw_images_debug = 0;
+ _dump_images = 0;
_speech = false;
_subtitles = false;
_mouse_cursor = 0;
@@ -3500,6 +3501,10 @@
case 'i':
if (_debugMode)
_draw_images_debug ^= 1;
+ break;
+ case 'd':
+ if (_debugMode)
+ _dump_images ^=1;
break;
}
Index: simon.h
===================================================================
RCS file: /cvsroot/scummvm/scummvm/simon/simon.h,v
retrieving revision 1.107
retrieving revision 1.108
diff -u -d -r1.107 -r1.108
--- simon.h 11 Dec 2003 03:50:25 -0000 1.107
+++ simon.h 11 Dec 2003 09:14:10 -0000 1.108
@@ -36,7 +36,6 @@
/* Various other settings */
//#define DUMP_FILE_NR 8
//#define DUMP_BITMAPS_FILE_NR 8
-//#define DUMP_DRAWN_BITMAPS
uint fileReadItemID(File *in);
@@ -197,6 +196,7 @@
bool _continous_mainscript;
bool _continous_vgascript;
bool _draw_images_debug;
+ bool _dump_images;
bool _speech;
bool _subtitles;
byte _mouse_cursor;
Index: vga.cpp
===================================================================
RCS file: /cvsroot/scummvm/scummvm/simon/vga.cpp,v
retrieving revision 1.94
retrieving revision 1.95
diff -u -d -r1.94 -r1.95
--- vga.cpp 6 Dec 2003 04:18:48 -0000 1.94
+++ vga.cpp 11 Dec 2003 09:14:10 -0000 1.95
@@ -628,10 +628,9 @@
if (height == 0 || width == 0)
return;
-#ifdef DUMP_DRAWN_BITMAPS
- dump_single_bitmap(_vga_cur_file_id, state.image, state.depack_src, width * 16, height,
- state.base_color);
-#endif
+ if (_dump_images)
+ dump_single_bitmap(_vga_cur_file_id, state.image, state.depack_src, width * 16, height,
+ state.base_color);
if (flags & 0x80 && !(state.e & 0x10)) {
if (state.e & 1) {
More information about the Scummvm-git-logs
mailing list