aboutsummaryrefslogtreecommitdiff
path: root/engines
diff options
context:
space:
mode:
Diffstat (limited to 'engines')
-rw-r--r--engines/dreamweb/dreamgen.cpp15
-rw-r--r--engines/dreamweb/dreamgen.h3
-rw-r--r--engines/dreamweb/stubs.cpp14
-rw-r--r--engines/dreamweb/stubs.h1
4 files changed, 16 insertions, 17 deletions
diff --git a/engines/dreamweb/dreamgen.cpp b/engines/dreamweb/dreamgen.cpp
index 459be79cde..c5ada978c0 100644
--- a/engines/dreamweb/dreamgen.cpp
+++ b/engines/dreamweb/dreamgen.cpp
@@ -2234,20 +2234,6 @@ over1001:
data.word(kTakeoff) = 320;
}
-void DreamGenContext::initman() {
- STACK_CHECK;
- al = data.byte(kRyanx);
- ah = data.byte(kRyany);
- si = ax;
- cx = 49464;
- dx = data.word(kMainsprites);
- di = 0;
- makesprite();
- es.byte(bx+23) = 4;
- es.byte(bx+22) = 0;
- es.byte(bx+29) = 0;
-}
-
void DreamGenContext::mainman() {
STACK_CHECK;
_cmp(data.byte(kResetmanxy), 1);
@@ -21527,7 +21513,6 @@ void DreamGenContext::__dispatch_call(uint16 addr) {
case addr_delsprite: delsprite(); break;
case addr_checkone: checkone(); break;
case addr_findsource: findsource(); break;
- case addr_initman: initman(); break;
case addr_mainman: mainman(); break;
case addr_aboutturn: aboutturn(); break;
case addr_facerightway: facerightway(); break;
diff --git a/engines/dreamweb/dreamgen.h b/engines/dreamweb/dreamgen.h
index 41154a4353..f43e4742bc 100644
--- a/engines/dreamweb/dreamgen.h
+++ b/engines/dreamweb/dreamgen.h
@@ -667,7 +667,6 @@ public:
static const uint16 addr_facerightway = 0xc144;
static const uint16 addr_aboutturn = 0xc13c;
static const uint16 addr_mainman = 0xc138;
- static const uint16 addr_initman = 0xc134;
static const uint16 addr_findsource = 0xc130;
static const uint16 addr_checkone = 0xc12c;
static const uint16 addr_delsprite = 0xc11c;
@@ -1891,7 +1890,7 @@ public:
void read();
void fadescreenups();
void checkdest();
- void initman();
+ //void initman();
void loadpalfromiff();
void facerightway();
void startup1();
diff --git a/engines/dreamweb/stubs.cpp b/engines/dreamweb/stubs.cpp
index afbf65aafe..074f3bfdab 100644
--- a/engines/dreamweb/stubs.cpp
+++ b/engines/dreamweb/stubs.cpp
@@ -778,6 +778,20 @@ void DreamGenContext::spriteupdate() {
}
}
+void DreamGenContext::initman() {
+ Sprite *sprite = makesprite(data.byte(kRyanx), data.byte(kRyany), addr_mainman, data.word(kMainsprites), 0);
+ sprite->priority = 4;
+ sprite->b22 = 0;
+ sprite->b29 = 0;
+
+ // Recover es:bx from sprite
+ es = data.word(kBuffers);
+ bx = kSpritetable;
+ Sprite *sprites = (Sprite*)es.ptr(bx, sizeof(Sprite)*16);
+ bx += 32*(sprite-sprites);
+ //
+}
+
void DreamGenContext::mainmanCPP(Sprite* sprite) {
push(es);
push(ds);
diff --git a/engines/dreamweb/stubs.h b/engines/dreamweb/stubs.h
index fb38a1d5b1..6d1ee5ec33 100644
--- a/engines/dreamweb/stubs.h
+++ b/engines/dreamweb/stubs.h
@@ -25,6 +25,7 @@
void makesprite();
Sprite* makesprite(uint8 x, uint8 y, uint16 updateCallback, uint16 somethingInDx, uint16 somethingInDi);
void spriteupdate();
+ void initman();
void mainmanCPP(Sprite* sprite);
void walking();
void backobject(Sprite* sprite);