summaryrefslogtreecommitdiff
path: root/src/lua_core.c
diff options
context:
space:
mode:
authorjussi2022-02-22 19:09:57 +0200
committerjussi2022-02-22 19:09:57 +0200
commit30ae308c9b26b18096f3f993f4b6ad50ea6bfd76 (patch)
tree4d44d290e078ff09ff848134d3e0f31ca9c5134d /src/lua_core.c
parenta7f58b3261565b59e508c659ae3a7f1964a5bad5 (diff)
downloadreilua-enhanced-30ae308c9b26b18096f3f993f4b6ad50ea6bfd76.tar.gz
reilua-enhanced-30ae308c9b26b18096f3f993f4b6ad50ea6bfd76.tar.bz2
reilua-enhanced-30ae308c9b26b18096f3f993f4b6ad50ea6bfd76.zip
Documentation, heightmap example and custom begin and end draw.
Diffstat (limited to 'src/lua_core.c')
-rw-r--r--src/lua_core.c6
1 files changed, 6 insertions, 0 deletions
diff --git a/src/lua_core.c b/src/lua_core.c
index 42b3f22..d7204f5 100644
--- a/src/lua_core.c
+++ b/src/lua_core.c
@@ -228,6 +228,10 @@ bool luaCallMain() {
/* If web, set path to resources folder. */
#ifdef EMSCRIPTEN
sprintf( path, "resources/main.lua" );
+ /* Alternatively look for main. Could be precompiled binary file. */
+ if ( !FileExists( path ) ) {
+ sprintf( path, "resources/main" );
+ }
#else
sprintf( path, "%smain.lua", state->exePath );
/* Alternatively look for main. Could be precompiled binary file. */
@@ -347,6 +351,8 @@ void luaRegister() {
lua_register( L, "RL_IsCursorOnScreen", lcoreIsCursorOnScreen );
/* Drawing. */
lua_register( L, "RL_ClearBackground", lcoreClearBackground );
+ lua_register( L, "RL_BeginDrawing", lcoreBeginDrawing );
+ lua_register( L, "RL_EndDrawing", lcoreEndDrawing );
lua_register( L, "RL_BeginBlendMode", lcoreBeginBlendMode );
lua_register( L, "RL_EndBlendMode", lcoreEndBlendMode );
lua_register( L, "RL_BeginScissorMode", lcoreBeginScissorMode );