diff options
author | Paul Gilbert | 2014-11-22 22:17:39 -0500 |
---|---|---|
committer | Paul Gilbert | 2014-12-12 22:38:31 -0500 |
commit | 30f602b6cb265000d4ac95e645598d324e3d5d49 (patch) | |
tree | 7216d28ce7b533bd4f03c76de39ecb61b114f021 | |
parent | 1d60368724198d9c5fd201ab628ef46d285bb73b (diff) | |
download | scummvm-rg350-30f602b6cb265000d4ac95e645598d324e3d5d49.tar.gz scummvm-rg350-30f602b6cb265000d4ac95e645598d324e3d5d49.tar.bz2 scummvm-rg350-30f602b6cb265000d4ac95e645598d324e3d5d49.zip |
ACCESS: Further fixes for panning
-rw-r--r-- | engines/access/access.cpp | 10 | ||||
-rw-r--r-- | engines/access/access.h | 2 | ||||
-rw-r--r-- | engines/access/amazon/amazon_scripts.cpp | 11 | ||||
-rw-r--r-- | engines/access/asurface.h | 2 |
4 files changed, 15 insertions, 10 deletions
diff --git a/engines/access/access.cpp b/engines/access/access.cpp index b309e92b29..e87b647b59 100644 --- a/engines/access/access.cpp +++ b/engines/access/access.cpp @@ -72,7 +72,7 @@ AccessEngine::AccessEngine(OSystem *syst, const AccessGameDescription *gameDesc) _scaleT1 = 0; _scaleMaxY = 0; _scaleI = 0; - _scaleFlag = false; + _imgUnscaled = false; _canSaveLoad = false; _eseg = nullptr; @@ -351,13 +351,13 @@ void AccessEngine::plotList1() { for (uint idx = 0; idx < _images.size(); ++idx) { ImageEntry &ie = _images[idx]; - _scaleFlag = (ie._flags & 8) != 0; + _imgUnscaled = (ie._flags & IMGFLAG_UNSCALED) != 0; Common::Point pt = ie._position - _screen->_bufferStart; SpriteResource *sprites = ie._spritesPtr; SpriteFrame *frame = sprites->getFrame(ie._frameNumber); Common::Rect bounds(pt.x, pt.y, pt.x + frame->w, pt.y + frame->h); - if (!_scaleFlag) { + if (!_imgUnscaled) { bounds.setWidth(_screen->_scaleTable1[frame->w]); bounds.setHeight(_screen->_scaleTable1[frame->h]); } @@ -376,7 +376,7 @@ void AccessEngine::plotList1() { _newRects.push_back(bounds); - if (!_scaleFlag) { + if (!_imgUnscaled) { _buffer2._rightSkip /= _scale; bounds.setWidth(bounds.width() / _scale); @@ -386,7 +386,7 @@ void AccessEngine::plotList1() { _buffer2.sPlotF(frame, destBounds); } } else { - if (ie._flags & 2) { + if (ie._flags & IMGFLAG_BACKWARDS) { _buffer2.plotB(frame, Common::Point(destBounds.left, destBounds.top)); } else { _buffer2.plotF(frame, Common::Point(destBounds.left, destBounds.top)); diff --git a/engines/access/access.h b/engines/access/access.h index 36951c7504..805abcce02 100644 --- a/engines/access/access.h +++ b/engines/access/access.h @@ -189,7 +189,7 @@ public: int _scaleT1; int _scaleMaxY; int _scaleI; - bool _scaleFlag; + bool _imgUnscaled; bool _canSaveLoad; Resource *_eseg; diff --git a/engines/access/amazon/amazon_scripts.cpp b/engines/access/amazon/amazon_scripts.cpp index d4018c2def..4d354017c6 100644 --- a/engines/access/amazon/amazon_scripts.cpp +++ b/engines/access/amazon/amazon_scripts.cpp @@ -425,11 +425,11 @@ void AmazonScripts::pan() { for (int i = 0; i < _pNumObj; i++) { _pObjZ[i] += _zTrack; _pObjXl[i] += (_pObjZ[i] * tx) & 0xff; - _pObjX[i] += (_pObjZ[i] * tx) >> 8 + (_pObjXl[i] >> 8); + _pObjX[i] += ((_pObjZ[i] * tx) >> 8) + (_pObjXl[i] >> 8); _pObjXl[i] &= 0xff; _pObjYl[i] += (_pObjZ[i] * ty) & 0xff; - _pObjY[i] += (_pObjZ[i] * ty) >> 8 + (_pObjYl[i] >> 8); + _pObjY[i] += ((_pObjZ[i] * ty) >> 8) + (_pObjYl[i] >> 8); _pObjYl[i] &= 0xff; } } @@ -697,8 +697,9 @@ void AmazonScripts::mWhileDoOpen() { _zCam = 270; _vm->_timers[24]._timer = _vm->_timers[24]._initTm = 1; ++_vm->_timers[24]._flag; - _pNumObj = 10; + _vm->_timers.updateTimers(); + _pNumObj = 10; for (int i = 0; i < _pNumObj; i++) { _pObject[i] = _vm->_objectsTable[1]; _pImgNum[i] = OPENING_OBJS[i][0]; @@ -731,7 +732,9 @@ void AmazonScripts::mWhileDoOpen() { screen.forceFadeIn(); } - events.pollEvents(); + events.pollEvents(); + g_system->delayMillis(10); + if (events._leftButton || events._rightButton || events._keypresses.size() > 0) { _game->_skipStart = true; _vm->_sound->newMusic(10, 1); diff --git a/engines/access/asurface.h b/engines/access/asurface.h index d066589f84..1c30db8915 100644 --- a/engines/access/asurface.h +++ b/engines/access/asurface.h @@ -131,6 +131,8 @@ public: SpriteFrame *getFrame(int idx) { return _frames[idx]; } }; +enum ImageFlag { IMGFLAG_BACKWARDS = 2, IMGFLAG_UNSCALED = 8 }; + class ImageEntry { public: int _frameNumber; |