diff options
| -rw-r--r-- | scumm/intern.h | 1 | ||||
| -rw-r--r-- | scumm/script_v72he.cpp | 35 | ||||
| -rw-r--r-- | scumm/script_v80he.cpp | 35 | ||||
| -rw-r--r-- | scumm/script_v90he.cpp | 2 | ||||
| -rw-r--r-- | scumm/scumm.cpp | 7 | 
5 files changed, 40 insertions, 40 deletions
| diff --git a/scumm/intern.h b/scumm/intern.h index fc1c9baa00..127758393b 100644 --- a/scumm/intern.h +++ b/scumm/intern.h @@ -1072,7 +1072,6 @@ protected:  	void o80_drawWizPolygon();  	void o80_drawLine();  	void o80_pickVarRandom(); -	void o80_getResourceSize();  };  struct SpriteInfo; diff --git a/scumm/script_v72he.cpp b/scumm/script_v72he.cpp index 90ee366eec..e74913edc4 100644 --- a/scumm/script_v72he.cpp +++ b/scumm/script_v72he.cpp @@ -2215,8 +2215,41 @@ void ScummEngine_v72he::o72_writeINI() {  }  void ScummEngine_v72he::o72_getResourceSize() { +	const byte *ptr; +	int size, type; +  	int resid = pop(); -	push(getSoundResourceSize(resid)); +	if (_heversion == 72) { +		push(getSoundResourceSize(resid)); +		return; +	} + +	byte subOp = fetchScriptByte(); + +	switch (subOp) { +	case 13: +		push (getSoundResourceSize(resid)); +		return; +	case 14: +		type = rtRoomImage; +		break; +	case 15: +		type = rtImage; +		break; +	case 16: +		type = rtCostume; +		break; +	case 17: +		type = rtScript; +		break; +	default: +		error("o80_getResourceSize: default type %d", subOp); +	} + +	ptr = getResourceAddress(type, resid); +	assert(ptr); +	size = READ_BE_UINT32(ptr + 4) - 8; +	push(size);  }  void ScummEngine_v72he::o72_setFilePath() { diff --git a/scumm/script_v80he.cpp b/scumm/script_v80he.cpp index 018d68e6b3..df3a833c6a 100644 --- a/scumm/script_v80he.cpp +++ b/scumm/script_v80he.cpp @@ -354,7 +354,7 @@ void ScummEngine_v80he::setupOpcodes() {  		OPCODE(o70_getCharIndexInString),  		OPCODE(o6_invalid),  		/* F8 */ -		OPCODE(o80_getResourceSize), +		OPCODE(o72_getResourceSize),  		OPCODE(o72_setFilePath),  		OPCODE(o72_setWindowCaption),  		OPCODE(o70_polygonOps), @@ -824,37 +824,4 @@ void ScummEngine_v80he::o80_pickVarRandom() {  	push(readArray(value, 0, num));  } -void ScummEngine_v80he::o80_getResourceSize() { -	const byte *ptr; -	int size, type; - -	int resid = pop(); -	byte subOp = fetchScriptByte(); - -	switch (subOp) { -	case 13: -		push (getSoundResourceSize(resid)); -		return; -	case 14: -		type = rtRoomImage; -		break; -	case 15: -		type = rtImage; -		break; -	case 16: -		type = rtCostume; -		break; -	case 17: -		type = rtScript; -		break; -	default: -		error("o80_getResourceSize: default type %d", subOp); -	} - -	ptr = getResourceAddress(type, resid); -	assert(ptr); -	size = READ_BE_UINT32(ptr + 4) - 8; -	push(size); -} -  } // End of namespace Scumm diff --git a/scumm/script_v90he.cpp b/scumm/script_v90he.cpp index e0ba5b0209..fd4d948de0 100644 --- a/scumm/script_v90he.cpp +++ b/scumm/script_v90he.cpp @@ -353,7 +353,7 @@ void ScummEngine_v90he::setupOpcodes() {  		OPCODE(o70_getCharIndexInString),  		OPCODE(o6_invalid),  		/* F8 */ -		OPCODE(o80_getResourceSize), +		OPCODE(o72_getResourceSize),  		OPCODE(o72_setFilePath),  		OPCODE(o72_setWindowCaption),  		OPCODE(o70_polygonOps), diff --git a/scumm/scumm.cpp b/scumm/scumm.cpp index aca3a89dd0..0f1b92c196 100644 --- a/scumm/scumm.cpp +++ b/scumm/scumm.cpp @@ -253,17 +253,17 @@ static const ScummGameSettings scumm_settings[] = {  	// Humongous Entertainment Scumm Version 7.2  	{"catalog2", "Humongous Interactive Catalog 2", GID_HEGAME, 6, 72, MDT_NONE,  	 GF_USE_KEY | GF_NEW_COSTUMES, Common::kPlatformWindows, 0, 0}, -	{"freddemo", "Freddi Fish 1: The Case of the Missing Kelp Seeds (Demo)", GID_HEGAME, 6, 72, MDT_NONE, +	{"freddemo", "Freddi Fish 1: The Case of the Missing Kelp Seeds (Demo)", GID_HEGAME, 6, 73, MDT_NONE,  	 GF_USE_KEY | GF_NEW_COSTUMES | GF_MULTIPLE_VERSIONS, Common::kPlatformWindows, 0, 0},  	{"farmdemo", "Let's Explore the Farm with Buzzy (Demo)", GID_HEGAME, 6, 72, MDT_NONE,  	 GF_USE_KEY | GF_NEW_COSTUMES | GF_MULTIPLE_VERSIONS, Common::kPlatformWindows, 0, 0}, -	{"farm", "Let's Explore the Farm with Buzzy", GID_HEGAME, 6, 72, MDT_NONE, +	{"farm", "Let's Explore the Farm with Buzzy", GID_HEGAME, 6, 73, MDT_NONE,  	 GF_USE_KEY | GF_NEW_COSTUMES, Common::kPlatformWindows, 0, 0},  	{"airdemo", "Let's Explore the Airport with Buzzy (Demo)", GID_HEGAME, 6, 72, MDT_NONE,  	 GF_USE_KEY | GF_NEW_COSTUMES | GF_MULTIPLE_VERSIONS, Common::kPlatformWindows, 0, 0},  	{"airport", "Let's Explore the Airport with Buzzy", GID_HEGAME, 6, 72, MDT_NONE,  	 GF_USE_KEY | GF_NEW_COSTUMES, Common::kPlatformWindows, 0, 0}, -	{"jungle", "Let's Explore the Jungle with Buzzy", GID_HEGAME, 6, 72, MDT_NONE, +	{"jungle", "Let's Explore the Jungle with Buzzy", GID_HEGAME, 6, 73, MDT_NONE,  	 GF_USE_KEY | GF_NEW_COSTUMES, Common::kPlatformWindows, 0, 0},  	{"puttzoo", "Putt-Putt Saves the Zoo", GID_HEGAME, 6, 72, MDT_NONE, @@ -2966,6 +2966,7 @@ Engine *Engine_SCUMM_create(GameDetector *detector, OSystem *syst) {  		case 80:  			engine = new ScummEngine_v80he(detector, syst, game, md5sum, substLastIndex);  			break; +		case 73:  		case 72:  			engine = new ScummEngine_v72he(detector, syst, game, md5sum, substLastIndex);  			break; | 
