[Scummvm-cvs-logs] CVS: scummvm/scumm boxes.cpp,1.54,1.55 charset.cpp,2.58,2.59 help.cpp,1.8,1.9 resource_v3.cpp,1.19,1.20 script.cpp,1.121,1.122 script_v5.cpp,1.144,1.145 scumm.h,1.280,1.281 scummvm.cpp,2.318,2.319

Max Horn fingolfin at users.sourceforge.net
Wed Aug 6 05:05:06 CEST 2003


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

Modified Files:
	boxes.cpp charset.cpp help.cpp resource_v3.cpp script.cpp 
	script_v5.cpp scumm.h scummvm.cpp 
Log Message:
get rid of GF_INDY3 again, and also remove GID_INDY3_256 and GID_INDY3_TOWNS

Index: boxes.cpp
===================================================================
RCS file: /cvsroot/scummvm/scummvm/scumm/boxes.cpp,v
retrieving revision 1.54
retrieving revision 1.55
diff -u -d -r1.54 -r1.55
--- boxes.cpp	6 Aug 2003 09:10:18 -0000	1.54
+++ boxes.cpp	6 Aug 2003 12:04:27 -0000	1.55
@@ -289,7 +289,8 @@
 	// checking at all. All the problems so far have been cases where
 	// the value was exactly one more than what we consider the maximum.
 	// So it's very well possible that all of these are script errors.
