CON access to raw q16 values for player horiz and ang etc

git-svn-id: https://svn.eduke32.com/eduke32@7320 1a8010ca-5511-0410-912e-c29ae57300e0
This commit is contained in:
terminx 2019-01-30 00:13:05 +00:00
parent 61c74f25aa
commit 7a8e368197
2 changed files with 33 additions and 2 deletions

View file

@ -296,8 +296,13 @@ enum PlayerLabel_t
PLAYER_POSY,
PLAYER_POSZ,
PLAYER_HORIZ,
PLAYER_HORIZOFF,
PLAYER_OHORIZ,
PLAYER_OHORIZOFF,
PLAYER_Q16HORIZ,
PLAYER_Q16HORIZOFF,
PLAYER_OQ16HORIZ,
PLAYER_OQ16HORIZOFF,
PLAYER_INVDISPTIME,
PLAYER_BOBPOSX,
PLAYER_BOBPOSY,
@ -321,7 +326,10 @@ enum PlayerLabel_t
PLAYER_AIM_MODE,
PLAYER_ANG,
PLAYER_OANG,
PLAYER_Q16ANG,
PLAYER_OQ16ANG,
PLAYER_ANGVEL,
PLAYER_Q16ANGVEL,
PLAYER_CURSECTNUM,
PLAYER_LOOK_ANG,
PLAYER_LAST_EXTRA,
@ -333,7 +341,6 @@ enum PlayerLabel_t
PLAYER_CURR_WEAPON,
PLAYER_LAST_WEAPON,
PLAYER_TIPINCS,
PLAYER_HORIZOFF,
PLAYER_WANTWEAPONFIRE,
PLAYER_HOLODUKE_AMOUNT,
PLAYER_NEWOWNER,

View file

@ -393,8 +393,14 @@ const memberlabel_t PlayerLabels[]=
{ "posy", PLAYER_POSY, 0, 0, -1 },
{ "posz", PLAYER_POSZ, 0, 0, -1 },
{ "horiz", PLAYER_HORIZ, 0, 0, -1 },
{ "horizoff", PLAYER_HORIZOFF, 0, 0, -1 },
{ "ohoriz", PLAYER_OHORIZ, 0, 0, -1 },
{ "ohorizoff", PLAYER_OHORIZOFF, 0, 0, -1 },
{ "q16horiz", PLAYER_Q16HORIZ, 0, 0, -1 },
{ "q16horizoff", PLAYER_Q16HORIZOFF, 0, 0, -1 },
{ "oq16horiz", PLAYER_OQ16HORIZ, 0, 0, -1 },
{ "oq16horizoff", PLAYER_OQ16HORIZOFF, 0, 0, -1 },
{ "invdisptime", PLAYER_INVDISPTIME, 0, 0, -1 },
{ "bobposx", PLAYER_BOBPOSX, 0, 0, -1 },
{ "bobposy", PLAYER_BOBPOSY, 0, 0, -1 },
@ -418,7 +424,10 @@ const memberlabel_t PlayerLabels[]=
{ "aim_mode", PLAYER_AIM_MODE, 0, 0, -1 },
{ "ang", PLAYER_ANG, 0, 0, -1 },
{ "oang", PLAYER_OANG, 0, 0, -1 },
{ "q16ang", PLAYER_Q16ANG, 0, 0, -1 },
{ "oq16ang", PLAYER_OQ16ANG, 0, 0, -1 },
{ "angvel", PLAYER_ANGVEL, 0, 0, -1 },
{ "q16angvel", PLAYER_Q16ANGVEL, 0, 0, -1 },
{ "cursectnum", PLAYER_CURSECTNUM, 0, 0, -1 },
{ "look_ang", PLAYER_LOOK_ANG, 0, 0, -1 },
{ "last_extra", PLAYER_LAST_EXTRA, 0, 0, -1 },
@ -430,7 +439,6 @@ const memberlabel_t PlayerLabels[]=
{ "curr_weapon", PLAYER_CURR_WEAPON, 0, 0, -1 },
{ "last_weapon", PLAYER_LAST_WEAPON, 0, 0, -1 },
{ "tipincs", PLAYER_TIPINCS, 0, 0, -1 },
{ "horizoff", PLAYER_HORIZOFF, 0, 0, -1 },
{ "wantweaponfire", PLAYER_WANTWEAPONFIRE, 0, 0, -1 },
{ "holoduke_amount", PLAYER_HOLODUKE_AMOUNT, 0, 0, -1 },
{ "newowner", PLAYER_NEWOWNER, 0, 0, -1 },
@ -557,6 +565,14 @@ int32_t __fastcall VM_GetPlayer(int const playerNum, int32_t labelNum, int const
case PLAYER_HORIZOFF: labelNum = fix16_to_int(ps.q16horizoff); break;
case PLAYER_OHORIZOFF: labelNum = fix16_to_int(ps.oq16horizoff); break;
case PLAYER_Q16ANG: labelNum = ps.q16ang; break;
case PLAYER_OQ16ANG: labelNum = ps.oq16ang; break;
case PLAYER_Q16ANGVEL: labelNum = ps.q16angvel; break;
case PLAYER_Q16HORIZ: labelNum = ps.q16horiz; break;
case PLAYER_OQ16HORIZ: labelNum = ps.oq16horiz; break;
case PLAYER_Q16HORIZOFF: labelNum = ps.q16horizoff; break;
case PLAYER_OQ16HORIZOFF: labelNum = ps.oq16horizoff; break;
case PLAYER_ACCESS_INCS: labelNum = ps.access_incs; break;
case PLAYER_ACCESS_SPRITENUM: labelNum = ps.access_spritenum; break;
case PLAYER_ACCESS_WALLNUM: labelNum = ps.access_wallnum; break;
@ -740,6 +756,14 @@ void __fastcall VM_SetPlayer(int const playerNum, int const labelNum, int const
case PLAYER_ANGVEL: ps.q16angvel = fix16_from_int(newValue); break;
case PLAYER_HORIZOFF: ps.q16horizoff = fix16_from_int(newValue); break;
case PLAYER_Q16HORIZ: ps.q16horiz = newValue; break;
case PLAYER_OQ16HORIZ: ps.oq16horiz = newValue; break;
case PLAYER_OQ16HORIZOFF: ps.oq16horizoff = newValue; break;
case PLAYER_Q16ANG: ps.q16ang = newValue; break;
case PLAYER_OQ16ANG: ps.oq16ang = newValue; break;
case PLAYER_Q16ANGVEL: ps.q16angvel = newValue; break;
case PLAYER_Q16HORIZOFF: ps.q16horizoff = newValue; break;
case PLAYER_ACCESS_INCS: ps.access_incs = newValue; break;
case PLAYER_ACCESS_SPRITENUM: ps.access_spritenum = newValue; break;
case PLAYER_ACCESS_WALLNUM: ps.access_wallnum = newValue; break;