From feef0ded2dac87faa362b98b0e10f0b754414fdc Mon Sep 17 00:00:00 2001 From: hendricks266 Date: Wed, 25 Mar 2015 06:27:08 +0000 Subject: [PATCH] C-CON: Add PLAYER_PALETTE to quick player struct access, and add a setter that calls P_SetGamePalette(). git-svn-id: https://svn.eduke32.com/eduke32@5085 1a8010ca-5511-0410-912e-c29ae57300e0 --- polymer/eduke32/source/gamestructures.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/polymer/eduke32/source/gamestructures.c b/polymer/eduke32/source/gamestructures.c index ff3fa02f2..0764f2b35 100644 --- a/polymer/eduke32/source/gamestructures.c +++ b/polymer/eduke32/source/gamestructures.c @@ -505,9 +505,7 @@ static void __fastcall VM_GetPlayer(register int32_t lVar1, register int32_t lLa case PLAYER_FALLING_COUNTER: lLabelID = ps->falling_counter; break; case PLAYER_GOTWEAPON: lLabelID = (ps->gotweapon & (1 << lParm2)) != 0; break; case PLAYER_REFRESH_INVENTORY: lLabelID = ps->refresh_inventory; break; - case PLAYER_PALETTE: // no set - lLabelID = ps->palette; - break; + case PLAYER_PALETTE: lLabelID = ps->palette; break; case PLAYER_TOGGLE_KEY_FLAG: lLabelID = ps->toggle_key_flag; break; case PLAYER_KNUCKLE_INCS: lLabelID = ps->knuckle_incs; break; case PLAYER_WALKING_SND_TOGGLE: lLabelID = ps->walking_snd_toggle; break; @@ -711,6 +709,7 @@ static void __fastcall VM_SetPlayer(int32_t lVar1, int32_t lLabelID, int32_t lVa else ps->gotweapon &= ~(1 << lParm2); break; case PLAYER_REFRESH_INVENTORY: ps->refresh_inventory = lVar1; break; + case PLAYER_PALETTE: P_SetGamePalette(ps, lVar1, 2+16); break; case PLAYER_TOGGLE_KEY_FLAG: ps->toggle_key_flag = lVar1; break; case PLAYER_KNUCKLE_INCS: ps->knuckle_incs = lVar1; break; case PLAYER_WALKING_SND_TOGGLE: ps->walking_snd_toggle = lVar1; break; @@ -1578,6 +1577,7 @@ static int32_t __fastcall VM_AccessPlayerX(int32_t iPlayer, int32_t lLabelID, in case PLAYER_FALLING_COUNTER: lLabelID = ps->falling_counter; break; case PLAYER_GOTWEAPON: lLabelID = (ps->gotweapon & (1 << lParm2)) != 0; break; case PLAYER_REFRESH_INVENTORY: lLabelID = ps->refresh_inventory; break; + case PLAYER_PALETTE: lLabelID = ps->palette; break; case PLAYER_TOGGLE_KEY_FLAG: lLabelID = ps->toggle_key_flag; break; case PLAYER_KNUCKLE_INCS: lLabelID = ps->knuckle_incs; break; case PLAYER_WALKING_SND_TOGGLE: lLabelID = ps->walking_snd_toggle; break;