aboutsummaryrefslogtreecommitdiff
path: root/engines/sci
diff options
context:
space:
mode:
authorFilippos Karapetis2009-12-31 08:10:51 +0000
committerFilippos Karapetis2009-12-31 08:10:51 +0000
commit762bdc7caded769c6440bae0e17fca8c37f5d317 (patch)
tree8c830de70057946230ea1fade13e62cbebc34354 /engines/sci
parent92a8d1360a4b98fbf050123617e637df1042ad3c (diff)
downloadscummvm-rg350-762bdc7caded769c6440bae0e17fca8c37f5d317.tar.gz
scummvm-rg350-762bdc7caded769c6440bae0e17fca8c37f5d317.tar.bz2
scummvm-rg350-762bdc7caded769c6440bae0e17fca8c37f5d317.zip
SCI/new music code: Slight cleanup
svn-id: r46791
Diffstat (limited to 'engines/sci')
-rw-r--r--engines/sci/sfx/soundcmd.cpp19
1 files changed, 11 insertions, 8 deletions
diff --git a/engines/sci/sfx/soundcmd.cpp b/engines/sci/sfx/soundcmd.cpp
index 9c8845a311..97408e7f96 100644
--- a/engines/sci/sfx/soundcmd.cpp
+++ b/engines/sci/sfx/soundcmd.cpp
@@ -280,16 +280,9 @@ void SoundCommandParser::cmdInitHandle(reg_t obj, int16 value) {
return;
_state->sfx_add_song(build_iterator(_resMan, number, type, handle), 0, handle, number);
-#endif
-
- if (_soundVersion <= SCI_VERSION_0_LATE)
- PUT_SEL32V(_segMan, obj, state, kSoundInitialized);
- else
- PUT_SEL32(_segMan, obj, nodePtr, obj);
- PUT_SEL32(_segMan, obj, handle, obj);
+#else
-#ifndef USE_OLD_MUSIC_FUNCTIONS
MusicEntry *newSound = new MusicEntry();
newSound->resnum = number;
if (number && _resMan->testResource(ResourceId(kResourceTypeSound, number)))
@@ -320,6 +313,13 @@ void SoundCommandParser::cmdInitHandle(reg_t obj, int16 value) {
_music->soundInitSnd(newSound);
}
#endif
+
+ if (_soundVersion <= SCI_VERSION_0_LATE)
+ PUT_SEL32V(_segMan, obj, state, kSoundInitialized);
+ else
+ PUT_SEL32(_segMan, obj, nodePtr, obj);
+
+ PUT_SEL32(_segMan, obj, handle, obj);
}
void SoundCommandParser::cmdPlayHandle(reg_t obj, int16 value) {
@@ -409,7 +409,10 @@ void SoundCommandParser::cmdPlayHandle(reg_t obj, int16 value) {
musicSlot = _music->getSlot(obj);
}
+ PUT_SEL32(_segMan, obj, handle, obj);
+
if (_soundVersion >= SCI_VERSION_1_EARLY) {
+ PUT_SEL32(_segMan, obj, nodePtr, obj);
PUT_SEL32V(_segMan, obj, min, 0);
PUT_SEL32V(_segMan, obj, sec, 0);
PUT_SEL32V(_segMan, obj, frame, 0);