[Scummvm-cvs-logs] SF.net SVN: scummvm:[41048] scummvm/trunk/engines/sci

thebluegr at users.sourceforge.net thebluegr at users.sourceforge.net
Sat May 30 22:45:57 CEST 2009


Revision: 41048
          http://scummvm.svn.sourceforge.net/scummvm/?rev=41048&view=rev
Author:   thebluegr
Date:     2009-05-30 20:45:57 +0000 (Sat, 30 May 2009)

Log Message:
-----------
Moved the "songlib" command to console.cpp and removed the non-working "set_vismap" command - we can view the different maps with "show_map", but it doesn't make much sense to redirect the game's graphics output to another screen map on demand

Modified Paths:
--------------
    scummvm/trunk/engines/sci/console.cpp
    scummvm/trunk/engines/sci/console.h
    scummvm/trunk/engines/sci/engine/scriptdebug.cpp
    scummvm/trunk/engines/sci/sfx/songlib.cpp

Modified: scummvm/trunk/engines/sci/console.cpp
===================================================================
--- scummvm/trunk/engines/sci/console.cpp	2009-05-30 20:41:10 UTC (rev 41047)
+++ scummvm/trunk/engines/sci/console.cpp	2009-05-30 20:45:57 UTC (rev 41048)
@@ -35,6 +35,7 @@
 #include "sci/gfx/gfx_gui.h"	// for sciw_set_status_bar
 #include "sci/gfx/gfx_state_internal.h"
 #include "sci/gfx/gfx_widgets.h"	// for gfxw_find_port
+#include "sci/sfx/songlib.h"	// for songlib_t
 #include "sci/vocabulary.h"
 
 #include "common/savefile.h"
@@ -89,6 +90,7 @@
 	DCmd_Register("segment_info",		WRAP_METHOD(Console, cmdSegmentInfo));
 	DCmd_Register("segment_kill",		WRAP_METHOD(Console, cmdKillSegment));
 	DCmd_Register("show_map",			WRAP_METHOD(Console, cmdShowMap));
+	DCmd_Register("songlib",			WRAP_METHOD(Console, cmdSongLib));
 	DCmd_Register("gc",					WRAP_METHOD(Console, cmdInvokeGC));
 	DCmd_Register("gc_objects",			WRAP_METHOD(Console, cmdGCObjects));
 	DCmd_Register("exit",				WRAP_METHOD(Console, cmdExit));
@@ -345,8 +347,7 @@
 	}
 
 	sci0_palette = atoi(argv[1]);
-	// TODO: the current room has to be changed to reset the palette of the views
-	game_init_graphics(g_EngineState);
+	cmdRedrawScreen(argc, argv);
 
 	return false;
 }
@@ -1137,6 +1138,25 @@
 	return false;
 }
 
