[Scummvm-cvs-logs] CVS: scummvm/scumm sprite_he.cpp,1.131,1.132 sprite_he.h,1.37,1.38
kirben
kirben at users.sourceforge.net
Wed Apr 20 03:34:05 CEST 2005
Update of /cvsroot/scummvm/scummvm/scumm
In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv31757/scumm
Modified Files:
sprite_he.cpp sprite_he.h
Log Message:
Add some additional details for sprite fields.
Remove the unused sprite/spriteGroup fields.
Break old He90+ saves but they aren't stable anyway.
Index: sprite_he.cpp
===================================================================
RCS file: /cvsroot/scummvm/scummvm/scumm/sprite_he.cpp,v
retrieving revision 1.131
retrieving revision 1.132
diff -u -d -r1.131 -r1.132
--- sprite_he.cpp 20 Apr 2005 06:55:30 -0000 1.131
+++ sprite_he.cpp 20 Apr 2005 10:33:19 -0000 1.132
@@ -203,7 +203,7 @@
y += h / 2;
}
- if(isWizPixelNonTransparent(resId, resState, x, y, spi->imgFlags))
+ if(isWizPixelNonTransparent(resId, resState, x, y, spi->curImgFlags))
return spi->id;
}
}
@@ -379,7 +379,7 @@
switch(type) {
case 0x7B:
- return _spriteTable[spriteId].field_8C;
+ return _spriteTable[spriteId].imgFlags;
case 0x7D:
return _spriteTable[spriteId].field_90;
case 0x7E:
@@ -741,6 +741,7 @@
}
void ScummEngine_v90he::spriteInfoSet_field_8C_90(int spriteId, int type, int value) {
+ debug(0, "spriteInfoSet_field_8C_90: spriteId %d type %d", spriteId, type);
checkRange(_varNumSprites, 1, spriteId, "Invalid sprite %d");
int delay;
@@ -748,7 +749,7 @@
switch(type) {
case 0x7B:
- _spriteTable[spriteId].field_8C = value;
+ _spriteTable[spriteId].imgFlags = value;
_spriteTable[spriteId].flags |= kSFChanged | kSFNeedRedraw;
break;
case 0x7D:
@@ -793,7 +794,7 @@
_spriteTable[spriteId].field_80 = 0;
_spriteTable[spriteId].zorderPriority = 0;
_spriteTable[spriteId].field_84 = 0;
- _spriteTable[spriteId].field_8C = 0;
+ _spriteTable[spriteId].imgFlags = 0;
_spriteTable[spriteId].field_90 = 0;
}
@@ -1271,6 +1272,7 @@
wiz.img.y1 = spi->ty - spr_wiz_y;
}
+ //wiz.field_23EA = spi->field_90;
spi->curImageState = wiz.img.state = resState;
spi->curResId = wiz.img.resNum = resId;
wiz.processFlags = kWPFNewState | kWPFSetPos;
@@ -1334,11 +1336,17 @@
}
if (spr_flags & kSFNeedPaletteRemap)
wiz.img.flags |= kWIFRemapPalette;
+ if (spi->field_84) {
+ wiz.processFlags |= 0x200000;
+ //wiz.field_390 = spi->field_84;
+ //wiz.zorder = spi->zorderPriority;
+ }
if (spi->maskImgResNum) {
wiz.processFlags |= kWPFMaskImg;
wiz.maskImgResNum = spi->maskImgResNum;
}
wiz.processFlags |= kWPFNewFlags;
+ wiz.img.flags |= spi->imgFlags;
if (spr_flags & kSFRotated) {
wiz.processFlags |= kWPFRotate;
@@ -1348,7 +1356,7 @@
wiz.processFlags |= kWPFZoom;
wiz.zoom = spi->zoom;
}
- spi->imgFlags = wiz.img.flags;
+ spi->curImgFlags = wiz.img.flags;
if (spi->groupNum && (_spriteGroups[spi->groupNum].flags & kSGFClipBox)) {
if (spi->bbox.intersects(_spriteGroups[spi->groupNum].bbox)) {
@@ -1406,16 +1414,15 @@
MKLINE(SpriteInfo, delayCount, sleInt32, VER(48)),
MKLINE(SpriteInfo, curAngle, sleInt32, VER(48)),
MKLINE(SpriteInfo, curZoom, sleInt32, VER(48)),
- MKLINE(SpriteInfo, imgFlags, sleInt32, VER(48)),
+ MKLINE(SpriteInfo, curImgFlags, sleInt32, VER(48)),
MKLINE(SpriteInfo, field_74, sleInt32, VER(48)),
MKLINE(SpriteInfo, delayAmount, sleInt32, VER(48)),
MKLINE(SpriteInfo, maskImgResNum, sleInt32, VER(48)),
MKLINE(SpriteInfo, field_80, sleInt32, VER(48)),
MKLINE(SpriteInfo, field_84, sleInt32, VER(48)),
MKLINE(SpriteInfo, classFlags, sleInt32, VER(48)),
- MKLINE(SpriteInfo, field_8C, sleInt32, VER(48)),
+ MKLINE(SpriteInfo, imgFlags, sleInt32, VER(48)),
MKLINE(SpriteInfo, field_90, sleInt32, VER(48)),
- MKLINE(SpriteInfo, field_94, sleInt32, VER(48)),
MKEND()
};
@@ -1430,8 +1437,6 @@
MKLINE(SpriteGroup, ty, sleInt32, VER(48)),
MKLINE(SpriteGroup, dstResNum, sleInt32, VER(48)),
MKLINE(SpriteGroup, scaling, sleInt32, VER(48)),
- MK_OBSOLETE(SpriteGroup, scaleX, sleInt32, VER(48), VER(48)),
- MK_OBSOLETE(SpriteGroup, scaleY, sleInt32, VER(48), VER(48)),
MKLINE(SpriteGroup, scale_x_ratio_mul, sleInt32, VER(48)),
MKLINE(SpriteGroup, scale_x_ratio_div, sleInt32, VER(48)),
MKLINE(SpriteGroup, scale_y_ratio_mul, sleInt32, VER(48)),
Index: sprite_he.h
===================================================================
RCS file: /cvsroot/scummvm/scummvm/scumm/sprite_he.h,v
retrieving revision 1.37
retrieving revision 1.38
diff -u -d -r1.37 -r1.38
--- sprite_he.h 20 Apr 2005 05:24:02 -0000 1.37
+++ sprite_he.h 20 Apr 2005 10:33:20 -0000 1.38
@@ -72,16 +72,15 @@
int32 delayCount;
int32 curAngle;
int32 curZoom;
- int32 imgFlags;
+ int32 curImgFlags;
int32 field_74;
int32 delayAmount;
int32 maskImgResNum;
int32 field_80;
int32 field_84;
int32 classFlags;
- int32 field_8C;
+ int32 imgFlags;
int32 field_90;
- int32 field_94;
};
struct SpriteGroup {
@@ -92,8 +91,6 @@
int32 ty;
int32 dstResNum;
int32 scaling;
-// int32 scaleX;
-// int32 scaleY;
int32 scale_x_ratio_mul;
int32 scale_x_ratio_div;
int32 scale_y_ratio_mul;
More information about the Scummvm-git-logs
mailing list