aboutsummaryrefslogtreecommitdiff
path: root/scumm
diff options
context:
space:
mode:
authorGregory Montoir2005-02-26 10:02:22 +0000
committerGregory Montoir2005-02-26 10:02:22 +0000
commit4f5589bb8b9f4a431145fd7fc931d2a0042a677f (patch)
treee1440d2758ceaf4ff740b1d4535183dd9e60bd70 /scumm
parent1d23aada61b1415e0336495f277f4cc9c9315bc8 (diff)
downloadscummvm-rg350-4f5589bb8b9f4a431145fd7fc931d2a0042a677f.tar.gz
scummvm-rg350-4f5589bb8b9f4a431145fd7fc931d2a0042a677f.tar.bz2
scummvm-rg350-4f5589bb8b9f4a431145fd7fc931d2a0042a677f.zip
fix issue in spritesBlitToScreen and added some suggestions for fields/flags renaming
svn-id: r16925
Diffstat (limited to 'scumm')
-rw-r--r--scumm/sprite_he.cpp34
-rw-r--r--scumm/sprite_he.h18
2 files changed, 26 insertions, 26 deletions
diff --git a/scumm/sprite_he.cpp b/scumm/sprite_he.cpp
index a2b4c907b6..df96e4e57c 100644
--- a/scumm/sprite_he.cpp
+++ b/scumm/sprite_he.cpp
@@ -1086,27 +1086,28 @@ void ScummEngine_v90he::spritesBlitToScreen() {
if (spi->bbox.left <= spi->bbox.right && spi->bbox.top <= spi->bbox.bottom) {
if (spi->flags & kSFBlitDirectly) {
gdi.copyVirtScreenBuffers(spi->bbox); // XXX 0, 0x40000000);
- }
- } else if (firstLoop) {
- xmin = spi->bbox.left;
- ymin = spi->bbox.top;
- xmax = spi->bbox.right;
- ymax = spi->bbox.bottom;
- firstLoop = false;
- } else {
- if (xmin < spi->bbox.left) {
+ } else if (firstLoop) {
xmin = spi->bbox.left;
- }
- if (ymin < spi->bbox.top) {
ymin = spi->bbox.top;
- }
- if (xmax > spi->bbox.right) {
xmax = spi->bbox.right;
- }
- if (ymax > spi->bbox.bottom) {
ymax = spi->bbox.bottom;
+ firstLoop = false;
+ refreshScreen = true;
+ } else {
+ if (xmin < spi->bbox.left) {
+ xmin = spi->bbox.left;
+ }
+ if (ymin < spi->bbox.top) {
+ ymin = spi->bbox.top;
+ }
+ if (xmax > spi->bbox.right) {
+ xmax = spi->bbox.right;
+ }
+ if (ymax > spi->bbox.bottom) {
+ ymax = spi->bbox.bottom;
+ }
+ refreshScreen = true;
}
- refreshScreen = true;
}
if (!(spi->flags & (kSFNeedRedraw | kSF30)) && spi->res_id) {
spi->flags |= kSFNeedRedraw;
@@ -1168,7 +1169,6 @@ void ScummEngine_v90he::spritesUpdateImages() {
spi->res_state = 0;
if (spi->imglist_num != 0) {
if (!(spi->flags & kSF25)) {
- // XXX
checkRange(_varMaxSprites, 1, spi->imglist_num, "Image list %d out of range");
uint16 img1 = _imageListTable[0x21 * spi->imglist_num - 1];
uint16 img2 = spi->field_74 + 1;
diff --git a/scumm/sprite_he.h b/scumm/sprite_he.h
index ed55a09503..f5cb946d76 100644
--- a/scumm/sprite_he.h
+++ b/scumm/sprite_he.h
@@ -56,17 +56,17 @@ enum SpriteFlags {
kSF28 = (1 << 27),
kSF29 = (1 << 28),
kSF30 = (1 << 29),
- kSF31 = (1 << 30),
+ kSF31 = (1 << 30), // kSFHasImage ?
kSF32 = (1 << 31)
};
enum SpriteGroupFlags {
- kSGF01 = 1 << 0,
- kSGF02 = 1 << 1
+ kSGF01 = 1 << 0, // kSGFClipBox
+ kSGF02 = 1 << 1 // kSGFNeedRedraw
};
struct SpriteInfo {
- int field_0;
+ int field_0; // zorder ?
int flags;
int res_id;
int res_state;
@@ -104,7 +104,7 @@ struct SpriteInfo {
struct SpriteGroup {
Common::Rect bbox;
- int field_10;
+ int field_10; // zorderPriority ?
int flags;
int tx;
int ty;
@@ -112,10 +112,10 @@ struct SpriteGroup {
int scaling;
int scale_x;
int scale_y;
- int field_30;
- int field_34;
- int field_38;
- int field_3C;
+ int field_30; // scale_x_ratio_mul
+ int field_34; // scale_x_ratio_div
+ int field_38; // scale_y_ratio_mul
+ int field_3C; // scale_y_ratio_div
};
int _varNumSpriteGroups;