aboutsummaryrefslogtreecommitdiff
path: root/scumm
diff options
context:
space:
mode:
authorTravis Howell2005-02-23 11:15:41 +0000
committerTravis Howell2005-02-23 11:15:41 +0000
commitf215c1ceae381c0546d490821f756f7d325ceabb (patch)
tree313fe4f1e86d546b0a45d54e0ef59f054b267e6d /scumm
parent84bc25a4269597c847ea275b764708e01c25b222 (diff)
downloadscummvm-rg350-f215c1ceae381c0546d490821f756f7d325ceabb.tar.gz
scummvm-rg350-f215c1ceae381c0546d490821f756f7d325ceabb.tar.bz2
scummvm-rg350-f215c1ceae381c0546d490821f756f7d325ceabb.zip
Update HE100
svn-id: r16880
Diffstat (limited to 'scumm')
-rw-r--r--scumm/intern.h3
-rw-r--r--scumm/script_v100he.cpp45
-rw-r--r--scumm/script_v90he.cpp4
-rw-r--r--scumm/sprite_he.cpp8
-rw-r--r--scumm/sprite_he.h2
5 files changed, 55 insertions, 7 deletions
diff --git a/scumm/intern.h b/scumm/intern.h
index 822478f440..91188edd6e 100644
--- a/scumm/intern.h
+++ b/scumm/intern.h
@@ -937,7 +937,8 @@ protected:
void spriteInfoSet_flags23_26(int spriteId, int value);
void spriteInfoSet_flag31(int spriteId, int value);
void spriteInfoSet_field_78_64(int spriteId, int value);
- void spriteInfoSet_setClassFlags(int spriteId, int value1, int value2);
+ void spriteInfoSet_setClassFlags(int spriteId, int value);
+ void spriteInfoSet_setClassFlag(int spriteId, int classId, int toggle);
void spriteInfoSet_resetClassFlags(int spriteId);
void spriteInfoSet_field_88(int spriteId, int type, int value);
diff --git a/scumm/script_v100he.cpp b/scumm/script_v100he.cpp
index 9fd175c2d9..d9173c484a 100644
--- a/scumm/script_v100he.cpp
+++ b/scumm/script_v100he.cpp
@@ -1582,7 +1582,7 @@ void ScummEngine_v100he::o100_startSound() {
void ScummEngine_v100he::o100_setSpriteInfo() {
int args[16];
- int spriteId, tmp[2];
+ int spriteId, n, tmp[2];
static int storedFields[2];
byte string[80];
@@ -1654,7 +1654,27 @@ void ScummEngine_v100he::o100_setSpriteInfo() {
spriteInfoSet_field_7C(spriteId, args[0]);
break;
case 16:
- getStackList(args, ARRAYSIZE(args));
+ n = getStackList(args, ARRAYSIZE(args));
+ if (_curSpriteId != 0 && _curMaxSpriteId != 0 && n != 0) {
+ int *p = &args[n - 1];
+ do {
+ int code = *p;
+ if (code == 0) {
+ for (int i = _curSpriteId; i <= _curMaxSpriteId; ++i) {
+ spriteInfoSet_resetClassFlags(i);
+ }
+ } else if (code & 0x80) {
+ for (int i = _curSpriteId; i <= _curMaxSpriteId; ++i) {
+ spriteInfoSet_setClassFlag(i, code & 0x7F, 1);
+ }
+ } else {
+ for (int i = _curSpriteId; i <= _curMaxSpriteId; ++i) {
+ spriteInfoSet_setClassFlag(i, code & 0x7F, 0);
+ }
+ }
+ --p;
+ } while (--n);
+ }
break;
case 32:
args[0] = pop();
@@ -1726,6 +1746,7 @@ void ScummEngine_v100he::o100_setSpriteInfo() {
spriteInfoSet_resetSprite(spriteId);
break;
case 54:
+ // TODO
pop();
pop();
break;
@@ -1881,9 +1902,25 @@ void ScummEngine_v100he::o100_setSpriteInfo() {
spriteInfoSet_field_44(spriteId, args[0], args[1]);
break;
case 88:
- pop();
+ args[0] = pop();
+ if (_curSpriteId > _curMaxSpriteId)
+ break;
+ spriteId = _curSpriteId;
+ if (!spriteId)
+ spriteId++;
+
+ for (; spriteId <= _curMaxSpriteId; spriteId++)
+ spriteInfoSet_setClassFlags(spriteId, args[0]);
break;
case 89:
+ if (_curSpriteId > _curMaxSpriteId)
+ break;
+ spriteId = _curSpriteId;
+ if (!spriteId)
+ spriteId++;
+
+ for (; spriteId <= _curMaxSpriteId; spriteId++)
+ spriteInfoSet_resetClassFlags(spriteId);
break;
default:
error("o100_setSpriteInfo: Unknown case %d", subOp);
@@ -2421,6 +2458,7 @@ void ScummEngine_v100he::o100_getSpriteInfo() {
push(0);
break;
case 54:
+ // TODO
pop();
pop();
push(0);
@@ -2506,6 +2544,7 @@ void ScummEngine_v100he::o100_getSpriteInfo() {
}
break;
case 82:
+ // TODO
pop();
push(0);
break;
diff --git a/scumm/script_v90he.cpp b/scumm/script_v90he.cpp
index 31a56ca3d5..ccddd49210 100644
--- a/scumm/script_v90he.cpp
+++ b/scumm/script_v90he.cpp
@@ -1225,11 +1225,11 @@ void ScummEngine_v90he::o90_setSpriteInfo() {
}
} else if (code & 0x80) {
for (int i = _curSpriteId; i <= _curMaxSpriteId; ++i) {
- spriteInfoSet_setClassFlags(i, code & 0x7F, 1);
+ spriteInfoSet_setClassFlag(i, code & 0x7F, 1);
}
} else {
for (int i = _curSpriteId; i <= _curMaxSpriteId; ++i) {
- spriteInfoSet_setClassFlags(i, code & 0x7F, 0);
+ spriteInfoSet_setClassFlag(i, code & 0x7F, 0);
}
}
--p;
diff --git a/scumm/sprite_he.cpp b/scumm/sprite_he.cpp
index 9b51d75a2a..8dbf90f5f8 100644
--- a/scumm/sprite_he.cpp
+++ b/scumm/sprite_he.cpp
@@ -517,7 +517,13 @@ void ScummEngine_v90he::spriteInfoSet_field_78_64(int spriteId, int value) {
_spriteTable[spriteId].field_64 = value;
}
-void ScummEngine_v90he::spriteInfoSet_setClassFlags(int spriteId, int classId, int toggle) {
+void ScummEngine_v90he::spriteInfoSet_setClassFlags(int spriteId, int value) {
+ checkRange(_varNumSprites, 1, spriteId, "Invalid sprite %d");
+
+ _spriteTable[spriteId].class_flags = value;
+}
+
+void ScummEngine_v90he::spriteInfoSet_setClassFlag(int spriteId, int classId, int toggle) {
checkRange(_varNumSprites, 1, spriteId, "Invalid sprite %d");
checkRange(32, 1, classId, "class %d out of range in statement");
diff --git a/scumm/sprite_he.h b/scumm/sprite_he.h
index d54fa4e387..02e46e6b37 100644
--- a/scumm/sprite_he.h
+++ b/scumm/sprite_he.h
@@ -101,6 +101,8 @@ struct SpriteInfo {
int field_80;
int class_flags;
int field_88;
+ int field_8C;
+ int field_90;
};
struct SpriteGroup {