aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/LuaSL/src/LuaSL_compile.c
diff options
context:
space:
mode:
authorDavid Walter Seikel2012-02-05 15:38:46 +1000
committerDavid Walter Seikel2012-02-05 15:38:46 +1000
commit4c45884e658800a2528381cb1368514499d592d8 (patch)
tree588b8f4ea1e45cd02c84eb2ee3178dc1bb7f7458 /LuaSL/src/LuaSL_compile.c
parentCommentry. (diff)
downloadSledjHamr-4c45884e658800a2528381cb1368514499d592d8.zip
SledjHamr-4c45884e658800a2528381cb1368514499d592d8.tar.gz
SledjHamr-4c45884e658800a2528381cb1368514499d592d8.tar.bz2
SledjHamr-4c45884e658800a2528381cb1368514499d592d8.tar.xz
Implement more of the state handling stuff, with copious comments.
Diffstat (limited to 'LuaSL/src/LuaSL_compile.c')
-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 0a194a8..80eda62 100644
--- a/LuaSL/src/LuaSL_compile.c
+++ b/LuaSL/src/LuaSL_compile.c
@@ -1636,7 +1636,7 @@ static void outputRawStatement(FILE *file, outputMode mode, LSL_Statement *state
1636 } 1636 }
1637 else if (OM_LUA == mode) 1637 else if (OM_LUA == mode)
1638 { 1638 {
1639 fprintf(file, "_LSL.stateChange(_"); 1639 fprintf(file, "return _LSL.stateChange(_");
1640 if (statement->identifier.text) 1640 if (statement->identifier.text)
1641 outputText(file, &(statement->identifier), TRUE); 1641 outputText(file, &(statement->identifier), TRUE);
1642 fprintf(file, "State)"); 1642 fprintf(file, "State)");
@@ -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 outputLeaf(out, OM_LUA, compiler.ast); 2279 outputLeaf(out, OM_LUA, compiler.ast);
2280 fprintf(out, "\n\n_LSL.stateChange(_defaultState)\n"); // This actually starts the script running. 2280 fprintf(out, "\n\n_LSL.mainLoop(_defaultState)\n"); // This actually starts the script running.
2281 fprintf(out, "\n--// End of generated code.\n\n"); 2281 fprintf(out, "\n--// End of generated code.\n\n");
2282 fclose(out); 2282 fclose(out);
2283 2283