freak-engine/src/main.c

32 lines
676 B
C
Raw Normal View History

2021-06-11 01:32:47 +02:00
#include "entity.h"
#include "player.h"
#include "wall.h"
#include <gint/display.h>
#include <gint/keyboard.h>
void
main(void)
{
struct Player player;
2021-06-11 11:10:10 +02:00
struct Player newb;
2021-06-11 01:32:47 +02:00
struct Wall walls[5];
player_init(&player, 16, 32);
2021-06-11 11:10:10 +02:00
player_init(&newb, 64, 128);
2021-06-11 01:32:47 +02:00
wall_init(&walls[0], 16, 0, DWIDTH - 32, 16);
wall_init(&walls[1], 16, DHEIGHT - 16, DWIDTH - 32, 16);
wall_init(&walls[2], 0, 0, 16, DHEIGHT);
wall_init(&walls[3], DWIDTH - 16, 0, 16, DHEIGHT);
wall_init(&walls[4], DWIDTH / 2 - 24, DHEIGHT - 64, 48, 48);
do {
dclear(C_BLACK);
entity_grid_draw_hitboxes();
dupdate();
clearevents();
2021-06-11 13:53:22 +02:00
player_update(&player);
2021-06-11 01:32:47 +02:00
} while (!keydown(KEY_EXIT));
return;
}