[Scummvm-cvs-logs] SF.net SVN: scummvm:[46791] scummvm/trunk/engines/sci/sfx/soundcmd.cpp
thebluegr at users.sourceforge.net
thebluegr at users.sourceforge.net
Thu Dec 31 09:10:57 CET 2009
Revision: 46791
http://scummvm.svn.sourceforge.net/scummvm/?rev=46791&view=rev
Author: thebluegr
Date: 2009-12-31 08:10:51 +0000 (Thu, 31 Dec 2009)
Log Message:
-----------
SCI/new music code: Slight cleanup
Modified Paths:
--------------
scummvm/trunk/engines/sci/sfx/soundcmd.cpp
Modified: scummvm/trunk/engines/sci/sfx/soundcmd.cpp
===================================================================
--- scummvm/trunk/engines/sci/sfx/soundcmd.cpp 2009-12-31 05:30:25 UTC (rev 46790)
+++ scummvm/trunk/engines/sci/sfx/soundcmd.cpp 2009-12-31 08:10:51 UTC (rev 46791)
@@ -280,16 +280,9 @@
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);
+#else
- PUT_SEL32(_segMan, obj, handle, obj);
-
-#ifndef USE_OLD_MUSIC_FUNCTIONS
MusicEntry *newSound = new MusicEntry();
newSound->resnum = number;
if (number && _resMan->testResource(ResourceId(kResourceTypeSound, number)))
@@ -320,6 +313,13 @@
_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 @@
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);
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