Skip to content

Commit

Permalink
DREAMWEB: A few debugging functions are not needed
Browse files Browse the repository at this point in the history
  • Loading branch information
tramboi committed Nov 26, 2011
1 parent 21d787d commit b10c473
Show file tree
Hide file tree
Showing 3 changed files with 13 additions and 104 deletions.
4 changes: 4 additions & 0 deletions devtools/tasmrecover/tasm-recover
Expand Up @@ -277,6 +277,10 @@ generator = cpp(context, "DreamGen", blacklist = [
'dolook',
'reelsonscreen',
'reconstruct',
'showbyte',
'onedigit',
'showword',
'convnum',
], skip_output = [
# These functions are processed but not output
'dreamweb',
Expand Down
91 changes: 0 additions & 91 deletions engines/dreamweb/dreamgen.cpp
Expand Up @@ -12233,97 +12233,6 @@ void DreamGenContext::checkforshake() {
data.byte(kShakecounter) = -1;
}

void DreamGenContext::showbyte() {
STACK_CHECK;
dl = al;
_shr(dl, 1);
_shr(dl, 1);
_shr(dl, 1);
_shr(dl, 1);
onedigit();
es.byte(di) = dl;
dl = al;
_and(dl, 15);
onedigit();
es.byte(di+1) = dl;
_add(di, 3);
}

void DreamGenContext::onedigit() {
STACK_CHECK;
_cmp(dl, 10);
if (!flags.c())
goto morethan10;
_add(dl, '0');
return;
morethan10:
_sub(dl, 10);
_add(dl, 'A');
}

void DreamGenContext::showword() {
STACK_CHECK;
ch = 0;
bx = 10000;
cl = 47;
word1:
_inc(cl);
_sub(ax, bx);
if (!flags.c())
goto word1;
_add(ax, bx);
convnum();
cs.byte(di) = cl;
bx = 1000;
cl = 47;
word2:
_inc(cl);
_sub(ax, bx);
if (!flags.c())
goto word2;
_add(ax, bx);
convnum();
cs.byte(di+1) = cl;
bx = 100;
cl = 47;
word3:
_inc(cl);
_sub(ax, bx);
if (!flags.c())
goto word3;
_add(ax, bx);
convnum();
cs.byte(di+2) = cl;
bx = 10;
cl = 47;
word4:
_inc(cl);
_sub(ax, bx);
if (!flags.c())
goto word4;
_add(ax, bx);
convnum();
cs.byte(di+3) = cl;
_add(al, 48);
cl = al;
convnum();
cs.byte(di+4) = cl;
}

void DreamGenContext::convnum() {
STACK_CHECK;
_cmp(ch, 0);
if (!flags.z())
return /* (noconvnum) */;
_cmp(cl, '0');
if (!flags.z())
goto notzeronum;
cl = 32;
return /* (noconvnum) */;
notzeronum:
ch = 1;
}

void DreamGenContext::madmanrun() {
STACK_CHECK;
_cmp(data.byte(kLocation), 14);
Expand Down
22 changes: 9 additions & 13 deletions engines/dreamweb/dreamgen.h
Expand Up @@ -95,10 +95,6 @@ class DreamGenContext : public Context {
static const uint16 addr_identifyob = 0xc9d4;
static const uint16 addr_madmanrun = 0xc9cc;
static const uint16 addr_mainscreen = 0xc9c8;
static const uint16 addr_convnum = 0xc9c4;
static const uint16 addr_showword = 0xc9c0;
static const uint16 addr_onedigit = 0xc9b8;
static const uint16 addr_showbyte = 0xc9b4;
static const uint16 addr_checkforshake = 0xc9a4;
static const uint16 addr_watchreel = 0xc9a0;
static const uint16 addr_allocatemem = 0xc988;
Expand Down Expand Up @@ -1203,7 +1199,7 @@ class DreamGenContext : public Context {
void setmode();
void getbackfromops();
//void frameoutv();
void showbyte();
void opensarters();
//void screenupdate();
//void addlength();
//void usetimedtext();
Expand Down Expand Up @@ -1239,7 +1235,7 @@ class DreamGenContext : public Context {
void opentomb();
//void makename();
void buttonfour();
void restoreall();
void dosometalk();
//void lockmon();
//void dochange();
void getanyaddir();
Expand Down Expand Up @@ -1315,6 +1311,7 @@ class DreamGenContext : public Context {
//void cancelch1();
void loadold();
//void loadtempcharset();
//void showbyte();
void useslab();
void dumpzoom();
//void aboutturn();
Expand Down Expand Up @@ -1411,7 +1408,7 @@ class DreamGenContext : public Context {
void loadposition();
//void wornerror();
void entersymbol();
void showword();
//void showword();
void dirfile();
//void bresenhams();
//void walktotext();
Expand All @@ -1420,7 +1417,7 @@ class DreamGenContext : public Context {
void wearwatch();
void runintroseq();
//void doblocks();
void opensarters();
void restoreall();
//void delpointer();
void attendant();
void nextsymbol();
Expand Down Expand Up @@ -1548,7 +1545,7 @@ class DreamGenContext : public Context {
void sparkydrip();
//void paltostartpal();
void getridofpit();
void convnum();
//void convnum();
//void checkifset();
void nothelderror();
//void readheader();
Expand Down Expand Up @@ -1595,8 +1592,8 @@ class DreamGenContext : public Context {
void checksoundint();
void usewindow();
void wearshades();
//void onedigit();
void pitinterupt();
void onedigit();
void deleverything();
void fadescreendown();
//void findxyfrompath();
Expand Down Expand Up @@ -1722,7 +1719,7 @@ class DreamGenContext : public Context {
void calledensdlift();
void checkinside();
void gates();
void selectlocation();
void newgame();
//void showwatch();
//void turnanypathon();
void restorereels();
Expand Down Expand Up @@ -1878,7 +1875,7 @@ class DreamGenContext : public Context {
void getridoftempsp();
void scanfornames();
//void setallchanges();
void newgame();
void selectlocation();
//void printboth();
//void standardload();
void undertextline();
Expand All @@ -1889,7 +1886,6 @@ class DreamGenContext : public Context {
void emergencypurge();
void usemenu();
void alleybarksound();
void dosometalk();
void usecart();
void intromusic();
void quitkey();
Expand Down

0 comments on commit b10c473

Please sign in to comment.