[Scummvm-cvs-logs] SF.net SVN: scummvm:[55652] scummvm/trunk/engines/mohawk/myst_stacks

bgk at users.sourceforge.net bgk at users.sourceforge.net
Sun Jan 30 13:33:40 CET 2011


Revision: 55652
          http://scummvm.svn.sourceforge.net/scummvm/?rev=55652&view=rev
Author:   bgk
Date:     2011-01-30 12:33:39 +0000 (Sun, 30 Jan 2011)

Log Message:
-----------
MOHAWK: Implement Stoneship cloud orbs

Modified Paths:
--------------
    scummvm/trunk/engines/mohawk/myst_stacks/stoneship.cpp
    scummvm/trunk/engines/mohawk/myst_stacks/stoneship.h

Modified: scummvm/trunk/engines/mohawk/myst_stacks/stoneship.cpp
===================================================================
--- scummvm/trunk/engines/mohawk/myst_stacks/stoneship.cpp	2011-01-30 07:53:44 UTC (rev 55651)
+++ scummvm/trunk/engines/mohawk/myst_stacks/stoneship.cpp	2011-01-30 12:33:39 UTC (rev 55652)
@@ -83,6 +83,8 @@
 	OPCODE(118, o_chestDropKey);
 	OPCODE(119, o_trapLockOpen);
 	OPCODE(120, o_sideDoorsMovies);
+	OPCODE(121, o_cloudOrbEnter);
+	OPCODE(122, o_cloudOrbLeave);
 	OPCODE(125, o_drawerCloseOpened);
 
 	// "Init" Opcodes
@@ -96,7 +98,7 @@
 	OPCODE(207, o_chest_init);
 	OPCODE(208, opcode_208);
 	OPCODE(209, o_achenarDrawers_init);
-	OPCODE(210, opcode_210);
+	OPCODE(210, o_cloudOrb_init);
 
 	// "Exit" Opcodes
 	OPCODE(300, opcode_300);
@@ -689,6 +691,21 @@
 	_vm->_cursor->showCursor();
 }
 
+void MystScriptParser_Stoneship::o_cloudOrbEnter(uint16 op, uint16 var, uint16 argc, uint16 *argv) {
+	debugC(kDebugScript, "Opcode %d: Cloud orb enter", op);
+
+	_vm->_sound->replaceSoundMyst(_cloudOrbSound, Audio::Mixer::kMaxChannelVolume, true);
+	_cloudOrbMovie->playMovie();
+}
+
+void MystScriptParser_Stoneship::o_cloudOrbLeave(uint16 op, uint16 var, uint16 argc, uint16 *argv) {
+	debugC(kDebugScript, "Opcode %d: Cloud orb leave", op);
+
+	_cloudOrbMovie->pauseMovie(true);
+	_vm->_sound->replaceSoundMyst(_cloudOrbStopSound);
+	_vm->_gfx->runTransition(5, _invokingResource->getRect(), 4, 0);
+}
+
 void MystScriptParser_Stoneship::o_drawerCloseOpened(uint16 op, uint16 var, uint16 argc, uint16 *argv) {
 	debugC(kDebugScript, "Opcode %d: Close open drawer", op);
 
@@ -860,21 +877,12 @@
 	}
 }
 
-void MystScriptParser_Stoneship::opcode_210(uint16 op, uint16 var, uint16 argc, uint16 *argv) {
-	varUnusedCheck(op, var);
+void MystScriptParser_Stoneship::o_cloudOrb_init(uint16 op, uint16 var, uint16 argc, uint16 *argv) {
+	debugC(kDebugScript, "Opcode %d: Cloud orb init", op);
 
-	// Used in Cards 2205 and 2207 (Cloud Orbs in Sirrus' Room)
-	if (argc == 2) {
-		uint16 soundId = argv[0];
-		uint16 soundIdStopping = argv[1];
-
-		// TODO: Work Out Function i.e. control Var etc.
-		if (false) {
-			_vm->_sound->replaceSoundMyst(soundId);
-			_vm->_sound->replaceSoundMyst(soundIdStopping);
-		}
-	} else
-		unknown(op, var, argc, argv);
+	_cloudOrbMovie = static_cast<MystResourceType6 *>(_invokingResource);
+	_cloudOrbSound = argv[0];
+	_cloudOrbStopSound = argv[1];
 }
 
 void MystScriptParser_Stoneship::opcode_300(uint16 op, uint16 var, uint16 argc, uint16 *argv) {

Modified: scummvm/trunk/engines/mohawk/myst_stacks/stoneship.h
===================================================================
--- scummvm/trunk/engines/mohawk/myst_stacks/stoneship.h	2011-01-30 07:53:44 UTC (rev 55651)
+++ scummvm/trunk/engines/mohawk/myst_stacks/stoneship.h	2011-01-30 12:33:39 UTC (rev 55652)
@@ -68,6 +68,8 @@
 	DECLARE_OPCODE(o_chestDropKey);
 	DECLARE_OPCODE(o_trapLockOpen);
 	DECLARE_OPCODE(o_sideDoorsMovies);
+	DECLARE_OPCODE(o_cloudOrbEnter);
+	DECLARE_OPCODE(o_cloudOrbLeave);
 	DECLARE_OPCODE(o_drawerCloseOpened);
 
 	DECLARE_OPCODE(o_hologramDisplay_init);
@@ -80,7 +82,7 @@
 	DECLARE_OPCODE(o_chest_init);
 	DECLARE_OPCODE(opcode_208);
 	DECLARE_OPCODE(o_achenarDrawers_init);
-	DECLARE_OPCODE(opcode_210);
+	DECLARE_OPCODE(o_cloudOrb_init);
 
 	DECLARE_OPCODE(opcode_300);
 
@@ -107,6 +109,10 @@
 	MystResourceType6 *_hologramSelection; // 88
 	uint16 _hologramDisplayPos;
 
+	MystResourceType6 *_cloudOrbMovie; // 136
+	uint16 _cloudOrbSound; // 140
+	uint16 _cloudOrbStopSound; // 142
+
 	uint16 batteryRemainingCharge();
 };
 


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