[Scummvm-cvs-logs] SF.net SVN: scummvm: [29487] scummvm/trunk/engines/kyra

lordhoto at users.sourceforge.net lordhoto at users.sourceforge.net
Mon Nov 12 21:04:45 CET 2007


Revision: 29487
          http://scummvm.svn.sourceforge.net/scummvm/?rev=29487&view=rev
Author:   lordhoto
Date:     2007-11-12 12:04:44 -0800 (Mon, 12 Nov 2007)

Log Message:
-----------
Implemented all timer handlers. (Cauldron animations work now)

Modified Paths:
--------------
    scummvm/trunk/engines/kyra/kyra_v2.h
    scummvm/trunk/engines/kyra/timer_v2.cpp

Modified: scummvm/trunk/engines/kyra/kyra_v2.h
===================================================================
--- scummvm/trunk/engines/kyra/kyra_v2.h	2007-11-12 19:49:42 UTC (rev 29486)
+++ scummvm/trunk/engines/kyra/kyra_v2.h	2007-11-12 20:04:44 UTC (rev 29487)
@@ -630,7 +630,7 @@
 
 	// timer
 	void timerFunc2(int);
-	void timerFunc3(int);
+	void timerCauldronAnimation(int);
 	void timerFunc4(int);
 	void timerFunc5(int);
 	void timerFunc6(int);

Modified: scummvm/trunk/engines/kyra/timer_v2.cpp
===================================================================
--- scummvm/trunk/engines/kyra/timer_v2.cpp	2007-11-12 19:49:42 UTC (rev 29486)
+++ scummvm/trunk/engines/kyra/timer_v2.cpp	2007-11-12 20:04:44 UTC (rev 29487)
@@ -35,7 +35,7 @@
 	
 	_timer->addTimer(0, 0, 5, 1);
 	_timer->addTimer(1, TimerV2(timerFunc2), -1, 1);
-	_timer->addTimer(2, TimerV2(timerFunc3), 1, 1);
+	_timer->addTimer(2, TimerV2(timerCauldronAnimation), 1, 1);
 	_timer->addTimer(3, TimerV2(timerFunc4), 1, 0);
 	_timer->addTimer(4, TimerV2(timerFunc5), 1, 0);
 	_timer->addTimer(5, TimerV2(timerFunc6), 1, 0);
@@ -47,9 +47,20 @@
 		_msgUnk1 = 1;
 }
 
-void KyraEngine_v2::timerFunc3(int arg) {
-	debugC(9, kDebugLevelMain | kDebugLevelTimer, "KyraEngine_v2::timerFunc3(%d)", arg);
-	// XXX
+void KyraEngine_v2::timerCauldronAnimation(int arg) {
+	debugC(9, kDebugLevelMain | kDebugLevelTimer, "KyraEngine_v2::timerCauldronAnimation(%d)", arg);
+	int animation = -1;
+
+	if (queryGameFlag(2) && _mainCharacter.sceneId != 34 && _mainCharacter.sceneId != 73 && !_invWsa.wsa && !_invWsa.running) {
+		if (animation == -1)
+			animation = _rnd.getRandomNumberRng(1, 6);
+
+		char filename[13];
+		strcpy(filename, "CAULD00.WSA");
+		filename[5] = (animation / 10) + '0';
+		filename[6] = (animation % 10) + '0';
+		loadInvWsa(filename, 0, 8, 0, -1, -1, 1);
+	}
 }
 
 void KyraEngine_v2::timerFunc4(int arg) {
@@ -60,12 +71,24 @@
 
 void KyraEngine_v2::timerFunc5(int arg) {
 	debugC(9, kDebugLevelMain | kDebugLevelTimer, "KyraEngine_v2::timerFunc5(%d)", arg);
-	// XXX
+	_timer->disable(4);
+	_screen->hideMouse();
+	_specialSceneScriptState[5] = 1;
+	for (int i = 68; i <= 75; ++i) {
+		updateSceneAnim(4, i);
+		delay(6);
+	}
+	//_unk1 = 4;
 }
 
 void KyraEngine_v2::timerFunc6(int arg) {
 	debugC(9, kDebugLevelMain | kDebugLevelTimer, "KyraEngine_v2::timerFunc6(%d)", arg);
-	// XXX
+	_timer->disable(5);
+	_screen->hideMouse();
+	snd_playSoundEffect(0x2D);
+	runTemporaryScript("_ZANBURN.EMC", 0, 1, 1, 0);
+	//_unk1 = 7;
+	snd_playWanderScoreViaMap(0x53, 1);
 }
 
 void KyraEngine_v2::setTimer1DelaySecs(int secs) {


This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.




More information about the Scummvm-git-logs mailing list