This commit was manufactured by cvs2svn to create branch
[btb/d2x.git] / main / player.c
1 /* $Id: player.c,v 1.2 2002-07-26 20:23:30 btb Exp $ */
2
3 #ifdef HAVE_CONFIG_H
4 #include <conf.h>
5 #endif
6
7 #include "player.h"
8 #include "cfile.h"
9
10 #ifdef RCS
11 static char rcsid[] = "$Id: player.c,v 1.2 2002-07-26 20:23:30 btb Exp $";
12 #endif
13
14 /*
15  * reads a player_ship structure from a CFILE
16  */
17 void player_ship_read(player_ship *ps, CFILE *fp)
18 {
19         int i;
20
21         ps->model_num = cfile_read_int(fp);
22         ps->expl_vclip_num = cfile_read_int(fp);
23         ps->mass = cfile_read_fix(fp);
24         ps->drag = cfile_read_fix(fp);
25         ps->max_thrust = cfile_read_fix(fp);
26         ps->reverse_thrust = cfile_read_fix(fp);
27         ps->brakes = cfile_read_fix(fp);
28         ps->wiggle = cfile_read_fix(fp);
29         ps->max_rotthrust = cfile_read_fix(fp);
30         for (i = 0; i < N_PLAYER_GUNS; i++)
31                 cfile_read_vector(&(ps->gun_points[i]), fp);
32 }