Remove several unused player struct members and bump BYTEVERSION

git-svn-id: https://svn.eduke32.com/eduke32@7177 1a8010ca-5511-0410-912e-c29ae57300e0
This commit is contained in:
terminx 2018-11-18 18:08:26 +00:00
parent 741d362228
commit b97074eece
7 changed files with 8 additions and 56 deletions

View file

@ -58,10 +58,10 @@ Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
// increase by 3, because atomic GRP adds 1, and Shareware adds 2
#ifdef LUNATIC
// Lunatic
# define BYTEVERSION_EDUKE32 336
# define BYTEVERSION_EDUKE32 339
#else
// Non-Lua build
# define BYTEVERSION_EDUKE32 336
# define BYTEVERSION_EDUKE32 339
#endif
//#define BYTEVERSION_13 27

View file

@ -951,8 +951,6 @@ const memberlabel_t TsprLabels[]=
const memberlabel_t PlayerLabels[]=
{
{ "zoom", PLAYER_ZOOM, 0, 0 },
{ "exitx", PLAYER_EXITX, 0, 0 },
{ "exity", PLAYER_EXITY, 0, 0 },
{ "loogiex", PLAYER_LOOGIEX, LABEL_HASPARM2, 64 },
{ "loogiey", PLAYER_LOOGIEY, LABEL_HASPARM2, 64 },
{ "numloogs", PLAYER_NUMLOOGS, 0, 0 },
@ -982,7 +980,6 @@ const memberlabel_t PlayerLabels[]=
{ "bobcounter", PLAYER_BOBCOUNTER, 0, 0 },
{ "weapon_sway", PLAYER_WEAPON_SWAY, 0, 0 },
{ "pals_time", PLAYER_PALS_TIME, 0, 0 },
{ "randomflamex", PLAYER_RANDOMFLAMEX, 0, 0 },
{ "crack_time", PLAYER_CRACK_TIME, 0, 0 },
{ "aim_mode", PLAYER_AIM_MODE, 0, 0 },
{ "ang", PLAYER_ANG, 0, 0 },
@ -1065,14 +1062,12 @@ const memberlabel_t PlayerLabels[]=
{ "buttonpalette", PLAYER_BUTTONPALETTE, 0, 0 },
{ "jetpack_on", PLAYER_JETPACK_ON, 0, 0 },
{ "spritebridge", PLAYER_SPRITEBRIDGE, 0, 0 },
{ "lastrandomspot", PLAYER_LASTRANDOMSPOT, 0, 0 },
{ "scuba_on", PLAYER_SCUBA_ON, 0, 0 },
{ "footprintpal", PLAYER_FOOTPRINTPAL, 0, 0 },
{ "heat_on", PLAYER_HEAT_ON, 0, 0 },
{ "holster_weapon", PLAYER_HOLSTER_WEAPON, 0, 0 },
{ "falling_counter", PLAYER_FALLING_COUNTER, 0, 0 },
{ "gotweapon", PLAYER_GOTWEAPON, LABEL_HASPARM2, MAX_WEAPONS },
{ "refresh_inventory", PLAYER_REFRESH_INVENTORY, 0, 0 },
{ "palette", PLAYER_PALETTE, 0, 0 },
{ "toggle_key_flag", PLAYER_TOGGLE_KEY_FLAG, 0, 0 },
{ "knuckle_incs", PLAYER_KNUCKLE_INCS, 0, 0 },

View file

@ -266,8 +266,6 @@ enum ScriptError_t
enum PlayerLabel_t
{
PLAYER_ZOOM,
PLAYER_EXITX,
PLAYER_EXITY,
PLAYER_LOOGIEX,
PLAYER_LOOGIEY,
PLAYER_NUMLOOGS,
@ -297,7 +295,6 @@ enum PlayerLabel_t
PLAYER_BOBCOUNTER,
PLAYER_WEAPON_SWAY,
PLAYER_PALS_TIME,
PLAYER_RANDOMFLAMEX,
PLAYER_CRACK_TIME,
PLAYER_AIM_MODE,
PLAYER_ANG,
@ -380,14 +377,12 @@ enum PlayerLabel_t
PLAYER_BUTTONPALETTE,
PLAYER_JETPACK_ON,
PLAYER_SPRITEBRIDGE,
PLAYER_LASTRANDOMSPOT,
PLAYER_SCUBA_ON,
PLAYER_FOOTPRINTPAL,
PLAYER_HEAT_ON,
PLAYER_HOLSTER_WEAPON,
PLAYER_FALLING_COUNTER,
PLAYER_GOTWEAPON,
PLAYER_REFRESH_INVENTORY,
PLAYER_PALETTE,
PLAYER_TOGGLE_KEY_FLAG,
PLAYER_KNUCKLE_INCS,

View file

@ -570,8 +570,6 @@ int32_t __fastcall VM_GetPlayer(int const playerNum, int32_t labelNum, int const
case PLAYER_CUSTOMEXITSOUND: labelNum = ps.customexitsound; break;
case PLAYER_DEAD_FLAG: labelNum = ps.dead_flag; break;
case PLAYER_DUMMYPLAYERSPRITE: labelNum = ps.dummyplayersprite; break;
case PLAYER_EXITX: labelNum = ps.exitx; break;
case PLAYER_EXITY: labelNum = ps.exity; break;
case PLAYER_EXTRA_EXTRA8: labelNum = ps.extra_extra8; break;
case PLAYER_FALLING_COUNTER: labelNum = ps.falling_counter; break;
case PLAYER_FIST_INCS: labelNum = ps.fist_incs; break;
@ -610,7 +608,6 @@ int32_t __fastcall VM_GetPlayer(int const playerNum, int32_t labelNum, int const
case PLAYER_LAST_QUICK_KICK: labelNum = ps.last_quick_kick; break;
case PLAYER_LAST_USED_WEAPON: labelNum = ps.last_used_weapon; break;
case PLAYER_LAST_WEAPON: labelNum = ps.last_weapon; break;
case PLAYER_LASTRANDOMSPOT: labelNum = ps.lastrandomspot; break;
case PLAYER_LOOGCNT: labelNum = ps.loogcnt; break;
case PLAYER_LOOGIEX: labelNum = ps.loogiex[lParm2]; break;
case PLAYER_LOOGIEY: labelNum = ps.loogiey[lParm2]; break;
@ -646,9 +643,7 @@ int32_t __fastcall VM_GetPlayer(int const playerNum, int32_t labelNum, int const
case PLAYER_PYOFF: labelNum = ps.pyoff; break;
case PLAYER_QUICK_KICK: labelNum = ps.quick_kick; break;
case PLAYER_RANDOM_CLUB_FRAME: labelNum = ps.random_club_frame; break;
case PLAYER_RANDOMFLAMEX: labelNum = ps.randomflamex; break;
case PLAYER_RAPID_FIRE_HOLD: labelNum = ps.rapid_fire_hold; break;
case PLAYER_REFRESH_INVENTORY: labelNum = ps.refresh_inventory; break;
case PLAYER_RELOADING: labelNum = ps.reloading; break;
case PLAYER_RETURN_TO_CENTER: labelNum = ps.return_to_center; break;
case PLAYER_ROTSCRNANG: labelNum = ps.rotscrnang; break;
@ -758,8 +753,6 @@ void __fastcall VM_SetPlayer(int const playerNum, int const labelNum, int const
case PLAYER_CUSTOMEXITSOUND: ps.customexitsound = newValue; break;
case PLAYER_DEAD_FLAG: ps.dead_flag = newValue; break;
case PLAYER_DUMMYPLAYERSPRITE: ps.dummyplayersprite = newValue; break;
case PLAYER_EXITX: ps.exitx = newValue; break;
case PLAYER_EXITY: ps.exity = newValue; break;
case PLAYER_EXTRA_EXTRA8: ps.extra_extra8 = newValue; break;
case PLAYER_FALLING_COUNTER: ps.falling_counter = newValue; break;
case PLAYER_FIST_INCS: ps.fist_incs = newValue; break;
@ -794,7 +787,6 @@ void __fastcall VM_SetPlayer(int const playerNum, int const labelNum, int const
case PLAYER_LAST_QUICK_KICK: ps.last_quick_kick = newValue; break;
case PLAYER_LAST_USED_WEAPON: ps.last_used_weapon = newValue; break;
case PLAYER_LAST_WEAPON: ps.last_weapon = newValue; break;
case PLAYER_LASTRANDOMSPOT: ps.lastrandomspot = newValue; break;
case PLAYER_LOOGCNT: ps.loogcnt = newValue; break;
case PLAYER_LOOGIEX: ps.loogiex[lParm2] = newValue; break;
case PLAYER_LOOGIEY: ps.loogiey[lParm2] = newValue; break;
@ -829,9 +821,7 @@ void __fastcall VM_SetPlayer(int const playerNum, int const labelNum, int const
case PLAYER_PYOFF: ps.pyoff = newValue; break;
case PLAYER_QUICK_KICK: ps.quick_kick = newValue; break;
case PLAYER_RANDOM_CLUB_FRAME: ps.random_club_frame = newValue; break;
case PLAYER_RANDOMFLAMEX: ps.randomflamex = newValue; break;
case PLAYER_RAPID_FIRE_HOLD: ps.rapid_fire_hold = newValue; break;
case PLAYER_REFRESH_INVENTORY: ps.refresh_inventory = newValue; break;
case PLAYER_RELOADING: ps.reloading = newValue; break;
case PLAYER_RETURN_TO_CENTER: ps.return_to_center = newValue; break;
case PLAYER_ROTSCRNANG: ps.rotscrnang = newValue; break;

View file

@ -140,7 +140,6 @@ typedef struct {
fix16_t q16ang, oq16ang, q16angvel;
int32_t truefz, truecz, player_par;
int32_t randomflamex, exitx, exity;
int32_t runspeed, max_player_health, max_shield_amount;
int32_t autostep, autostep_sbw;
@ -186,11 +185,11 @@ typedef struct {
uint8_t hbomb_on, jumping_toggle, rapid_fire_hold, on_ground;
uint8_t inven_icon, buttonpalette, over_shoulder_on, show_empty_weapon;
uint8_t jetpack_on, spritebridge, lastrandomspot;
uint8_t jetpack_on, spritebridge;
uint8_t scuba_on, footprintpal, heat_on, invdisptime;
uint8_t holster_weapon, falling_counter, footprintshade;
uint8_t refresh_inventory, last_full_weapon;
uint8_t last_full_weapon;
uint8_t toggle_key_flag, knuckle_incs, knee_incs, access_incs;
uint8_t walking_snd_toggle, palookup, hard_landing, fist_incs;
@ -210,7 +209,7 @@ typedef struct {
// anywhere (like with spritetype_t): g_player[i].ps->wa.idx == i.
struct { int32_t idx; } wa;
#endif
// int8_t padding_[0];
int8_t padding_[2];
} DukePlayer_t;
// KEEPINSYNC lunatic/_defs_game.lua

View file

@ -796,7 +796,6 @@ void P_ResetPlayer(int playerNum)
p.quick_kick = 0;
p.random_club_frame = 0;
p.rapid_fire_hold = 0;
p.refresh_inventory = 0;
p.reloading = 0;
p.return_to_center = 9;
p.rotscrnang = 0;
@ -902,7 +901,6 @@ static void P_PrepForNewLevel(int playerNum, int gameMode)
p.interface_toggle = 0;
p.last_pissed_time = 0;
p.last_weapon = -1;
p.lastrandomspot = 0;
p.max_actors_killed = 0;
p.max_secret_rooms = 0;
p.parallax_sectnum = -1;
@ -997,11 +995,6 @@ static void G_SetupRotfixedSprites(void)
}
}
static inline int G_CheckExitSprite(int spriteNum)
{
return ((uint16_t)sprite[spriteNum].lotag == UINT16_MAX && (sprite[spriteNum].cstat & CSTAT_SPRITE_ALIGNMENT_WALL));
}
static void G_SetupLightSwitches()
{
auto tagbitmap = (uint8_t *)Xcalloc(65536 >> 3, 1);
@ -1265,13 +1258,10 @@ static void G_DeleteTempEffectors()
{
for (int nextSprite, SPRITES_OF_STAT_SAFE(STAT_DEFAULT, i, nextSprite))
{
if (!G_CheckExitSprite(i))
switch (DYNAMICTILEMAP(PN(i)))
{
switch (DYNAMICTILEMAP(PN(i)))
{
case GPSPEED__STATIC:
case CYCLER__STATIC: A_DeleteSprite(i); break;
}
case GPSPEED__STATIC:
case CYCLER__STATIC: A_DeleteSprite(i); break;
}
}
}
@ -1327,13 +1317,6 @@ static void prelevel(int g)
p0.max_secret_rooms++;
continue;
}
if ((uint16_t)s.lotag == UINT16_MAX)
{
p0.exitx = wall[s.wallptr].x;
p0.exity = wall[s.wallptr].y;
continue;
}
}
if (missedCloudSectors > 0)
@ -1348,13 +1331,6 @@ static void prelevel(int g)
#endif
VM_OnEvent(EVENT_LOADACTOR, i, -1);
if (G_CheckExitSprite(i))
{
p0.exitx = SX(i);
p0.exity = SY(i);
continue;
}
A_MaybeProcessEffector(i);
}

View file

@ -2561,8 +2561,6 @@ void P_HandleSharedKeys(int playerNum)
}
return; // is there significance to returning?
}
if (pPlayer->refresh_inventory)
playerBits |= BIT(SK_INV_LEFT); // emulate move left...
if (pPlayer->newowner == -1 && (TEST_SYNC_KEY(playerBits, SK_INV_LEFT) || TEST_SYNC_KEY(playerBits, SK_INV_RIGHT)))
{
@ -2570,7 +2568,6 @@ void P_HandleSharedKeys(int playerNum)
int const inventoryRight = !!(TEST_SYNC_KEY(playerBits, SK_INV_RIGHT));
if (pPlayer->refresh_inventory) pPlayer->refresh_inventory = 0;
int32_t inventoryIcon = pPlayer->inven_icon;
int i = 0;