From b10c473214192eb6266bd11b1c6e682bb1c16de1 Mon Sep 17 00:00:00 2001 From: Bertrand Augereau Date: Sat, 26 Nov 2011 12:42:01 +0100 Subject: [PATCH] DREAMWEB: A few debugging functions are not needed --- devtools/tasmrecover/tasm-recover | 4 ++ engines/dreamweb/dreamgen.cpp | 91 ------------------------------- engines/dreamweb/dreamgen.h | 22 +++----- 3 files changed, 13 insertions(+), 104 deletions(-) diff --git a/devtools/tasmrecover/tasm-recover b/devtools/tasmrecover/tasm-recover index e1b8b51f375..b94c3581269 100755 --- a/devtools/tasmrecover/tasm-recover +++ b/devtools/tasmrecover/tasm-recover @@ -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', diff --git a/engines/dreamweb/dreamgen.cpp b/engines/dreamweb/dreamgen.cpp index 59b0537146b..a3cafdba40c 100644 --- a/engines/dreamweb/dreamgen.cpp +++ b/engines/dreamweb/dreamgen.cpp @@ -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); diff --git a/engines/dreamweb/dreamgen.h b/engines/dreamweb/dreamgen.h index fb80fd40f5c..7c169e58ee0 100644 --- a/engines/dreamweb/dreamgen.h +++ b/engines/dreamweb/dreamgen.h @@ -95,10 +95,6 @@ public: 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; @@ -1203,7 +1199,7 @@ public: void setmode(); void getbackfromops(); //void frameoutv(); - void showbyte(); + void opensarters(); //void screenupdate(); //void addlength(); //void usetimedtext(); @@ -1239,7 +1235,7 @@ public: void opentomb(); //void makename(); void buttonfour(); - void restoreall(); + void dosometalk(); //void lockmon(); //void dochange(); void getanyaddir(); @@ -1315,6 +1311,7 @@ public: //void cancelch1(); void loadold(); //void loadtempcharset(); + //void showbyte(); void useslab(); void dumpzoom(); //void aboutturn(); @@ -1411,7 +1408,7 @@ public: void loadposition(); //void wornerror(); void entersymbol(); - void showword(); + //void showword(); void dirfile(); //void bresenhams(); //void walktotext(); @@ -1420,7 +1417,7 @@ public: void wearwatch(); void runintroseq(); //void doblocks(); - void opensarters(); + void restoreall(); //void delpointer(); void attendant(); void nextsymbol(); @@ -1548,7 +1545,7 @@ public: void sparkydrip(); //void paltostartpal(); void getridofpit(); - void convnum(); + //void convnum(); //void checkifset(); void nothelderror(); //void readheader(); @@ -1595,8 +1592,8 @@ public: void checksoundint(); void usewindow(); void wearshades(); + //void onedigit(); void pitinterupt(); - void onedigit(); void deleverything(); void fadescreendown(); //void findxyfrompath(); @@ -1722,7 +1719,7 @@ public: void calledensdlift(); void checkinside(); void gates(); - void selectlocation(); + void newgame(); //void showwatch(); //void turnanypathon(); void restorereels(); @@ -1878,7 +1875,7 @@ public: void getridoftempsp(); void scanfornames(); //void setallchanges(); - void newgame(); + void selectlocation(); //void printboth(); //void standardload(); void undertextline(); @@ -1889,7 +1886,6 @@ public: void emergencypurge(); void usemenu(); void alleybarksound(); - void dosometalk(); void usecart(); void intromusic(); void quitkey();