aboutsummaryrefslogtreecommitdiffstats
path: root/src/main.c
diff options
context:
space:
mode:
authornathansmith117 <nathansmith117@sdf.org>2025-02-04 11:29:07 +0000
committernathansmith117 <nathansmith117@sdf.org>2025-02-04 11:29:07 +0000
commitfe9b718f8978cfd792f7303214b2dd45172b8d4b (patch)
tree8efd867eae12ad5d55d29e964272974ee3d71b18 /src/main.c
parentfb7ccc0c046ed80fdac2e829b8c367841600e211 (diff)
downloadsldj-fe9b718f8978cfd792f7303214b2dd45172b8d4b.tar.gz
sldj-fe9b718f8978cfd792f7303214b2dd45172b8d4b.tar.bz2
sldj-fe9b718f8978cfd792f7303214b2dd45172b8d4b.zip
Working on script context
Diffstat (limited to 'src/main.c')
-rw-r--r--src/main.c13
1 files changed, 11 insertions, 2 deletions
diff --git a/src/main.c b/src/main.c
index a02b023..298c65b 100644
--- a/src/main.c
+++ b/src/main.c
@@ -1,11 +1,20 @@
#include <raylib.h>
#include "sldj.h"
+#include "sldjConfig.h"
-int main()
+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);