A couple of Lunatic updates. DONT_BUILD.

- LunaCON: support for setting userdef[].m_volume_number, getting .last_level
- bump con_lang.MAXEVENTS
- fix compilation of astub.c

git-svn-id: https://svn.eduke32.com/eduke32@4567 1a8010ca-5511-0410-912e-c29ae57300e0
This commit is contained in:
helixhorned 2014-08-02 17:24:39 +00:00
parent b310eaef2c
commit 1486a2937b
4 changed files with 15 additions and 5 deletions

View file

@ -9860,8 +9860,8 @@ int32_t ExtPostStartupWindow(void)
{
extern const char luaJIT_BC_defs_m32[];
i = L_RunString(&g_EmState, (char *)luaJIT_BC_defs_m32, 0,
LUNATIC_DEFS_M32_BC_SIZE, "defs_m32.ilua");
int32_t i = L_RunString(&g_EmState, (char *)luaJIT_BC_defs_m32, 0,
LUNATIC_DEFS_M32_BC_SIZE, "defs_m32.ilua");
if (i != 0)
{
Em_DestroyState(&g_EmState);

View file

@ -17,7 +17,6 @@ MAXGAMETYPES = 16
MAXSKILLS = 7
MAXEVENTS = 96 -- KEEPINSYNC with EVENT_* list
MAXSOUNDS = 4096
MAXSESSIONVARS = 8 -- KEEPINSYNC lunatic_game.c
@ -174,6 +173,8 @@ EVENT = {
-- EVENT_ANIMATEALLSPRITES = 97, -- internal
}
MAXEVENTS = 97 -- KEEPINSYNC with above EVENT_* list
-- NOTE: negated values are not exported to the ffi.C namespace or CON.
-- See TWEAK_SFLAG below.
SFLAG = {
@ -852,11 +853,12 @@ local UserdefLabels = {
fta_on = UD".fta_on",
god = UDRO".god",
idplayers = UDRO".idplayers",
last_level = UDRO".lastlevel",
level_number = { UD".level_number", UD":set_level_number(%%s)", {0, MAXLEVELS-1} },
levelstats = UD".levelstats",
lockout = UDRO".lockout",
m_player_skill = UDRO".m_player_skill",
m_volume_number = UDRO".m_volume_number",
m_volume_number = { UD".m_volume_number", UD":set_m_volume_number(%%s)", {0, MAXVOLUMES} },
mouseaiming = UD".mouseaiming",
pause_on = UDRO".pause_on",
player_skill = UD".player_skill",

View file

@ -1486,6 +1486,14 @@ local user_defs_mt = {
ud.volume_number = volume_number
end,
set_m_volume_number = function(ud, volume_number)
-- NOTE: allow volume_number==MAXVOLUMES.
if (not (volume_number==con_lang.MAXVOLUMES)) then
bcheck.volume_idx(volume_number)
end
ud.m_volume_number = volume_number
end,
set_level_number = function(ud, level_number)
bcheck.level_idx(level_number)
ud.level_number = level_number

View file

@ -444,7 +444,7 @@ local function new_initial_gvartab()
}
-- Reserved bits
gamevar.LOGO_FLAGS.rbits = bit.bnot(2097151)
gamevar.LOGO_FLAGS.rbits = bit.bnot(0x001fffff)
for w=0,C.MAX_WEAPONS-1 do
for i=1,#wmembers do