freak-engine/src/main.c

32 lines
676 B
C

#include "entity.h"
#include "player.h"
#include "wall.h"
#include <gint/display.h>
#include <gint/keyboard.h>
void
main(void)
{
struct Player player;
struct Player newb;
struct Wall walls[5];
player_init(&player, 16, 32);
player_init(&newb, 64, 128);
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();
player_update(&player);
} while (!keydown(KEY_EXIT));
return;
}