Commit graph

176 commits

Author SHA1 Message Date
Nipun Garg
419a34f1d0 HDB: Change filenames to full-game versions 2019-09-03 17:16:46 +02:00
Nipun Garg
19eefe2cea HDB: Fix variables according to Naming Conventions 2019-09-03 17:16:44 +02:00
Eugene Sandulenko
3533362fc8 HDB: Make sure there is no OOB access for patched scripts 2019-09-03 17:16:43 +02:00
Nipun Garg
341759cf0d HDB: Add ScriptPatches for upvalues and setglobal
Moved the upvalue-syntax modification from
sanitizeComments to the scriptPatches
2019-09-03 17:16:43 +02:00
Nipun Garg
95234eef3b HDB: Add ScriptPatches for setglobal function 2019-09-03 17:16:43 +02:00
Nipun Garg
12a9036dd6 HDB: Add scriptPatch and add in sanitizeScript 2019-09-03 17:16:43 +02:00
Eugene Sandulenko
869b109eeb HDB: Hid Lua execution trace to debug level 8 2019-09-03 17:16:43 +02:00
Eugene Sandulenko
418ad2c94e HDB: Add error handling during level_init execution 2019-09-03 17:16:43 +02:00
Nipun Garg
ff6baf30b1 HDB: Add executeFile to LuaScript
It executes additional files in the current
Lua environment
2019-09-03 17:16:43 +02:00
Eugene Sandulenko
03a6cbc8f9 HDB: Refer to the Lua error handler 2019-09-03 17:16:43 +02:00
Eugene Sandulenko
a54d05ab95 HDB: Added more debugging facilities 2019-09-03 17:16:43 +02:00
Eugene Sandulenko
656e67db69 HDB: Move debugging facilities earlier in the code 2019-09-03 17:16:43 +02:00
Eugene Sandulenko
93faee87c3 HDB: Fix warnings 2019-09-03 17:16:43 +02:00
Eugene Sandulenko
fcdebdc015 JANITORIAL: Whitespace fixes 2019-09-03 17:16:43 +02:00
Eugene Sandulenko
efa460599d HDB: Added quick & dirty Lua tracing 2019-09-03 17:16:43 +02:00
Nipun Garg
f9beeb66d3 HDB: Add init() to load the GLOBAL_LUA code 2019-09-03 17:16:43 +02:00
Nipun Garg
24d42ce43a HDB: Remove the char *name arg from initScript 2019-09-03 17:16:43 +02:00
Nipun Garg
431d819d08 HDB: Load GLOBAL_LUA in initScript 2019-09-03 17:16:43 +02:00
Nipun Garg
7dd8b07ceb HDB: Modify stripComments to sanitizeScript
Lua 5.0 introduced new syntax for upvalues so the
old code needs to be preprocessed first.
2019-09-03 17:16:43 +02:00
Nipun Garg
b8a4fa2902 HDB: Add stubs for the Lua extensions 2019-09-03 17:16:43 +02:00
Nipun Garg
bcd4de2c7e HDB: Change comments from /**/ to #if 0 ... #endif 2019-09-03 17:16:43 +02:00
Nipun Garg
79ebe8927e HDB: Add *g_hdb to access the subsystems 2019-09-03 17:16:42 +02:00
Nipun Garg
4b8f7f339e HDB: Add stripComments() to strip C-style comments
There are a few C-style comments present in the
Lua files
2019-09-03 17:16:42 +02:00
Nipun Garg
bc638cf251 HDB: Add LuaScript::initScript
It creates a new Lua environment whenever a new
Lua script is loaded
2019-09-03 17:16:42 +02:00
Nipun Garg
0ad5f7e180 HDB: Add _systemInit check to LuaScript 2019-09-03 17:16:42 +02:00
Nipun Garg
f88b1d0d6a HDB: Add the LuaScript class to integrate Lua
It creates lua_State (s), initializes them and
executes Lua files in them
2019-09-03 17:16:42 +02:00