aboutsummaryrefslogtreecommitdiffstats
path: root/src/main.c
blob: 298c65b79649c9591377751479c1ccd622fdcec5 (plain) (blame)
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 <raylib.h>
#include "sldj.h"
#include "sldjConfig.h"

int main(int argc, char** argv)
{
    Sldj sldj;
    initSldj(&sldj);

    // Add script from argument.
    if (argc > 1)
    {
        strncpy(sldj.scriptFilepath, argv[1], SLDJ_NAMEMAX);
        reloadScript(&sldj);
    }

    // Run update loop.
    while (!WindowShouldClose())
    {
        updateSldj(&sldj);
    }

    closeSldj(&sldj);
    return 0;
}