[Scummvm-cvs-logs] SF.net SVN: scummvm: [20684] scummvm/trunk/engines/scumm

kirben at users.sourceforge.net kirben at users.sourceforge.net
Mon Feb 13 21:29:01 CET 2006


Revision: 20684
Author:   kirben
Date:     2006-02-13 21:27:39 -0800 (Mon, 13 Feb 2006)
ViewCVS:  http://svn.sourceforge.net/scummvm?rev=20684&view=rev

Log Message:
-----------
Add setSystemMessage opcode for HE70+ games. Sets the window caption correctly for all languages

Modified Paths:
--------------
    scummvm/trunk/engines/scumm/gfx.cpp
    scummvm/trunk/engines/scumm/intern_he.h
    scummvm/trunk/engines/scumm/script_v100he.cpp
    scummvm/trunk/engines/scumm/script_v72he.cpp
    scummvm/trunk/engines/scumm/script_v7he.cpp
    scummvm/trunk/engines/scumm/script_v80he.cpp
    scummvm/trunk/engines/scumm/script_v90he.cpp
Modified: scummvm/trunk/engines/scumm/gfx.cpp
===================================================================
--- scummvm/trunk/engines/scumm/gfx.cpp	2006-02-14 04:33:10 UTC (rev 20683)
+++ scummvm/trunk/engines/scumm/gfx.cpp	2006-02-14 05:27:39 UTC (rev 20684)
@@ -1705,8 +1705,6 @@
 	byte *src, *dst;
 	VirtScreen *vs = &_vm->virtscr[0];
 
-	debug(1,"copyVirtScreenBuffers: Left %d Right %d Top %d Bottom %d", rect.left, rect.right, rect.top, rect.bottom);
-
 	if (rect.top > vs->h || rect.bottom < 0)
 		return;
 

Modified: scummvm/trunk/engines/scumm/intern_he.h
===================================================================
--- scummvm/trunk/engines/scumm/intern_he.h	2006-02-14 04:33:10 UTC (rev 20683)
+++ scummvm/trunk/engines/scumm/intern_he.h	2006-02-14 05:27:39 UTC (rev 20684)
@@ -168,7 +168,7 @@
 	void o70_getStringLenForWidth();
 	void o70_getCharIndexInString();
 	void o70_setFilePath();
-	void o70_setWindowCaption();
+	void o70_setSystemMessage();
 	void o70_polygonOps();
 	void o70_polygonHit();
 
@@ -320,7 +320,7 @@
 	void o72_writeINI();
 	void o72_getResourceSize();
 	void o72_setFilePath();
-	void o72_setWindowCaption();
+	void o72_setSystemMessage();
 
 	byte VAR_NUM_ROOMS;
 	byte VAR_NUM_SCRIPTS;

Modified: scummvm/trunk/engines/scumm/script_v100he.cpp
===================================================================
--- scummvm/trunk/engines/scumm/script_v100he.cpp	2006-02-14 04:33:10 UTC (rev 20683)
+++ scummvm/trunk/engines/scumm/script_v100he.cpp	2006-02-14 05:27:39 UTC (rev 20684)
@@ -183,7 +183,7 @@
 		/* 70 */
 		OPCODE(o6_invalid),
 		OPCODE(o6_setBoxSet),
-		OPCODE(o72_setWindowCaption),
+		OPCODE(o72_setSystemMessage),
 		OPCODE(o6_shuffle),
 		/* 74 */
 		OPCODE(o6_delay),

Modified: scummvm/trunk/engines/scumm/script_v72he.cpp
===================================================================
--- scummvm/trunk/engines/scumm/script_v72he.cpp	2006-02-14 04:33:10 UTC (rev 20683)
+++ scummvm/trunk/engines/scumm/script_v72he.cpp	2006-02-14 05:27:39 UTC (rev 20684)
@@ -357,7 +357,7 @@
 		/* F8 */
 		OPCODE(o72_getResourceSize),
 		OPCODE(o72_setFilePath),
-		OPCODE(o72_setWindowCaption),
+		OPCODE(o72_setSystemMessage),
 		OPCODE(o70_polygonOps),
 		/* FC */
 		OPCODE(o70_polygonHit),
@@ -2240,7 +2240,7 @@
 		type = rtScript;
 		break;
 	default:
-		error("o80_getResourceSize: default type %d", subOp);
+		error("o72_getResourceSize: default type %d", subOp);
 	}
 
 	ptr = getResourceAddress(type, resid);
@@ -2250,18 +2250,34 @@
 }
 
 void ScummEngine_v72he::o72_setFilePath() {
-	// File related
 	byte filename[255];
+
 	copyScriptString(filename, sizeof(filename));
 	debug(1,"o72_setFilePath: %s", filename);
 }
 
