[Scummvm-cvs-logs] CVS: scummvm/scumm akos.cpp,1.138,1.139 gfx.cpp,2.289,2.290 script_v6.cpp,1.380,1.381 sound.cpp,1.365,1.366

Travis Howell kirben at users.sourceforge.net
Sun Aug 22 08:06:57 CEST 2004


Update of /cvsroot/scummvm/scummvm/scumm
In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv18741/scumm

Modified Files:
	akos.cpp gfx.cpp script_v6.cpp sound.cpp 
Log Message:

Basic start on freddemo (old version)


Index: akos.cpp
===================================================================
RCS file: /cvsroot/scummvm/scummvm/scumm/akos.cpp,v
retrieving revision 1.138
retrieving revision 1.139
diff -u -d -r1.138 -r1.139
--- akos.cpp	8 Aug 2004 22:09:49 -0000	1.138
+++ akos.cpp	22 Aug 2004 15:02:52 -0000	1.139
@@ -86,6 +86,7 @@
 	AKC_Cmd3 = 0xC08B,
 	AKC_Ignore3 = 0xC08C,
 	AKC_Ignore2 = 0xC08D,
+	AKC_Unk1 = 0xC08E,
 	AKC_SkipStart = 0xC090,
 	AKC_SkipE = 0xC090,
 	AKC_SkipNE = 0xC091,
@@ -265,6 +266,9 @@
 	if (_skipLimb)
 		return 0;
 
+	if (_vm->_heversion >= 70 && cost.active[limb] == 8)
+		return 0;
+
 	if (!cost.active[limb] || cost.stopped & (1 << limb))
 		return 0;
 
@@ -1289,6 +1293,7 @@
 		case AKC_Return:
 		case AKC_EndSeq:
 		case AKC_ComplexChan:
+		case AKC_Unk1:
 			break;
 
 		case AKC_Cmd3:
@@ -1317,7 +1322,7 @@
 	int code2 = aksq[curpos];
 	if (code2 & 0x80)
 		code2 = (code2 << 8) | aksq[curpos + 1];
-	assert((code2 & 0xC000) != 0xC000 || code2 == AKC_ComplexChan || code2 == AKC_Return || code2 == AKC_EndSeq);
+	assert((code2 & 0xC000) != 0xC000 || code2 == AKC_ComplexChan || code2 == AKC_Return || code2 == AKC_EndSeq || code2 == AKC_Unk1);
 
 	a->cost.curpos[chan] = curpos;
 

Index: gfx.cpp
===================================================================
RCS file: /cvsroot/scummvm/scummvm/scumm/gfx.cpp,v
retrieving revision 2.289
retrieving revision 2.290
diff -u -d -r2.289 -r2.290
--- gfx.cpp	16 Aug 2004 22:23:58 -0000	2.289
+++ gfx.cpp	22 Aug 2004 15:02:53 -0000	2.290
@@ -1028,8 +1028,10 @@
 		smap_ptr = _vm->findResource(MKID('SMAP'), ptr);
 
 	// newer Humongous titles use this
+	//	smap_ptr = _vm->findResource(MKID('BMAP'), ptr);
+	// HACK Until BMAP support is added
 	if (smap_ptr == NULL)
-		smap_ptr = _vm->findResource(MKID('BMAP'), ptr);
+		return;
 
 	assert(smap_ptr);
 

Index: script_v6.cpp
===================================================================
RCS file: /cvsroot/scummvm/scummvm/scumm/script_v6.cpp,v
retrieving revision 1.380
retrieving revision 1.381
diff -u -d -r1.380 -r1.381
--- script_v6.cpp	22 Aug 2004 09:17:24 -0000	1.380
+++ script_v6.cpp	22 Aug 2004 15:02:53 -0000	1.381
@@ -1620,7 +1620,7 @@
 			if (_heversion < 70)
 				error("o6_resourceRoutines: default case %d", op);
 			
-			warning("stub queueload resource 2, %d", pop());
+			debug(1,"stub queueload resource 2, %d", pop());
 			// QL_QueGlobForLoad(2, pop(), 1);
 			break;
 		}
