aboutsummaryrefslogtreecommitdiff
path: root/engines/sherlock/map.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'engines/sherlock/map.cpp')
-rw-r--r--engines/sherlock/map.cpp12
1 files changed, 8 insertions, 4 deletions
diff --git a/engines/sherlock/map.cpp b/engines/sherlock/map.cpp
index 44ca7cd44c..4f034d8889 100644
--- a/engines/sherlock/map.cpp
+++ b/engines/sherlock/map.cpp
@@ -65,8 +65,12 @@ Map::Map(SherlockEngine *vm): _vm(vm), _topLine(g_system->getWidth(), 12) {
_oldCharPoint = 0;
_frameChangeFlag = false;
- for (int idx = 0; idx < MAX_HOLMES_SEQUENCE; ++idx)
- Common::fill(&_sequences[idx][0], &_sequences[idx][MAX_FRAME], 0);
+ // Initialise the initial walk sequence set
+ _walkSequences.resize(MAX_HOLMES_SEQUENCE);
+ for (int idx = 0; idx < MAX_HOLMES_SEQUENCE; ++idx) {
+ _walkSequences[idx]._sequences.resize(MAX_FRAME);
+ Common::fill(&_walkSequences[idx]._sequences[0], &_walkSequences[idx]._sequences[0] + MAX_FRAME, 0);
+ }
if (!_vm->isDemo())
loadData();
@@ -80,7 +84,7 @@ void Map::loadPoints(int count, const int *xList, const int *yList, const int *t
void Map::loadSequences(int count, const byte *seq) {
for (int idx = 0; idx < count; ++idx, seq += MAX_FRAME)
- Common::copy(seq, seq + MAX_FRAME, &_sequences[idx][0]);
+ Common::copy(seq, seq + MAX_FRAME, &_walkSequences[idx]._sequences[0]);
}
void Map::loadData() {
@@ -289,7 +293,7 @@ void Map::setupSprites() {
p._type = CHARACTER;
p._position = Common::Point(12400, 5000);
p._sequenceNumber = 0;
- p._sequences = &_sequences;
+ p._walkSequences = _walkSequences;
p._images = _shapes;
p._imageFrame = nullptr;
p._frameNumber = 0;