Trying out an FSM for controlling the main loop.
This commit is contained in:
parent
740e30cb2b
commit
7228bdf210
6 changed files with 247 additions and 80 deletions
10
camera.hpp
10
camera.hpp
|
@ -7,17 +7,15 @@ struct CameraLOL {
|
|||
double rotSpeed = 0.1;
|
||||
double targetX = 0.0;
|
||||
double targetY = 0.0;
|
||||
int targetDir = 0;
|
||||
double targetDirX = 0.0;
|
||||
double targetDirY = 0.0;
|
||||
double targetPlaneX = 0.0;
|
||||
double targetPlaneY = 0.0;
|
||||
|
||||
void plan_run(Raycaster &rayview, int dir);
|
||||
bool play_run(Raycaster &rayview);
|
||||
void plan_rotate(Raycaster &rayview, int dir);
|
||||
bool play_rotate(Raycaster &rayview);
|
||||
|
||||
void plan_strafe(Raycaster &rayview, int dir);
|
||||
bool play_strafe(Raycaster &rayview);
|
||||
void plan_rotate(Raycaster &rayview, int dir);
|
||||
|
||||
bool play_rotate(Raycaster &rayview);
|
||||
bool play_move(Raycaster &rayview);
|
||||
};
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue