aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/LuaSL
diff options
context:
space:
mode:
authorDavid Walter Seikel2012-02-05 17:37:02 +1000
committerDavid Walter Seikel2012-02-05 17:37:02 +1000
commitab39923f87b081469d8f05e1ec26d8eed6f2458c (patch)
tree9cf1b06b077965d764a2b17a2a67a0bbf379a71a /LuaSL
parentWhite space fixes. (diff)
downloadSledjHamr-ab39923f87b081469d8f05e1ec26d8eed6f2458c.zip
SledjHamr-ab39923f87b081469d8f05e1ec26d8eed6f2458c.tar.gz
SledjHamr-ab39923f87b081469d8f05e1ec26d8eed6f2458c.tar.bz2
SledjHamr-ab39923f87b081469d8f05e1ec26d8eed6f2458c.tar.xz
Fix up the Lua output filenames and fake SID.
Diffstat (limited to 'LuaSL')
-rw-r--r--LuaSL/src/LuaSL_compile.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/LuaSL/src/LuaSL_compile.c b/LuaSL/src/LuaSL_compile.c
index 4821589..72d94b9 100644
--- a/LuaSL/src/LuaSL_compile.c
+++ b/LuaSL/src/LuaSL_compile.c
@@ -2277,7 +2277,7 @@ boolean compileLSL(gameGlobals *game, char *script, boolean doConstants)
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. 2279 // TODO - Use the scripts UUID instead of the file name here.
2280 fprintf(out, "local _SID = [=[%s]=]\n\n", compiler.fileName); 2280 fprintf(out, "local _SID = [=[%s.lua.out]=]\n\n", compiler.fileName);
2281 outputLeaf(out, OM_LUA, compiler.ast); 2281 outputLeaf(out, OM_LUA, compiler.ast);
2282 fprintf(out, "\n\n_LSL.mainLoop(_SID, _defaultState)\n"); // This actually starts the script running. 2282 fprintf(out, "\n\n_LSL.mainLoop(_SID, _defaultState)\n"); // This actually starts the script running.
2283 fprintf(out, "\n--// End of generated code.\n\n"); 2283 fprintf(out, "\n--// End of generated code.\n\n");
@@ -2301,7 +2301,7 @@ boolean compileLSL(gameGlobals *game, char *script, boolean doConstants)
2301 else 2301 else
2302 { 2302 {
2303 // Write the compiled code to a file. 2303 // Write the compiled code to a file.
2304 strcat(luaName, ".lua.out"); 2304 strcat(luaName, ".out");
2305 out = fopen(luaName, "w"); 2305 out = fopen(luaName, "w");
2306 if (out) 2306 if (out)
2307 { 2307 {