From 415ed57713ffd511dfea0bb268871227617790fd Mon Sep 17 00:00:00 2001 From: "alexey.lysiuk" Date: Sun, 29 Oct 2017 15:11:49 +0200 Subject: [PATCH] Added Wads.CheckNumForFullName() to ZScript https://forum.zdoom.org/viewtopic.php?t=57814 --- src/w_wad.cpp | 7 +++++++ wadsrc/static/zscript/base.txt | 1 + 2 files changed, 8 insertions(+) diff --git a/src/w_wad.cpp b/src/w_wad.cpp index 2c8213828..412450d0a 100644 --- a/src/w_wad.cpp +++ b/src/w_wad.cpp @@ -567,6 +567,13 @@ int FWadCollection::CheckNumForFullName (const char *name, bool trynormal, int n return -1; } +DEFINE_ACTION_FUNCTION(_Wads, CheckNumForFullName) +{ + PARAM_PROLOGUE; + PARAM_STRING(name); + ACTION_RETURN_INT(Wads.CheckNumForFullName(name)); +} + int FWadCollection::CheckNumForFullName (const char *name, int wadnum) { uint32_t i; diff --git a/wadsrc/static/zscript/base.txt b/wadsrc/static/zscript/base.txt index 9c429fb4d..a6866f0ff 100644 --- a/wadsrc/static/zscript/base.txt +++ b/wadsrc/static/zscript/base.txt @@ -638,6 +638,7 @@ struct 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 string ReadLump(int lump); }