[Scummvm-cvs-logs] CVS: scummvm/simon items.cpp,1.31,1.31.2.1 simon.cpp,1.107,1.107.2.1 simon.h,1.31,1.31.2.1 vga.cpp,1.21,1.21.2.1
Travis Howell
kirben at users.sourceforge.net
Thu Dec 5 18:44:01 CET 2002
- Previous message: [Scummvm-cvs-logs] CVS: scummvm/simon items.cpp,1.33,1.34 simon.cpp,1.108,1.109 simon.h,1.32,1.33 vga.cpp,1.21,1.22
- Next message: [Scummvm-cvs-logs] CVS: scummvm README,1.51.2.1,1.51.2.2
- Messages sorted by:
[ date ]
[ thread ]
[ subject ]
[ author ]
Update of /cvsroot/scummvm/scummvm/simon
In directory sc8-pr-cvs1:/tmp/cvs-serv25381/simon
Modified Files:
Tag: branch-0-3-0
items.cpp simon.cpp simon.h vga.cpp
Log Message:
Enable debug keys and warnings only if debug mode selected.
Fix fast mode
Index: items.cpp
===================================================================
RCS file: /cvsroot/scummvm/scummvm/simon/items.cpp,v
retrieving revision 1.31
retrieving revision 1.31.2.1
diff -u -d -r1.31 -r1.31.2.1
--- items.cpp 3 Dec 2002 05:39:30 -0000 1.31
+++ items.cpp 6 Dec 2002 02:43:12 -0000 1.31.2.1
@@ -780,7 +780,8 @@
break;
case 134:{
- warning("stopMidiMusic: not implemented");
+ if (_debugMode)
+ warning("stopMidiMusic: not implemented");
/* dummy proc */
}
break;
@@ -1665,7 +1666,8 @@
uint b = getVarOrWord();
uint c = getVarOrByte();
- warning("o_unk_127(%d,%d,%d) not implemented properly", a, b, c);
+ if (_debugMode)
+ warning("o_unk_127(%d,%d,%d) not implemented properly", a, b, c);
//FIXME simon 2 attempts to use music track 93 in ending sequences
// which doesn't exist so prevent that happening
Index: simon.cpp
===================================================================
RCS file: /cvsroot/scummvm/scummvm/simon/simon.cpp,v
retrieving revision 1.107
retrieving revision 1.107.2.1
diff -u -d -r1.107 -r1.107.2.1
--- simon.cpp 1 Dec 2002 15:36:36 -0000 1.107
+++ simon.cpp 6 Dec 2002 02:43:12 -0000 1.107.2.1
@@ -138,6 +138,7 @@
"Features of the game that depend on sound synchronization will most likely break");
midi.set_volume(detector->_music_volume);
set_volume(detector->_sfx_volume);
+ _debugMode = detector->_debugMode;
_effects_paused = false;
_ambient_paused = false;
@@ -821,7 +822,8 @@
}
}
- warning("loadTablesIntoMem: didn't find %d", subr_id);
+ if (_debugMode)
+ warning("loadTablesIntoMem: didn't find %d", subr_id);
}
Subroutine *SimonState::getSubroutineByID(uint subroutine_id)
@@ -840,7 +842,8 @@
return cur;
}
- warning("getSubroutineByID: subroutine %d not found", subroutine_id);
+ if (_debugMode)
+ warning("getSubroutineByID: subroutine %d not found", subroutine_id);
return NULL;
}
@@ -1958,7 +1961,8 @@
uint16 c;
byte *vc_ptr_org;
- //warning("Set video mode internal: %d, %d", mode, vga_res_id);
+ if (_debugMode)
+ warning("Set video mode internal: %d, %d", mode, vga_res_id);
_video_palette_mode = mode;
_lock_word |= 0x20;
@@ -2520,7 +2524,6 @@
}
}
-// warning("waiting on %d done", a);
_system->show_mouse(true);
}
@@ -3389,7 +3392,8 @@
h = ha->height;
if (!(h > 0 && w > 0 && ha->x + w <= 320 && ha->y + h <= 200)) {
- warning("Invalid coordinates in video_toggle_colors (%d,%d,%d,%d)", ha->x, ha->y, ha->width,
+ if (_debugMode)
+ warning("Invalid coordinates in video_toggle_colors (%d,%d,%d,%d)", ha->x, ha->y, ha->width,
ha->height);
_lock_word &= ~0x8000;
return;
@@ -4429,7 +4433,8 @@
void SimonState::realizePalette()
{
if (_palette_color_count & 0x8000) {
- warning("realizePalette subroutine unimplemented");
+ if (_debugMode)
+ warning("realizePalette subroutine unimplemented");
_palette_color_count = 0;
} else {
_video_var_9 = false;
@@ -4530,13 +4535,8 @@
while (_system->poll_event(&event)) {
switch (event.event_code) {
case OSystem::EVENT_KEYDOWN:
- if (event.kbd.ascii == 'r') {
- _start_mainscript ^= 1;
- } else if (event.kbd.ascii == 'o') {
- _continous_mainscript ^= 1;
- } else if (event.kbd.ascii == 'v') {
- _continous_vgascript ^= 1;
- } else if (event.kbd.ascii == 't') {
+
+ if (event.kbd.ascii == 't') {
_vk_t_toggle ^= 1;
} else if (event.kbd.ascii == '+') {
midi.set_volume(midi.get_volume() + 16);
@@ -4549,9 +4549,15 @@
} else if (event.kbd.ascii == 'b') {
_sound->ambientPause(_ambient_paused ^= 1);
} else if (event.kbd.flags == OSystem::KBD_CTRL) {
- if (event.kbd.ascii == 'f') {
+ if (event.kbd.keycode == 'f')
_fast_mode ^= 1;
- }
+ } else if (_debugMode) {
+ if (event.kbd.ascii == 'r') {
+ _start_mainscript ^= 1;
+ } else if (event.kbd.ascii == 'o') {
+ _continous_mainscript ^= 1;
+ } else if (event.kbd.ascii == 'v')
+ _continous_vgascript ^= 1;
}
_key_pressed = (byte)event.kbd.ascii;
break;
Index: simon.h
===================================================================
RCS file: /cvsroot/scummvm/scummvm/simon/simon.h,v
retrieving revision 1.31
retrieving revision 1.31.2.1
diff -u -d -r1.31 -r1.31.2.1
--- simon.h 3 Dec 2002 05:34:55 -0000 1.31
+++ simon.h 6 Dec 2002 02:43:13 -0000 1.31.2.1
@@ -174,6 +174,7 @@
bool _dx_use_3_or_4_for_lock;
bool _mouse_pos_changed;
+ bool _debugMode;
bool _start_mainscript;
bool _continous_mainscript;
bool _continous_vgascript;
Index: vga.cpp
===================================================================
RCS file: /cvsroot/scummvm/scummvm/simon/vga.cpp,v
retrieving revision 1.21
retrieving revision 1.21.2.1
diff -u -d -r1.21 -r1.21.2.1
--- vga.cpp 1 Dec 2002 08:56:04 -0000 1.21
+++ vga.cpp 6 Dec 2002 02:43:13 -0000 1.21.2.1
@@ -894,7 +894,8 @@
if (_game & GAME_SIMON2 && state.e & 0x4 && _bit_array[10] & 0x800) {
state.surf_addr = state.surf2_addr;
state.surf_pitch = state.surf2_pitch;
- warning("vc_10_draw: (state.e&0x4)");
+ if (_debugMode)
+ warning("vc_10_draw: (state.e&0x4)");
}
if (state.e & 0x8) {
@@ -1166,7 +1167,8 @@
VgaSprite bak;
if (vsp->id == 0) {
- warning("tried to set pri for unknown id %d", _vga_cur_sprite_id);
+ if (_debugMode)
+ warning("tried to set pri for unknown id %d", _vga_cur_sprite_id);
return;
}
@@ -1204,7 +1206,8 @@
vsp->image = vc_read_var_or_word();
if (vsp->id == 0) {
- warning("Trying to set XY of nonexistent sprite '%d'", _vga_cur_sprite_id);
+ if (_debugMode)
+ warning("Trying to set XY of nonexistent sprite '%d'", _vga_cur_sprite_id);
}
vsp->x += (int16)vc_read_next_word();
@@ -1783,7 +1786,8 @@
vc_29_stop_all_sounds();
if ((_game & GAME_SIMON2) && (!_video_var_3)) {
- warning("vc_62_palette_thing: music stuff?");
+ if (_debugMode)
+ warning("vc_62_palette_thing: music stuff?");
}
_video_var_3 = true;
@@ -1897,7 +1901,8 @@
uint16 a = vc_read_next_word();
uint16 b = vc_read_next_word();
- warning("vc_69(%d,%d): music stuff?", a, b);
+ if (_debugMode)
+ warning("vc_69(%d,%d): music stuff?", a, b);
}
void SimonState::vc_70()
- Previous message: [Scummvm-cvs-logs] CVS: scummvm/simon items.cpp,1.33,1.34 simon.cpp,1.108,1.109 simon.h,1.32,1.33 vga.cpp,1.21,1.22
- Next message: [Scummvm-cvs-logs] CVS: scummvm README,1.51.2.1,1.51.2.2
- Messages sorted by:
[ date ]
[ thread ]
[ subject ]
[ author ]
More information about the Scummvm-git-logs
mailing list