DIRECTOR: LINGO: Add GetVolume XFCN as builtin

This commit is contained in:
Nathanael Gentry 2020-08-21 12:00:18 -04:00
parent a6fc2ee3dc
commit 5c7b8fce47
2 changed files with 18 additions and 0 deletions

View File

@ -269,6 +269,8 @@ static struct BuiltinProto {
{ "scummvmAssert", LB::b_scummvmassert,1, 2, true, 200, HBLTIN },
{ "scummvmAssertEqual", LB::b_scummvmassertequal,2,3,true,200,HBLTIN },
// XCOD/XFCN (HyperCard), normally exposed
{ "GetVolumes", LB::b_getVolumes, 0, 0, true, 400, FBLTIN },
{ 0, 0, 0, 0, false, 0, VOIDSYM }
};
@ -2523,4 +2525,17 @@ void LB::b_scummvmassertequal(int nargs) {
assert(result == 1);
}
void LB::b_getVolumes(int nargs) {
ARGNUMCHECK(0);
// Right now, only "Journeyman Project 2: Buried in Time" is known to check
// for its volume name.
Datum d;
d.type = ARRAY;
d.u.farr = new DatumArray;
d.u.farr->push_back(Datum("Buried in Time\252 1"));
g_lingo->push(d);
}
} // End of namespace Director

View File

@ -202,6 +202,9 @@ void b_lastwordof(int nargs);
void b_scummvmassert(int nargs);
void b_scummvmassertequal(int nargs);
// XCOD/XFCN (HyperCard), normally exposed
void b_getVolumes(int nargs);
} // End of namespace LB
} // End of namespace Director