moved some variables to ScummEngine_v90he and renamed some SpriteInfo fields
svn-id: r16947
This commit is contained in:
parent
a0347d46de
commit
decda90ffd
3 changed files with 26 additions and 26 deletions
|
@ -838,6 +838,9 @@ protected:
|
||||||
void o80_pickVarRandom();
|
void o80_pickVarRandom();
|
||||||
};
|
};
|
||||||
|
|
||||||
|
struct SpriteInfo;
|
||||||
|
struct SpriteGroup;
|
||||||
|
|
||||||
class ScummEngine_v90he : public ScummEngine_v80he {
|
class ScummEngine_v90he : public ScummEngine_v80he {
|
||||||
protected:
|
protected:
|
||||||
typedef void (ScummEngine_v90he::*OpcodeProcV90he)();
|
typedef void (ScummEngine_v90he::*OpcodeProcV90he)();
|
||||||
|
@ -864,6 +867,16 @@ protected:
|
||||||
int _curMaxSpriteId;
|
int _curMaxSpriteId;
|
||||||
int _curSpriteId;
|
int _curSpriteId;
|
||||||
int _curSpriteGroupId;
|
int _curSpriteGroupId;
|
||||||
|
int _varNumSpriteGroups;
|
||||||
|
int _numSpritesToProcess;
|
||||||
|
int _varNumSprites;
|
||||||
|
int _varMaxSprites;
|
||||||
|
SpriteInfo *_spriteTable;
|
||||||
|
SpriteGroup *_spriteGroups;
|
||||||
|
SpriteInfo **_activeSpritesTable;
|
||||||
|
uint16 *_imageListTable;
|
||||||
|
uint16 *_imageListStack;
|
||||||
|
int _curSprImageListNum;
|
||||||
|
|
||||||
public:
|
public:
|
||||||
ScummEngine_v90he(GameDetector *detector, OSystem *syst, const ScummGameSettings &gs, uint8 md5sum[16]) : ScummEngine_v80he(detector, syst, gs, md5sum) {}
|
ScummEngine_v90he(GameDetector *detector, OSystem *syst, const ScummGameSettings &gs, uint8 md5sum[16]) : ScummEngine_v80he(detector, syst, gs, md5sum) {}
|
||||||
|
|
|
@ -80,10 +80,10 @@ int ScummEngine_v90he::findSpriteWithClassOf(int x, int y, int spriteGroupId, in
|
||||||
int16 x1, x2, y1, y2;
|
int16 x1, x2, y1, y2;
|
||||||
|
|
||||||
state = getWizImageStates(spi->field_80);
|
state = getWizImageStates(spi->field_80);
|
||||||
state /= spi->field_48;
|
state /= spi->cur_img_state;
|
||||||
|
|
||||||
x -= spi->field_34;
|
x -= spi->pos.x;
|
||||||
y -= spi->field_38;
|
y -= spi->pos.y;
|
||||||
|
|
||||||
loadImgSpot(spi->field_4C, state, x1, y1);
|
loadImgSpot(spi->field_4C, state, x1, y1);
|
||||||
loadImgSpot(spi->field_80, state, x2, y2);
|
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)
|
if (spi->bbox.bottom < y)
|
||||||
continue;
|
continue;
|
||||||
|
|
||||||
x -= spi->field_34;
|
x -= spi->pos.x;
|
||||||
y -= spi->field_38;
|
y -= spi->pos.y;
|
||||||
state = spi->field_48;
|
state = spi->cur_img_state;
|
||||||
}
|
}
|
||||||
|
|
||||||
rot_angle = spi->field_68;
|
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 &= ~(kSFImageless);
|
||||||
_spriteTable[spriteId].flags |= kSFChanged | kSFBlitDirectly;
|
_spriteTable[spriteId].flags |= kSFChanged | kSFBlitDirectly;
|
||||||
_spriteTable[spriteId].field_4C = 0;
|
_spriteTable[spriteId].field_4C = 0;
|
||||||
_spriteTable[spriteId].field_48 = 0;
|
_spriteTable[spriteId].cur_img_state = 0;
|
||||||
_spriteTable[spriteId].res_wiz_states = 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;
|
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;
|
spi->field_4C = wiz.img.resNum = res_id;
|
||||||
wiz.processFlags = kWPFNewState | kWPFSetPos;
|
wiz.processFlags = kWPFNewState | kWPFSetPos;
|
||||||
spi->field_68 = spi->rot_angle;
|
spi->field_68 = spi->rot_angle;
|
||||||
spi->field_6C = spi->zoom;
|
spi->field_6C = spi->zoom;
|
||||||
spi->field_34 = wiz.img.x1;
|
spi->pos.x = wiz.img.x1;
|
||||||
spi->field_38 = wiz.img.y1;
|
spi->pos.y = wiz.img.y1;
|
||||||
bboxPtr = &spi->bbox;
|
bboxPtr = &spi->bbox;
|
||||||
if (res_id) {
|
if (res_id) {
|
||||||
rot_angle = spi->rot_angle;
|
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->group_num && (_spriteGroups[spi->group_num].flags & kSGFClipBox)) {
|
||||||
if (spi->bbox.intersects(_spriteGroups[spi->group_num].bbox)) {
|
if (spi->bbox.intersects(_spriteGroups[spi->group_num].bbox)) {
|
||||||
spi->bbox.clip(_spriteGroups[spi->group_num].bbox);
|
spi->bbox.clip(_spriteGroups[spi->group_num].bbox);
|
||||||
wiz.processFlags |= 0x200;
|
wiz.processFlags |= kWPFClipBox;
|
||||||
wiz.box = spi->bbox;
|
wiz.box = spi->bbox;
|
||||||
} else {
|
} else {
|
||||||
bboxPtr->left = 1234;
|
bboxPtr->left = 1234;
|
||||||
|
|
|
@ -76,12 +76,11 @@ struct SpriteInfo {
|
||||||
Common::Rect bbox;
|
Common::Rect bbox;
|
||||||
int dx;
|
int dx;
|
||||||
int dy;
|
int dy;
|
||||||
int field_34;
|
Common::Point pos;
|
||||||
int field_38;
|
|
||||||
int tx;
|
int tx;
|
||||||
int ty;
|
int ty;
|
||||||
int field_44;
|
int field_44;
|
||||||
int field_48;
|
int cur_img_state;
|
||||||
int field_4C;
|
int field_4C;
|
||||||
int imglist_num;
|
int imglist_num;
|
||||||
int field_54;
|
int field_54;
|
||||||
|
@ -118,18 +117,6 @@ struct SpriteGroup {
|
||||||
int scale_y_ratio_div;
|
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
|
} // End of namespace Scumm
|
||||||
|
|
||||||
#endif
|
#endif
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue