diff options
Diffstat (limited to 'engines')
-rw-r--r-- | engines/dreamweb/dreamgen.cpp | 57 | ||||
-rw-r--r-- | engines/dreamweb/dreamgen.h | 5 | ||||
-rw-r--r-- | engines/dreamweb/stubs.cpp | 26 | ||||
-rw-r--r-- | engines/dreamweb/stubs.h | 1 |
4 files changed, 29 insertions, 60 deletions
diff --git a/engines/dreamweb/dreamgen.cpp b/engines/dreamweb/dreamgen.cpp index 6c63e0f7f9..78d3098277 100644 --- a/engines/dreamweb/dreamgen.cpp +++ b/engines/dreamweb/dreamgen.cpp @@ -9905,63 +9905,6 @@ void DreamGenContext::folderexit() { showframe(); } -void DreamGenContext::showrightpage() { - STACK_CHECK; - ds = data.word(kTempgraphics2); - di = 143; - bx = 12; - al = 0; - ah = 0; - showframe(); - bx = 12+37; - cx = 7; -rightpageloop: - push(cx); - push(bx); - ds = data.word(kTempgraphics2); - di = 143; - al = 1; - ah = 0; - showframe(); - bx = pop(); - cx = pop(); - _add(bx, 16); - if (--cx) - goto rightpageloop; - ds = data.word(kTempgraphics2); - di = 143; - al = 2; - ah = 0; - showframe(); - data.word(kLinespacing) = 8; - data.byte(kKerning) = 1; - bl = data.byte(kFolderpage); - _dec(bl); - _add(bl, bl); - bh = 0; - _add(bx, bx); - es = data.word(kTextfile1); - si = es.word(bx); - _add(si, 66*2); - di = 152; - bx = 48; - dl = 140; - cx = 2; -twolotsright: - push(cx); -contrightpage: - printdirect(); - _add(bx, data.word(kLinespacing)); - _cmp(al, 0); - if (!flags.z()) - goto contrightpage; - cx = pop(); - if (--cx) - goto twolotsright; - data.byte(kKerning) = 0; - data.word(kLinespacing) = 10; -} - void DreamGenContext::entersymbol() { STACK_CHECK; data.byte(kManisoffscreen) = 1; diff --git a/engines/dreamweb/dreamgen.h b/engines/dreamweb/dreamgen.h index eef7a350cd..e638e04037 100644 --- a/engines/dreamweb/dreamgen.h +++ b/engines/dreamweb/dreamgen.h @@ -176,7 +176,6 @@ public: static const uint16 addr_settopleft = 0xc7e0; static const uint16 addr_quitsymbol = 0xc7dc; static const uint16 addr_entersymbol = 0xc7d8; - static const uint16 addr_showrightpage = 0xc7d4; static const uint16 addr_folderexit = 0xc7cc; static const uint16 addr_loadfolder = 0xc7c4; static const uint16 addr_lastfolder = 0xc7c0; @@ -1383,7 +1382,7 @@ public: //void loadposition(); //void wornerror(); void entersymbol(); - //void showword(); + //void showrightpage(); void dirfile(); //void bresenhams(); //void savefilewrite(); @@ -1672,7 +1671,7 @@ public: void signon(); void deleteextext(); void foghornsound(); - void showrightpage(); + //void showword(); void showloadops(); void examicon(); void showgun(); diff --git a/engines/dreamweb/stubs.cpp b/engines/dreamweb/stubs.cpp index 0973e9ee6c..78089273f0 100644 --- a/engines/dreamweb/stubs.cpp +++ b/engines/dreamweb/stubs.cpp @@ -2376,5 +2376,31 @@ void DreamGenContext::showleftpage() { } } +void DreamGenContext::showrightpage() { + showframe(tempGraphics2(), 143, 12, 0, 0); + uint16 y = 12+37; + for (size_t i = 0; i < 7; ++i) { + showframe(tempGraphics2(), 143, y, 1, 0); + y += 16; + } + + showframe(tempGraphics2(), 143, y, 2, 0); + data.word(kLinespacing) = 8; + data.byte(kKerning) = 1; + uint8 pageIndex = data.byte(kFolderpage) - 1; + uint16 offset = segRef(data.word(kTextfile1)).word(pageIndex * 4) + 66*2; + const uint8 *string = segRef(data.word(kTextfile1)).ptr(offset, 0); + y = 48; + for (size_t i = 0; i < 2; ++i) { + uint8 lastChar; + do { + lastChar = printdirect(&string, 152, &y, 140, false); + y += data.word(kLinespacing); + } while (lastChar != '\0'); + } + data.byte(kKerning) = 0; + data.word(kLinespacing) = 10; +} + } /*namespace dreamgen */ diff --git a/engines/dreamweb/stubs.h b/engines/dreamweb/stubs.h index 129d906abf..c544253766 100644 --- a/engines/dreamweb/stubs.h +++ b/engines/dreamweb/stubs.h @@ -357,4 +357,5 @@ void viewfolder(); void showfolder(); void showleftpage(); + void showrightpage(); |