diff options
author | Eugene Sandulenko | 2005-02-20 15:05:18 +0000 |
---|---|---|
committer | Eugene Sandulenko | 2005-02-20 15:05:18 +0000 |
commit | 79a04349716a45e01ef4ab89aac9ab1b1ab867aa (patch) | |
tree | b2aa997d62b99731698b9f7f9442b612e556e5a1 /scumm | |
parent | 6abdb969813e3a2e6c7f8dfe3fda8cdeb56fb54a (diff) | |
download | scummvm-rg350-79a04349716a45e01ef4ab89aac9ab1b1ab867aa.tar.gz scummvm-rg350-79a04349716a45e01ef4ab89aac9ab1b1ab867aa.tar.bz2 scummvm-rg350-79a04349716a45e01ef4ab89aac9ab1b1ab867aa.zip |
Sprite flags and one rename in SpriteInfo structure.
svn-id: r16825
Diffstat (limited to 'scumm')
-rw-r--r-- | scumm/sprite_he.cpp | 24 | ||||
-rw-r--r-- | scumm/sprite_he.h | 37 |
2 files changed, 44 insertions, 17 deletions
diff --git a/scumm/sprite_he.cpp b/scumm/sprite_he.cpp index e23e8bec0c..ef7b5bc711 100644 --- a/scumm/sprite_he.cpp +++ b/scumm/sprite_he.cpp @@ -40,57 +40,49 @@ void ScummEngine_v90he::allocateArrays() { int ScummEngine_v90he::spriteInfoGet_flags_1(int spriteNum) { checkRange(_numSprites, 1, spriteNum, "_spriteTableGet_flags_1: Invalid sprite %d"); - int val = _spriteTable[spriteNum].flags >> 0xE; - return (val & 1); + return (_spriteTable[spriteNum].flags & kSF15 != 0) ? 1 : 0; } int ScummEngine_v90he::spriteInfoGet_flags_2(int spriteNum) { checkRange(_numSprites, 1, spriteNum, "_spriteTableGet_flags_2: Invalid sprite %d"); - int val = _spriteTable[spriteNum].flags >> 0xD; - return (val & 1); + return (_spriteTable[spriteNum].flags & kSF14 != 0) ? 1 : 0; } int ScummEngine_v90he::spriteInfoGet_flags_3(int spriteNum) { checkRange(_numSprites, 1, spriteNum, "_spriteTableGet_flags_3: Invalid sprite %d"); - int val = _spriteTable[spriteNum].flags >> 0xF; - return (val & 1); + return (_spriteTable[spriteNum].flags & kSF16 != 0) ? 1 : 0; } int ScummEngine_v90he::spriteInfoGet_flags_4(int spriteNum) { checkRange(_numSprites, 1, spriteNum, "_spriteTableGet_flags_4: Invalid sprite %d"); - int val = _spriteTable[spriteNum].flags >> 0xC; - return (val & 1); + return (_spriteTable[spriteNum].flags & kSF13 != 0) ? 1 : 0; } int ScummEngine_v90he::spriteInfoGet_flags_5(int spriteNum) { checkRange(_numSprites, 1, spriteNum, "_spriteTableGet_flags_5: Invalid sprite %d"); - int val = _spriteTable[spriteNum].flags >> 0x13; - return (val & 1); + return (_spriteTable[spriteNum].flags & kSF20 != 0) ? 1 : 0; } int ScummEngine_v90he::spriteInfoGet_flags_6(int spriteNum) { checkRange(_numSprites, 1, spriteNum, "_spriteTableGet_flags_6: Invalid sprite %d"); - int val = _spriteTable[spriteNum].flags; - return (val & 0x200000); + return _spriteTable[spriteNum].flags & kSF22; } int ScummEngine_v90he::spriteInfoGet_flags_7(int spriteNum) { checkRange(_numSprites, 1, spriteNum, "_spriteTableGet_flags_7: Invalid sprite %d"); - int val = _spriteTable[spriteNum].flags >> 0x16; - return (val & 1); + return (_spriteTable[spriteNum].flags & kSF23 != 0) ? 1 : 0; } int ScummEngine_v90he::spriteInfoGet_flags_8(int spriteNum) { checkRange(_numSprites, 1, spriteNum, "_spriteTableGet_flags_8: Invalid sprite %d"); - int val = _spriteTable[spriteNum].flags >> 0x1E; - return (val & 1); + return (_spriteTable[spriteNum].flags & kSF31 != 0) ? 1 : 0; } } // End of namespace Scumm diff --git a/scumm/sprite_he.h b/scumm/sprite_he.h index 4684500ffa..910ce1c490 100644 --- a/scumm/sprite_he.h +++ b/scumm/sprite_he.h @@ -25,6 +25,41 @@ namespace Scumm { +enum SpriteFlags { + kSF1 = (1 << 0), + kSF2 = (1 << 1), + kSF3 = (1 << 2), + kSF4 = (1 << 3), + kSFZoomed = (1 << 4), + kSFRotated = (1 << 5), + kSF7 = (1 << 6), + kSF8 = (1 << 7), + kSF9 = (1 << 8), + kSF10 = (1 << 9), + kSF11 = (1 << 10), + kSF12 = (1 << 11), + kSF13 = (1 << 12), + kSF14 = (1 << 13), + kSF15 = (1 << 14), + kSF16 = (1 << 15), + kSF17 = (1 << 16), + kSF18 = (1 << 17), + kSF19 = (1 << 18), + kSF20 = (1 << 19), + kSF21 = (1 << 20), + kSF22 = (1 << 21), + kSF23 = (1 << 22), + kSF24 = (1 << 23), + kSF25 = (1 << 24), + kSF26 = (1 << 25), + kSF27 = (1 << 26), + kSF28 = (1 << 27), + kSF29 = (1 << 28), + kSF30 = (1 << 29), + kSF31 = (1 << 30), + kSF32 = (1 << 31) +}; + struct SpriteInfo { int field_0; int flags; @@ -48,7 +83,7 @@ struct SpriteInfo { int field_4C; int imglist_num; int field_54; - int res_wiz_size; + int res_wiz_states; int rot_angle; int zoom; int field_64; |