aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--engines/access/access.cpp10
-rw-r--r--engines/access/amazon/amazon_game.cpp4
-rw-r--r--engines/access/amazon/amazon_scripts.cpp14
-rw-r--r--engines/access/asurface.h3
4 files changed, 17 insertions, 14 deletions
diff --git a/engines/access/access.cpp b/engines/access/access.cpp
index 88c62a74a7..2c973160b0 100644
--- a/engines/access/access.cpp
+++ b/engines/access/access.cpp
@@ -360,12 +360,12 @@ void AccessEngine::plotList1() {
Common::Rect destBounds = bounds;
if (_buffer2.clip(bounds)) {
- ie._flags |= 1;
+ ie._flags |= IMGFLAG_CROPPED;
} else {
- ie._flags &= ~1;
+ ie._flags &= ~IMGFLAG_CROPPED;
if (_buffer2._leftSkip != 0 || _buffer2._rightSkip != 0
|| _buffer2._topSkip != 0 || _buffer2._bottomSkip != 0)
- ie._flags |= 1;
+ ie._flags |= IMGFLAG_CROPPED;
_newRects.push_back(bounds);
@@ -373,7 +373,7 @@ void AccessEngine::plotList1() {
_buffer2._rightSkip /= _scale;
bounds.setWidth(bounds.width() / _scale);
- if (ie._flags & 2) {
+ if (ie._flags & IMGFLAG_BACKWARDS) {
_buffer2.sPlotB(frame, destBounds);
} else {
_buffer2.sPlotF(frame, destBounds);
@@ -386,6 +386,8 @@ void AccessEngine::plotList1() {
}
}
}
+
+ ie._flags |= IMGFLAG_DRAWN;
}
}
diff --git a/engines/access/amazon/amazon_game.cpp b/engines/access/amazon/amazon_game.cpp
index 05ac80e350..c575d8498c 100644
--- a/engines/access/amazon/amazon_game.cpp
+++ b/engines/access/amazon/amazon_game.cpp
@@ -1147,10 +1147,10 @@ void Guard::guardSee() {
void Guard::setGuardFrame() {
ImageEntry ie;
- ie._flags = 8;
+ ie._flags = IMGFLAG_UNSCALED;
if (_vm->_guardLocation == 4)
- ie._flags |= 2;
+ ie._flags |= IMGFLAG_BACKWARDS;
ie._spritesPtr = _vm->_objectsTable[37];
ie._frameNumber = _guardCel;
ie._position = _position;
diff --git a/engines/access/amazon/amazon_scripts.cpp b/engines/access/amazon/amazon_scripts.cpp
index f3f120bf72..7ec0f95e08 100644
--- a/engines/access/amazon/amazon_scripts.cpp
+++ b/engines/access/amazon/amazon_scripts.cpp
@@ -301,7 +301,7 @@ void AmazonScripts::jungleMove() {
for (int i = 0; i < count; ++i) {
ImageEntry ie;
- ie._flags = 8;
+ ie._flags = IMGFLAG_UNSCALED;
ie._spritesPtr = _vm->_objectsTable[24];
ie._frameNumber = _jCnt[i] + frameOffset;
ie._position = Common::Point(_jungleX[i], jungleY[i]);
@@ -437,7 +437,7 @@ void AmazonScripts::pan() {
for (int i = 0; i < _pNumObj; i++) {
ImageEntry ie;
- ie._flags= 8;
+ ie._flags = IMGFLAG_UNSCALED;
ie._position = Common::Point(_pObjX[i], _pObjY[i]);
ie._offsetY = 255;
ie._spritesPtr = _pObject[i];
@@ -1046,7 +1046,7 @@ void AmazonScripts::plotTorchSpear(int indx, const int *&buf) {
int idx = indx;
ImageEntry ie;
- ie._flags = 8;
+ ie._flags = IMGFLAG_UNSCALED;
ie._spritesPtr = _vm->_objectsTable[62];
ie._frameNumber = buf[(idx / 2)];
ie._position = Common::Point(_game->_pitPos.x + buf[(idx / 2) + 1], _game->_pitPos.y + buf[(idx / 2) + 2]);
@@ -1057,7 +1057,7 @@ void AmazonScripts::plotTorchSpear(int indx, const int *&buf) {
void AmazonScripts::plotPit(int indx, const int *&buf) {
int idx = indx;
ImageEntry ie;
- ie._flags = 8;
+ ie._flags = IMGFLAG_UNSCALED;
ie._spritesPtr = _vm->_objectsTable[62];
ie._frameNumber = buf[(idx / 2)];
ie._position = Common::Point(_game->_pitPos.x, _game->_pitPos.y);
@@ -1233,7 +1233,7 @@ void AmazonScripts::ANT() {
}
ImageEntry ie;
- ie._flags = 8;
+ ie._flags = IMGFLAG_UNSCALED;
ie._spritesPtr = _vm->_objectsTable[61];
ie._frameNumber = buf[(idx / 2)];
ie._position = Common::Point(_game->_antPos.x, _game->_antPos.y);
@@ -1730,7 +1730,7 @@ void AmazonScripts::plotRiver() {
}
ImageEntry ie;
- ie._flags = 8;
+ ie._flags = IMGFLAG_UNSCALED;
ie._spritesPtr = _vm->_objectsTable[45];
ie._frameNumber = _game->_canoeFrame;
ie._position.x = (_vm->_screen->_scrollCol * 16) + _vm->_screen->_scrollX + 160;
@@ -1741,7 +1741,7 @@ void AmazonScripts::plotRiver() {
RiverStruct *cur = _game->_topList;
while (cur <= _game->_botList) {
if (cur[0]._id != -1) {
- ie._flags = 8;
+ ie._flags = IMGFLAG_UNSCALED;
ie._spritesPtr = _vm->_objectsTable[45];
ie._frameNumber = 0;
ie._position.x = cur[0]._field5;
diff --git a/engines/access/asurface.h b/engines/access/asurface.h
index 1c30db8915..273578c830 100644
--- a/engines/access/asurface.h
+++ b/engines/access/asurface.h
@@ -131,7 +131,8 @@ public:
SpriteFrame *getFrame(int idx) { return _frames[idx]; }
};
-enum ImageFlag { IMGFLAG_BACKWARDS = 2, IMGFLAG_UNSCALED = 8 };
+enum ImageFlag { IMGFLAG_CROPPED = 1, IMGFLAG_BACKWARDS = 2, IMGFLAG_DRAWN = 4,
+ IMGFLAG_UNSCALED = 8 };
class ImageEntry {
public: