-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathGameWindow.h
More file actions
30 lines (28 loc) · 733 Bytes
/
GameWindow.h
File metadata and controls
30 lines (28 loc) · 733 Bytes
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
#ifndef GAMEWINDOW_H_INCLUDED
#define GAMEWINDOW_H_INCLUDED
#include <allegro5/allegro.h>
#include <stdbool.h>
typedef struct _GAME Game;
typedef void (*fptrGameExecute)(Game *);
typedef void (*fptrGameInit)(Game *);
typedef bool (*fptrGameUpdate)(Game *);
typedef void (*fptrGameDraw)(Game *);
typedef void (*fptrGameDestroy)(Game *);
void execute(Game *);
void game_init(Game *);
bool game_update(Game *);
void game_draw(Game *);
void game_destroy(Game *);
struct _GAME
{
const char *title;
// ALLEGRO Variables
ALLEGRO_DISPLAY *display;
fptrGameExecute execute;
fptrGameInit game_init;
fptrGameUpdate game_update;
fptrGameDraw game_draw;
fptrGameDestroy game_destroy;
};
Game *New_Game();
#endif