C-CON: Add read-only player structure member "hudpal", that returns the result of P_GetHudPal().

git-svn-id: https://svn.eduke32.com/eduke32@5099 1a8010ca-5511-0410-912e-c29ae57300e0
This commit is contained in:
hendricks266 2015-03-27 12:29:24 +00:00
parent 8a9fb41d5f
commit 0adcc4a3f7
5 changed files with 5 additions and 1 deletions

View file

@ -1004,6 +1004,7 @@ const memberlabel_t PlayerLabels[]=
{ "last_quick_kick", PLAYER_LAST_QUICK_KICK, 0, 0 },
{ "autostep", PLAYER_AUTOSTEP, 0, 0 },
{ "autostep_sbw", PLAYER_AUTOSTEP_SBW, 0, 0 },
{ "hudpal", PLAYER_HUDPAL, 0, 0 },
{ "", -1, 0, 0 } // END OF LIST
};

View file

@ -366,6 +366,7 @@ enum PlayerLabel_t
PLAYER_LAST_QUICK_KICK,
PLAYER_AUTOSTEP,
PLAYER_AUTOSTEP_SBW,
PLAYER_HUDPAL,
PLAYER_END
};

View file

@ -552,6 +552,7 @@ int32_t __fastcall VM_GetPlayer(register int32_t const iPlayer, register int32_t
case PLAYER_LAST_QUICK_KICK: lLabelID = ps->last_quick_kick; break;
case PLAYER_AUTOSTEP: lLabelID = ps->autostep; break;
case PLAYER_AUTOSTEP_SBW: lLabelID = ps->autostep_sbw; break;
case PLAYER_HUDPAL: lLabelID = P_GetHudPal(ps); break;
default: lLabelID = -1; break;
}

View file

@ -1684,7 +1684,7 @@ static void P_DisplaySpit(int32_t snum)
}
}
static int32_t P_GetHudPal(const DukePlayer_t *p)
int32_t P_GetHudPal(const DukePlayer_t *p)
{
if (sprite[p->i].pal == 1)
return 1;

View file

@ -381,6 +381,7 @@ void P_SelectNextInvItem(DukePlayer_t *p);
void P_UpdateScreenPal(DukePlayer_t *p);
void P_CheckWeaponI(int32_t snum);
int32_t P_GetHudPal(const DukePlayer_t *p);
#if !defined LUNATIC
void P_SetWeaponGamevars(int32_t snum, const DukePlayer_t *p);