diff options
author | Paul Gilbert | 2014-11-10 12:18:16 -0500 |
---|---|---|
committer | Paul Gilbert | 2014-12-12 22:29:16 -0500 |
commit | 0e01c3623a499fd69acef789bb4c2a6c39091b99 (patch) | |
tree | cf97ec5aa7bf7edb3478b86ddc747a89c4b176c1 /engines | |
parent | 26b632a9eb36f8e5e8874b50666b3d739dd1416f (diff) | |
download | scummvm-rg350-0e01c3623a499fd69acef789bb4c2a6c39091b99.tar.gz scummvm-rg350-0e01c3623a499fd69acef789bb4c2a6c39091b99.tar.bz2 scummvm-rg350-0e01c3623a499fd69acef789bb4c2a6c39091b99.zip |
ACCESS: Fixes to pan method
Diffstat (limited to 'engines')
-rw-r--r-- | engines/access/amazon/amazon_scripts.cpp | 16 |
1 files changed, 9 insertions, 7 deletions
diff --git a/engines/access/amazon/amazon_scripts.cpp b/engines/access/amazon/amazon_scripts.cpp index 53ac4be869..189f634aa6 100644 --- a/engines/access/amazon/amazon_scripts.cpp +++ b/engines/access/amazon/amazon_scripts.cpp @@ -295,18 +295,18 @@ void AmazonScripts::doFallCell() { void AmazonScripts::pan() { _zCam += _zTrack; _xCam += _xTrack; - int tx = (_xCam << 8) / _zCam; + int tx = (_xTrack << 8) / _zCam; _yCam += _yTrack; - int ty = (_yCam << 8) / _zCam; + int ty = (_yTrack << 8) / _zCam; if (_vm->_timers[24]._flag != 1) { ++_vm->_timers[24]._flag; for (int i = 0; i < _pNumObj; i++) { - _pObjZ[i] = _zTrack; - _pObjXl[i] += tx * _zTrack; - _pObjX[i] += _pObjXl[i]; - _pObjYl[i] += ty * _zTrack; - _pObjY[i] += _pObjYl[i]; + _pObjZ[i] += _zTrack; + _pObjXl[i] += (_pObjZ[i] * tx) & 0xff; + _pObjX[i] += (_pObjZ[i] * tx) >> 8; + _pObjYl[i] += (_pObjZ[i] * ty) & 0xff; + _pObjY[i] += (_pObjZ[i] * ty) >> 8; } } @@ -317,6 +317,8 @@ void AmazonScripts::pan() { ie._offsetY = 0xFF; ie._spritesPtr = _pObject[i]; ie._frameNumber = _pImgNum[i]; + + _vm->_images.addToList(&ie); } } |