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

thebluegr at users.sourceforge.net thebluegr at users.sourceforge.net
Sun Aug 22 18:30:34 CEST 2010


Revision: 52281
          http://scummvm.svn.sourceforge.net/scummvm/?rev=52281&view=rev
Author:   thebluegr
Date:     2010-08-22 16:30:33 +0000 (Sun, 22 Aug 2010)

Log Message:
-----------
SCI: Reimplemented the kShow kernel command, used by the inbuilt SCI debugger. There is no real need to implement kernel debug commands, but since this one maps almost directly to our own "show" debug command, it has been reimplemented (was removed in rev #45310). Normally, there is no real need to implement kernel functions for debug functionality, since there are advanced tools for this purpose nowadays (plus, ScummVM's debugger). Fixes bug #3050616 - "QFG1 EGA: priority/control/view functions crash, debug mode"

Revision Links:
--------------
    http://scummvm.svn.sourceforge.net/scummvm/?rev=45310&view=rev

Modified Paths:
--------------
    scummvm/trunk/engines/sci/engine/kernel.h
    scummvm/trunk/engines/sci/engine/kernel_tables.h
    scummvm/trunk/engines/sci/engine/kgraphics.cpp

Modified: scummvm/trunk/engines/sci/engine/kernel.h
===================================================================
--- scummvm/trunk/engines/sci/engine/kernel.h	2010-08-22 16:07:04 UTC (rev 52280)
+++ scummvm/trunk/engines/sci/engine/kernel.h	2010-08-22 16:30:33 UTC (rev 52281)
@@ -419,6 +419,7 @@
 reg_t kPlatform(EngineState *s, int argc, reg_t *argv);
 reg_t kTextColors(EngineState *s, int argc, reg_t *argv);
 reg_t kTextFonts(EngineState *s, int argc, reg_t *argv);
+reg_t kShow(EngineState *s, int argc, reg_t *argv);
 reg_t kDummy(EngineState *s, int argc, reg_t *argv);
 reg_t kEmpty(EngineState *s, int argc, reg_t *argv);
 reg_t kStub(EngineState *s, int argc, reg_t *argv);

Modified: scummvm/trunk/engines/sci/engine/kernel_tables.h
===================================================================
--- scummvm/trunk/engines/sci/engine/kernel_tables.h	2010-08-22 16:07:04 UTC (rev 52280)
+++ scummvm/trunk/engines/sci/engine/kernel_tables.h	2010-08-22 16:30:33 UTC (rev 52281)
@@ -430,6 +430,7 @@
     { MAP_CALL(SetVideoMode),      SIG_EVERYWHERE,           "i",                     NULL,            NULL },
     { MAP_CALL(ShakeScreen),       SIG_EVERYWHERE,           "(i)(i)",                NULL,            NULL },
     { MAP_CALL(ShowMovie),         SIG_EVERYWHERE,           "(.*)",                  NULL,            NULL },
+	{ MAP_CALL(Show),              SIG_EVERYWHERE,           "i",                     NULL,            NULL },
     { MAP_CALL(SinDiv),            SIG_EVERYWHERE,           "ii",                    NULL,            NULL },
     { MAP_CALL(Sort),              SIG_EVERYWHERE,           "ooo",                   NULL,            NULL },
     { MAP_CALL(Sqrt),              SIG_EVERYWHERE,           "i",                     NULL,            NULL },
@@ -502,7 +503,7 @@
 	/*0x06*/ "IsObject",
 	/*0x07*/ "RespondsTo",
 	/*0x08*/ "DrawPic",
-	/*0x09*/ "Dummy",	// Show
+	/*0x09*/ "Show",
 	/*0x0a*/ "PicNotValid",
 	/*0x0b*/ "Animate",
 	/*0x0c*/ "SetNowSeen",

Modified: scummvm/trunk/engines/sci/engine/kgraphics.cpp
===================================================================
--- scummvm/trunk/engines/sci/engine/kgraphics.cpp	2010-08-22 16:07:04 UTC (rev 52280)
+++ scummvm/trunk/engines/sci/engine/kgraphics.cpp	2010-08-22 16:30:33 UTC (rev 52281)
@@ -1155,6 +1155,30 @@
 	return s->r_acc;
 }
 
+/**
+ * Debug command, used by the SCI builtin debugger
+ */
+reg_t kShow(EngineState *s, int argc, reg_t *argv) {
+	uint16 map = argv[0].toUint16();
+
+	switch (map) {
+	case 1:	// Visual, substituted by display for us
+		g_sci->_gfxScreen->debugShowMap(3);
+		break;
+	case 2:	// Priority
+		g_sci->_gfxScreen->debugShowMap(1);
+		break;
+	case 3:	// Control
+	case 4:	// Control
+		g_sci->_gfxScreen->debugShowMap(2);
+		break;
+	default:
+		warning("Map %d is not available", map);
+	}
+
+	return s->r_acc;
+}
+
 #ifdef ENABLE_SCI32
 
 reg_t kIsHiRes(EngineState *s, int argc, reg_t *argv) {


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