aboutsummaryrefslogtreecommitdiff
path: root/engines/sci/sound/soundcmd.cpp
diff options
context:
space:
mode:
authorFilippos Karapetis2012-06-18 05:21:59 +0300
committerFilippos Karapetis2012-06-18 05:24:06 +0300
commit2b50824133ced47f1d8fb6407a1e0212a7eeb41c (patch)
tree9694687f829e097a92af756e38d05b3078829636 /engines/sci/sound/soundcmd.cpp
parent3c04d333f2f6a423a67a8d0202ffca29d22da9db (diff)
downloadscummvm-rg350-2b50824133ced47f1d8fb6407a1e0212a7eeb41c.tar.gz
scummvm-rg350-2b50824133ced47f1d8fb6407a1e0212a7eeb41c.tar.bz2
scummvm-rg350-2b50824133ced47f1d8fb6407a1e0212a7eeb41c.zip
SCI: Add setter/getter methods to reg_t's
No functionality change has been made with this commit. This avoids setting and getting the reg_t members directly, and is the basis of any future work on large SCI3 scripts (larger than 64KB)
Diffstat (limited to 'engines/sci/sound/soundcmd.cpp')
-rw-r--r--engines/sci/sound/soundcmd.cpp6
1 files changed, 3 insertions, 3 deletions
diff --git a/engines/sci/sound/soundcmd.cpp b/engines/sci/sound/soundcmd.cpp
index 05bb90332a..989df7c8a1 100644
--- a/engines/sci/sound/soundcmd.cpp
+++ b/engines/sci/sound/soundcmd.cpp
@@ -61,7 +61,7 @@ reg_t SoundCommandParser::kDoSoundInit(int argc, reg_t *argv, reg_t acc) {
}
int SoundCommandParser::getSoundResourceId(reg_t obj) {
- int resourceId = obj.segment ? readSelectorValue(_segMan, obj, SELECTOR(number)) : -1;
+ int resourceId = obj.getSegment() ? readSelectorValue(_segMan, obj, SELECTOR(number)) : -1;
// Modify the resourceId for the Windows versions that have an alternate MIDI soundtrack, like SSCI did.
if (g_sci && g_sci->_features->useAltWinGMSound()) {
// Check if the alternate MIDI song actually exists...
@@ -291,7 +291,7 @@ reg_t SoundCommandParser::kDoSoundPause(int argc, reg_t *argv, reg_t acc) {
reg_t obj = argv[0];
uint16 value = argc > 1 ? argv[1].toUint16() : 0;
- if (!obj.segment) { // pause the whole playlist
+ if (!obj.getSegment()) { // pause the whole playlist
_music->pauseAll(value);
} else { // pause a playlist slot
MusicEntry *musicSlot = _music->getSlot(obj);
@@ -369,7 +369,7 @@ reg_t SoundCommandParser::kDoSoundFade(int argc, reg_t *argv, reg_t acc) {
case 5: // SCI1+ (SCI1 late sound scheme), with fade and continue
musicSlot->fadeTo = CLIP<uint16>(argv[1].toUint16(), 0, MUSIC_VOLUME_MAX);
// sometimes we get objects in that position, fix it up (ffs. workarounds)
- if (!argv[1].segment)
+ if (!argv[1].getSegment())
musicSlot->fadeStep = volume > musicSlot->fadeTo ? -argv[3].toUint16() : argv[3].toUint16();
else
musicSlot->fadeStep = volume > musicSlot->fadeTo ? -5 : 5;