aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorTravis Howell2005-02-26 00:35:23 +0000
committerTravis Howell2005-02-26 00:35:23 +0000
commit574047157ae59f73d5c32eb1f843c9d3e9209af3 (patch)
tree74db3c56b758f17bbb1ac549ea4d4e3bfddc34d2
parent1bcfa18667cad41f05a02193bc19f33d09383a1e (diff)
downloadscummvm-rg350-574047157ae59f73d5c32eb1f843c9d3e9209af3.tar.gz
scummvm-rg350-574047157ae59f73d5c32eb1f843c9d3e9209af3.tar.bz2
scummvm-rg350-574047157ae59f73d5c32eb1f843c9d3e9209af3.zip
Fix sprite hacks
svn-id: r16920
-rw-r--r--scumm/sprite_he.cpp11
-rw-r--r--scumm/wiz_he.cpp7
2 files changed, 7 insertions, 11 deletions
diff --git a/scumm/sprite_he.cpp b/scumm/sprite_he.cpp
index 626a55612d..736f061d15 100644
--- a/scumm/sprite_he.cpp
+++ b/scumm/sprite_he.cpp
@@ -41,7 +41,7 @@ void ScummEngine_v90he::allocateArrays() {
//
int ScummEngine_v90he::findSpriteWithClassOf(int x, int y, int spriteGroup, int d, int num, int *args) {
int classId;
- debug(1, "findSprite: x %d, y %d, spriteGroup %d, d %d, num %d\n", x, y, spriteGroup, d, num);
+ debug(1, "findSprite: x %d, y %d, spriteGroup %d, d %d, num %d", x, y, spriteGroup, d, num);
for (int i = 0; i < _numSpritesToProcess; ++i) {
SpriteInfo *spi = _activeSpritesTable[i];
@@ -676,7 +676,8 @@ void ScummEngine_v90he::spriteInfoSet_resetSprite(int spriteId) {
_spriteTable[spriteId].field_14 = 0;
_spriteTable[spriteId].field_7C = 0;
_spriteTable[spriteId].field_80 = 0;
- _spriteTable[spriteId].field_18 = 0; // Maybe HE99+?
+ // freddicove specific
+ //_spriteTable[spriteId].field_18 = 0;
_spriteTable[spriteId].field_88 = 0;
}
@@ -1256,11 +1257,11 @@ void ScummEngine_v90he::spritesProcessWiz(bool arg) {
spr_flags = spi->flags;
if (arg) {
- if (spi->field_0)
- ; //return; // HACK
+ if (spi->field_0 >= 0)
+ return;
} else {
if (spi->field_0 < 0)
- ; //continue; // HACK
+ continue;
}
spi->flags &= ~(kSFChanged | kSFNeedRedraw);
diff --git a/scumm/wiz_he.cpp b/scumm/wiz_he.cpp
index b8470b7533..78e18f2e00 100644
--- a/scumm/wiz_he.cpp
+++ b/scumm/wiz_he.cpp
@@ -1121,12 +1121,7 @@ void ScummEngine_v72he::flushWizBuffer() {
void ScummEngine_v80he::loadImgSpot(int resId, int state, int16 &x, int16 &y) {
const uint8 *dataPtr = getResourceAddress(rtImage, resId);
- if (!dataPtr) {
- warning("loadImgSpot: unknown Image %d", resId);
- x = y = 0;
- return;
- }
-
+ assert(dataPtr);
const uint8 *spotPtr = findWrappedBlock(MKID('SPOT'), dataPtr, state, 0);
if (spotPtr) {
x = (int16)READ_LE_UINT32(spotPtr + 0);