From 4c45884e658800a2528381cb1368514499d592d8 Mon Sep 17 00:00:00 2001 From: David Walter Seikel Date: Sun, 5 Feb 2012 15:38:46 +1000 Subject: Implement more of the state handling stuff, with copious comments. --- LuaSL/src/LuaSL_compile.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'LuaSL/src/LuaSL_compile.c') 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 } else if (OM_LUA == mode) { - fprintf(file, "_LSL.stateChange(_"); + fprintf(file, "return _LSL.stateChange(_"); if (statement->identifier.text) outputText(file, &(statement->identifier), TRUE); fprintf(file, "State)"); @@ -2277,7 +2277,7 @@ boolean compileLSL(gameGlobals *game, char *script, boolean doConstants) fprintf(out, "local _bit = require(\"bit\")\n"); fprintf(out, "local _LSL = require(\"LSL\")\n\n"); outputLeaf(out, OM_LUA, compiler.ast); - fprintf(out, "\n\n_LSL.stateChange(_defaultState)\n"); // This actually starts the script running. + fprintf(out, "\n\n_LSL.mainLoop(_defaultState)\n"); // This actually starts the script running. fprintf(out, "\n--// End of generated code.\n\n"); fclose(out); -- cgit v1.1