summaryrefslogtreecommitdiff
path: root/src/main.c
blob: af955f0f42333439513be6290529f94bca266b54 (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
31
#include <stdio.h>
#include <raylib.h>
#include "scenes/scenes.h"

int main(void) {
    if (!InitSceneStack()) {
        printf("Failed to create a scene stack\n");
        return 1;
    }

    if (!AddScene(CreateMainMenu())) {
        printf("Failed to create a main menu\n");
        return 1;
    }
    
    InitWindow(800, 600, "Programming game");

    SetTargetFPS(60);
    while (!WindowShouldClose()) {
        BeginDrawing();

        UpdateScene();
        DrawScene();

        EndDrawing();
    }

    CloseWindow();

    return 0;
}