aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorchai <chaifix@163.com>2018-11-23 14:27:15 +0800
committerchai <chaifix@163.com>2018-11-23 14:27:15 +0800
commit71d6039f59b4a9485f6079c719c3b985adaa7914 (patch)
treef28b60f0b48e764ab056e553fb8f8e9dd3ba7418 /src
parent25b37f912cde628377b55e262fcaa8458448da97 (diff)
*修改代码结构
Diffstat (limited to 'src')
-rw-r--r--src/3rdparty/buildvm/buildvm.exebin121856 -> 123392 bytes
-rw-r--r--src/3rdparty/minilua/minilua.exebin209920 -> 219136 bytes
-rw-r--r--src/lua/jin.cpp15
-rw-r--r--src/lua/modules/ai/je_lua_ai.h10
-rw-r--r--src/lua/modules/audio/je_lua_audio.h10
-rw-r--r--src/lua/modules/bit/je_lua_bit.h14
-rw-r--r--src/lua/modules/core/je_lua_core.h14
-rw-r--r--src/lua/modules/event/je_lua_event.h14
-rw-r--r--src/lua/modules/filesystem/je_lua_filesystem.h14
-rw-r--r--src/lua/modules/graphics/je_lua_graphics.h14
-rw-r--r--src/lua/modules/je_lua_modules.h20
-rw-r--r--src/lua/modules/joypad/je_lua_joypad.h14
-rw-r--r--src/lua/modules/keyboard/je_lua_keyboard.h14
-rw-r--r--src/lua/modules/math/je_lua_math.h14
-rw-r--r--src/lua/modules/mouse/je_lua_mouse.h14
-rw-r--r--src/lua/modules/net/je_lua_net.h14
-rw-r--r--src/lua/modules/thread/je_lua_thread.h2
-rw-r--r--src/lua/modules/time/je_lua_time.h14
18 files changed, 197 insertions, 14 deletions
diff --git a/src/3rdparty/buildvm/buildvm.exe b/src/3rdparty/buildvm/buildvm.exe
index d5ad537..60809b0 100644
--- a/src/3rdparty/buildvm/buildvm.exe
+++ b/src/3rdparty/buildvm/buildvm.exe
Binary files differ
diff --git a/src/3rdparty/minilua/minilua.exe b/src/3rdparty/minilua/minilua.exe
index 44e9416..50c80c1 100644
--- a/src/3rdparty/minilua/minilua.exe
+++ b/src/3rdparty/minilua/minilua.exe
Binary files differ
diff --git a/src/lua/jin.cpp b/src/lua/jin.cpp
index 87e7bac..b11488b 100644
--- a/src/lua/jin.cpp
+++ b/src/lua/jin.cpp
@@ -1,5 +1,6 @@
#include "common/je_lua.h"
#include "common/je_lua_common.h"
+#include "modules/je_lua_modules.h"
#include "embed/embed.h"
#include "jin.h"
@@ -8,20 +9,6 @@ namespace JinEngine
namespace Lua
{
- LUA_PORT int luaopen_core(lua_State* L);
- LUA_PORT int luaopen_graphics(lua_State* L);
- LUA_PORT int luaopen_audio(lua_State* L);
- LUA_PORT int luaopen_net(lua_State* L);
- LUA_PORT int luaopen_event(lua_State* L);
- LUA_PORT int luaopen_time(lua_State* L);
- LUA_PORT int luaopen_mouse(lua_State* L);
- LUA_PORT int luaopen_keyboard(lua_State* L);
- LUA_PORT int luaopen_filesystem(lua_State* L);
- LUA_PORT int luaopen_joypad(lua_State* L);
- LUA_PORT int luaopen_math(lua_State* L);
- LUA_PORT int luaopen_thread(lua_State* L);
- LUA_PORT int luaopen_bit(lua_State* L);
-
LUA_IMPLEMENT int l_getversion(lua_State* L)
{
luax_pushstring(L, VERSION);
diff --git a/src/lua/modules/ai/je_lua_ai.h b/src/lua/modules/ai/je_lua_ai.h
index 036bc3f..895ceaa 100644
--- a/src/lua/modules/ai/je_lua_ai.h
+++ b/src/lua/modules/ai/je_lua_ai.h
@@ -4,4 +4,14 @@
#include "je_lua_behavior_tree.h"
#include "je_lua_state_machine.h"
+namespace JinEngine
+{
+ namespace Lua
+ {
+
+
+
+ }
+}
+
#endif \ No newline at end of file
diff --git a/src/lua/modules/audio/je_lua_audio.h b/src/lua/modules/audio/je_lua_audio.h
index fa66392..6b4669a 100644
--- a/src/lua/modules/audio/je_lua_audio.h
+++ b/src/lua/modules/audio/je_lua_audio.h
@@ -3,4 +3,14 @@
#include "je_lua_audio.h"
+namespace JinEngine
+{
+ namespace Lua
+ {
+
+ int luaopen_audio(lua_State* L);
+
+ }
+}
+
#endif \ No newline at end of file
diff --git a/src/lua/modules/bit/je_lua_bit.h b/src/lua/modules/bit/je_lua_bit.h
index e69de29..21cf064 100644
--- a/src/lua/modules/bit/je_lua_bit.h
+++ b/src/lua/modules/bit/je_lua_bit.h
@@ -0,0 +1,14 @@
+#ifndef __JE_LUA_BIT_H__
+#define __JE_LUA_BIT_H__
+
+namespace JinEngine
+{
+ namespace Lua
+ {
+
+ int luaopen_bit(lua_State* L);
+
+ }
+}
+
+#endif \ No newline at end of file
diff --git a/src/lua/modules/core/je_lua_core.h b/src/lua/modules/core/je_lua_core.h
index e69de29..037ac4b 100644
--- a/src/lua/modules/core/je_lua_core.h
+++ b/src/lua/modules/core/je_lua_core.h
@@ -0,0 +1,14 @@
+#ifndef __JE_LUA_CORE_H__
+#define __JE_LUA_CORE_H__
+
+namespace JinEngine
+{
+ namespace Lua
+ {
+
+ int luaopen_core(lua_State* L);
+
+ }
+}
+
+#endif \ No newline at end of file
diff --git a/src/lua/modules/event/je_lua_event.h b/src/lua/modules/event/je_lua_event.h
index e69de29..7a75459 100644
--- a/src/lua/modules/event/je_lua_event.h
+++ b/src/lua/modules/event/je_lua_event.h
@@ -0,0 +1,14 @@
+#ifndef __JE_LUA_EVENT_H__
+#define __JE_LUA_EVENT_H__
+
+namespace JinEngine
+{
+ namespace Lua
+ {
+
+ int luaopen_event(lua_State* L);
+
+ }
+}
+
+#endif \ No newline at end of file
diff --git a/src/lua/modules/filesystem/je_lua_filesystem.h b/src/lua/modules/filesystem/je_lua_filesystem.h
index e69de29..1e1ff23 100644
--- a/src/lua/modules/filesystem/je_lua_filesystem.h
+++ b/src/lua/modules/filesystem/je_lua_filesystem.h
@@ -0,0 +1,14 @@
+#ifndef __JE_LUA_FILESYSTEM_H__
+#define __JE_LUA_FILESYSTEM_H__
+
+namespace JinEngine
+{
+ namespace Lua
+ {
+
+ int luaopen_filesystem(lua_State* L);
+
+ }
+}
+
+#endif \ No newline at end of file
diff --git a/src/lua/modules/graphics/je_lua_graphics.h b/src/lua/modules/graphics/je_lua_graphics.h
index e69de29..02a2c63 100644
--- a/src/lua/modules/graphics/je_lua_graphics.h
+++ b/src/lua/modules/graphics/je_lua_graphics.h
@@ -0,0 +1,14 @@
+#ifndef __JE_LUA_GRAPHICS_H__
+#define __JE_LUA_GRAPHICS_H__
+
+namespace JinEngine
+{
+ namespace Lua
+ {
+
+ int luaopen_graphics(lua_State* L);
+
+ }
+}
+
+#endif \ No newline at end of file
diff --git a/src/lua/modules/je_lua_modules.h b/src/lua/modules/je_lua_modules.h
new file mode 100644
index 0000000..220e6e5
--- /dev/null
+++ b/src/lua/modules/je_lua_modules.h
@@ -0,0 +1,20 @@
+#ifndef __JE_LUA_MODULES_H__
+#define __JE_LUA_MODULES_H__
+
+#include "ai/je_lua_ai.h"
+#include "audio/je_lua_audio.h"
+#include "bit/je_lua_bit.h"
+#include "core/je_lua_core.h"
+#include "event/je_lua_event.h"
+#include "filesystem/je_lua_filesystem.h"
+#include "graphics/je_lua_graphics.h"
+#include "joypad/je_lua_joypad.h"
+#include "keyboard/je_lua_keyboard.h"
+#include "math/je_lua_math.h"
+#include "mouse/je_lua_mouse.h"
+#include "net/je_lua_net.h"
+#include "thread/je_lua_thread.h"
+#include "time/je_lua_time.h"
+
+
+#endif \ No newline at end of file
diff --git a/src/lua/modules/joypad/je_lua_joypad.h b/src/lua/modules/joypad/je_lua_joypad.h
index e69de29..ec0e20f 100644
--- a/src/lua/modules/joypad/je_lua_joypad.h
+++ b/src/lua/modules/joypad/je_lua_joypad.h
@@ -0,0 +1,14 @@
+#ifndef __JE_LUA_JOYPAD_H__
+#define __JE_LUA_JOYPAD_H__
+
+namespace JinEngine
+{
+ namespace Lua
+ {
+
+ int luaopen_joypad(lua_State* L);
+
+ }
+}
+
+#endif \ No newline at end of file
diff --git a/src/lua/modules/keyboard/je_lua_keyboard.h b/src/lua/modules/keyboard/je_lua_keyboard.h
index e69de29..bf00f83 100644
--- a/src/lua/modules/keyboard/je_lua_keyboard.h
+++ b/src/lua/modules/keyboard/je_lua_keyboard.h
@@ -0,0 +1,14 @@
+#ifndef __JE_LUA_KEYBOARD_H__
+#define __JE_LUA_KEYBOARD_H__
+
+namespace JinEngine
+{
+ namespace Lua
+ {
+
+ int luaopen_keyboard(lua_State* L);
+
+ }
+}
+
+#endif \ No newline at end of file
diff --git a/src/lua/modules/math/je_lua_math.h b/src/lua/modules/math/je_lua_math.h
index e69de29..2e7010c 100644
--- a/src/lua/modules/math/je_lua_math.h
+++ b/src/lua/modules/math/je_lua_math.h
@@ -0,0 +1,14 @@
+#ifndef __JE_LUA_MATH_H__
+#define __JE_LUA_MATH_H__
+
+namespace JinEngine
+{
+ namespace Lua
+ {
+
+ int luaopen_math(lua_State* L);
+
+ }
+}
+
+#endif \ No newline at end of file
diff --git a/src/lua/modules/mouse/je_lua_mouse.h b/src/lua/modules/mouse/je_lua_mouse.h
index e69de29..09738f5 100644
--- a/src/lua/modules/mouse/je_lua_mouse.h
+++ b/src/lua/modules/mouse/je_lua_mouse.h
@@ -0,0 +1,14 @@
+#ifndef __JE_LUA_MOUSE_H__
+#define __JE_LUA_MOUSE_H__
+
+namespace JinEngine
+{
+ namespace Lua
+ {
+
+ int luaopen_mouse(lua_State* L);
+
+ }
+}
+
+#endif \ No newline at end of file
diff --git a/src/lua/modules/net/je_lua_net.h b/src/lua/modules/net/je_lua_net.h
index e69de29..1542791 100644
--- a/src/lua/modules/net/je_lua_net.h
+++ b/src/lua/modules/net/je_lua_net.h
@@ -0,0 +1,14 @@
+#ifndef __JE_LUA_NET_H__
+#define __JE_LUA_NET_H__
+
+namespace JinEngine
+{
+ namespace Lua
+ {
+
+ int luaopen_net(lua_State* L);
+
+ }
+}
+
+#endif \ No newline at end of file
diff --git a/src/lua/modules/thread/je_lua_thread.h b/src/lua/modules/thread/je_lua_thread.h
index 12d482e..396cf5b 100644
--- a/src/lua/modules/thread/je_lua_thread.h
+++ b/src/lua/modules/thread/je_lua_thread.h
@@ -89,5 +89,7 @@ namespace JinEngine
};
+ int luaopen_thread(lua_State* L);
+
} // namespace Lua
} // namespace JinEngine \ No newline at end of file
diff --git a/src/lua/modules/time/je_lua_time.h b/src/lua/modules/time/je_lua_time.h
index e69de29..3c75221 100644
--- a/src/lua/modules/time/je_lua_time.h
+++ b/src/lua/modules/time/je_lua_time.h
@@ -0,0 +1,14 @@
+#ifndef __JE_LUA_TIME_H__
+#define __JE_LUA_TIME_H__
+
+namespace JinEngine
+{
+ namespace Lua
+ {
+
+ int luaopen_time(lua_State* L);
+
+ }
+}
+
+#endif \ No newline at end of file