summaryrefslogtreecommitdiff
path: root/src/main.c
blob: bb658ce5c1d968e7df69dfc071e4f6b86ce93a0a (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
26
27
28
29
30
#include <stdio.h>
#include <raylib.h>
#include "constants.h"
#include "game.h"
#include "background.h"
#include "player.h"
#include "barrel.h"

int main() {
    InitWindow(WINDOW_WIDTH, WINDOW_HEIGHT, "My BeatEmup");
    SetTargetFPS(120);

    LoadAssets();
    InitGame();

    AddBackground("street-background");
    AddPlayer(0, 400);
    AddWall(0, 160, 1000000, 100);
    AddBarrel(200, 400);

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

        DrawGame();
    }

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