[Scummvm-cvs-logs] scummvm master -> 3f6a277819aabffc0d15802ce7d83f4e9825e254
tramboi
bertrand_augereau at yahoo.fr
Thu Aug 18 22:47:41 CEST 2011
This automated email contains information about 1 new commit which have been
pushed to the 'scummvm' repo located at https://github.com/scummvm/scummvm .
Summary:
3f6a277819 DREAMWEB: Ported 'findxyfrompath' to C++
Commit: 3f6a277819aabffc0d15802ce7d83f4e9825e254
https://github.com/scummvm/scummvm/commit/3f6a277819aabffc0d15802ce7d83f4e9825e254
Author: Bertrand Augereau (bertrand_augereau at yahoo.fr)
Date: 2011-08-18T13:34:34-07:00
Commit Message:
DREAMWEB: Ported 'findxyfrompath' to C++
Changed paths:
devtools/tasmrecover/tasm-recover
engines/dreamweb/dreamgen.cpp
engines/dreamweb/dreamgen.h
engines/dreamweb/stubs.cpp
engines/dreamweb/stubs.h
diff --git a/devtools/tasmrecover/tasm-recover b/devtools/tasmrecover/tasm-recover
index 8aa8205..2c785ec 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 5b6383c..a20d03c 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 096135c..028df36 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 54d901f..762a48a 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 2b1cdfa..705fcd9 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();
More information about the Scummvm-git-logs
mailing list