44 lines
678 B
C
44 lines
678 B
C
#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();
|
|
}
|