mirror of
https://github.com/libretro/scummvm.git
synced 2024-12-14 21:59:17 +00:00
DREAMWEB: 'nextfolder' ported to C++
This commit is contained in:
parent
17d5b0d28d
commit
55d7272197
@ -305,6 +305,7 @@ generator = cpp(context, "DreamGen", blacklist = [
|
||||
'showfolder',
|
||||
'showleftpage',
|
||||
'showrightpage',
|
||||
'nextfolder',
|
||||
'getlocation',
|
||||
'setlocation',
|
||||
], skip_output = [
|
||||
|
@ -9740,40 +9740,6 @@ void DreamGenContext::loadmenu() {
|
||||
loadintotemp2();
|
||||
}
|
||||
|
||||
void DreamGenContext::nextfolder() {
|
||||
STACK_CHECK;
|
||||
_cmp(data.byte(kFolderpage), 12);
|
||||
if (!flags.z())
|
||||
goto cannextf;
|
||||
blank();
|
||||
return;
|
||||
cannextf:
|
||||
_cmp(data.byte(kCommandtype), 201);
|
||||
if (flags.z())
|
||||
goto alreadynextf;
|
||||
data.byte(kCommandtype) = 201;
|
||||
al = 16;
|
||||
commandonly();
|
||||
alreadynextf:
|
||||
ax = data.word(kMousebutton);
|
||||
_cmp(ax, data.word(kOldbutton));
|
||||
if (flags.z())
|
||||
return /* (notnextf) */;
|
||||
_cmp(ax, 1);
|
||||
if (flags.z())
|
||||
goto donextf;
|
||||
return;
|
||||
donextf:
|
||||
_inc(data.byte(kFolderpage));
|
||||
folderhints();
|
||||
delpointer();
|
||||
showfolder();
|
||||
data.word(kMousebutton) = 0;
|
||||
bx = offset_folderlist;
|
||||
checkcoords();
|
||||
worktoscreenm();
|
||||
}
|
||||
|
||||
void DreamGenContext::folderhints() {
|
||||
STACK_CHECK;
|
||||
_cmp(data.byte(kFolderpage), 5);
|
||||
|
@ -180,7 +180,6 @@ public:
|
||||
static const uint16 addr_loadfolder = 0xc7c4;
|
||||
static const uint16 addr_lastfolder = 0xc7c0;
|
||||
static const uint16 addr_folderhints = 0xc7bc;
|
||||
static const uint16 addr_nextfolder = 0xc7b8;
|
||||
static const uint16 addr_loadmenu = 0xc7b0;
|
||||
static const uint16 addr_showmenu = 0xc7ac;
|
||||
static const uint16 addr_dumpmenu = 0xc79c;
|
||||
@ -1341,7 +1340,7 @@ public:
|
||||
void calledenslift();
|
||||
void useclearbox();
|
||||
void entryanims();
|
||||
void nextfolder();
|
||||
//void nextfolder();
|
||||
void getfreead();
|
||||
void showarrows();
|
||||
void walkintoroom();
|
||||
|
@ -2423,5 +2423,36 @@ const uint8 *DreamGenContext::getTextInFile1(uint16 index) {
|
||||
return string;
|
||||
}
|
||||
|
||||
void DreamGenContext::checkFolderCoords() {
|
||||
RectWithCallback folderlist[] = {
|
||||
{ 280,320,160,200,&DreamGenContext::quitkey },
|
||||
{ 143,300,6,194,&DreamGenContext::nextfolder },
|
||||
{ 0,143,6,194,&DreamGenContext::lastfolder },
|
||||
{ 0,320,0,200,&DreamGenContext::blank },
|
||||
{ 0xFFFF,0,0,0,0 }
|
||||
};
|
||||
checkcoords(folderlist);
|
||||
}
|
||||
|
||||
void DreamGenContext::nextfolder() {
|
||||
if (data.byte(kFolderpage) == 12) {
|
||||
blank();
|
||||
return;
|
||||
}
|
||||
if (data.byte(kCommandtype) != 201) {
|
||||
data.byte(kCommandtype) = 201;
|
||||
commandonly(16);
|
||||
}
|
||||
if ((data.word(kMousebutton) == 1) && (data.word(kMousebutton) != data.word(kOldbutton))) {
|
||||
++data.byte(kFolderpage);
|
||||
folderhints();
|
||||
delpointer();
|
||||
showfolder();
|
||||
data.word(kMousebutton) = 0;
|
||||
checkFolderCoords();
|
||||
worktoscreenm();
|
||||
}
|
||||
}
|
||||
|
||||
} /*namespace dreamgen */
|
||||
|
||||
|
@ -355,9 +355,11 @@
|
||||
void restoreall();
|
||||
void restorereels();
|
||||
void viewfolder();
|
||||
void checkFolderCoords();
|
||||
void showfolder();
|
||||
void showleftpage();
|
||||
void showrightpage();
|
||||
void nextfolder();
|
||||
uint8 getlocation(uint8 index);
|
||||
void getlocation();
|
||||
void setlocation(uint8 index);
|
||||
|
@ -211,14 +211,7 @@ void DreamGenContext::viewfolder() {
|
||||
vsync();
|
||||
dumppointer();
|
||||
dumptextline();
|
||||
RectWithCallback folderlist[] = {
|
||||
{ 280,320,160,200,&DreamGenContext::quitkey },
|
||||
{ 143,300,6,194,&DreamGenContext::nextfolder },
|
||||
{ 0,143,6,194,&DreamGenContext::lastfolder },
|
||||
{ 0,320,0,200,&DreamGenContext::blank },
|
||||
{ 0xFFFF,0,0,0,0 }
|
||||
};
|
||||
checkcoords(folderlist);
|
||||
checkFolderCoords();
|
||||
} while (data.byte(kGetback) == 0);
|
||||
data.byte(kManisoffscreen) = 0;
|
||||
getridoftemp();
|
||||
|
Loading…
Reference in New Issue
Block a user