aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorTravis Howell2005-04-03 02:24:28 +0000
committerTravis Howell2005-04-03 02:24:28 +0000
commit27cba7619ec217d541d7160bb7daa00cb9b30b83 (patch)
tree0b8757ed01e411548fed99c805ed278c6d168322
parent2e1ce57b5f72823a8ce8bce0bf8826162897822f (diff)
downloadscummvm-rg350-27cba7619ec217d541d7160bb7daa00cb9b30b83.tar.gz
scummvm-rg350-27cba7619ec217d541d7160bb7daa00cb9b30b83.tar.bz2
scummvm-rg350-27cba7619ec217d541d7160bb7daa00cb9b30b83.zip
More sprite renames
svn-id: r17342
-rw-r--r--scumm/intern.h14
-rw-r--r--scumm/script_v100he.cpp14
-rw-r--r--scumm/script_v72he.cpp7
-rw-r--r--scumm/script_v90he.cpp15
-rw-r--r--scumm/sprite_he.cpp18
-rw-r--r--scumm/sprite_he.h2
6 files changed, 34 insertions, 36 deletions
diff --git a/scumm/intern.h b/scumm/intern.h
index 296402358d..eb0a816e2d 100644
--- a/scumm/intern.h
+++ b/scumm/intern.h
@@ -928,7 +928,7 @@ protected:
int spriteInfoGet_flagXFlipped(int spriteId);
int spriteInfoGet_flagActive(int spriteId);
int spriteInfoGet_flagNeedPaletteRemap(int spriteId);
- int spriteInfoGet_flags_22(int spriteId);
+ int spriteInfoGet_flagDelayed(int spriteId);
int spriteInfoGet_flagMarkDirty(int spriteId);
int spriteInfoGet_flagHasImage(int spriteId);
int spriteInfoGet_resId(int spriteId);
@@ -939,7 +939,7 @@ protected:
int spriteInfoGet_grp_tx(int spriteId);
int spriteInfoGet_grp_ty(int spriteId);
int spriteInfoGet_field_44(int spriteId);
- int spriteInfoGet_field_54(int spriteId);
+ int spriteInfoGet_xmapNum(int spriteId);
int spriteInfoGet_wizSize(int spriteId);
int spriteInfoGet_zoom(int spriteId);
int spriteInfoGet_delayAmount(int spriteId);
@@ -952,7 +952,7 @@ protected:
int spriteGroupGet_allocateGroupSpritesList(int spriteGroupId);
int spriteGroupGet_zorderPriority(int spriteGroupId);
- int spriteGroupGet_field_20(int spriteGroupId);
+ int spriteGroupGet_dstResNum(int spriteGroupId);
int spriteGroupGet_scale_x_ratio_mul(int spriteGroupId);
int spriteGroupGet_scale_x_ratio_div(int spriteGroupId);
int spriteGroupGet_scale_y_ratio_mul(int spriteGroupId);
@@ -967,18 +967,18 @@ protected:
void spriteInfoSet_tx_ty(int spriteId, int value1, int value2);
void spriteInfoSet_groupNum(int spriteId, int value);
void spriteInfoSet_dx_dy(int spriteId, int value1, int value2);
- void spriteInfoSet_field_54(int spriteId, int value);
+ void spriteInfoSet_xmapNum(int spriteId, int value);
void spriteInfoSet_field_44(int spriteId, int value1, int value2);
void spriteInfoSet_zorderPriority(int spriteId, int value);
void spriteInfoSet_Inc_tx_ty(int spriteId, int value1, int value2);
void spriteInfoSet_zoom(int spriteId, int value);
- void spriteInfoSet_rotAngle(int spriteId, int value);
+ void spriteInfoSet_angle(int spriteId, int value);
void spriteInfoSet_flagDoubleBuffered(int spriteId, int value);
void spriteInfoSet_flagYFlipped(int spriteId, int value);
void spriteInfoSet_flagXFlipped(int spriteId, int value);
void spriteInfoSet_flagActive(int spriteId, int value);
void spriteInfoSet_flagNeedPaletteRemap(int spriteId, int value);
- void spriteInfoSet_flag22(int spriteId, int value);
+ void spriteInfoSet_flagDelayed(int spriteId, int value);
void spriteInfoSet_flagMarkDirty(int spriteId, int value);
void spriteInfoSet_flagHasImage(int spriteId, int value);
void spriteInfoSet_delay(int spriteId, int value);
@@ -1000,7 +1000,7 @@ protected:
void spriteGroupSet_zorderPriority(int spriteGroupId, int value);
void spriteGroupSet_tx_ty(int spriteGroupId, int value1, int value2);
void spriteGroupSet_inc_tx_ty(int spriteGroupId, int value1, int value2);
- void spriteGroupSet_field_20(int spriteGroupId, int value);
+ void spriteGroupSet_dstResNum(int spriteGroupId, int value);
void spriteGroupSet_scaling(int spriteGroupId);
void spriteGroupSet_scale_x_ratio_mul(int spriteGroupId, int value);
void spriteGroupSet_scale_x_ratio_div(int spriteGroupId, int value);
diff --git a/scumm/script_v100he.cpp b/scumm/script_v100he.cpp
index 8c807887fa..4747dc4d0c 100644
--- a/scumm/script_v100he.cpp
+++ b/scumm/script_v100he.cpp
@@ -1009,7 +1009,7 @@ void ScummEngine_v100he::o100_setSpriteGroupInfo() {
if (!_curSpriteGroupId)
break;
- spriteGroupSet_field_20(_curSpriteGroupId, value1);
+ spriteGroupSet_dstResNum(_curSpriteGroupId, value1);
break;
case 49:
value2 = pop();
@@ -1747,7 +1747,7 @@ void ScummEngine_v100he::o100_setSpriteInfo() {
spriteId++;
for (; spriteId <= _curMaxSpriteId; spriteId++)
- spriteInfoSet_rotAngle(spriteId, args[0]);
+ spriteInfoSet_angle(spriteId, args[0]);
break;
case 3:
args[0] = pop();
@@ -1758,7 +1758,7 @@ void ScummEngine_v100he::o100_setSpriteInfo() {
spriteId++;
for (; spriteId <= _curMaxSpriteId; spriteId++)
- spriteInfoSet_flag22(spriteId, args[0]);
+ spriteInfoSet_flagDelayed(spriteId, args[0]);
break;
case 4:
args[0] = pop();
@@ -1966,7 +1966,7 @@ void ScummEngine_v100he::o100_setSpriteInfo() {
spriteId++;
for (; spriteId <= _curMaxSpriteId; spriteId++)
- spriteInfoSet_field_54(spriteId, args[0]);
+ spriteInfoSet_xmapNum(spriteId, args[0]);
break;
case 73:
args[0] = pop();
@@ -2281,7 +2281,7 @@ void ScummEngine_v100he::o100_getSpriteGroupInfo() {
case 40:
spriteGroupId = pop();
if (spriteGroupId)
- push(spriteGroupGet_field_20(spriteGroupId));
+ push(spriteGroupGet_dstResNum(spriteGroupId));
else
push(0);
break;
@@ -2511,7 +2511,7 @@ void ScummEngine_v100he::o100_getSpriteInfo() {
case 3:
spriteId = pop();
if (spriteId)
- push(spriteInfoGet_flags_22(spriteId));
+ push(spriteInfoGet_flagDelayed(spriteId));
else
push(0);
break;
@@ -2661,7 +2661,7 @@ void ScummEngine_v100he::o100_getSpriteInfo() {
case 70:
spriteId = pop();
if (spriteId)
- push(spriteInfoGet_field_54(spriteId));
+ push(spriteInfoGet_xmapNum(spriteId));
else
push(0);
break;
diff --git a/scumm/script_v72he.cpp b/scumm/script_v72he.cpp
index e47835fae2..e3a141f9e6 100644
--- a/scumm/script_v72he.cpp
+++ b/scumm/script_v72he.cpp
@@ -2061,21 +2061,20 @@ void ScummEngine_v72he::copyArrayHelper(ArrayHeader *ah, int idx2, int idx1, int
case kStringArray:
*num = len1 - idx1 + 1;
*size = pitch;
- *data = ah->data + offset;
+ *data = ah->data + offset + 1;
break;
case kIntArray:
- *num = (len1 - idx1 + 1) * 2;
+ *num = (len1 - idx1) * 2;
*size = pitch * 2;
*data = ah->data + offset * 2;
break;
case kDwordArray:
- *num = (len1 - idx1 + 1) * 4;
+ *num = (len1 - idx1) * 4;
*size = pitch * 4;
*data = ah->data + offset * 4;
break;
default:
error("Invalid array type", FROM_LE_32(ah->type));
- break;
}
}
diff --git a/scumm/script_v90he.cpp b/scumm/script_v90he.cpp
index 55729f016a..5430815225 100644
--- a/scumm/script_v90he.cpp
+++ b/scumm/script_v90he.cpp
@@ -916,7 +916,7 @@ void ScummEngine_v90he::o90_getSpriteInfo() {
case 52:
spriteId = pop();
if (spriteId)
- push(spriteInfoGet_flags_22(spriteId));
+ push(spriteInfoGet_flagDelayed(spriteId));
else
push(0);
break;
@@ -944,7 +944,7 @@ void ScummEngine_v90he::o90_getSpriteInfo() {
case 68:
spriteId = pop();
if (spriteId)
- push(spriteInfoGet_field_54(spriteId));
+ push(spriteInfoGet_xmapNum(spriteId));
else
push(0);
break;
@@ -1113,7 +1113,7 @@ void ScummEngine_v90he::o90_setSpriteInfo() {
spriteId++;
for (; spriteId <= _curMaxSpriteId; spriteId++)
- spriteInfoSet_rotAngle(spriteId, args[0]);
+ spriteInfoSet_angle(spriteId, args[0]);
break;
case 23:
if (_gameId == GID_FREDDI4 || _heversion >= 99) {
@@ -1193,7 +1193,7 @@ void ScummEngine_v90he::o90_setSpriteInfo() {
spriteId++;
for (; spriteId <= _curMaxSpriteId; spriteId++)
- spriteInfoSet_flag22(spriteId, args[0]);
+ spriteInfoSet_flagDelayed(spriteId, args[0]);
break;
case 52: // HE 98+
args[0] = pop();
@@ -1237,7 +1237,7 @@ void ScummEngine_v90he::o90_setSpriteInfo() {
spriteId++;
for (; spriteId <= _curMaxSpriteId; spriteId++)
- spriteInfoSet_field_54(spriteId, args[0]);
+ spriteInfoSet_xmapNum(spriteId, args[0]);
break;
case 90:
args[0] = pop();
@@ -1393,7 +1393,7 @@ void ScummEngine_v90he::o90_getSpriteGroupInfo() {
case 63: // HE 99+
spriteGroupId = pop();
if (spriteGroupId)
- push(spriteGroupGet_field_20(spriteGroupId));
+ push(spriteGroupGet_dstResNum(spriteGroupId));
else
push(0);
break;
@@ -1525,7 +1525,7 @@ void ScummEngine_v90he::o90_setSpriteGroupInfo() {
if (!_curSpriteGroupId)
break;
- spriteGroupSet_field_20(_curSpriteGroupId, value1);
+ spriteGroupSet_dstResNum(_curSpriteGroupId, value1);
break;
case 28:
value2 = pop();
@@ -2053,7 +2053,6 @@ void ScummEngine_v90he::sortArray(int array, int dim2start, int dim2end, int dim
break;
default:
error("Invalid array type", FROM_LE_32(ah->type));
- break;
}
}
diff --git a/scumm/sprite_he.cpp b/scumm/sprite_he.cpp
index 0ec68be5ed..cf22d63556 100644
--- a/scumm/sprite_he.cpp
+++ b/scumm/sprite_he.cpp
@@ -184,7 +184,7 @@ int ScummEngine_v90he::findSpriteWithClassOf(int x_pos, int y_pos, int spriteGro
}
angle = spi->curAngle;
- zoom = spi->cur_zoom;
+ zoom = spi->curZoom;
if ((spi->flags & kSFZoomed) || (spi->flags & kSFRotated)) {
if (spi->flags & kSFZoomed && zoom) {
x = x * 256 / zoom;
@@ -262,7 +262,7 @@ int ScummEngine_v90he::spriteInfoGet_flagNeedPaletteRemap(int spriteId) {
return ((_spriteTable[spriteId].flags & kSFNeedPaletteRemap) != 0) ? 1 : 0;
}
-int ScummEngine_v90he::spriteInfoGet_flags_22(int spriteId) {
+int ScummEngine_v90he::spriteInfoGet_flagDelayed(int spriteId) {
checkRange(_varNumSprites, 1, spriteId, "Invalid sprite %d");
return ((_spriteTable[spriteId].flags & kSFDelayed) != 0) ? 1 : 0;
@@ -334,7 +334,7 @@ int ScummEngine_v90he::spriteInfoGet_field_44(int spriteId) {
return _spriteTable[spriteId].field_44;
}
-int ScummEngine_v90he::spriteInfoGet_field_54(int spriteId) {
+int ScummEngine_v90he::spriteInfoGet_xmapNum(int spriteId) {
checkRange(_varNumSprites, 1, spriteId, "Invalid sprite %d");
return _spriteTable[spriteId].xmapNum;
@@ -438,7 +438,7 @@ int ScummEngine_v90he::spriteGroupGet_zorderPriority(int spriteGroupId) {
return _spriteGroups[spriteGroupId].zorderPriority;
}
-int ScummEngine_v90he::spriteGroupGet_field_20(int spriteGroupId) {
+int ScummEngine_v90he::spriteGroupGet_dstResNum(int spriteGroupId) {
checkRange(_varNumSpriteGroups, 1, spriteGroupId, "Invalid sprite group %d");
return _spriteGroups[spriteGroupId].dstResNum;
@@ -542,7 +542,7 @@ void ScummEngine_v90he::spriteInfoSet_dx_dy(int spriteId, int value1, int value2
_spriteTable[spriteId].dy = value2;
}
-void ScummEngine_v90he::spriteInfoSet_field_54(int spriteId, int value) {
+void ScummEngine_v90he::spriteInfoSet_xmapNum(int spriteId, int value) {
checkRange(_varNumSprites, 1, spriteId, "Invalid sprite %d");
_spriteTable[spriteId].xmapNum = value;
@@ -585,7 +585,7 @@ void ScummEngine_v90he::spriteInfoSet_zoom(int spriteId, int value) {
}
}
-void ScummEngine_v90he::spriteInfoSet_rotAngle(int spriteId, int value) {
+void ScummEngine_v90he::spriteInfoSet_angle(int spriteId, int value) {
checkRange(_varNumSprites, 1, spriteId, "Invalid sprite %d");
_spriteTable[spriteId].flags |= kSFRotated;
@@ -659,7 +659,7 @@ void ScummEngine_v90he::spriteInfoSet_flagNeedPaletteRemap(int spriteId, int val
_spriteTable[spriteId].flags |= kSFChanged | kSFNeedRedraw;
}
-void ScummEngine_v90he::spriteInfoSet_flag22(int spriteId, int value) {
+void ScummEngine_v90he::spriteInfoSet_flagDelayed(int spriteId, int value) {
checkRange(_varNumSprites, 1, spriteId, "Invalid sprite %d");
if (value)
@@ -935,7 +935,7 @@ void ScummEngine_v90he::spriteGroupSet_inc_tx_ty(int spriteGroupId, int value1,
}
}
-void ScummEngine_v90he::spriteGroupSet_field_20(int spriteGroupId, int value) {
+void ScummEngine_v90he::spriteGroupSet_dstResNum(int spriteGroupId, int value) {
checkRange(_varNumSpriteGroups, 1, spriteGroupId, "Invalid sprite group %d");
if (_spriteGroups[spriteGroupId].dstResNum != value) {
@@ -1257,7 +1257,7 @@ void ScummEngine_v90he::spritesProcessWiz(bool arg) {
spi->curResId = wiz.img.resNum = resId;
wiz.processFlags = kWPFNewState | kWPFSetPos;
spi->curAngle = spi->angle;
- spi->cur_zoom = spi->zoom;
+ spi->curZoom = spi->zoom;
spi->pos.x = wiz.img.x1;
spi->pos.y = wiz.img.y1;
bboxPtr = &spi->bbox;
diff --git a/scumm/sprite_he.h b/scumm/sprite_he.h
index 69bd007472..de6f35481b 100644
--- a/scumm/sprite_he.h
+++ b/scumm/sprite_he.h
@@ -71,7 +71,7 @@ struct SpriteInfo {
int zoom;
int delayCount;
int curAngle;
- int cur_zoom;
+ int curZoom;
int imgFlags;
int field_74;
int delayAmount;