From daa8d57a866e2866369e432cf1d624179edc8875 Mon Sep 17 00:00:00 2001 From: Johannes Schickel Date: Tue, 27 May 2014 02:04:07 +0200 Subject: ALL: Rename Debugger::DebugPrintf to Debugger::debugPrintf. --- engines/sci/console.cpp | 1434 +++++++++++++++++++++++------------------------ 1 file changed, 717 insertions(+), 717 deletions(-) (limited to 'engines/sci/console.cpp') diff --git a/engines/sci/console.cpp b/engines/sci/console.cpp index 1bc0dd067c..4f7aed75ac 100644 --- a/engines/sci/console.cpp +++ b/engines/sci/console.cpp @@ -307,137 +307,137 @@ void Console::postEnter() { } bool Console::cmdHelp(int argc, const char **argv) { - DebugPrintf("\n"); - DebugPrintf("Variables\n"); - DebugPrintf("---------\n"); - DebugPrintf("sleeptime_factor: Factor to multiply with wait times in kWait()\n"); - DebugPrintf("gc_interval: Number of kernel calls in between garbage collections\n"); - DebugPrintf("simulated_key: Add a key with the specified scan code to the event list\n"); - DebugPrintf("track_mouse_clicks: Toggles mouse click tracking to the console\n"); - DebugPrintf("weak_validations: Turns some validation errors into warnings\n"); - DebugPrintf("script_abort_flag: Set to 1 to abort script execution. Set to 2 to force a replay afterwards\n"); - DebugPrintf("\n"); - DebugPrintf("Debug flags\n"); - DebugPrintf("-----------\n"); - DebugPrintf("debugflag_list - Lists the available debug flags and their status\n"); - DebugPrintf("debugflag_enable - Enables a debug flag\n"); - DebugPrintf("debugflag_disable - Disables a debug flag\n"); - DebugPrintf("\n"); - DebugPrintf("Commands\n"); - DebugPrintf("--------\n"); - DebugPrintf("Kernel:\n"); - DebugPrintf(" opcodes - Lists the opcode names\n"); - DebugPrintf(" selectors - Lists the selector names\n"); - DebugPrintf(" selector - Attempts to find the requested selector by name\n"); - DebugPrintf(" functions - Lists the kernel functions\n"); - DebugPrintf(" class_table - Shows the available classes\n"); - DebugPrintf("\n"); - DebugPrintf("Parser:\n"); - DebugPrintf(" suffixes - Lists the vocabulary suffixes\n"); - DebugPrintf(" parse_grammar - Shows the parse grammar, in strict GNF\n"); - DebugPrintf(" parser_nodes - Shows the specified number of nodes from the parse node tree\n"); - DebugPrintf(" parser_words - Shows the words from the parse node tree\n"); - DebugPrintf(" sentence_fragments - Shows the sentence fragments (used to build Parse trees)\n"); - DebugPrintf(" parse - Parses a sequence of words and prints the resulting parse tree\n"); - DebugPrintf(" set_parse_nodes - Sets the contents of all parse nodes\n"); - DebugPrintf(" said - Match a string against a said spec\n"); - DebugPrintf("\n"); - DebugPrintf("Resources:\n"); - DebugPrintf(" diskdump - Dumps the specified resource to disk as a patch file\n"); - DebugPrintf(" hexdump - Dumps the specified resource to standard output\n"); - DebugPrintf(" resource_id - Identifies a resource number by splitting it up in resource type and resource number\n"); - DebugPrintf(" resource_info - Shows info about a resource\n"); - DebugPrintf(" resource_types - Shows the valid resource types\n"); - DebugPrintf(" list - Lists all the resources of a given type\n"); - DebugPrintf(" hexgrep - Searches some resources for a particular sequence of bytes, represented as hexadecimal numbers\n"); - DebugPrintf(" verify_scripts - Performs sanity checks on SCI1.1-SCI2.1 game scripts (e.g. if they're up to 64KB in total)\n"); - DebugPrintf("\n"); - DebugPrintf("Game:\n"); - DebugPrintf(" save_game - Saves the current game state to the hard disk\n"); - DebugPrintf(" restore_game - Restores a saved game from the hard disk\n"); - DebugPrintf(" list_saves - List all saved games including filenames\n"); - DebugPrintf(" restart_game - Restarts the game\n"); - DebugPrintf(" version - Shows the resource and interpreter versions\n"); - DebugPrintf(" room - Gets or sets the current room number\n"); - DebugPrintf(" quit - Quits the game\n"); - DebugPrintf("\n"); - DebugPrintf("Graphics:\n"); - DebugPrintf(" show_map - Switches to visual, priority, control or display screen\n"); - DebugPrintf(" set_palette - Sets a palette resource\n"); - DebugPrintf(" draw_pic - Draws a pic resource\n"); - DebugPrintf(" draw_cel - Draws a cel from a view resource\n"); - DebugPrintf(" pic_visualize - Enables visualization of the drawing process of EGA pictures\n"); - DebugPrintf(" undither - Enable/disable undithering\n"); - DebugPrintf(" play_video - Plays a SEQ, AVI, VMD, RBT or DUK video\n"); - DebugPrintf(" animate_list / al - Shows the current list of objects in kAnimate's draw list (SCI0 - SCI1.1)\n"); - DebugPrintf(" window_list / wl - Shows a list of all the windows (ports) in the draw list (SCI0 - SCI1.1)\n"); - DebugPrintf(" plane_list / pl - Shows a list of all the planes in the draw list (SCI2+)\n"); - DebugPrintf(" plane_items / pi - Shows a list of all items for a plane (SCI2+)\n"); - DebugPrintf(" saved_bits - List saved bits on the hunk\n"); - DebugPrintf(" show_saved_bits - Display saved bits\n"); - DebugPrintf("\n"); - DebugPrintf("Segments:\n"); - DebugPrintf(" segment_table / segtable - Lists all segments\n"); - DebugPrintf(" segment_info / seginfo - Provides information on the specified segment\n"); - DebugPrintf(" segment_kill / segkill - Deletes the specified segment\n"); - DebugPrintf("\n"); - DebugPrintf("Garbage collection:\n"); - DebugPrintf(" gc - Invokes the garbage collector\n"); - DebugPrintf(" gc_objects - Lists all reachable objects, normalized\n"); - DebugPrintf(" gc_reachable - Lists all addresses directly reachable from a given memory object\n"); - DebugPrintf(" gc_freeable - Lists all addresses freeable in a given segment\n"); - DebugPrintf(" gc_normalize - Prints the \"normal\" address of a given address\n"); - DebugPrintf("\n"); - DebugPrintf("Music/SFX:\n"); - DebugPrintf(" songlib - Shows the song library\n"); - DebugPrintf(" songinfo - Shows information about a specified song in the song library\n"); - DebugPrintf(" togglesound - Starts/stops a sound in the song library\n"); - DebugPrintf(" stopallsounds - Stops all sounds in the playlist\n"); - DebugPrintf(" startsound - Starts the specified sound resource, replacing the first song in the song library\n"); - DebugPrintf(" is_sample - Shows information on a given sound resource, if it's a PCM sample\n"); - DebugPrintf(" sfx01_header - Dumps the header of a SCI01 song\n"); - DebugPrintf(" sfx01_track - Dumps a track of a SCI01 song\n"); - DebugPrintf(" show_instruments - Shows the instruments of a specific song, or all songs\n"); - DebugPrintf(" map_instrument - Dynamically maps an MT-32 instrument to a GM instrument\n"); - DebugPrintf("\n"); - DebugPrintf("Script:\n"); - DebugPrintf(" addresses - Provides information on how to pass addresses\n"); - DebugPrintf(" registers - Shows the current register values\n"); - DebugPrintf(" dissect_script - Examines a script\n"); - DebugPrintf(" backtrace / bt - Dumps the send/self/super/call/calle/callb stack\n"); - DebugPrintf(" trace / t / s - Executes one operation (no parameters) or several operations (specified as a parameter) \n"); - DebugPrintf(" stepover / p - Executes one operation, skips over call/send\n"); - DebugPrintf(" step_ret / pret - Steps forward until ret is called on the current execution stack level.\n"); - DebugPrintf(" step_event / se - Steps forward until a SCI event is received.\n"); - DebugPrintf(" step_global / sg - Steps until the global variable with the specified index is modified.\n"); - DebugPrintf(" step_callk / snk - Steps forward until it hits the next callk operation, or a specific callk (specified as a parameter)\n"); - DebugPrintf(" disasm - Disassembles a method by name\n"); - DebugPrintf(" disasm_addr - Disassembles one or more commands\n"); - DebugPrintf(" send - Sends a message to an object\n"); - DebugPrintf(" go - Executes the script\n"); - DebugPrintf(" logkernel - Logs kernel calls\n"); - DebugPrintf("\n"); - DebugPrintf("Breakpoints:\n"); - DebugPrintf(" bp_list / bplist / bl - Lists the current breakpoints\n"); - DebugPrintf(" bp_del / bpdel / bc - Deletes a breakpoint with the specified index\n"); - DebugPrintf(" bp_method / bpx - Sets a breakpoint on the execution of a specified method/selector\n"); - DebugPrintf(" bp_read / bpr - Sets a breakpoint on reading of a specified selector\n"); - DebugPrintf(" bp_write / bpw - Sets a breakpoint on writing to a specified selector\n"); - DebugPrintf(" bp_kernel / bpk - Sets a breakpoint on execution of a kernel function\n"); - DebugPrintf(" bp_function / bpe - Sets a breakpoint on the execution of the specified exported function\n"); - DebugPrintf("\n"); - DebugPrintf("VM:\n"); - DebugPrintf(" script_steps - Shows the number of executed SCI operations\n"); - DebugPrintf(" vm_varlist / vmvarlist / vl - Shows the addresses of variables in the VM\n"); - DebugPrintf(" vm_vars / vmvars / vv - Displays or changes variables in the VM\n"); - DebugPrintf(" stack - Lists the specified number of stack elements\n"); - DebugPrintf(" value_type - Determines the type of a value\n"); - DebugPrintf(" view_listnode - Examines the list node at the given address\n"); - DebugPrintf(" view_reference / vr - Examines an arbitrary reference\n"); - DebugPrintf(" view_object / vo - Examines the object at the given address\n"); - DebugPrintf(" active_object - Shows information on the currently active object or class\n"); - DebugPrintf(" acc_object - Shows information on the object or class at the address indexed by the accumulator\n"); - DebugPrintf("\n"); + debugPrintf("\n"); + debugPrintf("Variables\n"); + debugPrintf("---------\n"); + debugPrintf("sleeptime_factor: Factor to multiply with wait times in kWait()\n"); + debugPrintf("gc_interval: Number of kernel calls in between garbage collections\n"); + debugPrintf("simulated_key: Add a key with the specified scan code to the event list\n"); + debugPrintf("track_mouse_clicks: Toggles mouse click tracking to the console\n"); + debugPrintf("weak_validations: Turns some validation errors into warnings\n"); + debugPrintf("script_abort_flag: Set to 1 to abort script execution. Set to 2 to force a replay afterwards\n"); + debugPrintf("\n"); + debugPrintf("Debug flags\n"); + debugPrintf("-----------\n"); + debugPrintf("debugflag_list - Lists the available debug flags and their status\n"); + debugPrintf("debugflag_enable - Enables a debug flag\n"); + debugPrintf("debugflag_disable - Disables a debug flag\n"); + debugPrintf("\n"); + debugPrintf("Commands\n"); + debugPrintf("--------\n"); + debugPrintf("Kernel:\n"); + debugPrintf(" opcodes - Lists the opcode names\n"); + debugPrintf(" selectors - Lists the selector names\n"); + debugPrintf(" selector - Attempts to find the requested selector by name\n"); + debugPrintf(" functions - Lists the kernel functions\n"); + debugPrintf(" class_table - Shows the available classes\n"); + debugPrintf("\n"); + debugPrintf("Parser:\n"); + debugPrintf(" suffixes - Lists the vocabulary suffixes\n"); + debugPrintf(" parse_grammar - Shows the parse grammar, in strict GNF\n"); + debugPrintf(" parser_nodes - Shows the specified number of nodes from the parse node tree\n"); + debugPrintf(" parser_words - Shows the words from the parse node tree\n"); + debugPrintf(" sentence_fragments - Shows the sentence fragments (used to build Parse trees)\n"); + debugPrintf(" parse - Parses a sequence of words and prints the resulting parse tree\n"); + debugPrintf(" set_parse_nodes - Sets the contents of all parse nodes\n"); + debugPrintf(" said - Match a string against a said spec\n"); + debugPrintf("\n"); + debugPrintf("Resources:\n"); + debugPrintf(" diskdump - Dumps the specified resource to disk as a patch file\n"); + debugPrintf(" hexdump - Dumps the specified resource to standard output\n"); + debugPrintf(" resource_id - Identifies a resource number by splitting it up in resource type and resource number\n"); + debugPrintf(" resource_info - Shows info about a resource\n"); + debugPrintf(" resource_types - Shows the valid resource types\n"); + debugPrintf(" list - Lists all the resources of a given type\n"); + debugPrintf(" hexgrep - Searches some resources for a particular sequence of bytes, represented as hexadecimal numbers\n"); + debugPrintf(" verify_scripts - Performs sanity checks on SCI1.1-SCI2.1 game scripts (e.g. if they're up to 64KB in total)\n"); + debugPrintf("\n"); + debugPrintf("Game:\n"); + debugPrintf(" save_game - Saves the current game state to the hard disk\n"); + debugPrintf(" restore_game - Restores a saved game from the hard disk\n"); + debugPrintf(" list_saves - List all saved games including filenames\n"); + debugPrintf(" restart_game - Restarts the game\n"); + debugPrintf(" version - Shows the resource and interpreter versions\n"); + debugPrintf(" room - Gets or sets the current room number\n"); + debugPrintf(" quit - Quits the game\n"); + debugPrintf("\n"); + debugPrintf("Graphics:\n"); + debugPrintf(" show_map - Switches to visual, priority, control or display screen\n"); + debugPrintf(" set_palette - Sets a palette resource\n"); + debugPrintf(" draw_pic - Draws a pic resource\n"); + debugPrintf(" draw_cel - Draws a cel from a view resource\n"); + debugPrintf(" pic_visualize - Enables visualization of the drawing process of EGA pictures\n"); + debugPrintf(" undither - Enable/disable undithering\n"); + debugPrintf(" play_video - Plays a SEQ, AVI, VMD, RBT or DUK video\n"); + debugPrintf(" animate_list / al - Shows the current list of objects in kAnimate's draw list (SCI0 - SCI1.1)\n"); + debugPrintf(" window_list / wl - Shows a list of all the windows (ports) in the draw list (SCI0 - SCI1.1)\n"); + debugPrintf(" plane_list / pl - Shows a list of all the planes in the draw list (SCI2+)\n"); + debugPrintf(" plane_items / pi - Shows a list of all items for a plane (SCI2+)\n"); + debugPrintf(" saved_bits - List saved bits on the hunk\n"); + debugPrintf(" show_saved_bits - Display saved bits\n"); + debugPrintf("\n"); + debugPrintf("Segments:\n"); + debugPrintf(" segment_table / segtable - Lists all segments\n"); + debugPrintf(" segment_info / seginfo - Provides information on the specified segment\n"); + debugPrintf(" segment_kill / segkill - Deletes the specified segment\n"); + debugPrintf("\n"); + debugPrintf("Garbage collection:\n"); + debugPrintf(" gc - Invokes the garbage collector\n"); + debugPrintf(" gc_objects - Lists all reachable objects, normalized\n"); + debugPrintf(" gc_reachable - Lists all addresses directly reachable from a given memory object\n"); + debugPrintf(" gc_freeable - Lists all addresses freeable in a given segment\n"); + debugPrintf(" gc_normalize - Prints the \"normal\" address of a given address\n"); + debugPrintf("\n"); + debugPrintf("Music/SFX:\n"); + debugPrintf(" songlib - Shows the song library\n"); + debugPrintf(" songinfo - Shows information about a specified song in the song library\n"); + debugPrintf(" togglesound - Starts/stops a sound in the song library\n"); + debugPrintf(" stopallsounds - Stops all sounds in the playlist\n"); + debugPrintf(" startsound - Starts the specified sound resource, replacing the first song in the song library\n"); + debugPrintf(" is_sample - Shows information on a given sound resource, if it's a PCM sample\n"); + debugPrintf(" sfx01_header - Dumps the header of a SCI01 song\n"); + debugPrintf(" sfx01_track - Dumps a track of a SCI01 song\n"); + debugPrintf(" show_instruments - Shows the instruments of a specific song, or all songs\n"); + debugPrintf(" map_instrument - Dynamically maps an MT-32 instrument to a GM instrument\n"); + debugPrintf("\n"); + debugPrintf("Script:\n"); + debugPrintf(" addresses - Provides information on how to pass addresses\n"); + debugPrintf(" registers - Shows the current register values\n"); + debugPrintf(" dissect_script - Examines a script\n"); + debugPrintf(" backtrace / bt - Dumps the send/self/super/call/calle/callb stack\n"); + debugPrintf(" trace / t / s - Executes one operation (no parameters) or several operations (specified as a parameter) \n"); + debugPrintf(" stepover / p - Executes one operation, skips over call/send\n"); + debugPrintf(" step_ret / pret - Steps forward until ret is called on the current execution stack level.\n"); + debugPrintf(" step_event / se - Steps forward until a SCI event is received.\n"); + debugPrintf(" step_global / sg - Steps until the global variable with the specified index is modified.\n"); + debugPrintf(" step_callk / snk - Steps forward until it hits the next callk operation, or a specific callk (specified as a parameter)\n"); + debugPrintf(" disasm - Disassembles a method by name\n"); + debugPrintf(" disasm_addr - Disassembles one or more commands\n"); + debugPrintf(" send - Sends a message to an object\n"); + debugPrintf(" go - Executes the script\n"); + debugPrintf(" logkernel - Logs kernel calls\n"); + debugPrintf("\n"); + debugPrintf("Breakpoints:\n"); + debugPrintf(" bp_list / bplist / bl - Lists the current breakpoints\n"); + debugPrintf(" bp_del / bpdel / bc - Deletes a breakpoint with the specified index\n"); + debugPrintf(" bp_method / bpx - Sets a breakpoint on the execution of a specified method/selector\n"); + debugPrintf(" bp_read / bpr - Sets a breakpoint on reading of a specified selector\n"); + debugPrintf(" bp_write / bpw - Sets a breakpoint on writing to a specified selector\n"); + debugPrintf(" bp_kernel / bpk - Sets a breakpoint on execution of a kernel function\n"); + debugPrintf(" bp_function / bpe - Sets a breakpoint on the execution of the specified exported function\n"); + debugPrintf("\n"); + debugPrintf("VM:\n"); + debugPrintf(" script_steps - Shows the number of executed SCI operations\n"); + debugPrintf(" vm_varlist / vmvarlist / vl - Shows the addresses of variables in the VM\n"); + debugPrintf(" vm_vars / vmvars / vv - Displays or changes variables in the VM\n"); + debugPrintf(" stack - Lists the specified number of stack elements\n"); + debugPrintf(" value_type - Determines the type of a value\n"); + debugPrintf(" view_listnode - Examines the list node at the given address\n"); + debugPrintf(" view_reference / vr - Examines an arbitrary reference\n"); + debugPrintf(" view_object / vo - Examines the object at the given address\n"); + debugPrintf(" active_object - Shows information on the currently active object or class\n"); + debugPrintf(" acc_object - Shows information on the object or class at the address indexed by the accumulator\n"); + debugPrintf("\n"); return true; } @@ -464,30 +464,30 @@ bool Console::cmdGetVersion(int argc, const char **argv) { versionFile.close(); } - DebugPrintf("Game ID: %s\n", _engine->getGameIdStr()); - DebugPrintf("Emulated interpreter version: %s\n", getSciVersionDesc(getSciVersion())); - DebugPrintf("\n"); - DebugPrintf("Detected features:\n"); - DebugPrintf("------------------\n"); - DebugPrintf("Sound type: %s\n", getSciVersionDesc(_engine->_features->detectDoSoundType())); - DebugPrintf("Graphics functions type: %s\n", getSciVersionDesc(_engine->_features->detectGfxFunctionsType())); - DebugPrintf("Lofs type: %s\n", getSciVersionDesc(_engine->_features->detectLofsType())); - DebugPrintf("Move count type: %s\n", (_engine->_features->handleMoveCount()) ? "increment" : "ignore"); - DebugPrintf("SetCursor type: %s\n", getSciVersionDesc(_engine->_features->detectSetCursorType())); + debugPrintf("Game ID: %s\n", _engine->getGameIdStr()); + debugPrintf("Emulated interpreter version: %s\n", getSciVersionDesc(getSciVersion())); + debugPrintf("\n"); + debugPrintf("Detected features:\n"); + debugPrintf("------------------\n"); + debugPrintf("Sound type: %s\n", getSciVersionDesc(_engine->_features->detectDoSoundType())); + debugPrintf("Graphics functions type: %s\n", getSciVersionDesc(_engine->_features->detectGfxFunctionsType())); + debugPrintf("Lofs type: %s\n", getSciVersionDesc(_engine->_features->detectLofsType())); + debugPrintf("Move count type: %s\n", (_engine->_features->handleMoveCount()) ? "increment" : "ignore"); + debugPrintf("SetCursor type: %s\n", getSciVersionDesc(_engine->_features->detectSetCursorType())); #ifdef ENABLE_SCI32 if (getSciVersion() >= SCI_VERSION_2) - DebugPrintf("kString type: %s\n", (_engine->_features->detectSci2StringFunctionType() == kSci2StringFunctionOld) ? "SCI2 (old)" : "SCI2.1 (new)"); + debugPrintf("kString type: %s\n", (_engine->_features->detectSci2StringFunctionType() == kSci2StringFunctionOld) ? "SCI2 (old)" : "SCI2.1 (new)"); if (getSciVersion() == SCI_VERSION_2_1) - DebugPrintf("SCI2.1 kernel table: %s\n", (_engine->_features->detectSci21KernelType() == SCI_VERSION_2) ? "modified SCI2 (old)" : "SCI2.1 (new)"); + debugPrintf("SCI2.1 kernel table: %s\n", (_engine->_features->detectSci21KernelType() == SCI_VERSION_2) ? "modified SCI2 (old)" : "SCI2.1 (new)"); #endif - DebugPrintf("View type: %s\n", viewTypeDesc[g_sci->getResMan()->getViewType()]); - DebugPrintf("Uses palette merging: %s\n", g_sci->_gfxPalette->isMerging() ? "yes" : "no"); - DebugPrintf("Resource volume version: %s\n", g_sci->getResMan()->getVolVersionDesc()); - DebugPrintf("Resource map version: %s\n", g_sci->getResMan()->getMapVersionDesc()); - DebugPrintf("Contains selector vocabulary (vocab.997): %s\n", hasVocab997 ? "yes" : "no"); - DebugPrintf("Has CantBeHere selector: %s\n", g_sci->getKernel()->_selectorCache.cantBeHere != -1 ? "yes" : "no"); - DebugPrintf("Game version (VERSION file): %s\n", gameVersion.c_str()); - DebugPrintf("\n"); + debugPrintf("View type: %s\n", viewTypeDesc[g_sci->getResMan()->getViewType()]); + debugPrintf("Uses palette merging: %s\n", g_sci->_gfxPalette->isMerging() ? "yes" : "no"); + debugPrintf("Resource volume version: %s\n", g_sci->getResMan()->getVolVersionDesc()); + debugPrintf("Resource map version: %s\n", g_sci->getResMan()->getMapVersionDesc()); + debugPrintf("Contains selector vocabulary (vocab.997): %s\n", hasVocab997 ? "yes" : "no"); + debugPrintf("Has CantBeHere selector: %s\n", g_sci->getKernel()->_selectorCache.cantBeHere != -1 ? "yes" : "no"); + debugPrintf("Game version (VERSION file): %s\n", gameVersion.c_str()); + debugPrintf("\n"); return true; } @@ -498,13 +498,13 @@ bool Console::cmdOpcodes(int argc, const char **argv) { // If the resource couldn't be loaded, leave if (!r) { - DebugPrintf("unable to load vocab.998"); + debugPrintf("unable to load vocab.998"); return true; } int count = READ_LE_UINT16(r->data); - DebugPrintf("Opcode names in numeric order [index: type name]:\n"); + debugPrintf("Opcode names in numeric order [index: type name]:\n"); for (int i = 0; i < count; i++) { int offset = READ_LE_UINT16(r->data + 2 + i * 2); @@ -512,49 +512,49 @@ bool Console::cmdOpcodes(int argc, const char **argv) { int type = READ_LE_UINT16(r->data + offset + 2); // QFG3 has empty opcodes Common::String name = len > 0 ? Common::String((const char *)r->data + offset + 4, len) : "Dummy"; - DebugPrintf("%03x: %03x %20s | ", i, type, name.c_str()); + debugPrintf("%03x: %03x %20s | ", i, type, name.c_str()); if ((i % 3) == 2) - DebugPrintf("\n"); + debugPrintf("\n"); } - DebugPrintf("\n"); + debugPrintf("\n"); return true; } bool Console::cmdSelector(int argc, const char **argv) { if (argc < 2) { - DebugPrintf("Attempts to find the requested selector by name.\n"); - DebugPrintf("Usage: %s \n", argv[0]); + debugPrintf("Attempts to find the requested selector by name.\n"); + debugPrintf("Usage: %s \n", argv[0]); return true; } Common::String name = argv[1]; int seeker = _engine->getKernel()->findSelector(name.c_str()); if (seeker >= 0) { - DebugPrintf("Selector %s found at %03x (%d)\n", name.c_str(), seeker, seeker); + debugPrintf("Selector %s found at %03x (%d)\n", name.c_str(), seeker, seeker); return true; } - DebugPrintf("Selector %s wasn't found\n", name.c_str()); + debugPrintf("Selector %s wasn't found\n", name.c_str()); return true; } bool Console::cmdSelectors(int argc, const char **argv) { - DebugPrintf("Selector names in numeric order:\n"); + debugPrintf("Selector names in numeric order:\n"); Common::String selectorName; for (uint seeker = 0; seeker < _engine->getKernel()->getSelectorNamesSize(); seeker++) { selectorName = _engine->getKernel()->getSelectorName(seeker); if (selectorName != "BAD SELECTOR") - DebugPrintf("%03x: %20s | ", seeker, selectorName.c_str()); + debugPrintf("%03x: %20s | ", seeker, selectorName.c_str()); else continue; if ((seeker % 3) == 2) - DebugPrintf("\n"); + debugPrintf("\n"); } - DebugPrintf("\n"); + debugPrintf("\n"); #if 0 // For debug/development @@ -584,14 +584,14 @@ bool Console::cmdSelectors(int argc, const char **argv) { } bool Console::cmdKernelFunctions(int argc, const char **argv) { - DebugPrintf("Kernel function names in numeric order:\n"); + debugPrintf("Kernel function names in numeric order:\n"); for (uint seeker = 0; seeker < _engine->getKernel()->getKernelNamesSize(); seeker++) { - DebugPrintf("%03x: %20s | ", seeker, _engine->getKernel()->getKernelName(seeker).c_str()); + debugPrintf("%03x: %20s | ", seeker, _engine->getKernel()->getKernelName(seeker).c_str()); if ((seeker % 3) == 2) - DebugPrintf("\n"); + debugPrintf("\n"); } - DebugPrintf("\n"); + debugPrintf("\n"); return true; } @@ -610,9 +610,9 @@ bool Console::cmdParserWords(int argc, const char **argv) { bool Console::cmdSetParseNodes(int argc, const char **argv) { if (argc < 2) { - DebugPrintf("Sets the contents of all parse nodes.\n"); - DebugPrintf("Usage: %s ... \n", argv[0]); - DebugPrintf("Tokens should be separated by blanks and enclosed in parentheses\n"); + debugPrintf("Sets the contents of all parse nodes.\n"); + debugPrintf("Usage: %s ... \n", argv[0]); + debugPrintf("Tokens should be separated by blanks and enclosed in parentheses\n"); return true; } @@ -643,23 +643,23 @@ bool Console::cmdSetParseNodes(int argc, const char **argv) { bool Console::cmdRegisters(int argc, const char **argv) { EngineState *s = _engine->_gamestate; - DebugPrintf("Current register values:\n"); - DebugPrintf("acc=%04x:%04x prev=%04x:%04x &rest=%x\n", PRINT_REG(s->r_acc), PRINT_REG(s->r_prev), s->r_rest); + debugPrintf("Current register values:\n"); + debugPrintf("acc=%04x:%04x prev=%04x:%04x &rest=%x\n", PRINT_REG(s->r_acc), PRINT_REG(s->r_prev), s->r_rest); if (!s->_executionStack.empty()) { - DebugPrintf("pc=%04x:%04x obj=%04x:%04x fp=ST:%04x sp=ST:%04x\n", + debugPrintf("pc=%04x:%04x obj=%04x:%04x fp=ST:%04x sp=ST:%04x\n", PRINT_REG(s->xs->addr.pc), PRINT_REG(s->xs->objp), (unsigned)(s->xs->fp - s->stack_base), (unsigned)(s->xs->sp - s->stack_base)); } else - DebugPrintf("\n"); + debugPrintf("\n"); return true; } bool Console::cmdDiskDump(int argc, const char **argv) { if (argc != 3) { - DebugPrintf("Dumps the specified resource to disk as a patch file\n"); - DebugPrintf("Usage: %s \n", argv[0]); + debugPrintf("Dumps the specified resource to disk as a patch file\n"); + debugPrintf("Usage: %s \n", argv[0]); cmdResourceTypes(argc, argv); return true; } @@ -668,7 +668,7 @@ bool Console::cmdDiskDump(int argc, const char **argv) { ResourceType res = parseResourceType(argv[1]); if (res == kResourceTypeInvalid) - DebugPrintf("Resource type '%s' is not valid\n", argv[1]); + debugPrintf("Resource type '%s' is not valid\n", argv[1]); else { Resource *resource = _engine->getResMan()->findResource(ResourceId(res, resNum), 0); if (resource) { @@ -680,9 +680,9 @@ bool Console::cmdDiskDump(int argc, const char **argv) { outFile->finalize(); outFile->close(); delete outFile; - DebugPrintf("Resource %s.%03d (located in %s) has been dumped to disk\n", argv[1], resNum, resource->getResourceLocation().c_str()); + debugPrintf("Resource %s.%03d (located in %s) has been dumped to disk\n", argv[1], resNum, resource->getResourceLocation().c_str()); } else { - DebugPrintf("Resource %s.%03d not found\n", argv[1], resNum); + debugPrintf("Resource %s.%03d not found\n", argv[1], resNum); } } @@ -691,8 +691,8 @@ bool Console::cmdDiskDump(int argc, const char **argv) { bool Console::cmdHexDump(int argc, const char **argv) { if (argc != 3) { - DebugPrintf("Dumps the specified resource to standard output\n"); - DebugPrintf("Usage: %s \n", argv[0]); + debugPrintf("Dumps the specified resource to standard output\n"); + debugPrintf("Usage: %s \n", argv[0]); cmdResourceTypes(argc, argv); return true; } @@ -701,14 +701,14 @@ bool Console::cmdHexDump(int argc, const char **argv) { ResourceType res = parseResourceType(argv[1]); if (res == kResourceTypeInvalid) - DebugPrintf("Resource type '%s' is not valid\n", argv[1]); + debugPrintf("Resource type '%s' is not valid\n", argv[1]); else { Resource *resource = _engine->getResMan()->findResource(ResourceId(res, resNum), 0); if (resource) { Common::hexdump(resource->data, resource->size, 16, 0); - DebugPrintf("Resource %s.%03d has been dumped to standard output\n", argv[1], resNum); + debugPrintf("Resource %s.%03d has been dumped to standard output\n", argv[1], resNum); } else { - DebugPrintf("Resource %s.%03d not found\n", argv[1], resNum); + debugPrintf("Resource %s.%03d not found\n", argv[1], resNum); } } @@ -717,21 +717,21 @@ bool Console::cmdHexDump(int argc, const char **argv) { bool Console::cmdResourceId(int argc, const char **argv) { if (argc != 2) { - DebugPrintf("Identifies a resource number by splitting it up in resource type and resource number\n"); - DebugPrintf("Usage: %s \n", argv[0]); + debugPrintf("Identifies a resource number by splitting it up in resource type and resource number\n"); + debugPrintf("Usage: %s \n", argv[0]); return true; } int id = atoi(argv[1]); - DebugPrintf("%s.%d (0x%x)\n", getResourceTypeName((ResourceType)(id >> 11)), id & 0x7ff, id & 0x7ff); + debugPrintf("%s.%d (0x%x)\n", getResourceTypeName((ResourceType)(id >> 11)), id & 0x7ff, id & 0x7ff); return true; } bool Console::cmdDissectScript(int argc, const char **argv) { if (argc != 2) { - DebugPrintf("Examines a script\n"); - DebugPrintf("Usage: %s