aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rwxr-xr-xdevtools/tasmrecover/tasm-recover1
-rw-r--r--engines/dreamweb/dreamgen.cpp54
-rw-r--r--engines/dreamweb/dreamgen.h7
-rw-r--r--engines/dreamweb/stubs.cpp20
-rw-r--r--engines/dreamweb/stubs.h1
5 files changed, 25 insertions, 58 deletions
diff --git a/devtools/tasmrecover/tasm-recover b/devtools/tasmrecover/tasm-recover
index f665b7403b..ed4c9f1352 100755
--- a/devtools/tasmrecover/tasm-recover
+++ b/devtools/tasmrecover/tasm-recover
@@ -74,6 +74,7 @@ generator = cpp(context, "DreamGen", blacklist = [
'showreelframe',
'findsource',
'walking',
+ 'autosetwalk',
'spriteupdate',
'dodoor',
'lockeddoorway',
diff --git a/engines/dreamweb/dreamgen.cpp b/engines/dreamweb/dreamgen.cpp
index 83951bd19c..291078169f 100644
--- a/engines/dreamweb/dreamgen.cpp
+++ b/engines/dreamweb/dreamgen.cpp
@@ -17359,59 +17359,6 @@ holdingreel:
data.byte(kWatchmode) = 2;
}
-void DreamGenContext::autosetwalk() {
- STACK_CHECK;
- al = data.byte(kManspath);
- _cmp(data.byte(kFinaldest), al);
- if (!flags.z())
- goto notsamealready;
- return;
-notsamealready:
- getroomspaths();
- checkdest();
- push(bx);
- al = data.byte(kManspath);
- ah = 0;
- _add(ax, ax);
- _add(ax, ax);
- _add(ax, ax);
- _add(bx, ax);
- al = es.byte(bx);
- ah = 0;
- _sub(ax, 12);
- data.word(kLinestartx) = ax;
- al = es.byte(bx+1);
- ah = 0;
- _sub(ax, 12);
- data.word(kLinestarty) = ax;
- bx = pop();
- al = data.byte(kDestination);
- ah = 0;
- _add(ax, ax);
- _add(ax, ax);
- _add(ax, ax);
- _add(bx, ax);
- al = es.byte(bx);
- ah = 0;
- _sub(ax, 12);
- data.word(kLineendx) = ax;
- al = es.byte(bx+1);
- ah = 0;
- _sub(ax, 12);
- data.word(kLineendy) = ax;
- bresenhams();
- _cmp(data.byte(kLinedirection), 0);
- if (flags.z())
- goto normalline;
- al = data.byte(kLinelength);
- _dec(al);
- data.byte(kLinepointer) = al;
- data.byte(kLinedirection) = 1;
- return;
-normalline:
- data.byte(kLinepointer) = 0;
-}
-
void DreamGenContext::checkdest() {
STACK_CHECK;
push(bx);
@@ -20190,7 +20137,6 @@ void DreamGenContext::__dispatch_call(uint16 addr) {
case addr_walktotext: walktotext(); break;
case addr_getflagunderp: getflagunderp(); break;
case addr_setwalk: setwalk(); break;
- case addr_autosetwalk: autosetwalk(); break;
case addr_checkdest: checkdest(); break;
case addr_bresenhams: bresenhams(); break;
case addr_workoutframes: workoutframes(); break;
diff --git a/engines/dreamweb/dreamgen.h b/engines/dreamweb/dreamgen.h
index 9c89fead42..18be264a9e 100644
--- a/engines/dreamweb/dreamgen.h
+++ b/engines/dreamweb/dreamgen.h
@@ -120,7 +120,6 @@ public:
static const uint16 addr_workoutframes = 0xca54;
static const uint16 addr_bresenhams = 0xca50;
static const uint16 addr_checkdest = 0xca4c;
- static const uint16 addr_autosetwalk = 0xca48;
static const uint16 addr_setwalk = 0xca44;
static const uint16 addr_getflagunderp = 0xca40;
static const uint16 addr_walktotext = 0xca3c;
@@ -1360,6 +1359,7 @@ public:
void fadedos();
//void fillspace();
//void multiget();
+ //void autosetwalk();
void fadeupmonfirst();
void drawfloor();
void loadkeypad();
@@ -1385,7 +1385,7 @@ public:
void additionaltext();
//void kernchars();
void othersmoker();
- void autosetwalk();
+ void dofade();
void setuptimedtemp();
void blocknametext();
void useelevator5();
@@ -1431,7 +1431,6 @@ public:
void addtopeoplelist();
void hangoncurs();
void sparkydrip();
- //void modifychar();
void compare();
void printcurs();
//void convertkey();
@@ -1759,7 +1758,7 @@ public:
void readfromfile();
void initialinv();
void showslots();
- void dofade();
+ //void modifychar();
void hangon();
void settopright();
void findsetobject();
diff --git a/engines/dreamweb/stubs.cpp b/engines/dreamweb/stubs.cpp
index c95091a464..6d2fee1ecd 100644
--- a/engines/dreamweb/stubs.cpp
+++ b/engines/dreamweb/stubs.cpp
@@ -882,5 +882,25 @@ void DreamGenContext::deltextline() {
multiput(ds.ptr(si, 0), x, y, kUndertextsizex, kUndertextsizey);
}
+void DreamGenContext::autosetwalk() {
+ al = data.byte(kManspath);
+ if (data.byte(kFinaldest) == al)
+ return;
+ getroomspaths();
+ uint8 *roomsPaths = getroomspathsCPP();
+ checkdest();
+ data.word(kLinestartx) = roomsPaths[data.byte(kManspath) * 8 + 0] - 12;
+ data.word(kLinestarty) = roomsPaths[data.byte(kManspath) * 8 + 1] - 12;
+ data.word(kLineendx) = roomsPaths[data.byte(kDestination) * 8 + 0] - 12;
+ data.word(kLineendy) = roomsPaths[data.byte(kDestination) * 8 + 1] - 12;
+ bresenhams();
+ if (data.byte(kLinedirection) != 0) {
+ data.byte(kLinepointer) = data.byte(kLinelength) - 1;
+ data.byte(kLinedirection) = 1;
+ return;
+ }
+ data.byte(kLinepointer) = 0;
+}
+
} /*namespace dreamgen */
diff --git a/engines/dreamweb/stubs.h b/engines/dreamweb/stubs.h
index 7e92ed847e..809e5f45f7 100644
--- a/engines/dreamweb/stubs.h
+++ b/engines/dreamweb/stubs.h
@@ -82,6 +82,7 @@
void facerightway();
void walking();
void walking(Sprite *sprite);
+ void autosetwalk();
void aboutturn(Sprite *sprite);
void backobject(Sprite *sprite);
void constant(Sprite *sprite, ObjData *objData);