mirror of
https://github.com/libretro/scummvm.git
synced 2025-01-27 05:32:45 +00:00
MTROPOLIS: Fix some wrong IDs, debugging menu MIDI not working
This commit is contained in:
parent
b64d73849d
commit
49f7dc0c2f
@ -570,6 +570,7 @@ VThreadState MidiModifier::consumeMessage(Runtime *runtime, const Common::Shared
|
||||
if (_executeWhen.respondsTo(msg->getEvent())) {
|
||||
if (_mode == kModeFile) {
|
||||
if (_embeddedFile) {
|
||||
debug(2, "MIDI (%p): Playing embedded file", this);
|
||||
_plugIn->getMidi()->playFile(&_embeddedFile->contents[0], _embeddedFile->contents.size());
|
||||
}
|
||||
}
|
||||
@ -619,8 +620,11 @@ MiniscriptInstructionOutcome MidiModifier::scriptSetVolume(MiniscriptThread *thr
|
||||
|
||||
_volume = asInteger;
|
||||
|
||||
if (_mode == kModeFile)
|
||||
_plugIn->getMidi()->setVolume((_volume * 1306) >> 9); // 100 -> 255 range
|
||||
if (_mode == kModeFile) {
|
||||
const int normalizedVolume = (_volume * 1306) >> 9;
|
||||
debug(2, "MIDI (%p): Changing volume to %i", this, normalizedVolume);
|
||||
_plugIn->getMidi()->setVolume(normalizedVolume); // 100 -> 255 range
|
||||
}
|
||||
|
||||
return kMiniscriptInstructionOutcomeContinue;
|
||||
}
|
||||
@ -635,8 +639,10 @@ MiniscriptInstructionOutcome MidiModifier::scriptSetNoteVelocity(MiniscriptThrea
|
||||
else if (asInteger > 127)
|
||||
asInteger = 127;
|
||||
|
||||
if (_mode == kModeSingleNote)
|
||||
if (_mode == kModeSingleNote) {
|
||||
debug(2, "MIDI (%p): Changing note velocity to %i", this, asInteger);
|
||||
_modeSpecific.singleNote.velocity = asInteger;
|
||||
}
|
||||
|
||||
return kMiniscriptInstructionOutcomeContinue;
|
||||
}
|
||||
|
@ -1654,8 +1654,12 @@ void MessengerSendSpec::resolveDestination(Runtime *runtime, Modifier *sender, C
|
||||
case kMessageDestModifiersParent:
|
||||
resolveVariableObjectType(sender->getParent().lock().get(), outStructuralDest, outModifierDest);
|
||||
break;
|
||||
case kMessageDestChildren:
|
||||
case kMessageDestElementsParent:
|
||||
resolveHierarchyStructuralDestination(runtime, sender, outStructuralDest, outModifierDest, isElementFilter);
|
||||
if (!outStructuralDest.expired())
|
||||
outStructuralDest = outStructuralDest.lock()->getParent()->getSelfReference().staticCast<Structural>();
|
||||
break;
|
||||
case kMessageDestChildren:
|
||||
case kMessageDestSubsection:
|
||||
case kMessageDestSourcesParent:
|
||||
case kMessageDestBehavior:
|
||||
|
@ -205,13 +205,13 @@ enum EventID {
|
||||
kTransitionStarted = 503,
|
||||
kTransitionEnded = 504,
|
||||
|
||||
kMouseUp = 301,
|
||||
kMouseDown = 302,
|
||||
kMouseDown = 301,
|
||||
kMouseUp = 302,
|
||||
kMouseOver = 303,
|
||||
kMouseOutside = 304,
|
||||
kMouseTrackedInside = 305,
|
||||
kMouseTracking = 306,
|
||||
kMouseTrackedOutside = 307,
|
||||
kMouseTrackedOutside = 306,
|
||||
kMouseTracking = 307,
|
||||
kMouseUpInside = 309,
|
||||
kMouseUpOutside = 310,
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user