aboutsummaryrefslogtreecommitdiff
path: root/kyra/script_v1.cpp
diff options
context:
space:
mode:
authorJohannes Schickel2005-12-20 12:42:22 +0000
committerJohannes Schickel2005-12-20 12:42:22 +0000
commitdf493c63c4a0ffc66aa8576dae80a914c344606b (patch)
treecffd92f632d6f2c7e8ceb4e6dc16c1f87c8db0e8 /kyra/script_v1.cpp
parentf241049961e4758894a0d1abefce6a225956f7d8 (diff)
downloadscummvm-rg350-df493c63c4a0ffc66aa8576dae80a914c344606b.tar.gz
scummvm-rg350-df493c63c4a0ffc66aa8576dae80a914c344606b.tar.bz2
scummvm-rg350-df493c63c4a0ffc66aa8576dae80a914c344606b.zip
Implemented cmd_makeAmuletAppear.
svn-id: r19815
Diffstat (limited to 'kyra/script_v1.cpp')
-rw-r--r--kyra/script_v1.cpp36
1 files changed, 35 insertions, 1 deletions
diff --git a/kyra/script_v1.cpp b/kyra/script_v1.cpp
index bae0bcd2c5..9d2db0ce96 100644
--- a/kyra/script_v1.cpp
+++ b/kyra/script_v1.cpp
@@ -1326,7 +1326,41 @@ int KyraEngine::cmd_drinkPotionAnimation(ScriptState *script) {
}
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;
}