@@ -1629,7 +1629,7 @@
 			if (_heversion < 70)
 				error("o6_resourceRoutines: default case %d", op);
 
-			warning("stub queueload resource 4, %d", pop());
+			debug(1,"stub queueload resource 4, %d", pop());
 			// QL_QueGlobForLoad(4, pop(), 1);
 			break;
 		}
@@ -1638,7 +1638,7 @@
 			if (_heversion < 70)
 				error("o6_resourceRoutines: default case %d", op);
 
-			warning("stub queueload resource 3, %d", pop());
+			debug(1,"stub queueload resource 3, %d", pop());
 			// QL_QueGlobForLoad(3, pop(), 1);
 			break;
 		}
@@ -1648,19 +1648,19 @@
 				error("o6_resourceRoutines: default case %d", op);
 
 			resid = pop();
-			warning("stub queueload resource 18, %d", resid);
+			debug(1,"stub queueload resource 18, %d", resid);
 			// QL_QueGlobForLoad(18, resid, 1);
 			// QL_QueGlobForLoad(1, resid, 1);
 			break;
 		}
 	case 233:
 		resid = pop();
-		warning("stub o6_resourceRoutines resource %d, 1", resid);
+		debug(1,"stub o6_resourceRoutines resource %d, 1", resid);
 		// foo(resid, 1);
 		break;
 	case 235:
 		resid = pop();
-		warning("stub o6_resourceRoutines resource %d, 0", resid);
+		debug(1,"stub o6_resourceRoutines resource %d, 0", resid);
 		// foo(resid, 0);
 		break;
 	default:

Index: sound.cpp
===================================================================
RCS file: /cvsroot/scummvm/scummvm/scumm/sound.cpp,v
retrieving revision 1.365
retrieving revision 1.366
diff -u -d -r1.365 -r1.366
--- sound.cpp	22 Aug 2004 09:30:08 -0000	1.365
+++ sound.cpp	22 Aug 2004 15:02:53 -0000	1.366
@@ -160,6 +160,7 @@
 	int size = -1;
 	int rate;
 	byte flags = SoundMixer::FLAG_UNSIGNED | SoundMixer::FLAG_AUTOFREE;
+	bool music = false;
 	
 	debugC(DEBUG_SOUND, "playSound #%d (room %d)", soundID, 
 		_vm->getResourceRoomNr(rtSound, soundID));
@@ -189,20 +190,24 @@
 		music_offs = musicFile.readUint32LE();
 		size = musicFile.readUint32LE();
 
-		if (music_offs > total_size || (size + music_offs) > total_size)
-			error("Bad music offsets");
+		if (music_offs > total_size || (size + music_offs) > total_size) {
+			warning("Bad music offsets");
+			musicFile.close();
+			return;
+		}
 
 		musicFile.seek(music_offs, SEEK_SET);
 		ptr = (byte *) calloc(size, 1);
 		musicFile.read(ptr, size);
 		musicFile.close();
 
+		_currentMusic = soundID;
+		music = true;
 		if (_vm->_heversion == 70) {
 			// Allocate a sound buffer, copy the data into it, and play
 			sound = (char *)malloc(size);
 			memcpy(sound, ptr, size);
 			free(ptr);
-			_currentMusic = soundID;
 			_vm->_mixer->stopHandle(_musicChannelHandle);
 			_vm->_mixer->playRaw(&_musicChannelHandle, sound, size, 11025, flags, soundID);
 			return;
@@ -251,7 +256,12 @@
 		// Allocate a sound buffer, copy the data into it, and play
 		sound = (char *)malloc(size);
 		memcpy(sound, ptr + offset + 8, size);
-		_vm->_mixer->playRaw(NULL, sound, size, rate, flags, soundID);
+
+		if (music == true) {
+			_vm->_mixer->stopHandle(_musicChannelHandle);
+			_vm->_mixer->playRaw(&_musicChannelHandle, sound, size, rate, flags, soundID);
+		} else
+			_vm->_mixer->playRaw(NULL, sound, size, rate, flags, soundID);
 	}
 	else if (READ_UINT32(ptr) == MKID('MRAW')) {
 		// pcm music in 3DO humongous games





More information about the Scummvm-git-logs mailing list