-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathstates.h
52 lines (45 loc) · 885 Bytes
/
states.h
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
#ifndef STATES_H_ /* Include guard */
#define STATES_H_
enum gba_state {
SETUP_START_SCREEN,
WAIT_TO_START,
SETUP_GAME,
PLAY,
SETUP_WIN,
SETUP_LOSE,
END,
RESET
};
struct pos {
int row;
int col;
int width;
int height;
};
struct time {
int time_seconds;
int initial_time;
struct pos pos;
};
struct state {
enum gba_state gamestate;
struct pos cars[2]; // 0 - black car, 1 - red car
struct pos player;
struct pos final_exam;
struct time time_remaining;
int win_count;
int loss_count;
int personal_best_time; // to complete
} stateInfo;
#define PLAYER_ROW 80
#define PLAYER_COL 25
#define BLACK_CAR_ROW 30
#define BLACK_CAR_COL 95
#define RED_CAR_ROW 30
#define RED_CAR_COL 122
#define TIME_ROW 0
#define TIME_COL 215
#define TIME_LIMIT 60
#define TIME_WIDTH 30
#define TIME_HEIGHT 30
#endif // STATES_H_