blob: 32857969b01972687f9d52fa5bc76268a680ac5a (
plain)
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
|
#include "background.h"
#include "conf.h"
#include "input.h"
#include "level.h"
#include "lzy.h"
#include "player.h"
static void deinit(void);
int main(int argc, char **argv)
{
if (LZY_Init(argc, (const char **)argv, "wehfou official goty", 30,
"res/tset.png", "res/font.png")) {
LZY_Log(LZY_GetError());
deinit();
return 1;
}
level_load(0);
background_init();
while (!LZY_ShouldQuit()) {
LZY_CycleEvents();
input_update();
background_update();
player_update();
LZY_DrawBegin();
background_draw();
level_draw();
player_draw();
LZY_DrawEnd();
}
deinit();
return 0;
}
static void deinit(void)
{
level_deinit();
LZY_Quit();
}
|