diff options
author | Filippos Karapetis | 2011-12-14 01:03:57 +0200 |
---|---|---|
committer | Filippos Karapetis | 2011-12-14 01:03:57 +0200 |
commit | c95bdeb20ca16927fbac990c9633cb0db9e1fc3e (patch) | |
tree | c20d866837da9313a92a2c3ed3e5f4cf6b784914 /engines/dreamweb | |
parent | c98803817418c39ca94994e7946419645ab729dd (diff) | |
download | scummvm-rg350-c95bdeb20ca16927fbac990c9633cb0db9e1fc3e.tar.gz scummvm-rg350-c95bdeb20ca16927fbac990c9633cb0db9e1fc3e.tar.bz2 scummvm-rg350-c95bdeb20ca16927fbac990c9633cb0db9e1fc3e.zip |
DREAMWEB: Port 'dumpdiarykeys' to C++ and remove the now unused 'findtext1'
Diffstat (limited to 'engines/dreamweb')
-rw-r--r-- | engines/dreamweb/dreamgen.cpp | 69 | ||||
-rw-r--r-- | engines/dreamweb/dreamgen.h | 2 | ||||
-rw-r--r-- | engines/dreamweb/stubs.cpp | 28 | ||||
-rw-r--r-- | engines/dreamweb/stubs.h | 1 |
4 files changed, 29 insertions, 71 deletions
diff --git a/engines/dreamweb/dreamgen.cpp b/engines/dreamweb/dreamgen.cpp index 725e682a14..e2b5530b2e 100644 --- a/engines/dreamweb/dreamgen.cpp +++ b/engines/dreamweb/dreamgen.cpp @@ -4202,75 +4202,6 @@ gotkeyp: showDiaryPage(); } -void DreamGenContext::dumpDiaryKeys() { - STACK_CHECK; - _cmp(data.byte(kPresscount), 1); - if (!flags.z()) - goto notdumpdiary; - _cmp(data.byte(kSartaindead), 1); - if (flags.z()) - goto notsartadd; - _cmp(data.byte(kDiarypage), 5); - if (!flags.z()) - goto notsartadd; - _cmp(data.byte(kDiarypage), 5); - if (!flags.z()) - goto notsartadd; - al = 6; - getLocation(); - _cmp(al, 1); - if (flags.z()) - goto notsartadd; - al = 6; - setLocation(); - delPointer(); - al = 12; - findText1(); - di = 70; - bx = 106; - dl = 241; - ah = 16; - printDirect(); - workToScreenM(); - cx = 200; - hangOnP(); - createPanel(); - showIcon(); - showDiary(); - showDiaryPage(); - workToScreenM(); - showPointer(); - return; -notsartadd: - di = (68+24)+48; - bx = (48+12)+15; - cl = 200; - ch = 16; - multiDump(); -notdumpdiary: - di = (68+24)+94; - bx = (48+12)+97; - cl = 16; - ch = 16; - multiDump(); - di = (68+24)+151; - bx = (48+12)+71; - cl = 16; - ch = 16; - multiDump(); -} - -void DreamGenContext::findText1() { - STACK_CHECK; - ah = 0; - si = ax; - _add(si, si); - es = data.word(kTextfile1); - ax = es.word(si); - _add(ax, (66*2)); - si = ax; -} - void DreamGenContext::showSlots() { STACK_CHECK; di = (60)+7; diff --git a/engines/dreamweb/dreamgen.h b/engines/dreamweb/dreamgen.h index f5c333be36..48b40feb37 100644 --- a/engines/dreamweb/dreamgen.h +++ b/engines/dreamweb/dreamgen.h @@ -488,7 +488,6 @@ public: void clearBuffers(); void getObTextStart(); void checkObjectSize(); - void findText1(); void isRyanHolding(); void showSlots(); void useCashCard(); @@ -507,7 +506,6 @@ public: void startTalk(); void getAnyAd(); void reminders(); - void dumpDiaryKeys(); void checkForExit(); void lookInInterface(); void inToInv(); diff --git a/engines/dreamweb/stubs.cpp b/engines/dreamweb/stubs.cpp index 4fc46ad3aa..e753efd72a 100644 --- a/engines/dreamweb/stubs.cpp +++ b/engines/dreamweb/stubs.cpp @@ -4599,4 +4599,32 @@ void DreamGenContext::showDiaryPage() { useCharset1(); } +void DreamGenContext::dumpDiaryKeys() { + if (data.byte(kPresscount) == 1) { + if (data.byte(kSartaindead) != 1 && data.byte(kDiarypage) == 5 && DreamBase::getLocation(6) != 1) { + // Add Sartain Industries note + DreamBase::setLocation(6); + delPointer(); + uint16 offset = kTextstart + getSegment(data.word(kTextfile1)).word(12 * 2); + const uint8 *string = getSegment(data.word(kTextfile1)).ptr(offset, 0); + uint16 y = 106; + printDirect(&string, 70, &y, 241, 241 & 1); + workToScreenM(); + hangOnP(200); + createPanel(); + showIcon(); + showDiary(); + showDiaryPage(); + workToScreenM(); + showPointer(); + return; + } else { + multiDump(kDiaryx + 48, kDiaryy + 15, 200, 16); + } + } + + multiDump(kDiaryx + 94, kDiaryy + 97, 16, 16); + multiDump(kDiaryx + 151, kDiaryy + 71, 16, 16); +} + } // End of namespace DreamGen diff --git a/engines/dreamweb/stubs.h b/engines/dreamweb/stubs.h index da01c9b26c..50a8faaf34 100644 --- a/engines/dreamweb/stubs.h +++ b/engines/dreamweb/stubs.h @@ -582,5 +582,6 @@ void updateSymbolTop(); void updateSymbolBot(); void showDiaryPage(); + void dumpDiaryKeys(); #endif |