Skip to content

Commit

Permalink
DREAMWEB: 'oldtonames' and 'namestoold' ported to C++
Browse files Browse the repository at this point in the history
  • Loading branch information
tramboi committed Nov 17, 2011
1 parent 3e049c0 commit a389f1e
Show file tree
Hide file tree
Showing 5 changed files with 16 additions and 29 deletions.
2 changes: 2 additions & 0 deletions devtools/tasmrecover/tasm-recover
Expand Up @@ -65,6 +65,8 @@ generator = cpp(context, "DreamGen", blacklist = [
'printsprites',
'printasprite',
'eraseoldobs',
'oldtonames',
'namestoold',
'clearsprites',
'makesprite',
'showframe',
Expand Down
22 changes: 0 additions & 22 deletions engines/dreamweb/dreamgen.cpp
Expand Up @@ -12217,26 +12217,6 @@ void DreamGenContext::shownames() {
goto shownameloop;
}

void DreamGenContext::namestoold() {
STACK_CHECK;
ds = cs;
si = 8579;
di = (0+(228*13)+32+60+(32*32)+(11*10*3)+768+768+768+(32*32)+(128*5)+(80*5)+(100*5)+(12*5));
es = data.word(kBuffers);
cx = 17*4;
_movsb(cx, true);
}

void DreamGenContext::oldtonames() {
STACK_CHECK;
es = cs;
di = 8579;
si = (0+(228*13)+32+60+(32*32)+(11*10*3)+768+768+768+(32*32)+(128*5)+(80*5)+(100*5)+(12*5));
ds = data.word(kBuffers);
cx = 17*4;
_movsb(cx, true);
}

void DreamGenContext::saveposition() {
STACK_CHECK;
makeheader();
Expand Down Expand Up @@ -16061,8 +16041,6 @@ void DreamGenContext::__dispatch_call(uint16 addr) {
case addr_shownames: shownames(); break;
case addr_dosreturn: dosreturn(); break;
case addr_error: error(); break;
case addr_namestoold: namestoold(); break;
case addr_oldtonames: oldtonames(); break;
case addr_savefilewrite: savefilewrite(); break;
case addr_savefileread: savefileread(); break;
case addr_saveposition: saveposition(); break;
Expand Down
12 changes: 5 additions & 7 deletions engines/dreamweb/dreamgen.h
Expand Up @@ -169,8 +169,6 @@ class DreamGenContext : public Context {
static const uint16 addr_saveposition = 0xc898;
static const uint16 addr_savefileread = 0xc894;
static const uint16 addr_savefilewrite = 0xc890;
static const uint16 addr_oldtonames = 0xc88c;
static const uint16 addr_namestoold = 0xc888;
static const uint16 addr_error = 0xc884;
static const uint16 addr_generalerror = 0xcbbc;
static const uint16 addr_dosreturn = 0xc880;
Expand Down Expand Up @@ -1295,7 +1293,7 @@ class DreamGenContext : public Context {
void showsaveops();
void intromonks1();
void resetlocation();
void oldtonames();
//void oldtonames();
void showdiscops();
void advisor();
void additionaltext();
Expand Down Expand Up @@ -1358,7 +1356,7 @@ class DreamGenContext : public Context {
void showsymbol();
void endgameseq();
//void cancelch0();
void setbotleft();
void turnonpower();
void findfirstpath();
//void cancelch1();
void loadold();
Expand All @@ -1368,7 +1366,7 @@ class DreamGenContext : public Context {
//void aboutturn();
void usealtar();
void createpanel2();
void turnonpower();
void setbotleft();
void manasleep2();
void moretalk();
//void printslow();
Expand Down Expand Up @@ -1648,7 +1646,7 @@ class DreamGenContext : public Context {
void deleverything();
void fadescreendown();
//void findxyfrompath();
void namestoold();
void poolguard();
//void getxad();
void openinv();
void lookatplace();
Expand All @@ -1668,7 +1666,7 @@ class DreamGenContext : public Context {
void loadintotemp3();
void loadintotemp2();
void gamer();
void poolguard();
//void namestoold();
void readfromfile();
void initialinv();
void quitsymbol();
Expand Down
7 changes: 7 additions & 0 deletions engines/dreamweb/saveload.cpp
Expand Up @@ -352,5 +352,12 @@ void DreamGenContext::savegame() {
}
}

void DreamGenContext::namestoold() {
memcpy(segRef(data.word(kBuffers)).ptr(kZoomspace, 0), cs.ptr(kSavenames, 0), 17*4);
}

void DreamGenContext::oldtonames() {
memcpy(cs.ptr(kSavenames, 0), segRef(data.word(kBuffers)).ptr(kZoomspace, 0), 17*4);
}

} /*namespace dreamgen */
2 changes: 2 additions & 0 deletions engines/dreamweb/stubs.h
Expand Up @@ -62,6 +62,8 @@
void getnumber();
uint8 getnumber(const Frame *charSet, const uint8 *string, uint16 maxWidth, bool centered, uint16 *offset);
uint8 kernchars(uint8 firstChar, uint8 secondChar, uint8 width);
void oldtonames();
void namestoold();
void getroomdata();
Room *getroomdata(uint8 room);
void readheader();
Expand Down

0 comments on commit a389f1e

Please sign in to comment.