aboutsummaryrefslogtreecommitdiff
path: root/engines/mads/sprites.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'engines/mads/sprites.cpp')
-rw-r--r--engines/mads/sprites.cpp24
1 files changed, 12 insertions, 12 deletions
diff --git a/engines/mads/sprites.cpp b/engines/mads/sprites.cpp
index 226835bb23..442125e929 100644
--- a/engines/mads/sprites.cpp
+++ b/engines/mads/sprites.cpp
@@ -139,7 +139,7 @@ byte MSprite::getTransparencyIndex() const {
MADSEngine *SpriteSlot::_vm = nullptr;
SpriteSlot::SpriteSlot() {
- _SlotType = ST_NONE;
+ _flags = IMG_STATIC;
_seqIndex = 0;
_spritesIndex = 0;
_frameNumber = 0;
@@ -147,8 +147,8 @@ SpriteSlot::SpriteSlot() {
_scale = 0;
}
-SpriteSlot::SpriteSlot(SlotType type, int seqIndex) {
- _SlotType = type;
+SpriteSlot::SpriteSlot(SpriteFlags type, int seqIndex) {
+ _flags = type;
_seqIndex = seqIndex;
_spritesIndex = 0;
_frameNumber = 0;
@@ -183,7 +183,7 @@ void SpriteSlots::reset(bool flag) {
_vm->_game->_scene._sprites.clear();
Common::Array<SpriteSlot>::clear();
- push_back(SpriteSlot(ST_FULL_SCREEN_REFRESH, -1));
+ push_back(SpriteSlot(IMG_REFRESH, -1));
}
void SpriteSlots::deleteEntry(int index) {
@@ -194,11 +194,11 @@ void SpriteSlots::setDirtyAreas() {
Scene &scene = _vm->_game->_scene;
for (uint i = 0; i < size(); ++i) {
- if ((*this)[i]._SlotType >= ST_NONE) {
+ if ((*this)[i]._flags >= IMG_STATIC) {
scene._dirtyAreas[i].setSpriteSlot(&(*this)[i]);
- scene._dirtyAreas[i]._textActive = ((*this)[i]._SlotType <= ST_NONE) ? 0 : 1;
- (*this)[i]._SlotType = ST_NONE;
+ scene._dirtyAreas[i]._textActive = ((*this)[i]._flags <= IMG_STATIC) ? 0 : 1;
+ (*this)[i]._flags = IMG_STATIC;
}
}
}
@@ -207,7 +207,7 @@ void SpriteSlots::fullRefresh(bool clearAll) {
if (clearAll)
Common::Array<SpriteSlot>::clear();
- push_back(SpriteSlot(ST_FULL_SCREEN_REFRESH, -1));
+ push_back(SpriteSlot(IMG_REFRESH, -1));
}
void SpriteSlots::deleteTimer(int seqIndex) {
@@ -233,14 +233,14 @@ void SpriteSlots::drawBackground() {
SpriteSlot &spriteSlot = (*this)[i];
DirtyArea &dirtyArea = scene._dirtyAreas[i];
- if (spriteSlot._SlotType >= ST_NONE) {
+ if (spriteSlot._flags >= IMG_STATIC) {
// Foreground sprite, so we can ignore it
dirtyArea._active = false;
} else {
dirtyArea._active = true;
dirtyArea.setSpriteSlot(&spriteSlot);
- if (spriteSlot._SlotType == ST_BACKGROUND) {
+ if (spriteSlot._flags == IMG_DELTA) {
// Background object, so need to draw it
assert(spriteSlot._frameNumber > 0);
SpriteAsset *asset = scene._sprites[spriteSlot._spritesIndex];
@@ -290,7 +290,7 @@ void SpriteSlots::drawForeground(MSurface *s) {
// Get a list of sprite object depths for active objects
for (uint i = 0; i < size(); ++i) {
SpriteSlot &spriteSlot = (*this)[i];
- if (spriteSlot._SlotType >= ST_NONE) {
+ if (spriteSlot._flags >= IMG_STATIC) {
DepthEntry rec(16 - spriteSlot._depth, i);
depthList.push_back(rec);
}
@@ -353,7 +353,7 @@ void SpriteSlots::drawForeground(MSurface *s) {
void SpriteSlots::cleanUp() {
for (int i = (int)size() - 1; i >= 0; --i) {
- if ((*this)[i]._SlotType < ST_NONE)
+ if ((*this)[i]._flags < IMG_STATIC)
remove_at(i);
}
}