+bool Console::cmdSongLib(int argc, const char **argv) {
+	DebugPrintf("Song library:\n");
+
+	song_t *seeker = *(g_EngineState->_sound._songlib.lib);
+
+	do {
+		DebugPrintf("    %p", (void *)seeker);
+
+		if (seeker) {
+			DebugPrintf("[%04lx,p=%d,s=%d]->", seeker->handle, seeker->priority, seeker->status);
+			seeker = seeker->next;
+		}
+		DebugPrintf("\n");
+	} while (seeker);
+	DebugPrintf("\n");
+
+	return true;
+}
+
 bool Console::cmdInvokeGC(int argc, const char **argv) {
 	DebugPrintf("Performing garbage collection...\n");
 	run_gc(g_EngineState);

Modified: scummvm/trunk/engines/sci/console.h
===================================================================
--- scummvm/trunk/engines/sci/console.h	2009-05-30 20:41:10 UTC (rev 41047)
+++ scummvm/trunk/engines/sci/console.h	2009-05-30 20:45:57 UTC (rev 41048)
@@ -80,6 +80,7 @@
 	bool cmdSegmentInfo(int argc, const char **argv);
 	bool cmdKillSegment(int argc, const char **argv);
 	bool cmdShowMap(int argc, const char **argv);
+	bool cmdSongLib(int argc, const char **argv);
 	bool cmdInvokeGC(int argc, const char **argv);
 	bool cmdGCObjects(int argc, const char **argv);
 	bool cmdExit(int argc, const char **argv);

Modified: scummvm/trunk/engines/sci/engine/scriptdebug.cpp
===================================================================
--- scummvm/trunk/engines/sci/engine/scriptdebug.cpp	2009-05-30 20:41:10 UTC (rev 41047)
+++ scummvm/trunk/engines/sci/engine/scriptdebug.cpp	2009-05-30 20:45:57 UTC (rev 41048)
@@ -338,14 +338,6 @@
 
 int objinfo(EngineState *s, reg_t pos);
 
-void song_lib_dump(const songlib_t &songlib, int line);
-
-static int c_songlib_print(EngineState *s, const Common::Array<cmd_param_t> &cmdParams) {
-	song_lib_dump(s->_sound._songlib, __LINE__);
-
-	return 0;
-}
-
 static int c_vr(EngineState *s, const Common::Array<cmd_param_t> &cmdParams) {
 	reg_t reg = cmdParams[0].reg;
 	reg_t reg_end = cmdParams.size() > 1 ? cmdParams[1].reg : NULL_REG;
@@ -1111,21 +1103,6 @@
 	return 0;
 }
 
-static int c_visible_map(EngineState *s, const Common::Array<cmd_param_t> &cmdParams) {
-	if (!s) {
-		sciprintf("Not in debug state\n");
-		return 1;
-	}
-
-	// TODO
-#if 0
-	if (cmdParams[0].val <= 3)
-		s->pic_visible_map = cmdParams[0].val;
-	c_redraw_screen(s);
-#endif
-	return 0;
-}
-
 static int c_gfx_priority(EngineState *s, const Common::Array<cmd_param_t> &cmdParams) {
 	if (!_debugstate_valid) {
 		sciprintf("Not in debug state\n");
@@ -2038,8 +2015,6 @@
 			con_hook_command(c_sret, "sret", "", "Steps forward until ret is called\n  on the current execution stack\n  level.");
 			con_hook_command(c_resource_id, "resource_id", "i", "Identifies a resource number by\n"
 			                 "  splitting it up in resource type\n  and resource number.");
-			con_hook_command(c_visible_map, "set_vismap", "i", "Sets the visible map.\n  Default is 0 (visual).\n"
-			                 "  Other useful values are:\n  1: Priority\n  2: Control\n  3: Auxiliary\n");
 			con_hook_command(c_bpx, "bpx", "s", "Sets a breakpoint on the execution of\n  the specified method.\n\n  EXAMPLE:\n"
 			                 "  bpx ego::doit\n\n  May also be used to set a breakpoint\n  that applies whenever an object\n"
 			                 "  of a specific type is touched:\n  bpx foo::\n");
@@ -2087,8 +2062,6 @@
 			                 "Steps until the global variable with the\n"
 			                 "specified index is modified.\n\nSEE ALSO\n\n"
 			                 "  s.1, snk.1, so.1, bpx.1");
-			con_hook_command(c_songlib_print, "songlib_print", "",
-			                 "");
 			con_hook_command(c_type, "type", "!a",
 			                 "Determines the type of a value\n\n"
 			                 "SEE ALSO\n\n  addresses.3, vo.1");

Modified: scummvm/trunk/engines/sci/sfx/songlib.cpp
===================================================================
--- scummvm/trunk/engines/sci/sfx/songlib.cpp	2009-05-30 20:41:10 UTC (rev 41047)
+++ scummvm/trunk/engines/sci/sfx/songlib.cpp	2009-05-30 20:45:57 UTC (rev 41048)
@@ -196,21 +196,4 @@
 	seeker->restore_behavior = action;
 }
 
-void song_lib_dump(const songlib_t &songlib, int line) {
-	song_t *seeker = *(songlib.lib);
-
-	fprintf(debug_stream, "L%d:", line);
-	do {
-		fprintf(debug_stream, "    %p", (void *)seeker);
-
-		if (seeker) {
-			fprintf(debug_stream, "[%04lx,p=%d,s=%d]->", seeker->handle, seeker->priority, seeker->status);
-			seeker = seeker->next;
-		}
-		fprintf(debug_stream, "\n");
-	} while (seeker);
-	fprintf(debug_stream, "\n");
-
-}
-
 } // End of namespace Sci


This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.




More information about the Scummvm-git-logs mailing list