LunaCON: add a couple of ud members, gamevars; handle 'dynamicremap' only once.

Also, allow MAXVOLUMES+1 to first arg of 'music'.

git-svn-id: https://svn.eduke32.com/eduke32@3817 1a8010ca-5511-0410-912e-c29ae57300e0
This commit is contained in:
helixhorned 2013-05-26 18:42:53 +00:00
parent 4e9cf9722a
commit 13b69711ac
3 changed files with 23 additions and 5 deletions

View file

@ -639,7 +639,7 @@ local PlayerLabels = {
footprintshade = PL".footprintshade",
refresh_inventory = PL".refresh_inventory",
last_full_weapon = { PL".last_full_weapon" },
last_full_weapon = PL".last_full_weapon",
walking_snd_toggle = PL".walking_snd_toggle",
palookup = PL".palookup",
@ -835,16 +835,19 @@ local UserdefLabels = {
detail = { "1" },
display_bonus_screen = UD".display_bonus_screen",
drawweapon = UDRO".drawweapon",
eog = UD".eog",
ffire = UDRO".ffire",
fta_on = UD".fta_on",
god = UDRO".god",
idplayers = UDRO".idplayers",
level_number = UDRO".level_number",
lockout = UDRO".lockout",
pause_on = UDRO".pause_on",
player_skill = UD".player_skill",
m_volume_number = UDRO".m_volume_number",
mouseflip = UDRO".mouseflip",
multimode = { "1" },
noexits = UDRO".noexits",
overhead_on = UD".overhead_on",
show_level_text = UD".show_level_text",
screen_size = { UD".screen_size", UD":set_screen_size(%%s)" },

View file

@ -272,7 +272,7 @@ __attribute__((packed)) struct {
bool holster_weapon;
uint8_t falling_counter, footprintshade;
uint8_t refresh_inventory;
const uint8_t last_full_weapon;
const<W> uint8_t last_full_weapon;
bool toggle_key_flag;
uint8_t knuckle_incs, knee_incs, access_incs;

View file

@ -284,6 +284,14 @@ local function new_initial_gvartab()
STICKYBOMB_LIFETIME = PRW(PLSX".tripbombLifetime"),
STICKYBOMB_LIFETIME_VAR = PRW(PLSX".tripbombLifetimeVar"),
-- Some *writable* system gamevars relating to multiplayer.
-- TODO_MP.
RESPAWN_MONSTERS = RO "0",
RESPAWN_ITEMS = RO "0",
RESPAWN_INVENTORY = RO "0",
MONSTERS_OFF = RO "0",
MARKER = RO "0",
-- These are not 100% authentic (they're only updated in certain
-- circumstances, see player.c: P_SetWeaponGamevars()). But IMO it's
-- more useful like this.
@ -1051,8 +1059,8 @@ end
function Cmd.music(volnum, ...)
local envmusicp = (volnum==0)
if (not (volnum >= 0 and volnum <= conl.MAXVOLUMES)) then
-- NOTE: Don't allow MAXVOLUMES+1 for now.
if (not (volnum >= 0 and volnum <= conl.MAXVOLUMES+1)) then
-- NOTE: Also allow MAXVOLUMES+1.
errprintf("volume number must be between 0 and MAXVOLUMES=%d", conl.MAXVOLUMES)
return
end
@ -1201,6 +1209,13 @@ function Cmd.gamevar(identifier, initval, flags)
end
end
function Cmd.dynamicremap()
if (g_dyntilei==nil) then
print("Using dynamic tile remapping");
g_dyntilei=true;
end
end
function lookup.gamearray(identifier)
local ga = g_gamearray[identifier]
if (ga == nil) then
@ -1347,7 +1362,7 @@ local Couter = {
--- 2. Defines and Meta-Settings
dynamicremap = cmd()
/ function() print("Using dynamic tile remapping"); g_dyntilei=true; end,
/ Cmd.dynamicremap,
setcfgname = sp1 * tok.filename
/ Cmd.nyi("`setcfgname'"),
setdefname = sp1 * tok.filename