-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathlogic.h
46 lines (37 loc) · 989 Bytes
/
logic.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
#ifndef LOGIC_SEEN
#define LOGIC_SEEN
#include "gba.h"
typedef struct {
// Store whether or not the game is over in this member:
int gameOver;
/*
* TA-TODO: Add any logical elements you need to keep track of in your app.
*
* For example, for a Snake game, those could be:
*
* Snake snake;
* Food foods[10];
* int points;
*
*/
} AppState;
/*
* TA-TODO: Add any additional structs that you need for your app.
*
* For example, for a Snake game, one could be:
*
* typedef struct {
* int heading;
* int length;
* int x;
* int y;
* } Snake;
*
*/
// This function can initialize an unused AppState struct.
void initializeAppState(AppState *appState);
// This function will be used to process app frames.
AppState processAppState(AppState *currentAppState, u32 keysPressedBefore, u32 keysPressedNow);
// If you have anything else you need accessible from outside the logic.c
// file, you can add them here. You likely won't.
#endif