aboutsummaryrefslogtreecommitdiff
path: root/engines
diff options
context:
space:
mode:
authorBertrand Augereau2011-06-27 09:08:54 +0200
committerBertrand Augereau2011-07-18 22:59:15 +0200
commit11917ad700e98bb6d9e8f24e517b9c36d0cd4834 (patch)
tree0bee12a224f37eb810498293db3fe72807002ee8 /engines
parentc011bee0e2985b979372397eff650509ba094de0 (diff)
downloadscummvm-rg350-11917ad700e98bb6d9e8f24e517b9c36d0cd4834.tar.gz
scummvm-rg350-11917ad700e98bb6d9e8f24e517b9c36d0cd4834.tar.bz2
scummvm-rg350-11917ad700e98bb6d9e8f24e517b9c36d0cd4834.zip
DREAMWEB: steady and constant objects sprites callbacks
Diffstat (limited to 'engines')
-rw-r--r--engines/dreamweb/structs.h10
-rw-r--r--engines/dreamweb/stubs.cpp20
-rw-r--r--engines/dreamweb/stubs.h2
3 files changed, 30 insertions, 2 deletions
diff --git a/engines/dreamweb/structs.h b/engines/dreamweb/structs.h
index a5ddabf7fe..822546b7f3 100644
--- a/engines/dreamweb/structs.h
+++ b/engines/dreamweb/structs.h
@@ -32,6 +32,16 @@ struct ObjData {
uint8 b6;
uint8 delay;
uint8 type;
+ uint8 b9;
+ uint8 b10;
+ uint8 b11;
+ uint8 b12;
+ uint8 b13;
+ uint8 b14;
+ uint8 b15;
+ uint8 b16;
+ uint8 b17;
+ uint8 b18[256]; // NB: Don't know the size yet
};
diff --git a/engines/dreamweb/stubs.cpp b/engines/dreamweb/stubs.cpp
index b5b88f66e2..45efe8b02c 100644
--- a/engines/dreamweb/stubs.cpp
+++ b/engines/dreamweb/stubs.cpp
@@ -829,14 +829,30 @@ void DreamGenContext::backobject(Sprite* sprite) {
else if (objData->type == 2)
doorway();
else if (objData->type == 1)
- constant();
+ constant(sprite, objData);
else
- steady();
+ steady(sprite, objData);
ds = pop();
es = pop();
}
+void DreamGenContext::constant(Sprite* sprite, ObjData* objData) {
+ ++sprite->b19;
+ if (objData->b18[sprite->b19] == 255) {
+ sprite->b19 = 0;
+ }
+ uint8 b18 = objData->b18[sprite->b19];
+ objData->b17 = b18;
+ sprite->b15 = b18;
+}
+
+void DreamGenContext::steady(Sprite* sprite, ObjData* objData) {
+ uint8 b18 = objData->b18[0];
+ objData->b17 = b18;
+ sprite->b15 = b18;
+}
+
void DreamGenContext::modifychar() {
al = engine->modifyChar(al);
}
diff --git a/engines/dreamweb/stubs.h b/engines/dreamweb/stubs.h
index dbedb32640..5a4377b119 100644
--- a/engines/dreamweb/stubs.h
+++ b/engines/dreamweb/stubs.h
@@ -27,6 +27,8 @@
void spriteupdate();
void mainmanCPP(Sprite* sprite);
void backobject(Sprite* sprite);
+ void constant(Sprite* sprite, ObjData* objData);
+ void steady(Sprite* sprite, ObjData* objData);
void modifychar();
void lockmon();