Skip to content

Commit

Permalink
DREAMWEB: Port 'getunderzoom', 'putunderzoom', 'showdecisions', 'unde…
Browse files Browse the repository at this point in the history
…rtextline' to C++
  • Loading branch information
bluegr committed Dec 8, 2011
1 parent 8b61fb1 commit 128f757
Show file tree
Hide file tree
Showing 5 changed files with 36 additions and 55 deletions.
4 changes: 4 additions & 0 deletions devtools/tasmrecover/tasm-recover
Original file line number Diff line number Diff line change
Expand Up @@ -360,6 +360,7 @@ generator = cpp(context, "DreamGen", blacklist = [
'gettingshot',
'getundermenu',
'getundertimed',
'getunderzoom',
'getxad',
'getyad',
'grafittidoor',
Expand Down Expand Up @@ -526,6 +527,7 @@ generator = cpp(context, "DreamGen", blacklist = [
'putbackobstuff',
'putundermenu',
'putundertimed',
'putunderzoom',
'quickquit',
'quickquit2',
'random',
Expand Down Expand Up @@ -598,6 +600,7 @@ generator = cpp(context, "DreamGen", blacklist = [
'showbyte',
'showcity',
'showcurrentfile',
'showdecisions',
'showdiary',
'showdiscops',
'showexit',
Expand Down Expand Up @@ -672,6 +675,7 @@ generator = cpp(context, "DreamGen", blacklist = [
'turnpathoff',
'turnpathon',
'twodigitnum',
'undertextline',
'updatepeople',
'usebalcony',
'usecardreader1',
Expand Down
51 changes: 0 additions & 51 deletions engines/dreamweb/dreamgen.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -6265,19 +6265,6 @@ void DreamGenContext::decide() {
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);
Expand Down Expand Up @@ -6779,44 +6766,6 @@ void DreamGenContext::printmessage2() {
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,
Expand Down
4 changes: 0 additions & 4 deletions engines/dreamweb/dreamgen.h
Original file line number Diff line number Diff line change
Expand Up @@ -575,7 +575,6 @@ class DreamGenContext : public DreamBase, public Context {
void getAnyAd();
void endGame();
void usePipe();
void getUnderZoom();
void reminders();
void runTap();
void talk();
Expand All @@ -587,7 +586,6 @@ class DreamGenContext : public DreamBase, public Context {
void deleteExText();
void entryAnims();
void getFreeAd();
void showDecisions();
void removeObFromInv();
void heavy();
void useKey();
Expand All @@ -597,7 +595,6 @@ class DreamGenContext : public DreamBase, public Context {
void pickupConts();
void allPalette();
void cantDrop();
void putUnderZoom();
void findInvPos();
void rollEndCredits();
void getKeyAndLogo();
Expand Down Expand Up @@ -693,7 +690,6 @@ class DreamGenContext : public DreamBase, public Context {
void createName();
void getPersonText();
void parser();
void underTextLine();
void showNames();
void emergencyPurge();
void quitKey();
Expand Down
28 changes: 28 additions & 0 deletions engines/dreamweb/stubs.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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);
Expand Down
4 changes: 4 additions & 0 deletions engines/dreamweb/stubs.h
Original file line number Diff line number Diff line change
Expand Up @@ -550,5 +550,9 @@
}
void afterNewRoom();
void madmanRun();
void showDecisions();
void underTextLine();
void getUnderZoom();
void putUnderZoom();

#endif

0 comments on commit 128f757

Please sign in to comment.