diff options
author | Robert Göffringmann | 2003-12-18 12:15:59 +0000 |
---|---|---|
committer | Robert Göffringmann | 2003-12-18 12:15:59 +0000 |
commit | 312abd748668ffca8122799993af438394df4826 (patch) | |
tree | dceb5b9ffd77a1a4283b9e9c68a22b806fb121d3 | |
parent | 3644176c43b70303e6ed4b241de751291cbe784a (diff) | |
download | scummvm-rg350-312abd748668ffca8122799993af438394df4826.tar.gz scummvm-rg350-312abd748668ffca8122799993af438394df4826.tar.bz2 scummvm-rg350-312abd748668ffca8122799993af438394df4826.zip |
endian fix for router.
svn-id: r11743
-rw-r--r-- | sword1/router.cpp | 24 |
1 files changed, 20 insertions, 4 deletions
diff --git a/sword1/router.cpp b/sword1/router.cpp index 2564583219..2574ec6643 100644 --- a/sword1/router.cpp +++ b/sword1/router.cpp @@ -2435,15 +2435,31 @@ int32 SwordRouter::LoadWalkResources(BsObject *megaObject, int32 x, int32 y, int nTurnFrames = fMegaWalkData[1]; fMegaWalkData += 2; - memmove(&_dx[0],fMegaWalkData,NO_DIRECTIONS*(nWalkFrames+1+nTurnFrames)*sizeof(int32)); + for (int32 cnt = 0; cnt < NO_DIRECTIONS * (nWalkFrames + 1 + nTurnFrames); cnt++) { + _dx[cnt] = (int32)READ_LE_UINT32(fMegaWalkData); + fMegaWalkData += 4; + } + for (int32 cnt = 0; cnt < NO_DIRECTIONS * (nWalkFrames + 1 + nTurnFrames); cnt++) { + _dy[cnt] = (int32)READ_LE_UINT32(fMegaWalkData); + fMegaWalkData += 4; + } + /*memmove(&_dx[0],fMegaWalkData,NO_DIRECTIONS*(nWalkFrames+1+nTurnFrames)*sizeof(int32)); fMegaWalkData += NO_DIRECTIONS*(nWalkFrames+1+nTurnFrames)*sizeof(int32); memmove(&_dy[0],fMegaWalkData,NO_DIRECTIONS*(nWalkFrames+1+nTurnFrames)*sizeof(int32)); - fMegaWalkData += NO_DIRECTIONS*(nWalkFrames+1+nTurnFrames)*sizeof(int32); + fMegaWalkData += NO_DIRECTIONS*(nWalkFrames+1+nTurnFrames)*sizeof(int32);*/ - memmove(&modX[0],fMegaWalkData,NO_DIRECTIONS*sizeof(int32)); + for (uint32 cnt = 0; cnt < NO_DIRECTIONS; cnt++) { + modX[cnt] = (int32)READ_LE_UINT32(fMegaWalkData); + fMegaWalkData += 4; + } + for (uint32 cnt = 0; cnt < NO_DIRECTIONS; cnt++) { + modY[cnt] = (int32)READ_LE_UINT32(fMegaWalkData); + fMegaWalkData += 4; + } + /*memmove(&modX[0],fMegaWalkData,NO_DIRECTIONS*sizeof(int32)); fMegaWalkData += NO_DIRECTIONS*sizeof(int32); memmove(&modY[0],fMegaWalkData,NO_DIRECTIONS*sizeof(int32)); - fMegaWalkData += NO_DIRECTIONS*sizeof(int32); + fMegaWalkData += NO_DIRECTIONS*sizeof(int32);*/ //ResUnlock(megaObject->o_mega_resource); // mouse wiggle //ResClose(megaObject->o_mega_resource); // mouse wiggle |