summaryrefslogtreecommitdiffstats
path: root/sdl/luatools.h
diff options
context:
space:
mode:
Diffstat (limited to 'sdl/luatools.h')
-rw-r--r--sdl/luatools.h28
1 files changed, 28 insertions, 0 deletions
diff --git a/sdl/luatools.h b/sdl/luatools.h
new file mode 100644
index 0000000..e05cb6b
--- /dev/null
+++ b/sdl/luatools.h
@@ -0,0 +1,28 @@
+#ifndef _LUATOOLS_H_
+#define _LUATOOLS_H_
+
+#include <lua.h>
+
+/* lua table to c struct converter would be very useful */
+struct luat_table_platform
+{
+ const char *name;
+ const char *icon;
+ unsigned int xres;
+ unsigned int yres;
+ unsigned int bpp;
+ unsigned int af;
+ float fovy;
+ float znear;
+ float zfar;
+ unsigned int maxfps;
+};
+
+const char *luaGetFieldString(lua_State *L, const char *);
+double luaGetFieldNumber(lua_State *, const char *);
+int luaLoadConfig(lua_State *, const char *);
+int luaFillTablePlatform(lua_State *, struct luat_table_platform *);
+void luaPrintTablePlatform(struct luat_table_platform *);
+
+#endif
+