-	if (_gameId == GID_MONKEY_EGA || _gameId == GID_INDY3 || _gameId == GID_ZAK) {
+	if ((_features & GF_OLD_BUNDLE)
+	    && (_gameId == GID_MONKEY_EGA || _gameId == GID_INDY3 || _gameId == GID_ZAK)) {
 		checkRange(ptr[0], 0, box, "Illegal box %d");
 	} else
 		checkRange(ptr[0] - 1, 0, box, "Illegal box %d");
@@ -657,7 +658,7 @@
 	// case to fix the scene in Indy3 where Indy meets Hitler in Berlin.
 	// It's one of the places (or maybe even the only one?). See bug #770690
 	// and also bug #774783.
-	if ((_features & GF_INDY3) && _roomResource == 46 && from == 1 && to == 0)
+	if ((_gameId == GID_INDY3) && _roomResource == 46 && from == 1 && to == 0)
 		return 1;
 
 	// Skip up to the matrix data for box 'from'

Index: charset.cpp
===================================================================
RCS file: /cvsroot/scummvm/scummvm/scumm/charset.cpp,v
retrieving revision 2.58
retrieving revision 2.59
diff -u -d -r2.58 -r2.59
--- charset.cpp	19 Jul 2003 18:18:01 -0000	2.58
+++ charset.cpp	6 Aug 2003 12:04:27 -0000	2.59
@@ -928,8 +928,8 @@
 void CharsetRendererV3::setColor(byte color)
 {
 	_color = color;
-	_shadowColor = (_vm->_features & GF_FMTOWNS) ? 8 : 0;
-	if (_vm->_features & GF_FMTOWNS || _vm->_gameId == GID_INDY3_256) {
+	_shadowColor = (_vm->_features & GF_OLD256) ? 8 : 0;
+	if (_vm->_features & GF_OLD256) {
 		_dropShadow = ((_color & 0x80) != 0);
 		_color &= 0x7f;
 	} else if (_vm->_features & GF_16COLOR) {

Index: help.cpp
===================================================================
RCS file: /cvsroot/scummvm/scummvm/scumm/help.cpp,v
retrieving revision 1.8
retrieving revision 1.9
diff -u -d -r1.8 -r1.9
--- help.cpp	18 Jul 2003 05:49:21 -0000	1.8
+++ help.cpp	6 Aug 2003 12:04:27 -0000	1.9
@@ -30,8 +30,6 @@
 		return 4;
 		break;
 	case GID_INDY3:
-	case GID_INDY3_256:
-	case GID_INDY3_TOWNS:
 		return 6;
 		break;
 	case GID_LOOM:
@@ -141,8 +139,6 @@
 				ADD_BIND("b", "Switch");
 			break;
 		case GID_INDY3:
-		case GID_INDY3_256:
-		case GID_INDY3_TOWNS:
 			ADD_BIND("q", "Push");
 			ADD_BIND("a", "Pull");
 			ADD_BIND("z", "Give");
@@ -265,8 +261,6 @@
 			break;
 		case GID_INDY3:
 		case GID_ZAK256:
-		case GID_INDY3_256:
-		case GID_INDY3_TOWNS:
 			title = "Other game controls:";
 			ADD_TEXT("Inventory:");
 			ADD_BIND("y", "Upper left item");
@@ -291,8 +285,6 @@
 	case 5:
 		switch (gameId) {
 		case GID_INDY3:
-		case GID_INDY3_256:
-		case GID_INDY3_TOWNS:
 			title = "Fighting controls (numpad):";
 			ADD_BIND("7", "Step back");
 			ADD_BIND("4", "Step back");
@@ -315,8 +307,6 @@
 	case 6:
 		switch (gameId) {
 		case GID_INDY3:
-		case GID_INDY3_256:
-		case GID_INDY3_TOWNS:
 			title = "Biplane controls (numpad):";
 			ADD_BIND("7", "Fly to upper left");
 			ADD_BIND("4", "Fly to left");

Index: resource_v3.cpp
===================================================================
RCS file: /cvsroot/scummvm/scummvm/scumm/resource_v3.cpp,v
retrieving revision 1.19
retrieving revision 1.20
diff -u -d -r1.19 -r1.20
--- resource_v3.cpp	18 Jul 2003 05:49:21 -0000	1.19
+++ resource_v3.cpp	6 Aug 2003 12:04:27 -0000	1.20
@@ -152,8 +152,9 @@
 				break;
 
 			default:
-				// FIXME: this is a little hack because Indy3 FM Towns has 32 bytes appended to 00.LFL.
-				if (_gameId != GID_INDY3_TOWNS)
+				// FIXME: this is a little hack because Indy3 FM Towns has
+				// 32 extra bytes of unknown meaning appended to 00.LFL
+				if (!(_gameId == GID_INDY3 && _features & GF_FMTOWNS))
 					error("Bad ID %c%c found in directory!", blocktype & 0xFF, blocktype >> 8);
 				return;
 			}

Index: script.cpp
===================================================================
RCS file: /cvsroot/scummvm/scummvm/scumm/script.cpp,v
retrieving revision 1.121
retrieving revision 1.122
diff -u -d -r1.121 -r1.122
--- script.cpp	18 Jul 2003 05:49:21 -0000	1.121
+++ script.cpp	6 Aug 2003 12:04:27 -0000	1.122
@@ -494,7 +494,7 @@
 #if defined(BYPASS_COPY_PROT)
 			// INDY3, EGA Loom and, apparently, Zak256 check this
 			// during the game...
-			if (_gameId == GID_INDY3 && var == 94 && bit == 4) {
+			if (_gameId == GID_INDY3 && (_features & GF_OLD_BUNDLE) && var == 94 && bit == 4) {
 				return 0;
 //			} else if (_gameId == GID_LOOM && var == 221 && bit == 14) {	// For Mac Loom
 			} else if (_gameId == GID_LOOM && var == 214 && bit == 15) {	// For PC Loom
@@ -508,7 +508,7 @@
 		} else {
 			var &= 0x7FFF;
 #if defined(BYPASS_COPY_PROT)
-			if (_gameId == GID_INDY3_TOWNS && var == 1508) {
+			if (_gameId == GID_INDY3 && (_features & GF_FMTOWNS) && var == 1508) {
 				return 0;
 			}
 #endif
@@ -518,7 +518,7 @@
 	}
 
 	if (var & 0x4000) {
-		if (_gameId == GID_INDY3_256 || _gameId == GID_INDY3_TOWNS) {
+		if (_features & GF_FEW_LOCALS) {
 			var &= 0xF;
 		} else {
 			var &= 0xFFF;
@@ -585,7 +585,7 @@
 	}
 
 	if (var & 0x4000) {
-		if (_gameId == GID_INDY3_256 || _gameId == GID_INDY3_TOWNS) {
+		if (_features & GF_FEW_LOCALS) {
 			var &= 0xF;
 		} else {
 			var &= 0xFFF;
@@ -759,13 +759,10 @@
 
 		vm.slot[slot].delayFrameCount = 0;
 
-		// FIXME: the exit script of room 7 in indy3 only seems to have a size and tag
-		// not actual data not even a 00 (stop code)
-		// maybe we should be limiting ourselves to strictly reading the size 
-		// described in the header?
-		if (_gameId == GID_INDY3_256 || _gameId == GID_INDY3_TOWNS) {
-			// FIXME: Oddly, Indy3 seems to contain exit scripts with only a size
-			// and a tag - not even a terminating NULL!
+		// FIXME: the exit script of room 7 in indy3 only seems to have a size
+		// and tag not actual data not even a 00 (stop code). Maybe we should
+		// be limiting ourselves to strictly reading the size from the header?
+		if (_gameId == GID_INDY3) {
 			byte *roomptr = getResourceAddress(rtRoom, _roomResource);
 			const byte *excd = findResourceData(MKID('EXCD'), roomptr) - _resourceHeaderSize;
 			if (!excd || (getResourceDataSize(excd) < 1)) {
@@ -813,7 +810,7 @@
 			ss->status = ssDead;
 		} else if (ss->where == WIO_LOCAL) {
 			// HACK to make Indy3 Demo work
-			if (ss->cutsceneOverride != 0 && !(_gameId == GID_INDY3 && _roomResource == 3)) {
+			if (ss->cutsceneOverride != 0 && !(_gameId == GID_INDY3 && (_features & GF_OLD_BUNDLE) && _roomResource == 3)) {
 				warning("Script %d stopped with active cutscene/override in exit", ss->number);
 				ss->cutsceneOverride = 0;
 			}

Index: script_v5.cpp
===================================================================
RCS file: /cvsroot/scummvm/scummvm/scumm/script_v5.cpp,v
retrieving revision 1.144
retrieving revision 1.145
diff -u -d -r1.144 -r1.145
--- script_v5.cpp	6 Aug 2003 09:30:48 -0000	1.144
+++ script_v5.cpp	6 Aug 2003 12:04:27 -0000	1.145
@@ -597,7 +597,7 @@
 	// called via chainScript by script 32, and in there Local[5] is defined
 	// to the  actor ID of the opposing soldier. So, we copy that value over
 	// to the Local[5] variable of script 33.
-	if ((_features & GF_INDY3) && vm.slot[cur].number == 32 && script == 33) {
+	if (_gameId == GID_INDY3 && vm.slot[cur].number == 32 && script == 33) {
 		vars[5] = vm.localvar[cur][5];
 	}
 
@@ -665,7 +665,7 @@
 		initCharset(getVarOrDirectByte(0x80));
 		break;
 	case 14:											/* unk */
-		if (_features & GF_OLD_BUNDLE || _gameId == GID_INDY3_256 || _gameId == GID_INDY3_TOWNS) {
+		if (_gameId == GID_LOOM || _gameId == GID_INDY3) {
 			/*int a = */ getVarOrDirectByte(0x80);
 			/*int b = */ getVarOrDirectByte(0x40);
 			// This is some kind of "init charset" opcode. However, we don't have to do anything
@@ -679,7 +679,7 @@
 		break;
 	}
 
-	if (!(_features & GF_OLD_BUNDLE) && _gameId != GID_INDY3_256 && _gameId != GID_INDY3_TOWNS) {
+	if (!(_gameId == GID_LOOM || _gameId == GID_INDY3)) {
 		VAR(VAR_CURSORSTATE) = _cursor.state;
 		VAR(VAR_USERPUT) = _userPut;
 	}
@@ -966,7 +966,7 @@
 		return;
 
 	// INDY3 uses this opcode as a wait_for_actor();
-	if (_features & GF_INDY3) {
+	if (_gameId == GID_INDY3) {
 		const byte *oldaddr = _scriptPointer - 1;
 		a = derefActor(getVarOrDirectByte(0x80), "o5_getActorScale (wait)");
 		if (a->moving) {
@@ -1000,7 +1000,7 @@
 	int a;
 	getResultPos();
 
-	if (_features & GF_INDY3)
+	if (_gameId == GID_INDY3)
 		a = getVarOrDirectByte(0x80);
 	else
 		a = getVarOrDirectWord(0x80);
@@ -1012,7 +1012,7 @@
 	int a;
 	getResultPos();
 
-	if (_features & GF_INDY3) {
+	if (_gameId == GID_INDY3) {
 		a = getVarOrDirectByte(0x80);
 
 		// WORKAROUND bug #636433 (can't get into Zeppelin) 
@@ -2349,7 +2349,7 @@
 void Scumm_v5::o5_wait() {
 	const byte *oldaddr = _scriptPointer - 1;
 
-	if (_features & GF_INDY3) {
+	if (_gameId == GID_INDY3) {
 		_opcode = 2;
 	} else
 		_opcode = fetchScriptByte();
@@ -2593,7 +2593,7 @@
  			// It's also needed for Loom, or the lines Bobbin
  			// speaks during the intro are put at position 0,0.
  			// In addition, Loom needs to remember the text colour.
-			if ((_features & GF_INDY3) || _gameId == GID_LOOM) {
+			if (_gameId == GID_LOOM || _gameId == GID_INDY3) {
 				_string[textSlot].t_xpos = _string[textSlot].xpos;
 				_string[textSlot].t_ypos = _string[textSlot].ypos;
  				_string[textSlot].t_color = _string[textSlot].color;

Index: scumm.h
===================================================================
RCS file: /cvsroot/scummvm/scummvm/scumm/scumm.h,v
retrieving revision 1.280
retrieving revision 1.281
diff -u -d -r1.280 -r1.281
--- scumm.h	6 Aug 2003 09:30:48 -0000	1.280
+++ scumm.h	6 Aug 2003 12:04:27 -0000	1.281
@@ -84,8 +84,8 @@
 	GF_HUMONGOUS           = 1 << 14,
 	GF_AFTER_HEV7          = 1 << 15,
 	GF_FMTOWNS             = 1 << 16,
-	GF_INDY3               = 1 << 17,
-	GF_LOOM                = 1 << 18,
+	GF_FEW_LOCALS          = 1 << 17,
+	GF_LOOM                = 1 << 18,	// FIXME: remove this
 
 	GF_EXTERNAL_CHARSET    = GF_SMALL_HEADER
 };
@@ -203,7 +203,6 @@
 	GID_MONKEY_EGA,
 	GID_LOOM256,
 	GID_ZAK256,
-	GID_INDY3_256,
 	GID_INDY3,
 	GID_LOOM,
 	GID_FT,
@@ -214,8 +213,7 @@
 	GID_ZAK,
 	GID_PUTTDEMO,
 	GID_PUTTPUTT,
-	GID_MONKEY_SEGA,
-	GID_INDY3_TOWNS
+	GID_MONKEY_SEGA
 };
 
 #define _maxRooms res.num[rtRoom]

Index: scummvm.cpp
===================================================================
RCS file: /cvsroot/scummvm/scummvm/scumm/scummvm.cpp,v
retrieving revision 2.318
retrieving revision 2.319
diff -u -d -r2.318 -r2.319
--- scummvm.cpp	6 Aug 2003 09:30:48 -0000	2.318
+++ scummvm.cpp	6 Aug 2003 12:04:27 -0000	2.319
@@ -74,11 +74,11 @@
 
 	/* Scumm Version 3 */
 	{"indy3EGA", "Indiana Jones and the Last Crusade", GID_INDY3, 3, VersionSettings::ADLIB_ALWAYS,
-	 GF_SMALL_HEADER | GF_SMALL_NAMES | GF_NO_SCALING | GF_USE_KEY | GF_16COLOR | GF_OLD_BUNDLE | GF_INDY3, "00.LFL"},
-	{"indy3Towns", "Indiana Jones and the Last Crusade (FM Towns)", GID_INDY3_TOWNS, 3, VersionSettings::ADLIB_ALWAYS,
-	 GF_SMALL_HEADER | GF_SMALL_NAMES | GF_NO_SCALING | GF_OLD256 | GF_INDY3 | GF_FMTOWNS | GF_AUDIOTRACKS, "00.LFL"},
-	{"indy3", "Indiana Jones and the Last Crusade (256)", GID_INDY3_256, 3, VersionSettings::ADLIB_ALWAYS,
-	 GF_SMALL_HEADER | GF_SMALL_NAMES | GF_NO_SCALING | GF_OLD256 | GF_INDY3, "00.LFL"},
+	 GF_SMALL_HEADER | GF_SMALL_NAMES | GF_NO_SCALING | GF_USE_KEY | GF_16COLOR | GF_OLD_BUNDLE, "00.LFL"},
+	{"indy3Towns", "Indiana Jones and the Last Crusade (FM Towns)", GID_INDY3, 3, VersionSettings::ADLIB_ALWAYS,
+	 GF_SMALL_HEADER | GF_SMALL_NAMES | GF_NO_SCALING | GF_OLD256 | GF_FEW_LOCALS | GF_FMTOWNS | GF_AUDIOTRACKS, "00.LFL"},
+	{"indy3", "Indiana Jones and the Last Crusade (256)", GID_INDY3, 3, VersionSettings::ADLIB_ALWAYS,
+	 GF_SMALL_HEADER | GF_SMALL_NAMES | GF_NO_SCALING | GF_OLD256 | GF_FEW_LOCALS, "00.LFL"},
 	{"zak256", "Zak McKracken and the Alien Mindbenders (256)", GID_ZAK256, 3, VersionSettings::ADLIB_ALWAYS,
 	 GF_SMALL_HEADER | GF_SMALL_NAMES | GF_NO_SCALING | GF_OLD256 | GF_FMTOWNS | GF_AUDIOTRACKS, "00.LFL"},
 	{"loom", "Loom", GID_LOOM, 3, VersionSettings::ADLIB_ALWAYS,
@@ -812,7 +812,7 @@
 		if (_version < 7)
 			VAR(VAR_VERSION) = 21;
 	
-		if (_gameId != GID_LOOM && _gameId != GID_INDY3) {
+		if (!(_features & GF_OLD_BUNDLE && (_gameId == GID_LOOM || _gameId == GID_INDY3))) {
 			// This is the for the Mac version of Indy3/Loom. TODO: add code to properly
 			// distinguish the Mac version from the PC (and other) versions.
 			VAR(VAR_DEBUGMODE) = _debugMode;
@@ -1064,7 +1064,7 @@
 		VAR(VAR_59) = 3;
 	}
 	
-	if (_gameId == GID_LOOM || _gameId == GID_INDY3) {
+	if (_features & GF_OLD_BUNDLE && (_gameId == GID_LOOM || _gameId == GID_INDY3)) {
 		// This is the for the Mac version of Indy3/Loom. TODO: add code to properly
 		// distinguish the Mac version from the PC (and other) versions.
 		VAR(39) = 320;
@@ -1183,7 +1183,7 @@
 		VAR(VAR_VIRT_MOUSE_Y) = _virtualMouse.y;
 		VAR(VAR_MOUSE_X) = _mouse.x;
 		VAR(VAR_MOUSE_Y) = _mouse.y;
-		if (_gameId != GID_LOOM && _gameId != GID_INDY3) {
+		if (_features & GF_OLD_BUNDLE && (_gameId == GID_LOOM || _gameId == GID_INDY3)) {
 			// This is the for the Mac version of Indy3/Loom. TODO: add code to properly
 			// distinguish the Mac version from the PC (and other) versions.
 			VAR(VAR_DEBUGMODE) = _debugMode;
@@ -1721,7 +1721,7 @@
 				if (_gameId == GID_ZAK256 && _roomResource == 15 && ss->number == 202) {
 					// HACK to make Zak256 work (see bug #770093)
 					warning("Script %d stopped with active cutscene/override in exit", ss->number);
-				} else if (_gameId == GID_INDY3 && _roomResource == 3) {
+				} else if (_gameId == GID_INDY3 && (_features & GF_OLD_BUNDLE) && _roomResource == 3) {
 					// HACK to make Indy3 Demo work
 					warning("Script %d stopped with active cutscene/override in exit", ss->number);
 				} else {





More information about the Scummvm-git-logs mailing list