mirror of
https://github.com/ZDoom/raze-gles.git
synced 2024-12-25 03:00:46 +00:00
LunaCON: implement qgetsysstr/STR_VOLUMENAME.
git-svn-id: https://svn.eduke32.com/eduke32@3872 1a8010ca-5511-0410-912e-c29ae57300e0
This commit is contained in:
parent
570d35dbaa
commit
bbcf6d6353
3 changed files with 7 additions and 4 deletions
|
@ -762,7 +762,9 @@ function _qgetsysstr(qdst, what, pli)
|
|||
elseif (what == ffiC.STR_GAMETYPE) then
|
||||
ffi.copy(dst, "multiplayer not yet implemented") -- TODO_MP
|
||||
elseif (what == ffiC.STR_VOLUMENAME) then
|
||||
ffi.copy(dst, "STR_VOLUMENAME: NYI")
|
||||
local vol = ffiC.ud.volume_number
|
||||
assert(vol+0ULL < con_lang.MAXVOLUMES)
|
||||
ffi.copy(dst, ffiC.EpisodeNames[vol], ffi.sizeof(ffiC.EpisodeNames[0]))
|
||||
else
|
||||
error("unknown system string ID "..what, 2)
|
||||
end
|
||||
|
|
|
@ -570,6 +570,7 @@ int32_t g_RETURN; // deprecated from Lua
|
|||
|
||||
-- INTERNAL VARIABLES/FUNCTIONS
|
||||
decl("map_t MapInfo[$*$];", con_lang.MAXVOLUMES+1, con_lang.MAXLEVELS)
|
||||
decl("char EpisodeNames[$][33];", con_lang.MAXVOLUMES)
|
||||
|
||||
decl[[
|
||||
int32_t g_elCONSize;
|
||||
|
@ -1741,9 +1742,8 @@ local event_funcs = {}
|
|||
local gameevent_internal = gameevent_internal -- included in lunatic.c
|
||||
-- gameevent(<event idx or string> [, flags], <event function>)
|
||||
local function our_gameevent(event, flags, func)
|
||||
if (ffiC.g_elCallDepth > 0) then
|
||||
error("Invalid use of gameevent: must be called from top level", 2)
|
||||
end
|
||||
bcheck.top_level("gameevent")
|
||||
|
||||
if (type(event) == "string") then
|
||||
if (event:sub(1,6) ~= "EVENT_") then
|
||||
event = "EVENT_"..event
|
||||
|
|
|
@ -108,6 +108,7 @@ g_elModules;
|
|||
g_modDir;
|
||||
|
||||
MapInfo;
|
||||
EpisodeNames;
|
||||
|
||||
kopen4loadfrommod;
|
||||
|
||||
|
|
Loading…
Reference in a new issue