aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/LuaSL/src/LuaSL_compile.c
diff options
context:
space:
mode:
authorDavid Walter Seikel2012-02-05 16:38:50 +1000
committerDavid Walter Seikel2012-02-05 16:38:50 +1000
commit53fe89764f8f679f3f4cbaa39c2393918898815f (patch)
tree6e6889754e1292d48ce407e2ba93b9bea4f827f6 /LuaSL/src/LuaSL_compile.c
parentA commented out debuggie that I might need later. (diff)
downloadSledjHamr-53fe89764f8f679f3f4cbaa39c2393918898815f.zip
SledjHamr-53fe89764f8f679f3f4cbaa39c2393918898815f.tar.gz
SledjHamr-53fe89764f8f679f3f4cbaa39c2393918898815f.tar.bz2
SledjHamr-53fe89764f8f679f3f4cbaa39c2393918898815f.tar.xz
Implement the script main loop, and the script UUID, which we call SID, though for now it's only the file name.
Diffstat (limited to 'LuaSL/src/LuaSL_compile.c')
-rw-r--r--LuaSL/src/LuaSL_compile.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/LuaSL/src/LuaSL_compile.c b/LuaSL/src/LuaSL_compile.c
index 80eda62..4821589 100644
--- a/LuaSL/src/LuaSL_compile.c
+++ b/LuaSL/src/LuaSL_compile.c
@@ -2276,8 +2276,10 @@ boolean compileLSL(gameGlobals *game, char *script, boolean doConstants)
2276 fprintf(out, "--// Generated code goes here.\n\n"); 2276 fprintf(out, "--// Generated code goes here.\n\n");
2277 fprintf(out, "local _bit = require(\"bit\")\n"); 2277 fprintf(out, "local _bit = require(\"bit\")\n");
2278 fprintf(out, "local _LSL = require(\"LSL\")\n\n"); 2278 fprintf(out, "local _LSL = require(\"LSL\")\n\n");
2279 // TODO - Use the scripts UUID instead of the file name here.
2280 fprintf(out, "local _SID = [=[%s]=]\n\n", compiler.fileName);
2279 outputLeaf(out, OM_LUA, compiler.ast); 2281 outputLeaf(out, OM_LUA, compiler.ast);
2280 fprintf(out, "\n\n_LSL.mainLoop(_defaultState)\n"); // This actually starts the script running. 2282 fprintf(out, "\n\n_LSL.mainLoop(_SID, _defaultState)\n"); // This actually starts the script running.
2281 fprintf(out, "\n--// End of generated code.\n\n"); 2283 fprintf(out, "\n--// End of generated code.\n\n");
2282 fclose(out); 2284 fclose(out);
2283 2285