diff options
-rwxr-xr-x | devtools/tasmrecover/tasm-recover | 1 | ||||
-rw-r--r-- | engines/dreamweb/dreamgen.cpp | 17 | ||||
-rw-r--r-- | engines/dreamweb/dreamgen.h | 3 | ||||
-rw-r--r-- | engines/dreamweb/stubs.cpp | 6 | ||||
-rw-r--r-- | engines/dreamweb/stubs.h | 1 |
5 files changed, 9 insertions, 19 deletions
diff --git a/devtools/tasmrecover/tasm-recover b/devtools/tasmrecover/tasm-recover index 8aa820538e..2c785ec32c 100755 --- a/devtools/tasmrecover/tasm-recover +++ b/devtools/tasmrecover/tasm-recover @@ -133,6 +133,7 @@ generator = cpp(context, "DreamGen", blacklist = [ 'blocknametext', 'walktotext', 'personnametext', + 'findxyfrompath', ], skip_output = [ # These functions are processed but not output 'dreamweb', diff --git a/engines/dreamweb/dreamgen.cpp b/engines/dreamweb/dreamgen.cpp index 5b6383c969..a20d03c6b0 100644 --- a/engines/dreamweb/dreamgen.cpp +++ b/engines/dreamweb/dreamgen.cpp @@ -17659,22 +17659,6 @@ lookx2: es.byte(bx+6) = al; } -void DreamGenContext::findxyfrompath() { - STACK_CHECK; - getroomspaths(); - al = data.byte(kManspath); - ah = 0; - _add(ax, ax); - _add(ax, ax); - _add(ax, ax); - _add(bx, ax); - ax = es.word(bx); - _sub(al, 12); - _sub(ah, 12); - data.byte(kRyanx) = al; - data.byte(kRyany) = ah; -} - void DreamGenContext::findroominloc() { STACK_CHECK; al = data.byte(kMapy); @@ -18982,7 +18966,6 @@ void DreamGenContext::__dispatch_call(uint16 addr) { case addr_restoreall: restoreall(); break; case addr_sortoutmap: sortoutmap(); break; case addr_disablepath: disablepath(); break; - case addr_findxyfrompath: findxyfrompath(); break; case addr_findroominloc: findroominloc(); break; case addr_dontloadseg: dontloadseg(); break; case addr_allocateload: allocateload(); break; diff --git a/engines/dreamweb/dreamgen.h b/engines/dreamweb/dreamgen.h index 096135cabd..028df367a0 100644 --- a/engines/dreamweb/dreamgen.h +++ b/engines/dreamweb/dreamgen.h @@ -59,7 +59,6 @@ public: static const uint16 addr_allocateload = 0xcb68; static const uint16 addr_dontloadseg = 0xcb64; static const uint16 addr_findroominloc = 0xcb58; - static const uint16 addr_findxyfrompath = 0xcb54; static const uint16 addr_disablepath = 0xcb50; static const uint16 addr_sortoutmap = 0xcb48; static const uint16 addr_restoreall = 0xcb44; @@ -1746,7 +1745,7 @@ public: void pitinterupt(); void deleverything(); void fadescreendown(); - void findxyfrompath(); + //void findxyfrompath(); void namestoold(); //void getxad(); void openinv(); diff --git a/engines/dreamweb/stubs.cpp b/engines/dreamweb/stubs.cpp index 54d901f5c5..762a48af3f 100644 --- a/engines/dreamweb/stubs.cpp +++ b/engines/dreamweb/stubs.cpp @@ -1110,6 +1110,12 @@ void DreamGenContext::walktotext() { commandwithob(3, data.byte(kCommandtype), data.byte(kCommand)); } +void DreamGenContext::findxyfrompath() { + const uint8 *roomsPaths = getroomspathsCPP(); + data.byte(kRyanx) = roomsPaths[data.byte(kManspath) * 8 + 0] - 12; + data.byte(kRyany) = roomsPaths[data.byte(kManspath) * 8 + 1] - 12; +} + bool DreamGenContext::isCD() { // The original sources has two codepaths depending if the game is 'if cd' or not // This is a hack to guess which version to use with the assumption that if we have a cd version diff --git a/engines/dreamweb/stubs.h b/engines/dreamweb/stubs.h index 2b1cdface7..705fcd90f1 100644 --- a/engines/dreamweb/stubs.h +++ b/engines/dreamweb/stubs.h @@ -148,5 +148,6 @@ void blocknametext(); void walktotext(); void personnametext(); + void findxyfrompath(); bool isCD(); |