-void ScummEngine_v72he::o72_setWindowCaption() {
+void ScummEngine_v72he::o72_setSystemMessage() {
 	byte name[1024];
+
 	copyScriptString(name, sizeof(name));
 	byte subOp = fetchScriptByte();
 
-	debug(1,"o72_setWindowCaption: (%d) %s", subOp, name);
+	switch (subOp) {
+	case 240:
+		debug(1,"o72_setSystemMessage: (%d) %s", subOp, name);
+		break;
+	case 241:  // Set Version
+		debug(1,"o72_setSystemMessage: (%d) %s", subOp, name);
+		break;
+	case 242:
+		debug(1,"o72_setSystemMessage: (%d) %s", subOp, name);
+		break;
+	case 243: // Set Window Caption
+		_system->setWindowCaption((const char *)name);
+		break;
+	default:
+		error("o72_setSystemMessage: default case %d", subOp);
+	}
 }
 
 void ScummEngine_v72he::decodeParseString(int m, int n) {

Modified: scummvm/trunk/engines/scumm/script_v7he.cpp
===================================================================
--- scummvm/trunk/engines/scumm/script_v7he.cpp	2006-02-14 04:33:10 UTC (rev 20683)
+++ scummvm/trunk/engines/scumm/script_v7he.cpp	2006-02-14 05:27:39 UTC (rev 20684)
@@ -24,6 +24,7 @@
 #include "common/stdafx.h"
 
 #include "common/config-manager.h"
+#include "common/system.h"
 
 #include "scumm/actor.h"
 #include "scumm/charset.h"
@@ -354,7 +355,7 @@
 		/* F8 */
 		OPCODE(o6_invalid),
 		OPCODE(o70_setFilePath),
-		OPCODE(o70_setWindowCaption),
+		OPCODE(o70_setSystemMessage),
 		OPCODE(o70_polygonOps),
 		/* FC */
 		OPCODE(o70_polygonHit),
@@ -1070,23 +1071,42 @@
 }
 
 void ScummEngine_v70he::o70_setFilePath() {
-	// File related
 	int len;
 	byte filename[100];
 
 	convertMessageToString(_scriptPointer, filename, sizeof(filename));
-
 	len = resStrLen(_scriptPointer);
 	_scriptPointer += len + 1;
 
 	debug(1,"stub o70_setFilePath(%s)", filename);
 }
 
-void ScummEngine_v70he::o70_setWindowCaption() {
+void ScummEngine_v70he::o70_setSystemMessage() {
+	int len;
+	byte name[255];
+
 	byte subOp = fetchScriptByte();
-	int len = resStrLen(_scriptPointer);
-	debug(1,"stub o70_setWindowCaption(%d, \"%s\")", subOp, _scriptPointer);
+
+	convertMessageToString(_scriptPointer, name, sizeof(name));
+	len = resStrLen(_scriptPointer);
 	_scriptPointer += len + 1;
+
+	switch (subOp) {
+	case 240:
+		debug(1,"o70_setSystemMessage: (%d) %s", subOp, name);
+		break;
+	case 241:  // Set Version
+		debug(1,"o70_setSystemMessage: (%d) %s", subOp, name);
+		break;
+	case 242:
+		debug(1,"o70_setSystemMessage: (%d) %s", subOp, name);
+		break;
+	case 243: // Set Window Caption
+		_system->setWindowCaption((const char *)name);
+		break;
+	default:
+		error("o70_setSystemMessage: default case %d", subOp);
+	}
 }
 
 void ScummEngine_v70he::o70_polygonOps() {

Modified: scummvm/trunk/engines/scumm/script_v80he.cpp
===================================================================
--- scummvm/trunk/engines/scumm/script_v80he.cpp	2006-02-14 04:33:10 UTC (rev 20683)
+++ scummvm/trunk/engines/scumm/script_v80he.cpp	2006-02-14 05:27:39 UTC (rev 20684)
@@ -356,7 +356,7 @@
 		/* F8 */
 		OPCODE(o72_getResourceSize),
 		OPCODE(o72_setFilePath),
-		OPCODE(o72_setWindowCaption),
+		OPCODE(o72_setSystemMessage),
 		OPCODE(o70_polygonOps),
 		/* FC */
 		OPCODE(o70_polygonHit),

Modified: scummvm/trunk/engines/scumm/script_v90he.cpp
===================================================================
--- scummvm/trunk/engines/scumm/script_v90he.cpp	2006-02-14 04:33:10 UTC (rev 20683)
+++ scummvm/trunk/engines/scumm/script_v90he.cpp	2006-02-14 05:27:39 UTC (rev 20684)
@@ -354,7 +354,7 @@
 		/* F8 */
 		OPCODE(o72_getResourceSize),
 		OPCODE(o72_setFilePath),
-		OPCODE(o72_setWindowCaption),
+		OPCODE(o72_setSystemMessage),
 		OPCODE(o70_polygonOps),
 		/* FC */
 		OPCODE(o70_polygonHit),







More information about the Scummvm-git-logs mailing list