aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorFilippos Karapetis2011-12-08 22:48:00 +0200
committerFilippos Karapetis2011-12-08 22:48:00 +0200
commit128f75739c7382179e8f70e6a7098fc366d65821 (patch)
tree9b1f3c297d02f22aa71896648c92941c7b7a1ff4
parent8b61fb168d03e045c0fec85e8ce4fbb93dd535b8 (diff)
downloadscummvm-rg350-128f75739c7382179e8f70e6a7098fc366d65821.tar.gz
scummvm-rg350-128f75739c7382179e8f70e6a7098fc366d65821.tar.bz2
scummvm-rg350-128f75739c7382179e8f70e6a7098fc366d65821.zip
DREAMWEB: Port 'getunderzoom', 'putunderzoom', 'showdecisions', 'undertextline' to C++
-rwxr-xr-xdevtools/tasmrecover/tasm-recover4
-rw-r--r--engines/dreamweb/dreamgen.cpp51
-rw-r--r--engines/dreamweb/dreamgen.h4
-rw-r--r--engines/dreamweb/stubs.cpp28
-rw-r--r--engines/dreamweb/stubs.h4
5 files changed, 36 insertions, 55 deletions
diff --git a/devtools/tasmrecover/tasm-recover b/devtools/tasmrecover/tasm-recover
index 1c30478b60..baea7a8fb7 100755
--- a/devtools/tasmrecover/tasm-recover
+++ b/devtools/tasmrecover/tasm-recover
@@ -360,6 +360,7 @@ generator = cpp(context, "DreamGen", blacklist = [
'gettingshot',
'getundermenu',
'getundertimed',
+ 'getunderzoom',
'getxad',
'getyad',
'grafittidoor',
@@ -526,6 +527,7 @@ generator = cpp(context, "DreamGen", blacklist = [
'putbackobstuff',
'putundermenu',
'putundertimed',
+ 'putunderzoom',
'quickquit',
'quickquit2',
'random',
@@ -598,6 +600,7 @@ generator = cpp(context, "DreamGen", blacklist = [
'showbyte',
'showcity',
'showcurrentfile',
+ 'showdecisions',
'showdiary',
'showdiscops',
'showexit',
@@ -672,6 +675,7 @@ generator = cpp(context, "DreamGen", blacklist = [
'turnpathoff',
'turnpathon',
'twodigitnum',
+ 'undertextline',
'updatepeople',
'usebalcony',
'usecardreader1',
diff --git a/engines/dreamweb/dreamgen.cpp b/engines/dreamweb/dreamgen.cpp
index b29e04b2dc..022b80a721 100644
--- a/engines/dreamweb/dreamgen.cpp
+++ b/engines/dreamweb/dreamgen.cpp
@@ -6265,19 +6265,6 @@ hasloadedroom:
data.byte(kTextlen) = 240;
}
-void DreamGenContext::showDecisions() {
- STACK_CHECK;
- createPanel2();
- showOpBox();
- ds = data.word(kTempgraphics);
- di = (60)+17;
- bx = (52)+13;
- al = 6;
- ah = 0;
- showFrame();
- underTextLine();
-}
-
void DreamGenContext::createName() {
STACK_CHECK;
push(ax);
@@ -6779,44 +6766,6 @@ searchmess:
printDirect();
}
-void DreamGenContext::getUnderZoom() {
- STACK_CHECK;
- di = (8)+5;
- bx = (132)+4;
- ds = data.word(kBuffers);
- si = (0+(228*13)+32+60+(32*32)+(11*10*3)+768+768+768+(32*32)+(128*5)+(80*5)+(100*5)+(12*5));
- cl = 46;
- ch = 40;
- multiGet();
-}
-
-void DreamGenContext::putUnderZoom() {
- STACK_CHECK;
- di = (8)+5;
- bx = (132)+4;
- ds = data.word(kBuffers);
- si = (0+(228*13)+32+60+(32*32)+(11*10*3)+768+768+768+(32*32)+(128*5)+(80*5)+(100*5)+(12*5));
- cl = 46;
- ch = 40;
- multiPut();
-}
-
-void DreamGenContext::underTextLine() {
- STACK_CHECK;
- di = data.word(kTextaddressx);
- bx = data.word(kTextaddressy);
- _cmp(data.byte(kForeignrelease), 0);
- if (flags.z())
- goto _tmp1;
- _sub(bx, 3);
-_tmp1:
- ds = data.word(kBuffers);
- si = (0);
- cl = (228);
- ch = (13);
- multiGet();
-}
-
void DreamGenContext::__start() {
static const uint8 src[] = {
0x00, 0x00, 0x00, 0x00, 0x00, 0x1e, 0x13, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
diff --git a/engines/dreamweb/dreamgen.h b/engines/dreamweb/dreamgen.h
index 0f4dcdb01e..3ca39f0eda 100644
--- a/engines/dreamweb/dreamgen.h
+++ b/engines/dreamweb/dreamgen.h
@@ -575,7 +575,6 @@ public:
void getAnyAd();
void endGame();
void usePipe();
- void getUnderZoom();
void reminders();
void runTap();
void talk();
@@ -587,7 +586,6 @@ public:
void deleteExText();
void entryAnims();
void getFreeAd();
- void showDecisions();
void removeObFromInv();
void heavy();
void useKey();
@@ -597,7 +595,6 @@ public:
void pickupConts();
void allPalette();
void cantDrop();
- void putUnderZoom();
void findInvPos();
void rollEndCredits();
void getKeyAndLogo();
@@ -693,7 +690,6 @@ public:
void createName();
void getPersonText();
void parser();
- void underTextLine();
void showNames();
void emergencyPurge();
void quitKey();
diff --git a/engines/dreamweb/stubs.cpp b/engines/dreamweb/stubs.cpp
index 35b0ae3ac4..14029ae835 100644
--- a/engines/dreamweb/stubs.cpp
+++ b/engines/dreamweb/stubs.cpp
@@ -3808,6 +3808,34 @@ void DreamBase::showDiary() {
showFrame(tempGraphics(), kDiaryx + 176, kDiaryy + 108, 2, 0);
}
+void DreamGenContext::underTextLine() {
+ uint16 y = data.word(kTextaddressy);
+ if (data.byte(kForeignrelease))
+ y -= 3;
+ ds = data.word(kBuffers);
+ si = kTextunder;
+ multiGet(ds.ptr(si, 0), data.byte(kTextaddressx), y, kUndertextsizex, kUndertextsizey);
+}
+
+void DreamGenContext::showDecisions() {
+ createPanel2();
+ showOpBox();
+ showFrame(tempGraphics(), kOpsx + 17, kOpsy + 13, 6, 0);
+ underTextLine();
+}
+
+void DreamGenContext::getUnderZoom() {
+ ds = data.word(kBuffers);
+ si = kZoomspace;
+ multiGet(ds.ptr(si, 0), kZoomx + 5, kZoomy + 4, 46, 40);
+}
+
+void DreamGenContext::putUnderZoom() {
+ ds = data.word(kBuffers);
+ si = kZoomspace;
+ multiPut(ds.ptr(si, 0), kZoomx + 5, kZoomy + 4, 46, 40);
+}
+
void DreamGenContext::showWatchReel() {
uint16 reelPointer = data.word(kReeltowatch);
plotReel(reelPointer);
diff --git a/engines/dreamweb/stubs.h b/engines/dreamweb/stubs.h
index f4bb1ec13b..012d0a8e6d 100644
--- a/engines/dreamweb/stubs.h
+++ b/engines/dreamweb/stubs.h
@@ -550,5 +550,9 @@
}
void afterNewRoom();
void madmanRun();
+ void showDecisions();
+ void underTextLine();
+ void getUnderZoom();
+ void putUnderZoom();
#endif