diff options
author | Bertrand Augereau | 2011-08-18 22:22:39 +0200 |
---|---|---|
committer | Bertrand Augereau | 2011-08-18 22:34:34 +0200 |
commit | 3f6a277819aabffc0d15802ce7d83f4e9825e254 (patch) | |
tree | 1e6f4051ebc9fb693d2993d7b186e4a4355f3223 /engines | |
parent | ef7c28c2cd33b6b8a8f7532d74693bf8e68a0cf6 (diff) | |
download | scummvm-rg350-3f6a277819aabffc0d15802ce7d83f4e9825e254.tar.gz scummvm-rg350-3f6a277819aabffc0d15802ce7d83f4e9825e254.tar.bz2 scummvm-rg350-3f6a277819aabffc0d15802ce7d83f4e9825e254.zip |
DREAMWEB: Ported 'findxyfrompath' to C++
Diffstat (limited to 'engines')
-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 |
4 files changed, 8 insertions, 19 deletions
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(); |