[Scummvm-cvs-logs] CVS: scummvm/scumm imuse.cpp,2.20,2.21

Jamieson Christian jamieson630 at users.sourceforge.net
Mon May 5 09:08:04 CEST 2003


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

Modified Files:
	imuse.cpp 
Log Message:
Interim fix for Bug [712042] FOA: Lockup.
Final fix will require a savegame format mod.

Index: imuse.cpp
===================================================================
RCS file: /cvsroot/scummvm/scummvm/scumm/imuse.cpp,v
retrieving revision 2.20
retrieving revision 2.21
diff -u -d -r2.20 -r2.21
--- imuse.cpp	30 Apr 2003 13:23:29 -0000	2.20
+++ imuse.cpp	5 May 2003 16:07:10 -0000	2.21
@@ -52,7 +52,8 @@
 struct Part;
 
 struct HookDatas {
-	byte _jump, _transpose;
+	byte _jump[2];
+	byte _transpose;
 	byte _part_onoff[16];
 	byte _part_volume[16];
 	byte _part_program[16];
@@ -1321,7 +1322,7 @@
 			// Sam & Max: Set hook for a "maybe" jump
 			for (i = ARRAYSIZE(_players), player = _players; i != 0; i--, player++) {
 				if (player->_active && player->_id == (uint16)b) {
-					player->_hook._jump = d;
+					player->_hook.set (0, d, 0);
 					return 0;
 				}
 			}
@@ -1557,7 +1558,7 @@
 int HookDatas::query_param(int param, byte chan) {
 	switch (param) {
 	case 18:
-		return _jump;
+		return _jump[0];
 	case 19:
 		return _transpose;
 	case 20:
@@ -1576,7 +1577,8 @@
 int HookDatas::set(byte cls, byte value, byte chan) {
 	switch (cls) {
 	case 0:
-		_jump = value;
+		_jump[1] = _jump[0];
+		_jump[0] = value;
 		break;
 	case 1:
 		_transpose = value;
@@ -2218,12 +2220,14 @@
 
 void Player::maybe_jump (byte cmd, uint track, uint beat, uint tick) {
 	// Is this the hook I'm waiting for?
-	if (cmd && _hook._jump != cmd)
+	if (cmd && _hook._jump[0] != cmd)
 		return;
 
 	// Reset hook?
-	if (cmd != 0 && cmd < 0x80)
-		_hook._jump = 0;
+	if (cmd != 0 && cmd < 0x80) {
+		_hook._jump[0] = _hook._jump[1];
+		_hook._jump[1] = 0;
+	}
 
 	jump (track, beat, tick);
 }
@@ -2935,7 +2939,7 @@
 		MKLINE(Player, _tick_index, sleUint16, VER_V8),
 		MKLINE(Player, _beat_index, sleUint16, VER_V8),
 		MKLINE(Player, _ticks_per_beat, sleUint16, VER_V8),
-		MKLINE(Player, _hook._jump, sleByte, VER_V8),
+		MKLINE(Player, _hook._jump[0], sleByte, VER_V8),
 		MKLINE(Player, _hook._transpose, sleByte, VER_V8),
 		MKARRAY(Player, _hook._part_onoff[0], sleByte, 16, VER_V8),
 		MKARRAY(Player, _hook._part_volume[0], sleByte, 16, VER_V8),





More information about the Scummvm-git-logs mailing list