[Scummvm-cvs-logs] SF.net SVN: scummvm: [24619] scummvm/trunk/engines/agos
kirben at users.sourceforge.net
kirben at users.sourceforge.net
Sun Nov 5 02:43:36 CET 2006
Revision: 24619
http://svn.sourceforge.net/scummvm/?rev=24619&view=rev
Author: kirben
Date: 2006-11-04 17:43:29 -0800 (Sat, 04 Nov 2006)
Log Message:
-----------
Music is disabled when under water in Elvira 1
Modified Paths:
--------------
scummvm/trunk/engines/agos/agos.h
scummvm/trunk/engines/agos/script_e1.cpp
scummvm/trunk/engines/agos/script_s1.cpp
Modified: scummvm/trunk/engines/agos/agos.h
===================================================================
--- scummvm/trunk/engines/agos/agos.h 2006-11-05 00:40:35 UTC (rev 24618)
+++ scummvm/trunk/engines/agos/agos.h 2006-11-05 01:43:29 UTC (rev 24619)
@@ -1122,6 +1122,7 @@
void oe1_enableInput();
void oe1_setTime();
void oe1_ifTime();
+ void oe1_playTune();
void oe1_bitClear();
void oe1_bitSet();
void oe1_bitTest();
Modified: scummvm/trunk/engines/agos/script_e1.cpp
===================================================================
--- scummvm/trunk/engines/agos/script_e1.cpp 2006-11-05 00:40:35 UTC (rev 24618)
+++ scummvm/trunk/engines/agos/script_e1.cpp 2006-11-05 01:43:29 UTC (rev 24619)
@@ -152,7 +152,7 @@
op[260] = &AGOSEngine::oe1_ifTime;
op[261] = &AGOSEngine::o_here;
op[262] = &AGOSEngine::o_doClassIcons;
- op[263] = &AGOSEngine::os1_playTune;
+ op[263] = &AGOSEngine::oe1_playTune;
op[266] = &AGOSEngine::o_setAdjNoun;
op[267] = &AGOSEngine::oe1_zoneDisk;
op[268] = &AGOSEngine::o_saveUserGame;
@@ -600,6 +600,26 @@
setScriptCondition(false);
}
+void AGOSEngine::oe1_playTune() {
+ // 264: play tune
+ int music = getVarOrWord();
+ int track = getVarOrWord();
+
+ if (music != _lastMusicPlayed) {
+ _lastMusicPlayed = music;
+ // No tune under water
+ if (music == 4) {
+ if (getPlatform() == Common::kPlatformAmiga)
+ _mixer->stopHandle(_modHandle);
+ else
+ midi.stop();
+ } else {
+ loadMusic(music);
+ midi.startTrack(track);
+ }
+ }
+}
+
void AGOSEngine::oe1_zoneDisk() {
// 267: set disk number of each zone
getVarOrWord();
Modified: scummvm/trunk/engines/agos/script_s1.cpp
===================================================================
--- scummvm/trunk/engines/agos/script_s1.cpp 2006-11-05 00:40:35 UTC (rev 24618)
+++ scummvm/trunk/engines/agos/script_s1.cpp 2006-11-05 01:43:29 UTC (rev 24619)
@@ -88,19 +88,10 @@
}
void AGOSEngine::os1_playTune() {
- // 127: deals with music
+ // 127: play tune
int music = getVarOrWord();
int track = getVarOrWord();
- // Jamieson630:
- // This appears to be a "load or play music" command.
- // The music resource is specified, and optionally
- // a track as well. Normally we see two calls being
- // made, one to load the resource and another to
- // actually start a track (so the resource is
- // effectively preloaded so there's no latency when
- // starting playback).
-
if (music != _lastMusicPlayed) {
_lastMusicPlayed = music;
loadMusic(music);
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