labyrinth
diff src/player.h @ 0:8ba79034e8a6
labyrinth example initial commit
author | John Tsiombikas <nuclear@member.fsf.org> |
---|---|
date | Thu, 15 Jan 2015 14:59:38 +0200 |
parents | |
children |
line diff
1.1 --- /dev/null Thu Jan 01 00:00:00 1970 +0000 1.2 +++ b/src/player.h Thu Jan 15 14:59:38 2015 +0200 1.3 @@ -0,0 +1,20 @@ 1.4 +#ifndef PLAYER_H_ 1.5 +#define PLAYER_H_ 1.6 + 1.7 +struct level; 1.8 + 1.9 +struct player { 1.10 + float x, y; 1.11 + float horiz_angle, vert_angle; /* angles in degrees */ 1.12 + 1.13 + struct level *lvl; 1.14 +}; 1.15 + 1.16 +void player_init(struct player *p, struct level *lvl); 1.17 + 1.18 +int player_move(struct player *p, float fwd, float right); 1.19 +void player_turn(struct player *p, float horiz_deg, float vert_deg); 1.20 + 1.21 +void player_setup_view_matrix(struct player *p); 1.22 + 1.23 +#endif /* PLAYER_H_ */