diff options
author | Paul Gilbert | 2014-03-08 15:42:07 -0500 |
---|---|---|
committer | Paul Gilbert | 2014-03-08 15:42:07 -0500 |
commit | 5536b8a933f792f45d08ab5126e826a9a20fa476 (patch) | |
tree | 30ad251d2dd4b09449214bb71590605636838519 /engines/mads/sequence.cpp | |
parent | c2587af8f29b2b79beae7fda5a9b983614840b17 (diff) | |
download | scummvm-rg350-5536b8a933f792f45d08ab5126e826a9a20fa476.tar.gz scummvm-rg350-5536b8a933f792f45d08ab5126e826a9a20fa476.tar.bz2 scummvm-rg350-5536b8a933f792f45d08ab5126e826a9a20fa476.zip |
MADS: Fixes for sprite list initialisation
Diffstat (limited to 'engines/mads/sequence.cpp')
-rw-r--r-- | engines/mads/sequence.cpp | 8 |
1 files changed, 5 insertions, 3 deletions
diff --git a/engines/mads/sequence.cpp b/engines/mads/sequence.cpp index e8c5a37298..f703ce3b3a 100644 --- a/engines/mads/sequence.cpp +++ b/engines/mads/sequence.cpp @@ -50,10 +50,12 @@ namespace MADS { /*------------------------------------------------------------------------*/ -#define TIMER_LIST_SIZE 30 +#define SEQUENCE_LIST_SIZE 30 SequenceList::SequenceList(MADSEngine *vm) : _vm(vm) { - for (int i = 0; i < TIMER_LIST_SIZE; ++i) { + // IMPORTANT: Preallocate timer slots. Note that sprite slots refer to entries + // in this list by index, so we can't just add or delete entries later + for (int i = 0; i < SEQUENCE_LIST_SIZE; ++i) { SequenceEntry rec; rec._active = false; rec._dynamicHotspotIndex = -1; @@ -239,7 +241,7 @@ bool SequenceList::loadSprites(int seqIndex) { if (seqEntry._frameIndex > seqEntry._numSprites) { result = true; if (seqEntry._animType == ANIMTYPE_CYCLED) { - // Reset back to the starting frame (cyclic) + // back to the starting frame (cyclic) seqEntry._frameIndex = seqEntry._frameStart; } else { |