diff options
| -rw-r--r-- | scumm/resource.cpp | 8 | ||||
| -rw-r--r-- | scumm/script_v6.cpp | 8 | ||||
| -rw-r--r-- | scumm/script_v72he.cpp | 29 | 
3 files changed, 27 insertions, 18 deletions
diff --git a/scumm/resource.cpp b/scumm/resource.cpp index e4c3974ca0..ebe6caa3ca 100644 --- a/scumm/resource.cpp +++ b/scumm/resource.cpp @@ -987,6 +987,14 @@ int ScummEngine::readSoundResource(int type, int idx) {  		total_size = _fileHandle.readUint32BE();  		_fileHandle.read(createResource(type, idx, total_size), total_size - 8);  		return 1; +	} else if (basetag == MKID('TALK')) { +		debugC(DEBUG_SOUND, "Found base tag TALK in sound %d, size %d", idx, total_size); +		debugC(DEBUG_SOUND, "It was at position %d", _fileHandle.pos()); + +		_fileHandle.seek(-12, SEEK_CUR); +		total_size = _fileHandle.readUint32BE(); +		_fileHandle.read(createResource(type, idx, total_size), total_size - 8); +		return 1;  	} else if (basetag == MKID('DIGI')) {  		// Use in Putt-Putt Demo  		debugC(DEBUG_SOUND, "Found base tag DIGI in sound %d, size %d", idx, total_size); diff --git a/scumm/script_v6.cpp b/scumm/script_v6.cpp index d5bf4908a8..f02b7b56b5 100644 --- a/scumm/script_v6.cpp +++ b/scumm/script_v6.cpp @@ -505,9 +505,8 @@ ArrayHeader *ScummEngine_v6::getArray(int array) {  int ScummEngine_v6::readArray(int array, int idx, int base) {  	ArrayHeader *ah = getArray(array); -	if (ah == NULL || ah->data == NULL) { +	if (ah == NULL || ah->data == NULL)  		error("readArray: invalid array %d (%d)", array, readVar(array)); -	}  	// WORKAROUND bug #645711. This is clearly a script bug, as this script  	// excerpt shows nicely: @@ -565,7 +564,10 @@ void ScummEngine_v6::readArrayFromIndexFile() {  		a = _fileHandle.readUint16LE();  		b = _fileHandle.readUint16LE();  		c = _fileHandle.readUint16LE(); -		defineArray(num, c, a, b); +		if (c == 1) +			defineArray(num, kBitArray, a, b); +		else +			defineArray(num, kIntArray, a, b);  	}  } diff --git a/scumm/script_v72he.cpp b/scumm/script_v72he.cpp index f7878e0b0d..7707c3496d 100644 --- a/scumm/script_v72he.cpp +++ b/scumm/script_v72he.cpp @@ -551,6 +551,9 @@ void ScummEngine_v72he::o72_dimArray() {  	case 4:		// SO_BYTE_ARRAY  		data = kByteArray;  		break; +	case 6: +		error("New array type"); +		break;  	case 7:		// SO_STRING_ARRAY  		data = kStringArray;  		break; @@ -568,20 +571,23 @@ void ScummEngine_v72he::o72_dimArray() {  void ScummEngine_v72he::o72_dim2dimArray() {  	int a, b, data;  	int type = fetchScriptByte(); -	switch (type - 2) { -	case 0:		// SO_INT_ARRAY -		data = kIntArray; -		break; -	case 1:		// SO_BIT_ARRAY +	switch (type) { +	case 2:		// SO_BIT_ARRAY  		data = kBitArray;  		break; -	case 2:		// SO_NIBBLE_ARRAY +	case 3:		// SO_NIBBLE_ARRAY  		data = kNibbleArray;  		break; -	case 3:		// SO_BYTE_ARRAY +	case 4:		// SO_BYTE_ARRAY  		data = kByteArray;  		break; -	case 4:		// SO_STRING_ARRAY +	case 5:		// SO_INT_ARRAY +		data = kIntArray; +		break; +	case 6:		 +		error("New array type"); +		break; +	case 7:		// SO_STRING_ARRAY  		data = kStringArray;  		break;  	default: @@ -645,20 +651,13 @@ void ScummEngine_v72he::o72_readINI() {  void ScummEngine_v72he::o72_unknownF4() {  	byte b; -	int len;  	b = fetchScriptByte();  	switch (b) {  	case 6:  		pop(); -		len = resStrLen(_scriptPointer); -		_scriptPointer += len + 1;  		break;  	case 7: -		len = resStrLen(_scriptPointer); -		_scriptPointer += len + 1; -		len = resStrLen(_scriptPointer); -		_scriptPointer += len + 1;  		break;  	}  	warning("o72_unknownF4 stub");  | 
