Export FindLumpFullName to ZScript.

This commit is contained in:
Marisa the Magician 2022-08-05 16:48:48 +02:00 committed by Christoph Oelckers
parent 4c6d0e4209
commit 931211b9db
2 changed files with 11 additions and 0 deletions

View File

@ -758,6 +758,16 @@ DEFINE_ACTION_FUNCTION(_Wads, FindLump)
ACTION_RETURN_INT(isLumpValid ? fileSystem.FindLump(name, &startlump, 0 != ns) : -1);
}
DEFINE_ACTION_FUNCTION(_Wads, FindLumpFullName)
{
PARAM_PROLOGUE;
PARAM_STRING(name);
PARAM_INT(startlump);
PARAM_BOOL(noext);
const bool isLumpValid = startlump >= 0 && startlump < fileSystem.GetNumEntries();
ACTION_RETURN_INT(isLumpValid ? fileSystem.FindLumpFullName(name, &startlump, noext) : -1);
}
DEFINE_ACTION_FUNCTION(_Wads, GetLumpName)
{
PARAM_PROLOGUE;

View File

@ -829,6 +829,7 @@ struct Wads // todo: make FileSystem an alias to 'Wads'
native static int CheckNumForName(string name, int ns, int wadnum = -1, bool exact = false);
native static int CheckNumForFullName(string name);
native static int FindLump(string name, int startlump = 0, FindLumpNamespace ns = GlobalNamespace);
native static int FindLumpFullName(string name, int startlump = 0, bool noext = false);
native static string ReadLump(int lump);
native static int GetNumLumps();