[Scummvm-cvs-logs] CVS: scummvm/scumm intern.h,2.325,2.326 script_v100he.cpp,2.34,2.35 sound.cpp,1.415,1.416

kirben kirben at users.sourceforge.net
Sat Jan 29 21:35:53 CET 2005


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

Modified Files:
	intern.h script_v100he.cpp sound.cpp 
Log Message:

HE100 difference


Index: intern.h
===================================================================
RCS file: /cvsroot/scummvm/scummvm/scumm/intern.h,v
retrieving revision 2.325
retrieving revision 2.326
diff -u -d -r2.325 -r2.326
--- intern.h	6 Jan 2005 15:57:12 -0000	2.325
+++ intern.h	30 Jan 2005 05:34:03 -0000	2.326
@@ -940,9 +940,11 @@
 	void o100_quitPauseRestart();
 	void o100_cursorCommand();
 	void o100_wait();
+	void o100_writeFile();
 	void o100_getResourceSize();
 	void o100_unknown27();
 	void o100_getPaletteData();
+	void o100_readFile();
 	void o100_unknown25();
 	void o100_unknown29();
 };

Index: script_v100he.cpp
===================================================================
RCS file: /cvsroot/scummvm/scummvm/scumm/script_v100he.cpp,v
retrieving revision 2.34
retrieving revision 2.35
diff -u -d -r2.34 -r2.35
--- script_v100he.cpp	30 Jan 2005 05:11:04 -0000	2.34
+++ script_v100he.cpp	30 Jan 2005 05:34:04 -0000	2.35
@@ -221,7 +221,7 @@
 		OPCODE(o6_walkActorToObj),
 		OPCODE(o6_walkActorTo),
 		/* 90 */
-		OPCODE(o72_writeFile),
+		OPCODE(o100_writeFile),
 		OPCODE(o72_writeINI),
 		OPCODE(o80_writeConfigFile),
 		OPCODE(o6_abs),
@@ -304,7 +304,7 @@
 		OPCODE(o6_getRandomNumber),
 		OPCODE(o6_getRandomNumberRange),
 		OPCODE(o6_invalid),
-		OPCODE(o72_readFile),
+		OPCODE(o100_readFile),
 		/* D4 */
 		OPCODE(o72_readINI),
 		OPCODE(o80_readConfigFile),
@@ -1525,6 +1525,31 @@
 	o6_breakHere();
 }
 
+void ScummEngine_v100he::o100_writeFile() {
+	int16 resID = pop();
+	int slot = pop();
+	byte subOp = fetchScriptByte();
+
+	switch (subOp) {
+	case 5:
+		fetchScriptByte();
+		writeFileFromArray(slot, resID);
+		break;
+	case 42:
+		_hFileTable[slot].writeUint16LE(resID);
+		break;
+	case 43:
+		_hFileTable[slot].writeUint32LE(resID);
+		break;
+	case 45:
+		_hFileTable[slot].writeByte(resID);
+		break;
+	default:
+		error("o100_writeFile: default case %d", subOp);
+	}
+	debug(1, "o100_writeFile: slot %d, subOp %d", slot, subOp);
+}
+
 void ScummEngine_v100he::o100_getResourceSize() {
 	int size = 0, type;
 
@@ -1714,6 +1739,40 @@
 	debug(1,"o100_getPaletteData stub (%d)", subOp);
 }
 
+void ScummEngine_v100he::o100_readFile() {
+	int slot, val;
+	int32 size;
+	byte subOp = fetchScriptByte();
+
+	switch (subOp) {
+	case 5:
+		fetchScriptByte();
+		size = pop();
+		slot = pop();
+		val = readFileToArray(slot, size);
+		push(val);
+		break;
+	case 42:
+		slot = pop();
+		val = _hFileTable[slot].readUint16LE();
+		push(val);
+		break;
+	case 43:
+		slot = pop();
+		val = _hFileTable[slot].readUint32LE();
+		push(val);
+		break;
+	case 45:
+		slot = pop();
+		val = _hFileTable[slot].readByte();
+		push(val);
+		break;
+	default:
+		error("o100_readFile: default case %d", subOp);
+	}
+	debug(1, "o100_readFile: slot %d, subOp %d val %d", slot, subOp, val);
+}
+
 void ScummEngine_v100he::o100_unknown25() {
 	int args[16];
 

Index: sound.cpp
===================================================================
RCS file: /cvsroot/scummvm/scummvm/scumm/sound.cpp,v
retrieving revision 1.415
retrieving revision 1.416
diff -u -d -r1.415 -r1.416
--- sound.cpp	30 Jan 2005 02:06:41 -0000	1.415
+++ sound.cpp	30 Jan 2005 05:34:04 -0000	1.416
@@ -277,7 +277,7 @@
 
 		if (READ_UINT32(ptr) == MKID('SBNG')) {
 			ptr += READ_BE_UINT32(ptr + 4);
-			warning("playSound: Skipped SBNG block");
+			debug(2, "playSound: Skipped SBNG block");
 		}
 
 		if (READ_UINT32(ptr) != MKID('SDAT')) {





More information about the Scummvm-git-logs mailing list