Move */main/player.c -> similar/main/player.c
This commit is contained in:
parent
ed814d313e
commit
a622ccf07f
|
@ -385,6 +385,7 @@ class DXXProgram(DXXCommon):
|
|||
'main/morph.c',
|
||||
'main/newmenu.c',
|
||||
'main/paging.c',
|
||||
'main/player.c',
|
||||
'main/scores.c',
|
||||
'main/slew.c',
|
||||
'main/terrain.c',
|
||||
|
@ -626,7 +627,6 @@ class D1XProgram(DXXProgram):
|
|||
'main/object.c',
|
||||
'main/physics.c',
|
||||
'main/piggy.c',
|
||||
'main/player.c',
|
||||
'main/playsave.c',
|
||||
'main/polyobj.c',
|
||||
'main/powerup.c',
|
||||
|
@ -742,7 +742,6 @@ class D2XProgram(DXXProgram):
|
|||
'main/object.c',
|
||||
'main/physics.c',
|
||||
'main/piggy.c',
|
||||
'main/player.c',
|
||||
'main/playsave.c',
|
||||
'main/polyobj.c',
|
||||
'main/powerup.c',
|
||||
|
|
|
@ -1,61 +0,0 @@
|
|||
|
||||
/*
|
||||
*
|
||||
* Player Stuff
|
||||
*
|
||||
*/
|
||||
|
||||
#include "player.h"
|
||||
#include "byteswap.h"
|
||||
|
||||
|
||||
void player_rw_swap(player_rw *p, int swap)
|
||||
{
|
||||
int i;
|
||||
|
||||
if (!swap)
|
||||
return;
|
||||
|
||||
p->objnum = SWAPINT(p->objnum);
|
||||
p->n_packets_got = SWAPINT(p->n_packets_got);
|
||||
p->n_packets_sent = SWAPINT(p->n_packets_sent);
|
||||
p->flags = SWAPINT(p->flags);
|
||||
p->energy = SWAPINT(p->energy);
|
||||
p->shields = SWAPINT(p->shields);
|
||||
p->killer_objnum = SWAPSHORT(p->killer_objnum);
|
||||
for (i = 0; i < MAX_PRIMARY_WEAPONS; i++)
|
||||
p->primary_ammo[i] = SWAPSHORT(p->primary_ammo[i]);
|
||||
for (i = 0; i < MAX_SECONDARY_WEAPONS; i++)
|
||||
p->secondary_ammo[i] = SWAPSHORT(p->secondary_ammo[i]);
|
||||
p->last_score = SWAPINT(p->last_score);
|
||||
p->score = SWAPINT(p->score);
|
||||
p->time_level = SWAPINT(p->time_level);
|
||||
p->time_total = SWAPINT(p->time_total);
|
||||
p->cloak_time = SWAPINT(p->cloak_time);
|
||||
p->invulnerable_time = SWAPINT(p->invulnerable_time);
|
||||
p->net_killed_total = SWAPSHORT(p->net_killed_total);
|
||||
p->net_kills_total = SWAPSHORT(p->net_kills_total);
|
||||
p->num_kills_level = SWAPSHORT(p->num_kills_level);
|
||||
p->num_kills_total = SWAPSHORT(p->num_kills_total);
|
||||
p->num_robots_level = SWAPSHORT(p->num_robots_level);
|
||||
p->num_robots_total = SWAPSHORT(p->num_robots_total);
|
||||
p->hostages_rescued_total = SWAPSHORT(p->hostages_rescued_total);
|
||||
p->hostages_total = SWAPSHORT(p->hostages_total);
|
||||
p->homing_object_dist = SWAPINT(p->homing_object_dist);
|
||||
}
|
||||
|
||||
void player_ship_read(player_ship *ps, PHYSFS_file *fp)
|
||||
{
|
||||
int i;
|
||||
ps->model_num = PHYSFSX_readInt(fp);
|
||||
ps->expl_vclip_num = PHYSFSX_readInt(fp);
|
||||
ps->mass = PHYSFSX_readFix(fp);
|
||||
ps->drag = PHYSFSX_readFix(fp);
|
||||
ps->max_thrust = PHYSFSX_readFix(fp);
|
||||
ps->reverse_thrust = PHYSFSX_readFix(fp);
|
||||
ps->brakes = PHYSFSX_readFix(fp);
|
||||
ps->wiggle = PHYSFSX_readFix(fp);
|
||||
ps->max_rotthrust = PHYSFSX_readFix(fp);
|
||||
for (i = 0; i < N_PLAYER_GUNS; i++)
|
||||
PHYSFSX_readVector(&ps->gun_points[i], fp);
|
||||
}
|
|
@ -23,8 +23,10 @@ void player_rw_swap(player_rw *p, int swap)
|
|||
p->energy = SWAPINT(p->energy);
|
||||
p->shields = SWAPINT(p->shields);
|
||||
p->killer_objnum = SWAPSHORT(p->killer_objnum);
|
||||
#if defined(DXX_BUILD_DESCENT_II)
|
||||
p->primary_weapon_flags = SWAPSHORT(p->primary_weapon_flags);
|
||||
p->secondary_weapon_flags = SWAPSHORT(p->secondary_weapon_flags);
|
||||
#endif
|
||||
for (i = 0; i < MAX_PRIMARY_WEAPONS; i++)
|
||||
p->primary_ammo[i] = SWAPSHORT(p->primary_ammo[i]);
|
||||
for (i = 0; i < MAX_SECONDARY_WEAPONS; i++)
|
||||
|
@ -35,7 +37,9 @@ void player_rw_swap(player_rw *p, int swap)
|
|||
p->time_total = SWAPINT(p->time_total);
|
||||
p->cloak_time = SWAPINT(p->cloak_time);
|
||||
p->invulnerable_time = SWAPINT(p->invulnerable_time);
|
||||
#if defined(DXX_BUILD_DESCENT_II)
|
||||
p->KillGoalCount = SWAPSHORT(p->KillGoalCount);
|
||||
#endif
|
||||
p->net_killed_total = SWAPSHORT(p->net_killed_total);
|
||||
p->net_kills_total = SWAPSHORT(p->net_kills_total);
|
||||
p->num_kills_level = SWAPSHORT(p->num_kills_level);
|
Loading…
Reference in a new issue