mirror of
https://github.com/libretro/scummvm.git
synced 2025-01-31 16:03:24 +00:00
DIRECTOR: Fix processing channels
This commit is contained in:
parent
2177e685b7
commit
69ffcba521
@ -87,7 +87,7 @@ Frame::Frame(const Frame &frame) {
|
||||
|
||||
_sprites.resize(_numChannels + 1);
|
||||
|
||||
for (uint16 i = 0; i < _numChannels + 1; i++) {
|
||||
for (uint16 i = 0; i <= _numChannels; i++) {
|
||||
_sprites[i] = new Sprite(*frame._sprites[i]);
|
||||
}
|
||||
}
|
||||
@ -581,7 +581,7 @@ void Frame::playTransition(Score *score) {
|
||||
}
|
||||
|
||||
void Frame::renderSprites(Graphics::ManagedSurface &surface, bool renderTrail) {
|
||||
for (uint16 i = 0; i < _numChannels; i++) {
|
||||
for (uint16 i = 0; i <= _numChannels; i++) {
|
||||
if (!_sprites[i]->_enabled)
|
||||
continue;
|
||||
|
||||
|
@ -258,7 +258,7 @@ void Lingo::processSpriteEvent(LEvent event) {
|
||||
Frame *currentFrame = score->_frames[score->getCurrentFrame()];
|
||||
if (event == kEventBeginSprite) {
|
||||
// TODO: Check if this is also possibly a kSpriteScript?
|
||||
for (uint16 i = 0; i < score->_numChannelsDisplayed; i++)
|
||||
for (uint16 i = 0; i <= score->_numChannelsDisplayed; i++)
|
||||
if (currentFrame->_sprites[i]->_enabled)
|
||||
processEvent(event, kCastScript, currentFrame->_sprites[i]->_scriptId);
|
||||
|
||||
|
@ -601,7 +601,7 @@ void Lingo::runTests() {
|
||||
}
|
||||
|
||||
void Lingo::executeImmediateScripts(Frame *frame) {
|
||||
for (uint16 i = 0; i < _vm->getCurrentScore()->_numChannelsDisplayed; i++) {
|
||||
for (uint16 i = 0; i <= _vm->getCurrentScore()->_numChannelsDisplayed; i++) {
|
||||
if (_vm->getCurrentScore()->_immediateActions.contains(frame->_sprites[i]->_scriptId)) {
|
||||
g_lingo->processEvent(kEventMouseUp, kFrameScript, frame->_sprites[i]->_scriptId);
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user