diff options
author | Arnaud Boutonné | 2010-08-17 14:21:04 +0000 |
---|---|---|
committer | Arnaud Boutonné | 2010-08-17 14:21:04 +0000 |
commit | 9698f34d9231b306ee4eed912e5fdb580502eac3 (patch) | |
tree | 801c8a62e181c4549858c8c2cce3b4ee4b57c578 /engines/hugo | |
parent | bec56837ebc5919d7d421e99252f38c2a19c1d6e (diff) | |
download | scummvm-rg350-9698f34d9231b306ee4eed912e5fdb580502eac3.tar.gz scummvm-rg350-9698f34d9231b306ee4eed912e5fdb580502eac3.tar.bz2 scummvm-rg350-9698f34d9231b306ee4eed912e5fdb580502eac3.zip |
Hugo - Fix the sprite modification of the hero (quickest test : H1, entering the machine)
svn-id: r52158
Diffstat (limited to 'engines/hugo')
-rwxr-xr-x | engines/hugo/schedule.cpp | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/engines/hugo/schedule.cpp b/engines/hugo/schedule.cpp index b14fef10f3..9757ace12a 100755 --- a/engines/hugo/schedule.cpp +++ b/engines/hugo/schedule.cpp @@ -659,13 +659,14 @@ void Scheduler::swapImages(int objNumb1, int objNumb2) { // the assumption for now that the first obj is always the HERO) to the object // number of the swapped image seqList_t tmpSeqList[MAX_SEQUENCES]; + int seqListSize = sizeof(seqList_t) * MAX_SEQUENCES; debugC(1, kDebugSchedule, "swapImages(%d, %d)", objNumb1, objNumb2); _vm.file().saveSeq(&_vm._objects[objNumb1]); - memcpy(tmpSeqList, _vm._objects[objNumb1].seqList, sizeof(seqList_t)); - memcpy(_vm._objects[objNumb1].seqList, _vm._objects[objNumb2].seqList, sizeof(seqList_t)); - memcpy(_vm._objects[objNumb2].seqList, tmpSeqList, sizeof(seqList_t)); + memcpy(tmpSeqList, _vm._objects[objNumb1].seqList, seqListSize); + memcpy(_vm._objects[objNumb1].seqList, _vm._objects[objNumb2].seqList, seqListSize); + memcpy(_vm._objects[objNumb2].seqList, tmpSeqList, seqListSize); _vm.file().restoreSeq(&_vm._objects[objNumb1]); _vm._objects[objNumb2].currImagePtr = _vm._objects[objNumb2].seqList[0].seqPtr; _vm._heroImage = (_vm._heroImage == HERO) ? objNumb2 : HERO; |