dungeon generation first step
[vrlugburz] / src / player.h
1 #ifndef PLAYER_H_
2 #define PLAYER_H_
3
4 #include "cgmath/cgmath.h"
5 #include "level.h"
6
7 struct player {
8         struct level *lvl;
9
10         int cx, cy;
11         cgm_vec3 cpos;          /* cell position (derived from cx,cy) */
12         float theta, phi;       /* mouselook/VR controller rotation (theta only) */
13         cgm_vec3 vpos;          /* VR position within the cell */
14         cgm_quat vrot;          /* VR orientation */
15
16         float height;
17
18         /* view matrix, derived from all of the above by upd_player_xform */
19         float view_xform[16];
20
21         int hp, mp, hp_max, mp_max;
22 };
23
24 void init_player(struct player *p);
25 void upd_player_xform(struct player *p);
26
27 #endif  /* PLAYER_H_ */