jtmm2/src/main.c

52 lines
551 B
C
Raw Normal View History

2021-12-15 23:43:04 +01:00
#include "player.h"
#include <gint/display.h>
#include <gint/keyboard.h>
static Player player;
static void init(void);
static void deinit(void);
static void draw(void);
static void update(void);
2021-12-15 23:07:26 +01:00
int
main(void)
{
2021-12-15 23:43:04 +01:00
init();
draw();
do {
update();
draw();
} while (!keydown(KEY_EXIT));
deinit();
2021-12-15 23:07:26 +01:00
return 0;
}
2021-12-15 23:43:04 +01:00
static void
init(void)
{
player_init(&player);
}
static void
deinit(void)
{
}
static void
update(void)
{
clearevents();
player_update(&player);
}
static void
draw(void)
{
dclear(C_BLACK);
player_draw(&player);
dupdate();
}