diff options
author | Bertrand Augereau | 2011-11-28 12:10:48 +0100 |
---|---|---|
committer | Bertrand Augereau | 2011-11-28 15:47:29 +0100 |
commit | ae8e5ea2f7b93bb0dfdb3aca225ede80eadc5ac7 (patch) | |
tree | ea4001c3248ff3d190b42873387547e96b05133b /engines/dreamweb | |
parent | a2721b6c579bbf5c3b4e83c9e70cd17f88fc049e (diff) | |
download | scummvm-rg350-ae8e5ea2f7b93bb0dfdb3aca225ede80eadc5ac7.tar.gz scummvm-rg350-ae8e5ea2f7b93bb0dfdb3aca225ede80eadc5ac7.tar.bz2 scummvm-rg350-ae8e5ea2f7b93bb0dfdb3aca225ede80eadc5ac7.zip |
DREAMWEB: 'showfolder' ported to C++
Diffstat (limited to 'engines/dreamweb')
-rw-r--r-- | engines/dreamweb/dreamgen.cpp | 64 | ||||
-rw-r--r-- | engines/dreamweb/dreamgen.h | 3 | ||||
-rw-r--r-- | engines/dreamweb/stubs.cpp | 25 | ||||
-rw-r--r-- | engines/dreamweb/stubs.h | 1 |
4 files changed, 27 insertions, 66 deletions
diff --git a/engines/dreamweb/dreamgen.cpp b/engines/dreamweb/dreamgen.cpp index 1e629a8ca9..518d25e2ad 100644 --- a/engines/dreamweb/dreamgen.cpp +++ b/engines/dreamweb/dreamgen.cpp @@ -9895,70 +9895,6 @@ void DreamGenContext::loadfolder() { loadtemptext(); } -void DreamGenContext::showfolder() { - STACK_CHECK; - data.byte(kCommandtype) = 255; - _cmp(data.byte(kFolderpage), 0); - if (flags.z()) - goto closedfolder; - usetempcharset(); - createpanel2(); - ds = data.word(kTempgraphics); - di = 0; - bx = 0; - al = 0; - ah = 0; - showframe(); - ds = data.word(kTempgraphics); - di = 143; - bx = 0; - al = 1; - ah = 0; - showframe(); - ds = data.word(kTempgraphics); - di = 0; - bx = 92; - al = 2; - ah = 0; - showframe(); - ds = data.word(kTempgraphics); - di = 143; - bx = 92; - al = 3; - ah = 0; - showframe(); - folderexit(); - _cmp(data.byte(kFolderpage), 1); - if (flags.z()) - goto noleftpage; - showleftpage(); -noleftpage: - _cmp(data.byte(kFolderpage), 12); - if (flags.z()) - goto norightpage; - showrightpage(); -norightpage: - usecharset1(); - undertextline(); - return; -closedfolder: - createpanel2(); - ds = data.word(kTempgraphics3); - di = 143-28; - bx = 0; - al = 0; - ah = 0; - showframe(); - ds = data.word(kTempgraphics3); - di = 143-28; - bx = 92; - al = 1; - ah = 0; - showframe(); - folderexit(); - undertextline(); -} - void DreamGenContext::folderexit() { STACK_CHECK; ds = data.word(kTempgraphics2); diff --git a/engines/dreamweb/dreamgen.h b/engines/dreamweb/dreamgen.h index 8e1a8074e5..fc77962601 100644 --- a/engines/dreamweb/dreamgen.h +++ b/engines/dreamweb/dreamgen.h @@ -179,7 +179,6 @@ public: static const uint16 addr_showrightpage = 0xc7d4; static const uint16 addr_showleftpage = 0xc7d0; static const uint16 addr_folderexit = 0xc7cc; - static const uint16 addr_showfolder = 0xc7c8; static const uint16 addr_loadfolder = 0xc7c4; static const uint16 addr_lastfolder = 0xc7c0; static const uint16 addr_folderhints = 0xc7bc; @@ -1188,7 +1187,7 @@ public: void deallocatemem(); void mainscreen(); void watchreel(); - void showfolder(); + //void showfolder(); void showslots(); void openfilefromc(); void gettime(); diff --git a/engines/dreamweb/stubs.cpp b/engines/dreamweb/stubs.cpp index e8a5624323..22bf348db9 100644 --- a/engines/dreamweb/stubs.cpp +++ b/engines/dreamweb/stubs.cpp @@ -2317,5 +2317,30 @@ void DreamGenContext::restorereels() { closefile(); } +void DreamGenContext::showfolder() { + data.byte(kCommandtype) = 255; + if (data.byte(kFolderpage)) { + usetempcharset(); + createpanel2(); + showframe(tempGraphics(), 0, 0, 0, 0); + showframe(tempGraphics(), 143, 0, 1, 0); + showframe(tempGraphics(), 0, 92, 2, 0); + showframe(tempGraphics(), 143, 92, 3, 0); + folderexit(); + if (data.byte(kFolderpage) != 1) + showleftpage(); + if (data.byte(kFolderpage) != 12) + showrightpage(); + usecharset1(); + undertextline(); + } else { + createpanel2(); + showframe(tempGraphics3(), 143-28, 0, 0, 0); + showframe(tempGraphics3(), 143-28, 92, 1, 0); + folderexit(); + undertextline(); + } +} + } /*namespace dreamgen */ diff --git a/engines/dreamweb/stubs.h b/engines/dreamweb/stubs.h index 029b99a93e..b5201d847a 100644 --- a/engines/dreamweb/stubs.h +++ b/engines/dreamweb/stubs.h @@ -355,4 +355,5 @@ void restoreall(); void restorereels(); void viewfolder(); + void showfolder(); |