From c98803817418c39ca94994e7946419645ab729dd Mon Sep 17 00:00:00 2001 From: Filippos Karapetis Date: Wed, 14 Dec 2011 00:47:29 +0200 Subject: DREAMWEB: Port 'showdiarypage' to C++ --- engines/dreamweb/dreamgen.cpp | 33 --------------------------------- engines/dreamweb/dreamgen.h | 1 - engines/dreamweb/stubs.cpp | 17 +++++++++++++++++ engines/dreamweb/stubs.h | 1 + 4 files changed, 18 insertions(+), 34 deletions(-) (limited to 'engines/dreamweb') diff --git a/engines/dreamweb/dreamgen.cpp b/engines/dreamweb/dreamgen.cpp index 83b86f9d51..725e682a14 100644 --- a/engines/dreamweb/dreamgen.cpp +++ b/engines/dreamweb/dreamgen.cpp @@ -4260,39 +4260,6 @@ notdumpdiary: multiDump(); } -void DreamGenContext::showDiaryPage() { - STACK_CHECK; - al = 0; - ah = 0; - di = (68+24); - bx = (48+12); - ds = data.word(kTempgraphics); - showFrame(); - al = data.byte(kDiarypage); - findText1(); - data.byte(kKerning) = 1; - useTempCharset(); - di = (68+24)+48; - bx = (48+12)+16; - dl = 240; - ah = 16; - data.word(kCharshift) = 91+91; - printDirect(); - di = (68+24)+129; - bx = (48+12)+16; - dl = 240; - ah = 16; - printDirect(); - di = (68+24)+48; - bx = (48+12)+23; - dl = 240; - ah = 16; - printDirect(); - data.byte(kKerning) = 0; - data.word(kCharshift) = 0; - useCharset1(); -} - void DreamGenContext::findText1() { STACK_CHECK; ah = 0; diff --git a/engines/dreamweb/dreamgen.h b/engines/dreamweb/dreamgen.h index a8e8a610fd..f5c333be36 100644 --- a/engines/dreamweb/dreamgen.h +++ b/engines/dreamweb/dreamgen.h @@ -523,7 +523,6 @@ public: void getKeyAndLogo(); void selectOb(); void fadeUpMon(); - void showDiaryPage(); void reExFromInv(); void businessMan(); void outOfInv(); diff --git a/engines/dreamweb/stubs.cpp b/engines/dreamweb/stubs.cpp index a7d65845e1..4fc46ad3aa 100644 --- a/engines/dreamweb/stubs.cpp +++ b/engines/dreamweb/stubs.cpp @@ -4582,4 +4582,21 @@ void DreamGenContext::updateSymbolBot() { } } +void DreamGenContext::showDiaryPage() { + showFrame(tempGraphics(), kDiaryx, kDiaryy, 0, 0); + data.byte(kKerning) = 1; + useTempCharset(); + data.word(kCharshift) = 91+91; + uint16 offset = kTextstart + getSegment(data.word(kTextfile1)).word(data.byte(kDiarypage) * 2); + const uint8 *string = getSegment(data.word(kTextfile1)).ptr(offset, 0); + uint16 y = kDiaryy + 16; + printDirect(&string, kDiaryx + 48, &y, 240, 240 & 1); + printDirect(&string, kDiaryx + 129, &y, 240, 240 & 1); + y = kDiaryy + 23; + printDirect(&string, kDiaryx + 48, &y, 240, 240 & 1); + data.byte(kKerning) = 0; + data.word(kCharshift) = 0; + useCharset1(); +} + } // End of namespace DreamGen diff --git a/engines/dreamweb/stubs.h b/engines/dreamweb/stubs.h index 5256111cc1..da01c9b26c 100644 --- a/engines/dreamweb/stubs.h +++ b/engines/dreamweb/stubs.h @@ -581,5 +581,6 @@ void processTrigger(); void updateSymbolTop(); void updateSymbolBot(); + void showDiaryPage(); #endif -- cgit v1.2.3