mirror of
https://github.com/libretro/scummvm.git
synced 2025-02-09 04:16:34 +00:00
Made Script::run() manually mark the last animation index before it executes a program. This is done to prevent Release wreaking havoc if it is unpaired (i.e. if the script forgot to call a Mark first).
svn-id: r42733
This commit is contained in:
parent
ed59a12d53
commit
ceb9f18132
@ -565,6 +565,10 @@ const GPL2Command *Script::findCommand(byte num, byte subnum) {
|
||||
|
||||
int Script::run(GPL2Program program, uint16 offset) {
|
||||
|
||||
// Mark the last animation index before we do anything so a Release command
|
||||
// doesn't unload too many animations if we forget to use a Mark command first
|
||||
_vm->_game->setMarkedAnimationIndex(_vm->_anims->getLastIndex());
|
||||
|
||||
// Stream reader for the whole program
|
||||
Common::MemoryReadStream reader(program._bytecode, program._length);
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user