[Scummvm-cvs-logs] CVS: residual engine.cpp,1.53,1.54 engine.h,1.19,1.20 lua.cpp,1.93,1.94

Pawel Kolodziejski aquadran at users.sourceforge.net
Mon Jan 3 08:29:13 CET 2005


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

Modified Files:
	engine.cpp engine.h lua.cpp 
Log Message:
fixes to imuse

Index: engine.cpp
===================================================================
RCS file: /cvsroot/scummvm/residual/engine.cpp,v
retrieving revision 1.53
retrieving revision 1.54
diff -u -d -r1.53 -r1.54
--- engine.cpp	1 Jan 2005 12:27:55 -0000	1.53
+++ engine.cpp	3 Jan 2005 16:27:56 -0000	1.54
@@ -35,6 +35,7 @@
 Engine *g_engine = NULL;
 
 extern Imuse *g_imuse;
+int g_imuseState = -1;
 
 Engine::Engine() :
 		_currScene(NULL), _selectedActor(NULL) {
@@ -224,6 +225,11 @@
 
 		// Run asynchronous tasks
 		lua_runtasks();
+
+		if (g_imuseState != -1) {
+			g_imuse->setMusicState(g_imuseState);
+			g_imuseState = -1;
+		}
 	}
 }
 

Index: engine.h
===================================================================
RCS file: /cvsroot/scummvm/residual/engine.h,v
retrieving revision 1.19
retrieving revision 1.20
diff -u -d -r1.19 -r1.20
--- engine.h	1 Jan 2005 12:27:55 -0000	1.19
+++ engine.h	3 Jan 2005 16:27:56 -0000	1.20
@@ -170,6 +170,8 @@
 
 extern Engine *g_engine;
 
+extern int g_imuseState;
+
 void vimaInit(uint16 *destTable);
 void decompressVima(const byte *src, int16 *dest, int destLen, uint16 *destTable);
 

Index: lua.cpp
===================================================================
RCS file: /cvsroot/scummvm/residual/lua.cpp,v
retrieving revision 1.93
retrieving revision 1.94
diff -u -d -r1.93 -r1.94
--- lua.cpp	3 Jan 2005 08:18:45 -0000	1.93
+++ lua.cpp	3 Jan 2005 16:27:56 -0000	1.94
@@ -983,22 +983,21 @@
 	char *soundName = luaL_check_string(1);
 	int opcode = check_int(2);
 	int value = check_int(3);
-	int fadeDelay = check_int(4);
+	int duration = check_int(4);
 
 	switch (opcode) {
 	case IM_SOUND_PAN:
-		// it should be fade panning really
-		g_imuse->setPan(soundName, value);
+		g_imuse->setFadePan(soundName, value, duration);
 		break;
 	default:
-		error("ImFadeParam(%s, %h, %d, %d)", soundName, opcode, value, fadeDelay);
+		error("ImFadeParam(%s, %h, %d, %d)", soundName, opcode, value, duration);
 		break;
 	}
 }
 
 static void ImSetState() {
 	int state = check_int(1);
-	g_imuse->setMusicState(state);
+	g_imuseState = state;
 }
 
 static void ImSetSequence() {





More information about the Scummvm-git-logs mailing list