Skip to content

Commit

Permalink
DREAMWEB: 'showfolder' ported to C++
Browse files Browse the repository at this point in the history
  • Loading branch information
tramboi committed Nov 28, 2011
1 parent a2721b6 commit ae8e5ea
Show file tree
Hide file tree
Showing 5 changed files with 28 additions and 66 deletions.
1 change: 1 addition & 0 deletions devtools/tasmrecover/tasm-recover
Expand Up @@ -302,6 +302,7 @@ generator = cpp(context, "DreamGen", blacklist = [
'restorereels',
'allocateload',
'viewfolder',
'showfolder',
], skip_output = [
# These functions are processed but not output
'dreamweb',
Expand Down
64 changes: 0 additions & 64 deletions engines/dreamweb/dreamgen.cpp
Expand Up @@ -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);
Expand Down
3 changes: 1 addition & 2 deletions engines/dreamweb/dreamgen.h
Expand Up @@ -179,7 +179,6 @@ class DreamGenContext : public Context {
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;
Expand Down Expand Up @@ -1188,7 +1187,7 @@ class DreamGenContext : public Context {
void deallocatemem();
void mainscreen();
void watchreel();
void showfolder();
//void showfolder();
void showslots();
void openfilefromc();
void gettime();
Expand Down
25 changes: 25 additions & 0 deletions engines/dreamweb/stubs.cpp
Expand Up @@ -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 */

1 change: 1 addition & 0 deletions engines/dreamweb/stubs.h
Expand Up @@ -355,4 +355,5 @@
void restoreall();
void restorereels();
void viewfolder();
void showfolder();

0 comments on commit ae8e5ea

Please sign in to comment.