Skip to content

Commit

Permalink
DREAMWEB: 'getlocation' and 'setlocation' ported to C++
Browse files Browse the repository at this point in the history
  • Loading branch information
tramboi committed Nov 28, 2011
1 parent 9d5a831 commit 23aa97f
Show file tree
Hide file tree
Showing 5 changed files with 25 additions and 24 deletions.
2 changes: 2 additions & 0 deletions devtools/tasmrecover/tasm-recover
Expand Up @@ -305,6 +305,8 @@ generator = cpp(context, "DreamGen", blacklist = [
'showfolder',
'showleftpage',
'showrightpage',
'getlocation',
'setlocation',
], skip_output = [
# These functions are processed but not output
'dreamweb',
Expand Down
20 changes: 0 additions & 20 deletions engines/dreamweb/dreamgen.cpp
Expand Up @@ -5667,26 +5667,6 @@ void DreamGenContext::destselect() {
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);
Expand Down
6 changes: 2 additions & 4 deletions engines/dreamweb/dreamgen.h
Expand Up @@ -327,8 +327,6 @@ class DreamGenContext : public Context {
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;
Expand Down Expand Up @@ -1563,7 +1561,7 @@ class DreamGenContext : public Context {
void searchforsame();
void enablesoundint();
void getback1();
void setlocation();
//void setlocation();
void fadefromwhite();
//void animpointer();
void usewindow();
Expand Down Expand Up @@ -1823,7 +1821,7 @@ class DreamGenContext : public Context {
void setupemm();
void aide();
//void getmapad();
void getlocation();
//void getlocation();
void geteitherad();
//void placesetobject();
//void drawflags();
Expand Down
17 changes: 17 additions & 0 deletions engines/dreamweb/stubs.cpp
Expand Up @@ -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 */

4 changes: 4 additions & 0 deletions engines/dreamweb/stubs.h
Expand Up @@ -358,4 +358,8 @@
void showfolder();
void showleftpage();
void showrightpage();
uint8 getlocation(uint8 index);
void getlocation();
void setlocation(uint8 index);
void setlocation();

0 comments on commit 23aa97f

Please sign in to comment.