aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorGregory Montoir2005-02-27 03:36:33 +0000
committerGregory Montoir2005-02-27 03:36:33 +0000
commitdecda90ffd2751a3fd989875d920e9ebf7fff341 (patch)
tree29cfcebc3d5c72018ef3c911051fd2a3bd57ed66
parenta0347d46de528dda23c07fbcc4e20a48a86f9190 (diff)
downloadscummvm-rg350-decda90ffd2751a3fd989875d920e9ebf7fff341.tar.gz
scummvm-rg350-decda90ffd2751a3fd989875d920e9ebf7fff341.tar.bz2
scummvm-rg350-decda90ffd2751a3fd989875d920e9ebf7fff341.zip
moved some variables to ScummEngine_v90he and renamed some SpriteInfo fields
svn-id: r16947
-rw-r--r--scumm/intern.h13
-rw-r--r--scumm/sprite_he.cpp22
-rw-r--r--scumm/sprite_he.h17
3 files changed, 26 insertions, 26 deletions
diff --git a/scumm/intern.h b/scumm/intern.h
index 12ec701ce2..6aa863750c 100644
--- a/scumm/intern.h
+++ b/scumm/intern.h
@@ -838,6 +838,9 @@ protected:
void o80_pickVarRandom();
};
+struct SpriteInfo;
+struct SpriteGroup;
+
class ScummEngine_v90he : public ScummEngine_v80he {
protected:
typedef void (ScummEngine_v90he::*OpcodeProcV90he)();
@@ -864,6 +867,16 @@ protected:
int _curMaxSpriteId;
int _curSpriteId;
int _curSpriteGroupId;
+ int _varNumSpriteGroups;
+ int _numSpritesToProcess;
+ int _varNumSprites;
+ int _varMaxSprites;
+ SpriteInfo *_spriteTable;
+ SpriteGroup *_spriteGroups;
+ SpriteInfo **_activeSpritesTable;
+ uint16 *_imageListTable;
+ uint16 *_imageListStack;
+ int _curSprImageListNum;
public:
ScummEngine_v90he(GameDetector *detector, OSystem *syst, const ScummGameSettings &gs, uint8 md5sum[16]) : ScummEngine_v80he(detector, syst, gs, md5sum) {}
diff --git a/scumm/sprite_he.cpp b/scumm/sprite_he.cpp
index 08ef8f312f..9ddb31ea33 100644
--- a/scumm/sprite_he.cpp
+++ b/scumm/sprite_he.cpp
@@ -80,10 +80,10 @@ int ScummEngine_v90he::findSpriteWithClassOf(int x, int y, int spriteGroupId, in
int16 x1, x2, y1, y2;
state = getWizImageStates(spi->field_80);
- state /= spi->field_48;
+ state /= spi->cur_img_state;
- x -= spi->field_34;
- y -= spi->field_38;
+ x -= spi->pos.x;
+ y -= spi->pos.y;
loadImgSpot(spi->field_4C, state, x1, y1);
loadImgSpot(spi->field_80, state, x2, y2);
@@ -104,9 +104,9 @@ int ScummEngine_v90he::findSpriteWithClassOf(int x, int y, int spriteGroupId, in
if (spi->bbox.bottom < y)
continue;
- x -= spi->field_34;
- y -= spi->field_38;
- state = spi->field_48;
+ x -= spi->pos.x;
+ y -= spi->pos.y;
+ state = spi->cur_img_state;
}
rot_angle = spi->field_68;
@@ -742,7 +742,7 @@ void ScummEngine_v90he::spriteAddImageToList(int spriteId, int imageNum, int *sp
_spriteTable[spriteId].flags &= ~(kSFImageless);
_spriteTable[spriteId].flags |= kSFChanged | kSFBlitDirectly;
_spriteTable[spriteId].field_4C = 0;
- _spriteTable[spriteId].field_48 = 0;
+ _spriteTable[spriteId].cur_img_state = 0;
_spriteTable[spriteId].res_wiz_states = 0;
}
}
@@ -1287,13 +1287,13 @@ void ScummEngine_v90he::spritesProcessWiz(bool arg) {
wiz.img.y1 = spi->ty - spr_wiz_y;
}
- spi->field_48 = wiz.img.state = res_state;
+ spi->cur_img_state = wiz.img.state = res_state;
spi->field_4C = wiz.img.resNum = res_id;
wiz.processFlags = kWPFNewState | kWPFSetPos;
spi->field_68 = spi->rot_angle;
spi->field_6C = spi->zoom;
- spi->field_34 = wiz.img.x1;
- spi->field_38 = wiz.img.y1;
+ spi->pos.x = wiz.img.x1;
+ spi->pos.y = wiz.img.y1;
bboxPtr = &spi->bbox;
if (res_id) {
rot_angle = spi->rot_angle;
@@ -1369,7 +1369,7 @@ void ScummEngine_v90he::spritesProcessWiz(bool arg) {
if (spi->group_num && (_spriteGroups[spi->group_num].flags & kSGFClipBox)) {
if (spi->bbox.intersects(_spriteGroups[spi->group_num].bbox)) {
spi->bbox.clip(_spriteGroups[spi->group_num].bbox);
- wiz.processFlags |= 0x200;
+ wiz.processFlags |= kWPFClipBox;
wiz.box = spi->bbox;
} else {
bboxPtr->left = 1234;
diff --git a/scumm/sprite_he.h b/scumm/sprite_he.h
index a99450f03a..16373fc109 100644
--- a/scumm/sprite_he.h
+++ b/scumm/sprite_he.h
@@ -76,12 +76,11 @@ struct SpriteInfo {
Common::Rect bbox;
int dx;
int dy;
- int field_34;
- int field_38;
+ Common::Point pos;
int tx;
int ty;
int field_44;
- int field_48;
+ int cur_img_state;
int field_4C;
int imglist_num;
int field_54;
@@ -118,18 +117,6 @@ struct SpriteGroup {
int scale_y_ratio_div;
};
- int _varNumSpriteGroups;
- int _numSpritesToProcess;
- int _varNumSprites;
- int _varMaxSprites;
- SpriteInfo *_spriteTable;
- SpriteGroup *_spriteGroups;
- SpriteInfo **_activeSpritesTable;
- uint16 *_imageListTable;
- uint16 *_imageListStack;
- int _curSprImageListNum;
-
-
} // End of namespace Scumm
#endif