[Scummvm-cvs-logs] CVS: scummvm/simon items.cpp,1.19,1.20 simon.cpp,1.86,1.87 simon.h,1.18,1.19 vga.cpp,1.7,1.8
Travis Howell
kirben at users.sourceforge.net
Tue Nov 19 22:34:02 CET 2002
Update of /cvsroot/scummvm/scummvm/simon
In directory sc8-pr-cvs1:/tmp/cvs-serv28176/simon
Modified Files:
items.cpp simon.cpp simon.h vga.cpp
Log Message:
Main debug output can now be controlled by 'o' and 'v' keys
Index: items.cpp
===================================================================
RCS file: /cvsroot/scummvm/scummvm/simon/items.cpp,v
retrieving revision 1.19
retrieving revision 1.20
diff -u -d -r1.19 -r1.20
--- items.cpp 20 Nov 2002 05:12:09 -0000 1.19
+++ items.cpp 20 Nov 2002 06:33:11 -0000 1.20
@@ -37,9 +37,8 @@
bool flag, condition;
do {
-#ifdef DUMP_CONTINOUS_MAINSCRIPT
- dumpOpcode(_code_ptr);
-#endif
+ if (_mainscript_toggle)
+ dumpOpcode(_code_ptr);
opcode = getByte();
if (opcode == 0xFF)
@@ -1219,9 +1218,8 @@
SubroutineLine *sl;
byte *old_code_ptr;
-#ifdef DUMP_START_MAINSCRIPT
- dumpSubroutine(sub);
-#endif
+ if (_mainscript_toggle)
+ dumpSubroutine(sub);
old_code_ptr = _code_ptr;
@@ -1239,9 +1237,8 @@
else
_code_ptr += 8;
-#ifdef DUMP_CONTINOUS_MAINSCRIPT
- fprintf(_dump_file, "; %d\n", sub->id);
-#endif
+ if (_mainscript_toggle)
+ fprintf(_dump_file, "; %d\n", sub->id);
result = runScript();
if (result != 0) {
/* result -10 means restart subroutine */
Index: simon.cpp
===================================================================
RCS file: /cvsroot/scummvm/scummvm/simon/simon.cpp,v
retrieving revision 1.86
retrieving revision 1.87
diff -u -d -r1.86 -r1.87
--- simon.cpp 20 Nov 2002 05:12:10 -0000 1.86
+++ simon.cpp 20 Nov 2002 06:33:11 -0000 1.87
@@ -4553,6 +4553,9 @@
_last_music_played = (uint) - 1;
_vga_base_delay = 1;
+ _mainscript_toggle = false;
+ _vgascript_toggle = false;
+
if (_voice_type != FORMAT_NONE) {
_vk_t_toggle = false;
} else {
@@ -4598,7 +4601,11 @@
while (_system->poll_event(&event)) {
switch (event.event_code) {
case OSystem::EVENT_KEYDOWN:
- if (event.kbd.keycode == 't') {
+ if (event.kbd.keycode == 'o') {
+ _mainscript_toggle ^= 1;
+ } else if (event.kbd.keycode == 'v') {
+ _vgascript_toggle ^= 1;
+ } else if (event.kbd.keycode == 't') {
_vk_t_toggle ^= 1;
} else if (event.kbd.keycode == ']' || event.kbd.keycode == '+') {
midi.set_volume(midi.get_volume() + 16);
Index: simon.h
===================================================================
RCS file: /cvsroot/scummvm/scummvm/simon/simon.h,v
retrieving revision 1.18
retrieving revision 1.19
diff -u -d -r1.18 -r1.19
--- simon.h 20 Nov 2002 05:12:10 -0000 1.18
+++ simon.h 20 Nov 2002 06:33:12 -0000 1.19
@@ -28,12 +28,8 @@
#include "sound/mixer.h"
/* Various other settings */
-//#define DUMP_CONTINOUS_MAINSCRIPT
-//#define DUMP_START_MAINSCRIPT
-//#define DUMP_CONTINOUS_VGASCRIPT
//#define DRAW_IMAGES_DEBUG
//#define DRAW_THREE_STARS
-//#define DUMP_START_VGASCRIPT
//#define DUMP_FILE_NR 8
//#define DUMP_BITMAPS_FILE_NR 8
//#define DUMP_DRAWN_BITMAPS
@@ -196,6 +192,8 @@
bool _dx_use_3_or_4_for_lock;
bool _mouse_pos_changed;
+ bool _mainscript_toggle;
+ bool _vgascript_toggle;
bool _vk_t_toggle;
byte _mouse_cursor;
bool _vga_var9;
Index: vga.cpp
===================================================================
RCS file: /cvsroot/scummvm/scummvm/simon/vga.cpp,v
retrieving revision 1.7
retrieving revision 1.8
diff -u -d -r1.7 -r1.8
--- vga.cpp 17 Nov 2002 18:44:33 -0000 1.7
+++ vga.cpp 20 Nov 2002 06:33:12 -0000 1.8
@@ -113,7 +113,7 @@
for (;;) {
uint opcode;
-#ifdef DUMP_CONTINOUS_VGASCRIPT
+if (_vgascript_toggle) {
if ((void *)_vc_ptr != (void *)&vc_get_out_of_code) {
// if (_vga_cur_sprite_id==62 && _vga_cur_file_id==68 ||
// _vga_cur_sprite_id==1 && _vga_cur_file_id==2) {
@@ -122,7 +122,7 @@
dump_video_script(_vc_ptr, true);
// }
}
-#endif
+}
if (!(_game & GAME_SIMON2)) {
opcode = READ_BE_UINT16_UNALIGNED(_vc_ptr);
@@ -196,9 +196,8 @@
_vc_ptr += opcode_param_len_simon1[opcode];
}
-#ifdef DUMP_CONTINOUS_VGASCRIPT
- fprintf(_dump_file, "; skipped\n");
-#endif
+ if (_vgascript_toggle)
+ fprintf(_dump_file, "; skipped\n");
}
void SimonState::o_read_vgares_23()
@@ -1654,9 +1653,8 @@
if (_game & GAME_SIMON2) {
uint num = vc_read_var_or_word() * _vga_base_delay;
-#ifdef DUMP_CONTINOUS_VGASCRIPT
- fprintf(_dump_file, "; sleep_ex = %d\n", num + gss->VGA_DELAY_BASE);
-#endif
+ if (_vgascript_toggle)
+ fprintf(_dump_file, "; sleep_ex = %d\n", num + gss->VGA_DELAY_BASE);
add_vga_timer(num + gss->VGA_DELAY_BASE, _vc_ptr, _vga_cur_sprite_id, _vga_cur_file_id);
_vc_ptr = (byte *)&vc_get_out_of_code;
More information about the Scummvm-git-logs
mailing list