diff options
author | nathansmith117 <nathansmith117@sdf.org> | 2025-02-10 08:12:55 +0000 |
---|---|---|
committer | nathansmith117 <nathansmith117@sdf.org> | 2025-02-10 08:12:55 +0000 |
commit | b04d5702719eca30a95d1db2a927b6605ebd3477 (patch) | |
tree | c388a6b152c117e2903e7acf63054211739e6df4 /src/scripting.c | |
parent | fe9b718f8978cfd792f7303214b2dd45172b8d4b (diff) | |
download | sldj-b04d5702719eca30a95d1db2a927b6605ebd3477.tar.gz sldj-b04d5702719eca30a95d1db2a927b6605ebd3477.tar.bz2 sldj-b04d5702719eca30a95d1db2a927b6605ebd3477.zip |
Some fast math stuff added
Diffstat (limited to 'src/scripting.c')
-rw-r--r-- | src/scripting.c | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/src/scripting.c b/src/scripting.c index e43f4b5..efd85b0 100644 --- a/src/scripting.c +++ b/src/scripting.c @@ -10,6 +10,7 @@ void initScripting(SldjScripting* scripting) *scripting = (SldjScripting){ .state = NULL, .lineScanner = NULL, + .loadContext = NULL, .fileBuf = NULL, .fileSize = 0 }; @@ -18,6 +19,7 @@ void initScripting(SldjScripting* scripting) void compileScript(SldjScripting* scripting, const char filePath[SLDJ_NAMEMAX]) { scripting->lineScanner = NULL; + scripting->loadContext = NULL; // Get file size. struct stat fileState; @@ -73,6 +75,9 @@ void compileScript(SldjScripting* scripting, const char filePath[SLDJ_NAMEMAX]) tcc_set_error_func(scripting->state, stderr, handle_tcc_error); tcc_set_output_type(scripting->state, TCC_OUTPUT_MEMORY); + tcc_add_library_path(scripting->state, "./"); + tcc_add_library(scripting->state, "libsldj"); + // Compile. if (tcc_compile_string(scripting->state, scripting->fileBuf) < 0) { |