aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorTravis Howell2005-02-27 06:07:09 +0000
committerTravis Howell2005-02-27 06:07:09 +0000
commit0d8a49de37f62eb1906896e0f6d761ef18a8b342 (patch)
treecbd6b4ad5587187eab7b2f1368af01a7a6691092
parent991c1859b117ebd03b6cf9c5e0214ed1157374cc (diff)
downloadscummvm-rg350-0d8a49de37f62eb1906896e0f6d761ef18a8b342.tar.gz
scummvm-rg350-0d8a49de37f62eb1906896e0f6d761ef18a8b342.tar.bz2
scummvm-rg350-0d8a49de37f62eb1906896e0f6d761ef18a8b342.zip
Revert the spriteGroupId checks.change.
svn-id: r16951
-rw-r--r--scumm/sprite_he.cpp54
1 files changed, 27 insertions, 27 deletions
diff --git a/scumm/sprite_he.cpp b/scumm/sprite_he.cpp
index cb63a2f35c..03282797e4 100644
--- a/scumm/sprite_he.cpp
+++ b/scumm/sprite_he.cpp
@@ -341,7 +341,7 @@ void ScummEngine_v90he::spriteInfoGet_dx_dy(int spriteId, int32 &dx, int32 &dy)
int ScummEngine_v90he::spriteGroupGet_allocateGroupSpritesList(int spriteGroupId) {
int i, j = 0, sprites = 0;
- checkRange(_varNumSpriteGroups, 64, spriteGroupId, "Invalid sprite group %d");
+ checkRange(_varNumSpriteGroups, 1, spriteGroupId, "Invalid sprite group %d");
for (i = 1; i < _varNumSprites; i++) {
if (_spriteTable[i].group_num == spriteGroupId)
@@ -364,43 +364,43 @@ int ScummEngine_v90he::spriteGroupGet_allocateGroupSpritesList(int spriteGroupId
}
int ScummEngine_v90he::spriteGroupGet_zorderPriority(int spriteGroupId) {
- checkRange(_varNumSpriteGroups, 64, spriteGroupId, "Invalid sprite group %d");
+ checkRange(_varNumSpriteGroups, 1, spriteGroupId, "Invalid sprite group %d");
return _spriteGroups[spriteGroupId].zorderPriority;
}
int ScummEngine_v90he::spriteGroupGet_field_20(int spriteGroupId) {
- checkRange(_varNumSpriteGroups, 64, spriteGroupId, "Invalid sprite group %d");
+ checkRange(_varNumSpriteGroups, 1, spriteGroupId, "Invalid sprite group %d");
return _spriteGroups[spriteGroupId].field_20;
}
int ScummEngine_v90he::spriteGroupGet_scale_x_ratio_mul(int spriteGroupId) {
- checkRange(_varNumSpriteGroups, 64, spriteGroupId, "Invalid sprite group %d");
+ checkRange(_varNumSpriteGroups, 1, spriteGroupId, "Invalid sprite group %d");
return _spriteGroups[spriteGroupId].scale_x_ratio_mul;
}
int ScummEngine_v90he::spriteGroupGet_scale_x_ratio_div(int spriteGroupId) {
- checkRange(_varNumSpriteGroups, 64, spriteGroupId, "Invalid sprite group %d");
+ checkRange(_varNumSpriteGroups, 1, spriteGroupId, "Invalid sprite group %d");
return _spriteGroups[spriteGroupId].scale_x_ratio_div;
}
int ScummEngine_v90he::spriteGroupGet_scale_y_ratio_mul(int spriteGroupId) {
- checkRange(_varNumSpriteGroups, 64, spriteGroupId, "Invalid sprite group %d");
+ checkRange(_varNumSpriteGroups, 1, spriteGroupId, "Invalid sprite group %d");
return _spriteGroups[spriteGroupId].scale_y_ratio_mul;
}
int ScummEngine_v90he::spriteGroupGet_scale_y_ratio_div(int spriteGroupId) {
- checkRange(_varNumSpriteGroups, 64, spriteGroupId, "Invalid sprite group %d");
+ checkRange(_varNumSpriteGroups, 1, spriteGroupId, "Invalid sprite group %d");
return _spriteGroups[spriteGroupId].scale_y_ratio_div;
}
void ScummEngine_v90he::spriteGroupGet_tx_ty(int spriteGroupId, int32 &tx, int32 &ty) {
- checkRange(_varNumSpriteGroups, 64, spriteGroupId, "Invalid sprite group %d");
+ checkRange(_varNumSpriteGroups, 1, spriteGroupId, "Invalid sprite group %d");
tx = _spriteGroups[spriteGroupId].tx;
ty = _spriteGroups[spriteGroupId].ty;
@@ -764,7 +764,7 @@ void ScummEngine_v90he::redrawSpriteGroup(int spriteGroupId) {
}
void ScummEngine_v90he::spriteGroupSet_case0_0(int spriteGroupId, int value1, int value2) {
- checkRange(_varNumSpriteGroups, 64, spriteGroupId, "Invalid sprite group %d");
+ checkRange(_varNumSpriteGroups, 1, spriteGroupId, "Invalid sprite group %d");
for (int i = 1; i < _varNumSprites; i++) {
if (_spriteTable[i].group_num == spriteGroupId) {
@@ -778,7 +778,7 @@ void ScummEngine_v90he::spriteGroupSet_case0_0(int spriteGroupId, int value1, in
}
void ScummEngine_v90he::spriteGroupSet_case0_1(int spriteGroupId, int value) {
- checkRange(_varNumSpriteGroups, 64, spriteGroupId, "Invalid sprite group %d");
+ checkRange(_varNumSpriteGroups, 1, spriteGroupId, "Invalid sprite group %d");
for (int i = 1; i < _varNumSprites; i++) {
if (_spriteTable[i].group_num == spriteGroupId)
@@ -787,7 +787,7 @@ void ScummEngine_v90he::spriteGroupSet_case0_1(int spriteGroupId, int value) {
}
void ScummEngine_v90he::spriteGroupSet_case0_2(int spriteGroupId, int value) {
- checkRange(_varNumSpriteGroups, 64, spriteGroupId, "Invalid sprite group %d");
+ checkRange(_varNumSpriteGroups, 1, spriteGroupId, "Invalid sprite group %d");
for (int i = 1; i < _varNumSprites; i++) {
if (_spriteTable[i].group_num == spriteGroupId) {
@@ -798,7 +798,7 @@ void ScummEngine_v90he::spriteGroupSet_case0_2(int spriteGroupId, int value) {
}
void ScummEngine_v90he::spriteGroupSet_case0_3(int spriteGroupId, int value) {
- checkRange(_varNumSpriteGroups, 64, spriteGroupId, "Invalid sprite group %d");
+ checkRange(_varNumSpriteGroups, 1, spriteGroupId, "Invalid sprite group %d");
for (int i = 1; i < _varNumSprites; i++) {
if (_spriteTable[i].group_num == spriteGroupId) {
@@ -811,7 +811,7 @@ void ScummEngine_v90he::spriteGroupSet_case0_3(int spriteGroupId, int value) {
}
void ScummEngine_v90he::spriteGroupSet_case0_4(int spriteGroupId) {
- checkRange(_varNumSpriteGroups, 64, spriteGroupId, "Invalid sprite group %d");
+ checkRange(_varNumSpriteGroups, 1, spriteGroupId, "Invalid sprite group %d");
for (int i = 1; i < _varNumSprites; i++) {
if (_spriteTable[i].group_num == spriteGroupId)
@@ -820,7 +820,7 @@ void ScummEngine_v90he::spriteGroupSet_case0_4(int spriteGroupId) {
}
void ScummEngine_v90he::spriteGroupSet_case0_5(int spriteGroupId, int value) {
- checkRange(_varNumSpriteGroups, 64, spriteGroupId, "Invalid sprite group %d");
+ checkRange(_varNumSpriteGroups, 1, spriteGroupId, "Invalid sprite group %d");
for (int i = 1; i < _varNumSprites; i++) {
if (_spriteTable[i].group_num == spriteGroupId) {
@@ -831,7 +831,7 @@ void ScummEngine_v90he::spriteGroupSet_case0_5(int spriteGroupId, int value) {
}
void ScummEngine_v90he::spriteGroupSet_case0_6(int spriteGroupId, int value) {
- checkRange(_varNumSpriteGroups, 64, spriteGroupId, "Invalid sprite group %d");
+ checkRange(_varNumSpriteGroups, 1, spriteGroupId, "Invalid sprite group %d");
for (int i = 1; i < _varNumSprites; i++) {
if (_spriteTable[i].group_num == spriteGroupId) {
@@ -844,7 +844,7 @@ void ScummEngine_v90he::spriteGroupSet_case0_6(int spriteGroupId, int value) {
}
void ScummEngine_v90he::spriteGroupSet_case0_7(int spriteGroupId, int value) {
- checkRange(_varNumSpriteGroups, 64, spriteGroupId, "Invalid sprite group %d");
+ checkRange(_varNumSpriteGroups, 1, spriteGroupId, "Invalid sprite group %d");
for (int i = 1; i < _varNumSprites; i++) {
if (_spriteTable[i].group_num == spriteGroupId) {
@@ -856,7 +856,7 @@ void ScummEngine_v90he::spriteGroupSet_case0_7(int spriteGroupId, int value) {
}
void ScummEngine_v90he::spriteGroupSet_case5_0(int spriteGroupId, int value) {
- checkRange(_varNumSpriteGroups, 64, spriteGroupId, "Invalid sprite group %d");
+ checkRange(_varNumSpriteGroups, 1, spriteGroupId, "Invalid sprite group %d");
if (_spriteGroups[spriteGroupId].scale_x_ratio_mul == value)
return;
@@ -873,7 +873,7 @@ void ScummEngine_v90he::spriteGroupSet_case5_0(int spriteGroupId, int value) {
}
void ScummEngine_v90he::spriteGroupSet_case5_1(int spriteGroupId, int value) {
- checkRange(_varNumSpriteGroups, 64, spriteGroupId, "Invalid sprite group %d");
+ checkRange(_varNumSpriteGroups, 1, spriteGroupId, "Invalid sprite group %d");
if (_spriteGroups[spriteGroupId].scale_x_ratio_div == value)
return;
@@ -890,7 +890,7 @@ void ScummEngine_v90he::spriteGroupSet_case5_1(int spriteGroupId, int value) {
}
void ScummEngine_v90he::spriteGroupSet_case5_2(int spriteGroupId, int value) {
- checkRange(_varNumSpriteGroups, 64, spriteGroupId, "Invalid sprite group %d");
+ checkRange(_varNumSpriteGroups, 1, spriteGroupId, "Invalid sprite group %d");
if (_spriteGroups[spriteGroupId].scale_y_ratio_mul == value)
return;
@@ -907,7 +907,7 @@ void ScummEngine_v90he::spriteGroupSet_case5_2(int spriteGroupId, int value) {
}
void ScummEngine_v90he::spriteGroupSet_case5_3(int spriteGroupId, int value) {
- checkRange(_varNumSpriteGroups, 64, spriteGroupId, "Invalid sprite group %d");
+ checkRange(_varNumSpriteGroups, 1, spriteGroupId, "Invalid sprite group %d");
if (_spriteGroups[spriteGroupId].scale_y_ratio_div == value)
return;
@@ -924,7 +924,7 @@ void ScummEngine_v90he::spriteGroupSet_case5_3(int spriteGroupId, int value) {
}
void ScummEngine_v90he::spriteGroupSet_zorderPriority(int spriteGroupId, int value) {
- checkRange(_varNumSpriteGroups, 64, spriteGroupId, "Invalid sprite group %d");
+ checkRange(_varNumSpriteGroups, 1, spriteGroupId, "Invalid sprite group %d");
if (_spriteGroups[spriteGroupId].zorderPriority == value)
return;
@@ -935,7 +935,7 @@ void ScummEngine_v90he::spriteGroupSet_zorderPriority(int spriteGroupId, int val
}
void ScummEngine_v90he::spriteGroupSet_tx_ty(int spriteGroupId, int value1, int value2) {
- checkRange(_varNumSpriteGroups, 64, spriteGroupId, "Invalid sprite group %d");
+ checkRange(_varNumSpriteGroups, 1, spriteGroupId, "Invalid sprite group %d");
_spriteGroups[spriteGroupId].tx += value1;
_spriteGroups[spriteGroupId].ty += value2;
@@ -944,7 +944,7 @@ void ScummEngine_v90he::spriteGroupSet_tx_ty(int spriteGroupId, int value1, int
}
void ScummEngine_v90he::spriteGroupSet_case26(int spriteGroupId, int value) {
- checkRange(_varNumSpriteGroups, 64, spriteGroupId, "Invalid sprite group %d");
+ checkRange(_varNumSpriteGroups, 1, spriteGroupId, "Invalid sprite group %d");
if (_spriteGroups[spriteGroupId].field_20 == value)
return;
@@ -955,7 +955,7 @@ void ScummEngine_v90he::spriteGroupSet_case26(int spriteGroupId, int value) {
}
void ScummEngine_v90he::spriteGroupSet_case28(int spriteGroupId, int value1, int value2) {
- checkRange(_varNumSpriteGroups, 64, spriteGroupId, "Invalid sprite group %d");
+ checkRange(_varNumSpriteGroups, 1, spriteGroupId, "Invalid sprite group %d");
if (_spriteGroups[spriteGroupId].tx == value1 && _spriteGroups[spriteGroupId].ty == value2)
return;
@@ -967,7 +967,7 @@ void ScummEngine_v90he::spriteGroupSet_case28(int spriteGroupId, int value1, int
}
void ScummEngine_v90he::spriteGroupSet_bbox(int spriteGroupId, int x1, int y1, int x2, int y2) {
- checkRange(_varNumSpriteGroups, 64, spriteGroupId, "Invalid sprite group %d");
+ checkRange(_varNumSpriteGroups, 1, spriteGroupId, "Invalid sprite group %d");
_spriteGroups[spriteGroupId].flags |= kSGFClipBox;
_spriteGroups[spriteGroupId].bbox.left = x1;
@@ -979,7 +979,7 @@ void ScummEngine_v90he::spriteGroupSet_bbox(int spriteGroupId, int x1, int y1, i
}
void ScummEngine_v90he::spriteGroupSet_case56(int spriteGroupId) {
- checkRange(_varNumSpriteGroups, 64, spriteGroupId, "Invalid sprite group %d");
+ checkRange(_varNumSpriteGroups, 1, spriteGroupId, "Invalid sprite group %d");
_spriteGroups[spriteGroupId].flags &= ~(kSGFNeedRedraw);
@@ -1000,7 +1000,7 @@ void ScummEngine_v90he::spritesAllocTables(int numSprites, int numGroups, int nu
void ScummEngine_v90he::spritesResetGroup(int spriteGroupId) {
SpriteGroup *spg = &_spriteGroups[spriteGroupId];
- checkRange(_varNumSpriteGroups, 64, spriteGroupId, "Invalid sprite group %d");
+ checkRange(_varNumSpriteGroups, 1, spriteGroupId, "Invalid sprite group %d");
spg->zorderPriority = 0;
spg->tx = spg->ty = 0;