aboutsummaryrefslogtreecommitdiff
path: root/examples/rlua_execute_file.c
diff options
context:
space:
mode:
authorraysan5 <raysan5@gmail.com>2016-08-03 21:38:21 +0200
committerraysan5 <raysan5@gmail.com>2016-08-03 21:38:21 +0200
commit735968e68543bb5141122f181608d0d7ada9a3be (patch)
treea8763182a289c9d321d08d51cc54f7169c858310 /examples/rlua_execute_file.c
parentd3d9aaceb12111ebe54f55f23cd87dfb43964f1f (diff)
downloadraylib-735968e68543bb5141122f181608d0d7ada9a3be.tar.gz
raylib-735968e68543bb5141122f181608d0d7ada9a3be.zip
[rlua] new module: raylib Lua binding
Diffstat (limited to 'examples/rlua_execute_file.c')
-rw-r--r--examples/rlua_execute_file.c39
1 files changed, 39 insertions, 0 deletions
diff --git a/examples/rlua_execute_file.c b/examples/rlua_execute_file.c
new file mode 100644
index 00000000..b21a4459
--- /dev/null
+++ b/examples/rlua_execute_file.c
@@ -0,0 +1,39 @@
+/*******************************************************************************************
+*
+* raylib [rlua] example - Lua file execution
+*
+* NOTE: This example requires Lua library (http://luabinaries.sourceforge.net/download.html)
+*
+* Compile example using:
+* gcc -o $(NAME_PART).exe $(FILE_NAME) $(RAYLIB_DIR)\raylib_icon /
+* -I../src -I../src/external/lua/include -L../src/external/lua/lib /
+* -lraylib -lglfw3 -lopengl32 -lopenal32 -llua53 -lgdi32 -std=c99
+*
+* This example has been created using raylib 1.6 (www.raylib.com)
+* raylib is licensed under an unmodified zlib/libpng license (View raylib.h for details)
+*
+* Copyright (c) 2013-2016 Ramon Santamaria (@raysan5)
+*
+********************************************************************************************/
+
+#include "raylib.h"
+
+#define RLUA_IMPLEMENTATION
+#include "rlua.h"
+
+int main()
+{
+ // Initialization
+ //--------------------------------------------------------------------------------------
+ InitLuaDevice();
+ //--------------------------------------------------------------------------------------
+
+ ExecuteLuaFile("core_basic_window.lua");
+
+ // De-Initialization
+ //--------------------------------------------------------------------------------------
+ CloseLuaDevice(); // Close Lua device and free resources
+ //--------------------------------------------------------------------------------------
+
+ return 0;
+} \ No newline at end of file