Move player_ship_read bm.c -> player.c
This commit is contained in:
parent
19c95a684a
commit
c0ae3d9264
17
main/bm.c
17
main/bm.c
|
@ -108,23 +108,6 @@ int tmap_info_read_n(tmap_info *ti, int n, PHYSFS_file *fp)
|
|||
return i;
|
||||
}
|
||||
|
||||
int 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);
|
||||
return i;
|
||||
}
|
||||
|
||||
void gamedata_close()
|
||||
{
|
||||
free_polygon_models();
|
||||
|
|
|
@ -43,3 +43,19 @@ void player_rw_swap(player_rw *p, int swap)
|
|||
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);
|
||||
}
|
||||
|
|
|
@ -181,6 +181,11 @@ extern int Player_num; // The player number who is on the console.
|
|||
extern player Players[MAX_PLAYERS]; // Misc player info
|
||||
extern player_ship *Player_ship;
|
||||
|
||||
/*
|
||||
* reads a player_ship structure from a PHYSFS_file
|
||||
*/
|
||||
void player_ship_read(player_ship *ps, PHYSFS_file *fp);
|
||||
|
||||
void player_rw_swap(player_rw *p, int swap);
|
||||
|
||||
#endif
|
||||
|
|
Loading…
Reference in a new issue