void player_input(struct player *p, uint16_t bnstate)
{
if(bnstate & KEY_UP) {
- p->phi += 0x2000;
+ p->phi += 0x800;
if(p->phi > X_HPI) p->phi = X_HPI;
}
if(bnstate & KEY_DOWN) {
- p->phi -= 0x2000;
+ p->phi -= 0x800;
if(p->phi < -X_HPI) p->phi = -X_HPI;
}
if(bnstate & KEY_LEFT) {
- p->theta += 0x2000;
+ p->theta += 0x800;
if(p->theta > X_2PI) p->theta -= X_2PI;
}
if(bnstate & KEY_RIGHT) {
- p->theta -= 0x2000;
+ p->theta -= 0x800;
if(p->theta < X_2PI) p->theta += X_2PI;
}
if(bnstate & KEY_A) {
}
}
+ if(top < 0) top = 0;
+ if(bot >= fbheight) bot = fbheight - 1;
+
fbptr = fb + top * fbwidth;
for(i=top; i<=bot; i++) {
start = scantab[0][i];