Exported:

* GetLumpContainer
* GetContainerName
* GetLumpFullPath
for WADS struct, useful for debugging custom-made parsers and identifying where problems may arise.

All credit goes to Jay for the code.
This commit is contained in:
MajorCooke 2025-03-30 18:15:53 -05:00 committed by Ricardo Luís Vaz Silva
parent da6730d0a7
commit 6f3032dc54
2 changed files with 24 additions and 0 deletions

View file

@ -853,6 +853,27 @@ DEFINE_ACTION_FUNCTION(_Wads, GetLumpFullName)
ACTION_RETURN_STRING(fileSystem.GetFileFullName(lump));
}
DEFINE_ACTION_FUNCTION(_Wads, GetLumpContainer)
{
PARAM_PROLOGUE;
PARAM_INT(lump);
ACTION_RETURN_INT(fileSystem.GetFileContainer(lump));
}
DEFINE_ACTION_FUNCTION(_Wads, GetContainerName)
{
PARAM_PROLOGUE;
PARAM_INT(lump);
ACTION_RETURN_STRING(fileSystem.GetResourceFileName(lump));
}
DEFINE_ACTION_FUNCTION(_Wads, GetLumpFullPath)
{
PARAM_PROLOGUE;
PARAM_INT(lump);
ACTION_RETURN_STRING(fileSystem.GetFileFullPath(lump));
}
DEFINE_ACTION_FUNCTION(_Wads, GetLumpNamespace)
{
PARAM_PROLOGUE;

View file

@ -898,6 +898,9 @@ struct Wads // todo: make FileSystem an alias to 'Wads'
native static string GetLumpName(int lump);
native static string GetLumpFullName(int lump);
native static int GetLumpNamespace(int lump);
native static int GetLumpContainer(int lump);
native static string GetContainerName(int lump);
native static string GetLumpFullPath(int lump);
}
enum EmptyTokenType