summaryrefslogtreecommitdiff
path: root/src/main.c
blob: b7bef751bd2300d5e3e82ddf503d8e2b384528bb (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
#include <stdio.h>
#include <raylib.h>
#include "constants.h"
#include "assets.h"
#include "game.h"
#include "background.h"

int main() {
    SetConfigFlags(FLAG_VSYNC_HINT); //Always better than fixed FPS imo
    InitWindow(WINDOW_WIDTH, WINDOW_HEIGHT, "My BeatEmup");
    SetTargetFPS(0);

    LoadAssets();
    InitGame();

    while(!WindowShouldClose()) {
        UpdateGame(GetFrameTime());

        DrawGame();
    }

    UnloadAssets();
    CloseWindow();
    return 0;
}