[Scummvm-cvs-logs] CVS: scummvm/scumm intern.h,2.102,2.103 resource_v2.cpp,1.24,1.25 script_v2.cpp,2.168,2.169 scumm.h,1.286,1.287 scummvm.cpp,2.333,2.334

Jonathan Gray khalek at users.sourceforge.net
Thu Aug 14 07:25:48 CEST 2003


Update of /cvsroot/scummvm/scummvm/scumm
In directory sc8-pr-cvs1:/tmp/cvs-serv21343

Modified Files:
	intern.h resource_v2.cpp script_v2.cpp scumm.h scummvm.cpp 
Log Message:
add maniacnes target, rather prelimary so people would be well advised not to add to compatibility at this point

Index: intern.h
===================================================================
RCS file: /cvsroot/scummvm/scummvm/scumm/intern.h,v
retrieving revision 2.102
retrieving revision 2.103
diff -u -d -r2.102 -r2.103
--- intern.h	18 Jul 2003 18:55:04 -0000	2.102
+++ intern.h	14 Aug 2003 11:40:50 -0000	2.103
@@ -285,6 +285,7 @@
 	void o2_startScript();
 	void o2_subtract();
 	void o2_subIndirect();
+	void o2_switchCostumeSet();
 	void o2_verbOps();
 	void o2_waitForActor();
 	void o2_waitForMessage();

Index: resource_v2.cpp
===================================================================
RCS file: /cvsroot/scummvm/scummvm/scumm/resource_v2.cpp,v
retrieving revision 1.24
retrieving revision 1.25
diff -u -d -r1.24 -r1.25
--- resource_v2.cpp	14 Aug 2003 02:32:40 -0000	1.24
+++ resource_v2.cpp	14 Aug 2003 11:40:50 -0000	1.25
@@ -168,6 +168,13 @@
 			_version = 1;
 			readClassicIndexFile();
 			break;
+		case 0x4643:
+			if (!(_features & GF_NES))
+				error("use maniacnes target");
+			warning("NES V1 game detected");
+			_version = 1;
+			readClassicIndexFile();
+			break;
 		default:
 			error("Unknown magic id (0x%X) - this version is unsupported", magic);
 			break;

Index: script_v2.cpp
===================================================================
RCS file: /cvsroot/scummvm/scummvm/scumm/script_v2.cpp,v
retrieving revision 2.168
retrieving revision 2.169
diff -u -d -r2.168 -r2.169
--- script_v2.cpp	8 Aug 2003 09:26:09 -0000	2.168
+++ script_v2.cpp	14 Aug 2003 11:40:50 -0000	2.169
@@ -246,7 +246,7 @@
 		OPCODE(o5_notEqualZero),
 		OPCODE(o2_setOwnerOf),
 		OPCODE(o2_addIndirect),
-		OPCODE(o2_dummy),
+		OPCODE(o2_switchCostumeSet),
 		/* AC */
 		OPCODE(o2_drawSentence),
 		OPCODE(o5_putActorInRoom),
@@ -1486,6 +1486,16 @@
 
 void Scumm_v2::o2_dummy() {
 	warning("o2_dummy invoked (opcode %d)", _opcode);
+}
+
+void Scumm_v2::o2_switchCostumeSet() {
+	// NES version of maniac uses this to switch between the two
+	// groups of costumes it has
+	if (_features & GF_NES) {
+		warning("stub: o2_switchCostumeSet()");
+		fetchScriptByte();
+	} else
+		o2_dummy();
 }
 
 void Scumm_v2::resetSentence() {

Index: scumm.h
===================================================================
RCS file: /cvsroot/scummvm/scummvm/scumm/scumm.h,v
retrieving revision 1.286
retrieving revision 1.287
diff -u -d -r1.286 -r1.287
--- scumm.h	13 Aug 2003 15:37:28 -0000	1.286
+++ scumm.h	14 Aug 2003 11:40:50 -0000	1.287
@@ -85,6 +85,7 @@
 	GF_AFTER_HEV7          = 1 << 15,
 	GF_FMTOWNS             = 1 << 16,
 	GF_FEW_LOCALS          = 1 << 17,
+	GF_NES                 = 1 << 18,
 
 	GF_EXTERNAL_CHARSET    = GF_SMALL_HEADER
 };

Index: scummvm.cpp
===================================================================
RCS file: /cvsroot/scummvm/scummvm/scumm/scummvm.cpp,v
retrieving revision 2.333
retrieving revision 2.334
diff -u -d -r2.333 -r2.334
--- scummvm.cpp	14 Aug 2003 10:28:16 -0000	2.333
+++ scummvm.cpp	14 Aug 2003 11:40:50 -0000	2.334
@@ -70,6 +70,8 @@
 
 	{"maniac", "Maniac Mansion", GID_MANIAC, 2, VersionSettings::ADLIB_ALWAYS,
 	 GF_SMALL_HEADER | GF_USE_KEY | GF_SMALL_NAMES | GF_16COLOR | GF_OLD_BUNDLE | GF_NO_SCALING, "00.LFL"},
+	{"maniacnes", "Maniac Mansion (NES)", GID_MANIAC, 2, VersionSettings::ADLIB_ALWAYS,
+	 GF_SMALL_HEADER | GF_USE_KEY | GF_SMALL_NAMES | GF_16COLOR | GF_OLD_BUNDLE | GF_NO_SCALING | GF_NES, "00.LFL"},
 	{"zak",         "Zak McKracken and the Alien Mindbenders", GID_ZAK, 2, VersionSettings::ADLIB_ALWAYS,
 	 GF_SMALL_HEADER | GF_USE_KEY | GF_SMALL_NAMES | GF_16COLOR | GF_OLD_BUNDLE | GF_NO_SCALING, "00.LFL"},
 
@@ -562,6 +564,9 @@
 	} else if (_gameId == GID_CMI) {
 		_screenWidth = 640;
 		_screenHeight = 480;
+	} else if (_features & GF_NES) {
+		_screenWidth = 256;
+		_screenHeight = 240;
 	} else {
 		_screenWidth = 320;
 		_screenHeight = 200;





More information about the Scummvm-git-logs mailing list