aboutsummaryrefslogtreecommitdiff
path: root/scumm
diff options
context:
space:
mode:
authorEugene Sandulenko2005-02-24 23:11:50 +0000
committerEugene Sandulenko2005-02-24 23:11:50 +0000
commit451527e2afef3cd37213961288a3efad159d362e (patch)
tree6edde1dd0ae7c1ce180bb709147f78f402dc2527 /scumm
parent84453d572520a2c4b27d897ce223da9e00920acf (diff)
downloadscummvm-rg350-451527e2afef3cd37213961288a3efad159d362e.tar.gz
scummvm-rg350-451527e2afef3cd37213961288a3efad159d362e.tar.bz2
scummvm-rg350-451527e2afef3cd37213961288a3efad159d362e.zip
Rename sprite flags as suggested:
kSF22 -> kSFYFlipped kSF23 -> kSFXFlipped svn-id: r16903
Diffstat (limited to 'scumm')
-rw-r--r--scumm/intern.h8
-rw-r--r--scumm/script_v100he.cpp8
-rw-r--r--scumm/script_v90he.cpp8
-rw-r--r--scumm/sprite_he.cpp40
-rw-r--r--scumm/sprite_he.h4
5 files changed, 34 insertions, 34 deletions
diff --git a/scumm/intern.h b/scumm/intern.h
index df4950ddb8..3e48bdf504 100644
--- a/scumm/intern.h
+++ b/scumm/intern.h
@@ -883,8 +883,8 @@ protected:
int spriteInfoGet_flags_15(int spriteId);
int spriteInfoGet_flagActive(int spriteId);
int spriteInfoGet_flags_20(int spriteId);
- int spriteInfoGet_flags_22(int spriteId);
- int spriteInfoGet_flags_23(int spriteId);
+ int spriteInfoGet_flagYFlipped(int spriteId);
+ int spriteInfoGet_flagXFlipped(int spriteId);
int spriteInfoGet_flags_31(int spriteId);
int spriteInfoGet_resId(int spriteId);
int spriteInfoGet_resState(int spriteId);
@@ -933,8 +933,8 @@ protected:
void spriteInfoSet_flag15(int spriteId, int value);
void spriteInfoSet_flagActive(int spriteId, int value);
void spriteInfoSet_flag20(int spriteId, int value);
- void spriteInfoSet_flag22(int spriteId, int value);
- void spriteInfoSet_flags23_26(int spriteId, int value);
+ void spriteInfoSet_flagYFlipped(int spriteId, int value);
+ void spriteInfoSet_flagXFlipped(int spriteId, int value);
void spriteInfoSet_flag31(int spriteId, int value);
void spriteInfoSet_field_78_64(int spriteId, int value);
void spriteInfoSet_setClassFlags(int spriteId, int value);
diff --git a/scumm/script_v100he.cpp b/scumm/script_v100he.cpp
index e2f1c10a16..9180e27a53 100644
--- a/scumm/script_v100he.cpp
+++ b/scumm/script_v100he.cpp
@@ -1617,7 +1617,7 @@ void ScummEngine_v100he::o100_setSpriteInfo() {
spriteId++;
for (; spriteId <= _curMaxSpriteId; spriteId++)
- spriteInfoSet_flag22(spriteId, args[0]);
+ spriteInfoSet_flagYFlipped(spriteId, args[0]);
break;
case 4:
args[0] = pop();
@@ -1887,7 +1887,7 @@ void ScummEngine_v100he::o100_setSpriteInfo() {
spriteId++;
for (; spriteId <= _curMaxSpriteId; spriteId++)
- spriteInfoSet_flags23_26(spriteId, args[0]);
+ spriteInfoSet_flagXFlipped(spriteId, args[0]);
break;
case 83:
args[1] = pop();
@@ -2361,7 +2361,7 @@ void ScummEngine_v100he::o100_getSpriteInfo() {
case 3:
spriteId = pop();
if (spriteId)
- push(spriteInfoGet_flags_22(spriteId));
+ push(spriteInfoGet_flagYFlipped(spriteId));
else
push(0);
break;
@@ -2546,7 +2546,7 @@ void ScummEngine_v100he::o100_getSpriteInfo() {
case 82:
spriteId = pop();
if (spriteId)
- push(spriteInfoGet_flags_23(spriteId));
+ push(spriteInfoGet_flagXFlipped(spriteId));
else
push(0);
break;
diff --git a/scumm/script_v90he.cpp b/scumm/script_v90he.cpp
index 78673ec45d..90276a1934 100644
--- a/scumm/script_v90he.cpp
+++ b/scumm/script_v90he.cpp
@@ -874,7 +874,7 @@ void ScummEngine_v90he::o90_getSpriteInfo() {
case 52:
spriteId = pop();
if (spriteId)
- push(spriteInfoGet_flags_22(spriteId));
+ push(spriteInfoGet_flagYFlipped(spriteId));
else
push(0);
break;
@@ -909,7 +909,7 @@ void ScummEngine_v90he::o90_getSpriteInfo() {
case 94:
spriteId = pop();
if (spriteId)
- push(spriteInfoGet_flags_23(spriteId));
+ push(spriteInfoGet_flagXFlipped(spriteId));
else
push(0);
break;
@@ -1156,7 +1156,7 @@ void ScummEngine_v90he::o90_setSpriteInfo() {
spriteId++;
for (; spriteId <= _curMaxSpriteId; spriteId++)
- spriteInfoSet_flag22(spriteId, args[0]);
+ spriteInfoSet_flagYFlipped(spriteId, args[0]);
break;
case 52: // HE 98+
args[0] = pop();
@@ -1211,7 +1211,7 @@ void ScummEngine_v90he::o90_setSpriteInfo() {
spriteId++;
for (; spriteId <= _curMaxSpriteId; spriteId++)
- spriteInfoSet_flags23_26(spriteId, args[0]);
+ spriteInfoSet_flagXFlipped(spriteId, args[0]);
break;
case 91:
n = getStackList(args, ARRAYSIZE(args));
diff --git a/scumm/sprite_he.cpp b/scumm/sprite_he.cpp
index de9b296698..cf7000700d 100644
--- a/scumm/sprite_he.cpp
+++ b/scumm/sprite_he.cpp
@@ -102,16 +102,16 @@ int ScummEngine_v90he::spriteInfoGet_flags_20(int spriteId) {
return ((_spriteTable[spriteId].flags & kSF20) != 0) ? 1 : 0;
}
-int ScummEngine_v90he::spriteInfoGet_flags_22(int spriteId) {
+int ScummEngine_v90he::spriteInfoGet_flagYFlipped(int spriteId) {
checkRange(_varNumSprites, 1, spriteId, "Invalid sprite %d");
- return ((_spriteTable[spriteId].flags & kSF22) != 0) ? 1 : 0;
+ return ((_spriteTable[spriteId].flags & kSFYFlipped) != 0) ? 1 : 0;
}
-int ScummEngine_v90he::spriteInfoGet_flags_23(int spriteId) {
+int ScummEngine_v90he::spriteInfoGet_flagXFlipped(int spriteId) {
checkRange(_varNumSprites, 1, spriteId, "Invalid sprite %d");
- return ((_spriteTable[spriteId].flags & kSF23) != 0) ? 1 : 0;
+ return ((_spriteTable[spriteId].flags & kSFXFlipped) != 0) ? 1 : 0;
}
int ScummEngine_v90he::spriteInfoGet_flags_31(int spriteId) {
@@ -492,22 +492,22 @@ void ScummEngine_v90he::spriteInfoSet_flag20(int spriteId, int value) {
_spriteTable[spriteId].flags |= kSFChanged | kSFNeedRedraw;
}
-void ScummEngine_v90he::spriteInfoSet_flag22(int spriteId, int value) {
+void ScummEngine_v90he::spriteInfoSet_flagYFlipped(int spriteId, int value) {
checkRange(_varNumSprites, 1, spriteId, "Invalid sprite %d");
if (value)
- _spriteTable[spriteId].flags |= kSF22;
+ _spriteTable[spriteId].flags |= kSFYFlipped;
else
- _spriteTable[spriteId].flags &= ~(kSFChanged | kSF22);
+ _spriteTable[spriteId].flags &= ~(kSFChanged | kSFYFlipped);
}
-void ScummEngine_v90he::spriteInfoSet_flags23_26(int spriteId, int value) {
+void ScummEngine_v90he::spriteInfoSet_flagXFlipped(int spriteId, int value) {
checkRange(_varNumSprites, 1, spriteId, "Invalid sprite %d");
if (value)
- _spriteTable[spriteId].flags |= kSF23 | kSFBlitDirectly;
+ _spriteTable[spriteId].flags |= kSFXFlipped | kSFBlitDirectly;
else
- _spriteTable[spriteId].flags &= ~(kSFChanged | kSF23 | kSFBlitDirectly);
+ _spriteTable[spriteId].flags &= ~(kSFChanged | kSFXFlipped | kSFBlitDirectly);
}
void ScummEngine_v90he::spriteInfoSet_flag31(int spriteId, int value) {
@@ -635,7 +635,7 @@ void ScummEngine_v90he::spriteAddImageToList(int spriteId, int imageNum, int *sp
if (_spriteTable[spriteId].res_id) {
_spriteTable[spriteId].res_wiz_states = getWizImageStates(_spriteTable[spriteId].res_id);
- _spriteTable[spriteId].flags |= kSFActive | kSF22 | kSF23 | kSFBlitDirectly;
+ _spriteTable[spriteId].flags |= kSFActive | kSFYFlipped | kSFXFlipped | kSFBlitDirectly;
if (_spriteTable[spriteId].res_id == origResId &&
_spriteTable[spriteId].res_wiz_states == spriteId)
@@ -703,9 +703,9 @@ void ScummEngine_v90he::spriteGroupSet_case0_3(int spriteGroupId, int value) {
for (int i = 1; i < _varNumSprites; i++) {
if (_spriteTable[i].group_num == spriteGroupId) {
if (value)
- _spriteTable[i].flags |= kSF23 | kSFBlitDirectly;
+ _spriteTable[i].flags |= kSFXFlipped | kSFBlitDirectly;
else
- _spriteTable[i].flags &= ~(kSFChanged | kSF23 | kSFBlitDirectly);
+ _spriteTable[i].flags &= ~(kSFChanged | kSFXFlipped | kSFBlitDirectly);
}
}
}
@@ -736,9 +736,9 @@ void ScummEngine_v90he::spriteGroupSet_case0_6(int spriteGroupId, int value) {
for (int i = 1; i < _varNumSprites; i++) {
if (_spriteTable[i].group_num == spriteGroupId) {
if (value)
- _spriteTable[i].flags |= kSF22;
+ _spriteTable[i].flags |= kSFYFlipped;
else
- _spriteTable[i].flags &= ~(kSFChanged | kSF22);
+ _spriteTable[i].flags &= ~(kSFChanged | kSFYFlipped);
}
}
}
@@ -1026,7 +1026,7 @@ void ScummEngine_v90he::spritesMarkDirty(bool unkFlag) {
for (int i = 0; i < _numSpritesToProcess; ++i) {
SpriteInfo *spi = _activeSpritesTable[i];
if (!(spi->flags & (kSFNeedRedraw | kSF30))) {
- if ((!unkFlag || spi->field_18 >= 0) && (spi->flags & kSF23)) {
+ if ((!unkFlag || spi->field_18 >= 0) && (spi->flags & kSFXFlipped)) {
bool needRedraw = false;
int lp = MIN(79, spi->bbox.left / 8);
int rp = MIN(79, (spi->bbox.right + 7) / 8);
@@ -1057,7 +1057,7 @@ void ScummEngine_v90he::spritesUpdateImages() {
spi->flags |= kSFChanged | kSFNeedRedraw;
}
}
- if (spi->flags & kSF22) {
+ if (spi->flags & kSFYFlipped) {
if (spi->field_78 != 0) {
--spi->field_64;
if (spi->field_64 != 0) {
@@ -1120,7 +1120,7 @@ void ScummEngine_v90he::spritesSortActiveSprites() {
SpriteInfo *spi = &_spriteTable[i];
if (spi->flags & kSFActive) {
- if (!spi->flags & kSF23) {
+ if (!spi->flags & kSFXFlipped) {
if (!(spi->flags & kSF30))
spi->flags |= kSFNeedRedraw;
if (!(spi->flags & kSF31))
@@ -1237,9 +1237,9 @@ void ScummEngine_v90he::spritesProcessWiz(bool arg) {
}
wiz.img.flags = 0x10;
- if (spr_flags & kSF23)
+ if (spr_flags & kSFXFlipped)
wiz.img.flags |= kWIFFlipX;
- if (spr_flags & kSF22)
+ if (spr_flags & kSFYFlipped)
wiz.img.flags |= kWIFFlipY;
if (spr_flags & kSF21) {
wiz.img.flags &= ~(0x11);
diff --git a/scumm/sprite_he.h b/scumm/sprite_he.h
index a8e5546b07..14b26ab371 100644
--- a/scumm/sprite_he.h
+++ b/scumm/sprite_he.h
@@ -47,8 +47,8 @@ enum SpriteFlags {
kSF19 = (1 << 18),
kSF20 = (1 << 19),
kSF21 = (1 << 20),
- kSF22 = (1 << 21), // kSFYFlipped
- kSF23 = (1 << 22), // kSFXFlipped
+ kSFYFlipped = (1 << 21),
+ kSFXFlipped = (1 << 22),
kSF24 = (1 << 23),
kSF25 = (1 << 24),
kSFBlitDirectly = (1 << 25),