5 void player_input(struct player *p, uint16_t bnstate)
9 if(p->phi > X_HPI) p->phi = X_HPI;
11 if(bnstate & KEY_DOWN) {
13 if(p->phi < -X_HPI) p->phi = -X_HPI;
15 if(bnstate & KEY_LEFT) {
17 if(p->theta > X_2PI) p->theta -= X_2PI;
19 if(bnstate & KEY_RIGHT) {
21 if(p->theta < X_2PI) p->theta += X_2PI;