mirror of
https://github.com/ZDoom/raze-gles.git
synced 2025-01-12 11:10:39 +00:00
LunaCON: disable some player members, tweak decls of others.
The ones disabled are because they were found to not be used in any mod I tested. Exposing members directly is rarely good API. - bool toggle_key_flag -> const uint8_t ... (because value 2 is used) - make scream_voice, cheat_phase read-only git-svn-id: https://svn.eduke32.com/eduke32@4179 1a8010ca-5511-0410-912e-c29ae57300e0
This commit is contained in:
parent
f26663a9dc
commit
b6efd5e57e
2 changed files with 27 additions and 21 deletions
|
@ -443,6 +443,10 @@ local PL = function(memb) return "player[%s]"..memb end
|
||||||
-- Access to DukePlayer_t's bool members: they must be read as numbers.
|
-- Access to DukePlayer_t's bool members: they must be read as numbers.
|
||||||
local PLBOOL = function(memb) return { "("..PL(memb).." and 1 or 0)", PL(memb) } end
|
local PLBOOL = function(memb) return { "("..PL(memb).." and 1 or 0)", PL(memb) } end
|
||||||
|
|
||||||
|
local empty_table = {}
|
||||||
|
local DISABLED_PL = function() return empty_table end
|
||||||
|
local DISABLED = DISABLED_PL
|
||||||
|
|
||||||
local PlayerLabels = {
|
local PlayerLabels = {
|
||||||
posx = PL".pos.x",
|
posx = PL".pos.x",
|
||||||
posy = PL".pos.y",
|
posy = PL".pos.y",
|
||||||
|
@ -454,16 +458,16 @@ local PlayerLabels = {
|
||||||
posyv = PL".vel.y",
|
posyv = PL".vel.y",
|
||||||
poszv = PL".vel.z",
|
poszv = PL".vel.z",
|
||||||
-- NOTE: no access for .npos
|
-- NOTE: no access for .npos
|
||||||
bobposx = PL".bobposx",
|
bobposx = DISABLED_PL".bobposx",
|
||||||
bobposy = PL".bobposy",
|
bobposy = DISABLED_PL".bobposy",
|
||||||
|
|
||||||
truefz = PL".truefz",
|
truefz = DISABLED_PL".truefz",
|
||||||
truecz = PL".truecz",
|
truecz = DISABLED_PL".truecz",
|
||||||
player_par = PL".player_par",
|
player_par = PL".player_par",
|
||||||
|
|
||||||
randomflamex = PL".randomflamex",
|
randomflamex = DISABLED_PL".randomflamex",
|
||||||
exitx = PL".exitx",
|
exitx = DISABLED_PL".exitx",
|
||||||
exity = PL".exity",
|
exity = DISABLED_PL".exity",
|
||||||
|
|
||||||
runspeed = PL".runspeed",
|
runspeed = PL".runspeed",
|
||||||
max_player_health = PL".max_player_health",
|
max_player_health = PL".max_player_health",
|
||||||
|
@ -472,7 +476,7 @@ local PlayerLabels = {
|
||||||
autostep = PL".autostep",
|
autostep = PL".autostep",
|
||||||
autostep_sbw = PL".autostep_sbw",
|
autostep_sbw = PL".autostep_sbw",
|
||||||
|
|
||||||
interface_toggle_flag = PL".interface_toggle_flag",
|
interface_toggle_flag = DISABLED_PL".interface_toggle_flag",
|
||||||
|
|
||||||
-- NOTE: *bombControl etc. are accessed by gamevars in CON
|
-- NOTE: *bombControl etc. are accessed by gamevars in CON
|
||||||
|
|
||||||
|
@ -532,12 +536,12 @@ local PlayerLabels = {
|
||||||
|
|
||||||
i = { PL".i" },
|
i = { PL".i" },
|
||||||
|
|
||||||
one_parallax_sectnum = { PL".one_parallax_sectnum" },
|
one_parallax_sectnum = DISABLED{ PL".one_parallax_sectnum" },
|
||||||
|
|
||||||
random_club_frame = PL".random_club_frame",
|
random_club_frame = PL".random_club_frame",
|
||||||
one_eighty_count = PL".one_eighty_count",
|
one_eighty_count = DISABLED_PL".one_eighty_count",
|
||||||
|
|
||||||
dummyplayersprite = PL".dummyplayersprite",
|
dummyplayersprite = DISABLED_PL".dummyplayersprite",
|
||||||
extra_extra8 = PL".extra_extra8",
|
extra_extra8 = PL".extra_extra8",
|
||||||
|
|
||||||
actorsqu = PL".actorsqu",
|
actorsqu = PL".actorsqu",
|
||||||
|
@ -568,7 +572,7 @@ local PlayerLabels = {
|
||||||
quick_kick = PL".quick_kick",
|
quick_kick = PL".quick_kick",
|
||||||
last_quick_kick = PL".last_quick_kick",
|
last_quick_kick = PL".last_quick_kick",
|
||||||
|
|
||||||
return_to_center = PL".return_to_center",
|
return_to_center = DISABLED_PL".return_to_center",
|
||||||
reloading = PLBOOL".reloading",
|
reloading = PLBOOL".reloading",
|
||||||
weapreccnt = { PL".weapreccnt" },
|
weapreccnt = { PL".weapreccnt" },
|
||||||
|
|
||||||
|
@ -600,7 +604,7 @@ local PlayerLabels = {
|
||||||
|
|
||||||
jetpack_on = PLBOOL".jetpack_on",
|
jetpack_on = PLBOOL".jetpack_on",
|
||||||
spritebridge = PLBOOL".spritebridge",
|
spritebridge = PLBOOL".spritebridge",
|
||||||
lastrandomspot = PL".lastrandomspot",
|
lastrandomspot = DISABLED_PL".lastrandomspot",
|
||||||
|
|
||||||
scuba_on = PLBOOL".scuba_on",
|
scuba_on = PLBOOL".scuba_on",
|
||||||
footprintpal = PL".footprintpal",
|
footprintpal = PL".footprintpal",
|
||||||
|
@ -618,17 +622,17 @@ local PlayerLabels = {
|
||||||
hard_landing = PL".hard_landing",
|
hard_landing = PL".hard_landing",
|
||||||
fist_incs = PL".fist_incs",
|
fist_incs = PL".fist_incs",
|
||||||
|
|
||||||
toggle_key_flag = PLBOOL".toggle_key_flag",
|
toggle_key_flag = { PL".toggle_key_flag" },
|
||||||
knuckle_incs = PL".knuckle_incs",
|
knuckle_incs = PL".knuckle_incs",
|
||||||
knee_incs = PL".knee_incs",
|
knee_incs = PL".knee_incs",
|
||||||
access_incs = PL".access_incs",
|
access_incs = PL".access_incs",
|
||||||
|
|
||||||
numloogs = PL".numloogs",
|
numloogs = DISABLED_PL".numloogs",
|
||||||
loogcnt = PL".loogcnt",
|
loogcnt = DISABLED_PL".loogcnt",
|
||||||
scream_voice = PL".scream_voice",
|
scream_voice = { PL".scream_voice" },
|
||||||
|
|
||||||
last_weapon = PL".last_weapon",
|
last_weapon = PL".last_weapon",
|
||||||
cheat_phase = PL".cheat_phase",
|
cheat_phase = { PL".cheat_phase" },
|
||||||
weapon_pos = PL".weapon_pos",
|
weapon_pos = PL".weapon_pos",
|
||||||
wantweaponfire = PL".wantweaponfire",
|
wantweaponfire = PL".wantweaponfire",
|
||||||
|
|
||||||
|
|
|
@ -292,13 +292,15 @@ __attribute__((packed)) struct {
|
||||||
uint8_t refresh_inventory;
|
uint8_t refresh_inventory;
|
||||||
const<W> uint8_t last_full_weapon;
|
const<W> uint8_t last_full_weapon;
|
||||||
|
|
||||||
bool toggle_key_flag;
|
const uint8_t toggle_key_flag;
|
||||||
uint8_t knuckle_incs, knee_incs, access_incs;
|
uint8_t knuckle_incs, knee_incs, access_incs;
|
||||||
uint8_t walking_snd_toggle, palookup, hard_landing, fist_incs;
|
uint8_t walking_snd_toggle, palookup, hard_landing, fist_incs;
|
||||||
|
|
||||||
int8_t numloogs, loogcnt, scream_voice;
|
int8_t numloogs, loogcnt;
|
||||||
|
const int8_t scream_voice;
|
||||||
const<W-> int8_t last_weapon;
|
const<W-> int8_t last_weapon;
|
||||||
int8_t cheat_phase, weapon_pos;
|
const int8_t cheat_phase;
|
||||||
|
int8_t weapon_pos;
|
||||||
const<W-> int8_t wantweaponfire;
|
const<W-> int8_t wantweaponfire;
|
||||||
const<W> int8_t curr_weapon;
|
const<W> int8_t curr_weapon;
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue