[Scummvm-cvs-logs] CVS: scummvm/kyra kyra.h,1.49,1.50 script_v1.cpp,1.42,1.43 staticres.cpp,1.24,1.25

Johannes Schickel lordhoto at users.sourceforge.net
Tue Dec 20 04:43:02 CET 2005


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

Modified Files:
	kyra.h script_v1.cpp staticres.cpp 
Log Message:
Implemented cmd_makeAmuletAppear.


Index: kyra.h
===================================================================
RCS file: /cvsroot/scummvm/scummvm/kyra/kyra.h,v
retrieving revision 1.49
retrieving revision 1.50
diff -u -d -r1.49 -r1.50
--- kyra.h	20 Dec 2005 10:58:07 -0000	1.49
+++ kyra.h	20 Dec 2005 12:42:22 -0000	1.50
@@ -711,6 +711,8 @@
 	int _roomTableSize;	
 	char **_roomFilenameTable;
 	int _roomFilenameTableSize;
+	
+	uint8 *_amuleteAnim;
 
 	Timer _timers[34];
 	uint32 _timerNextRun;	
@@ -724,7 +726,6 @@
 
 	static const uint16 _amuletX[];
 	static const uint16 _amuletY[];
-
 };
 
 } // End of namespace Kyra

Index: script_v1.cpp
===================================================================
RCS file: /cvsroot/scummvm/scummvm/kyra/script_v1.cpp,v
retrieving revision 1.42
retrieving revision 1.43
diff -u -d -r1.42 -r1.43
--- script_v1.cpp	20 Dec 2005 10:58:07 -0000	1.42
+++ script_v1.cpp	20 Dec 2005 12:42:22 -0000	1.43
@@ -1326,7 +1326,41 @@
 }
 
 int KyraEngine::cmd_makeAmuletAppear(ScriptState *script) {
-	warning("STUB: cmd_makeAmuletAppear");
+	debug(3, "cmd_makeAmuletAppear(0x%X) ()", script);
+	WSAMovieV1 *amulet = wsa_open("AMULET.WSA", 1, 0);
+	if (amulet) {
+		assert(_amuleteAnim);
+		_screen->hideMouse();
+		// snd_kyraPlaySound(0x70);
+		uint32 nextTime = 0;
+		for (int i = 0; _amuleteAnim[i] != 0xFF; ++i) {
+			nextTime = _system->getMillis() + 5 * _tickLength;
+			
+			uint8 code = _amuleteAnim[i];
+			if (code == 3 || code == 7) {
+				// snd_kyraPlaySound(0x71);
+			}
+			
+			if (code == 5) {
+				// snd_kyraPlaySound(0x72);
+			}
+			
+			if (code == 14) {
+				// snd_kyraPlaySound(0x73);
+			}
+			
+			wsa_play(amulet, code, 224, 152, 0);
+			_updateScreen = true;
+			
+			while (_system->getMillis() < nextTime) {
+				_sprites->updateSceneAnims();
+				updateAllObjectShapes();
+			}
+		}
+		_screen->showMouse();
+	}
+	wsa_close(amulet);
+	setGameFlag(0x2D);
 	return 0;
 }
 

Index: staticres.cpp
===================================================================
RCS file: /cvsroot/scummvm/scummvm/kyra/staticres.cpp,v
retrieving revision 1.24
retrieving revision 1.25
diff -u -d -r1.24 -r1.25
--- staticres.cpp	14 Dec 2005 14:08:30 -0000	1.24
+++ staticres.cpp	20 Dec 2005 12:42:22 -0000	1.25
@@ -26,7 +26,7 @@
 
 namespace Kyra {
 
-#define RESFILE_VERSION 4
+#define RESFILE_VERSION 5
 
 #define GAME_FLAGS (GF_FLOPPY | GF_TALKIE | GF_DEMO | GF_AUDIOCD)
 #define LANGUAGE_FLAGS (GF_ENGLISH | GF_FRENCH | GF_GERMAN | GF_SPANISH | GF_LNGUNK)
@@ -194,6 +194,8 @@
 		res_loadLangTable("PLACED.", &resFile, (byte***)&_placedList, &_placedList_Size, loadNativeLanguage);
 		res_loadLangTable("DROPPED.", &resFile, (byte***)&_droppedList, &_droppedList_Size, loadNativeLanguage);
 		res_loadLangTable("NODROP.", &resFile, (byte***)&_noDropList, &_noDropList_Size, loadNativeLanguage);
+		
+		loadRawFile(resFile, "AMULETEANIM.SEQ", _amuleteAnim);
 	}
 
 #undef loadRooms
@@ -299,6 +301,9 @@
 		delete [] _noDropList;
 		_noDropList_Size = 0;
 		_noDropList = 0;
+		
+		delete [] _amuleteAnim;
+		_amuleteAnim = 0;
 	}
 }
 
@@ -627,7 +632,6 @@
 	 0, -2, -2, -2,  0,  2,  2,  2
 };
 
-const uint16 KyraEngine::_amuletX[] = {231, 275, 253, 253};
-const uint16 KyraEngine::_amuletY[] = {170, 170, 159, 181};
-
+const uint16 KyraEngine::_amuletX[] = { 231, 275, 253, 253 };
+const uint16 KyraEngine::_amuletY[] = { 170, 170, 159, 181 };
 } // End of namespace Kyra





More information about the Scummvm-git-logs mailing list