diff options
author | Bertrand Augereau | 2011-11-28 17:03:07 +0100 |
---|---|---|
committer | Bertrand Augereau | 2011-11-28 17:07:52 +0100 |
commit | 23aa97f3b801868b55244ce6799a36869b04c913 (patch) | |
tree | 9dd16acb22c6ed9951bb90a6d64bd590ef0c2659 | |
parent | 9d5a831c10e4f7f006ea65d03db2615d47f1be25 (diff) | |
download | scummvm-rg350-23aa97f3b801868b55244ce6799a36869b04c913.tar.gz scummvm-rg350-23aa97f3b801868b55244ce6799a36869b04c913.tar.bz2 scummvm-rg350-23aa97f3b801868b55244ce6799a36869b04c913.zip |
DREAMWEB: 'getlocation' and 'setlocation' ported to C++
-rwxr-xr-x | devtools/tasmrecover/tasm-recover | 2 | ||||
-rw-r--r-- | engines/dreamweb/dreamgen.cpp | 20 | ||||
-rw-r--r-- | engines/dreamweb/dreamgen.h | 6 | ||||
-rw-r--r-- | engines/dreamweb/stubs.cpp | 17 | ||||
-rw-r--r-- | engines/dreamweb/stubs.h | 4 |
5 files changed, 25 insertions, 24 deletions
diff --git a/devtools/tasmrecover/tasm-recover b/devtools/tasmrecover/tasm-recover index a9963d23df..9fb76eb0e4 100755 --- a/devtools/tasmrecover/tasm-recover +++ b/devtools/tasmrecover/tasm-recover @@ -305,6 +305,8 @@ generator = cpp(context, "DreamGen", blacklist = [ 'showfolder', 'showleftpage', 'showrightpage', + 'getlocation', + 'setlocation', ], skip_output = [ # These functions are processed but not output 'dreamweb', diff --git a/engines/dreamweb/dreamgen.cpp b/engines/dreamweb/dreamgen.cpp index 78d3098277..85324fb2a9 100644 --- a/engines/dreamweb/dreamgen.cpp +++ b/engines/dreamweb/dreamgen.cpp @@ -5667,26 +5667,6 @@ alreadytrav: data.byte(kNewlocation) = al; } -void DreamGenContext::getlocation() { - STACK_CHECK; - ah = 0; - bx = ax; - dx = data; - es = dx; - _add(bx, 8011); - al = es.byte(bx); -} - -void DreamGenContext::setlocation() { - STACK_CHECK; - ah = 0; - bx = ax; - dx = data; - es = dx; - _add(bx, 8011); - es.byte(bx) = 1; -} - void DreamGenContext::resetlocation() { STACK_CHECK; push(ax); diff --git a/engines/dreamweb/dreamgen.h b/engines/dreamweb/dreamgen.h index e638e04037..a63d27dc66 100644 --- a/engines/dreamweb/dreamgen.h +++ b/engines/dreamweb/dreamgen.h @@ -327,8 +327,6 @@ public: static const uint16 addr_readcitypic = 0xc4e4; static const uint16 addr_readdesticon = 0xc4e0; static const uint16 addr_resetlocation = 0xc4dc; - static const uint16 addr_setlocation = 0xc4d8; - static const uint16 addr_getlocation = 0xc4d4; static const uint16 addr_destselect = 0xc4d0; static const uint16 addr_lastdest = 0xc4cc; static const uint16 addr_nextdest = 0xc4c8; @@ -1563,7 +1561,7 @@ public: void searchforsame(); void enablesoundint(); void getback1(); - void setlocation(); + //void setlocation(); void fadefromwhite(); //void animpointer(); void usewindow(); @@ -1823,7 +1821,7 @@ public: void setupemm(); void aide(); //void getmapad(); - void getlocation(); + //void getlocation(); void geteitherad(); //void placesetobject(); //void drawflags(); diff --git a/engines/dreamweb/stubs.cpp b/engines/dreamweb/stubs.cpp index 78089273f0..9c81f9535b 100644 --- a/engines/dreamweb/stubs.cpp +++ b/engines/dreamweb/stubs.cpp @@ -2402,5 +2402,22 @@ void DreamGenContext::showrightpage() { data.word(kLinespacing) = 10; } + +uint8 DreamGenContext::getlocation(uint8 index) { + return data.byte(kRoomscango + index); +} + +void DreamGenContext::getlocation() { + al = getlocation(al); +} + +void DreamGenContext::setlocation(uint8 index) { + data.byte(kRoomscango + index) = 1; +} + +void DreamGenContext::setlocation() { + setlocation(al); +} + } /*namespace dreamgen */ diff --git a/engines/dreamweb/stubs.h b/engines/dreamweb/stubs.h index c544253766..f1245ad04a 100644 --- a/engines/dreamweb/stubs.h +++ b/engines/dreamweb/stubs.h @@ -358,4 +358,8 @@ void showfolder(); void showleftpage(); void showrightpage(); + uint8 getlocation(uint8 index); + void getlocation(); + void setlocation(uint8 index); + void setlocation(); |