Init commit
This commit is contained in:
commit
83e6c9e1f0
41 changed files with 1455 additions and 0 deletions
35
code-samples/frogger/inc/fsm.h
Normal file
35
code-samples/frogger/inc/fsm.h
Normal file
|
|
@ -0,0 +1,35 @@
|
|||
#ifndef FSM_H
|
||||
#define FSM_H
|
||||
|
||||
#include "defines.h"
|
||||
#include "objects.h"
|
||||
#include "frog_backend.h"
|
||||
#include "frog_frontend.h"
|
||||
|
||||
typedef enum
|
||||
{
|
||||
START = 0,
|
||||
SPAWN,
|
||||
MOVING,
|
||||
SHIFTING,
|
||||
REACH,
|
||||
COLLIDE,
|
||||
GAMEOVER,
|
||||
EXIT_STATE
|
||||
} frog_state;
|
||||
|
||||
typedef enum
|
||||
{
|
||||
MOVE_UP = 0,
|
||||
MOVE_DOWN,
|
||||
MOVE_RIGHT,
|
||||
MOVE_LEFT,
|
||||
ESCAPE_BTN,
|
||||
ENTER_BTN,
|
||||
NOSIG
|
||||
} signals;
|
||||
|
||||
signals get_signal(int user_input);
|
||||
void sigact(signals sig, frog_state *state, game_stats_t *stats, board_t *map, player_pos *frog_pos);
|
||||
|
||||
#endif
|
||||
Loading…
Add table
Add a link
Reference in a new issue