diff options
Diffstat (limited to 'src')
-rw-r--r-- | src/3rdparty/LuaJIT-2.0.5/src/buildvm.lib | bin | 33996 -> 33996 bytes | |||
-rw-r--r-- | src/3rdparty/LuaJIT-2.0.5/src/minilua.lib | bin | 33996 -> 33996 bytes | |||
-rw-r--r-- | src/libjin-lua/je_lua_embed.h | 2 | ||||
-rw-r--r-- | src/libjin-lua/je_lua_jin.cpp | 4 | ||||
-rw-r--r-- | src/libjin-lua/scripts/app.lua | 7 | ||||
-rw-r--r-- | src/libjin-lua/scripts/app.lua.h | 188 | ||||
-rw-r--r-- | src/libjin/core/je_configuration.h | 2 |
7 files changed, 97 insertions, 106 deletions
diff --git a/src/3rdparty/LuaJIT-2.0.5/src/buildvm.lib b/src/3rdparty/LuaJIT-2.0.5/src/buildvm.lib Binary files differindex c7be727..d4372fd 100644 --- a/src/3rdparty/LuaJIT-2.0.5/src/buildvm.lib +++ b/src/3rdparty/LuaJIT-2.0.5/src/buildvm.lib diff --git a/src/3rdparty/LuaJIT-2.0.5/src/minilua.lib b/src/3rdparty/LuaJIT-2.0.5/src/minilua.lib Binary files differindex e2b3ac3..a3cce18 100644 --- a/src/3rdparty/LuaJIT-2.0.5/src/minilua.lib +++ b/src/3rdparty/LuaJIT-2.0.5/src/minilua.lib diff --git a/src/libjin-lua/je_lua_embed.h b/src/libjin-lua/je_lua_embed.h index 47d85ff..c2290d0 100644 --- a/src/libjin-lua/je_lua_embed.h +++ b/src/libjin-lua/je_lua_embed.h @@ -29,7 +29,7 @@ namespace JinEngine { const char* file, *source; }; - + // In order. static const jin_Embed modules[] = { // ai diff --git a/src/libjin-lua/je_lua_jin.cpp b/src/libjin-lua/je_lua_jin.cpp index fec1544..5989792 100644 --- a/src/libjin-lua/je_lua_jin.cpp +++ b/src/libjin-lua/je_lua_jin.cpp @@ -31,8 +31,8 @@ namespace JinEngine luax_pushstring(L, "macos"); #endif return 1; - } - + } + LUA_IMPLEMENT int l_revision(lua_State* L) { luax_pushnumber(L, REVISION); diff --git a/src/libjin-lua/scripts/app.lua b/src/libjin-lua/scripts/app.lua index 261ae28..393719c 100644 --- a/src/libjin-lua/scripts/app.lua +++ b/src/libjin-lua/scripts/app.lua @@ -50,6 +50,7 @@ function jin.core.run() jin.graphics.present() jin.time.sleep(0.001) end + call(jin.core.onQuit) end ------------------------------------------------------------------------- @@ -113,10 +114,8 @@ jin.audio.init() jin.graphics.init(jin.config) -jin.log.info("================== Start game ==================") - ------------------------------------------------------------------------- --- Boot game +-- Start game ------------------------------------------------------------------------- xpcall(boot, onError) @@ -125,8 +124,6 @@ xpcall(boot, onError) -- Destroy sub-systems ------------------------------------------------------------------------- -jin.log.info("================== Quit game ==================") - jin.graphics.destroy() jin.audio.destroy() diff --git a/src/libjin-lua/scripts/app.lua.h b/src/libjin-lua/scripts/app.lua.h index 863b49f..4bc2d9b 100644 --- a/src/libjin-lua/scripts/app.lua.h +++ b/src/libjin-lua/scripts/app.lua.h @@ -88,98 +88,96 @@ static char app_lua[] = { 32,106,105,110,46,103,114,97,112,104,105,99,115,46,112,114,101,115,101,110, 116,40,41,13,10,32,32,32,32,32,32,32,32,106,105,110,46,116,105,109, 101,46,115,108,101,101,112,40,48,46,48,48,49,41,13,10,32,32,32,32, -101,110,100,13,10,101,110,100,13,10,13,10,45,45,45,45,45,45,45,45, +101,110,100,13,10,32,32,32,32,99,97,108,108,40,106,105,110,46,99,111, +114,101,46,111,110,81,117,105,116,41,13,10,101,110,100,13,10,13,10,45, +45,45,45,45,45,45,45,45,45,45,45,45,45,45,45,45,45,45,45,45, +45,45,45,45,45,45,45,45,45,45,45,45,45,45,45,45,45,45,45,45, +45,45,45,45,45,45,45,45,45,45,45,45,45,45,45,45,45,45,45,45, +45,45,45,45,45,45,45,45,45,45,45,45,13,10,45,45,32,66,111,111, +116,32,103,97,109,101,13,10,45,45,45,45,45,45,45,45,45,45,45,45, +45,45,45,45,45,45,45,45,45,45,45,45,45,45,45,45,45,45,45,45, +45,45,45,45,45,45,45,45,45,45,45,45,45,45,45,45,45,45,45,45, +45,45,45,45,45,45,45,45,45,45,45,45,45,45,45,45,45,45,45,45, +45,13,10,13,10,45,45,32,68,105,115,112,108,97,121,32,101,114,114,111, +114,32,109,101,115,115,97,103,101,46,13,10,108,111,99,97,108,32,102,117, +110,99,116,105,111,110,32,111,110,69,114,114,111,114,40,109,115,103,41,32, +13,10,32,32,32,32,108,111,99,97,108,32,101,114,114,32,61,32,34,69, +114,114,111,114,32,111,99,99,117,114,114,101,100,58,92,110,34,32,46,46, +32,109,115,103,32,46,46,32,34,92,110,34,32,46,46,32,100,101,98,117, +103,46,116,114,97,99,101,98,97,99,107,40,41,13,10,32,32,32,32,106, +105,110,46,108,111,103,46,101,114,114,111,114,40,101,114,114,41,13,10,32, +32,32,32,106,105,110,46,103,114,97,112,104,105,99,115,46,115,104,111,119, +87,105,110,100,111,119,40,41,13,10,32,32,32,32,106,105,110,46,103,114, +97,112,104,105,99,115,46,114,101,115,101,116,40,41,13,10,32,32,32,32, +106,105,110,46,103,114,97,112,104,105,99,115,46,115,101,116,67,108,101,97, +114,67,111,108,111,114,40,49,48,48,44,32,49,48,48,44,32,49,48,48, +44,32,50,53,53,41,13,10,32,32,32,32,106,105,110,46,103,114,97,112, +104,105,99,115,46,99,108,101,97,114,40,41,13,10,32,32,32,32,106,105, +110,46,103,114,97,112,104,105,99,115,46,112,114,105,110,116,40,101,114,114, +44,32,53,44,32,53,41,13,10,32,32,32,32,106,105,110,46,103,114,97, +112,104,105,99,115,46,112,114,101,115,101,110,116,40,41,13,10,32,32,32, +32,119,104,105,108,101,32,106,105,110,46,99,111,114,101,46,114,117,110,110, +105,110,103,40,41,32,100,111,32,13,10,32,32,32,32,32,32,32,32,102, +111,114,32,95,44,32,101,32,105,110,32,112,97,105,114,115,40,106,105,110, +46,101,118,101,110,116,46,112,111,108,108,40,41,41,32,100,111,32,13,10, +32,32,32,32,32,32,32,32,32,32,32,32,105,102,32,101,46,116,121,112, +101,32,61,61,32,34,81,117,105,116,34,32,116,104,101,110,32,13,10,32, +32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,106,105,110,46,99, +111,114,101,46,115,116,111,112,40,41,13,10,32,32,32,32,32,32,32,32, +32,32,32,32,101,110,100,13,10,32,32,32,32,32,32,32,32,101,110,100, +13,10,32,32,32,32,32,32,32,32,106,105,110,46,116,105,109,101,46,115, +108,101,101,112,40,48,46,48,48,49,41,13,10,32,32,32,32,101,110,100, +13,10,101,110,100,13,10,13,10,45,45,32,78,111,32,103,97,109,101,32, +115,99,114,101,101,110,46,13,10,108,111,99,97,108,32,102,117,110,99,116, +105,111,110,32,110,111,71,97,109,101,40,41,13,10,32,32,32,32,106,105, +110,46,103,114,97,112,104,105,99,115,46,115,104,111,119,87,105,110,100,111, +119,40,41,13,10,32,32,32,32,106,105,110,46,103,114,97,112,104,105,99, +115,46,114,101,115,101,116,40,41,13,10,32,32,32,32,106,105,110,46,103, +114,97,112,104,105,99,115,46,115,101,116,67,108,101,97,114,67,111,108,111, +114,40,49,48,48,44,32,49,48,48,44,32,49,48,48,44,32,50,53,53, +41,13,10,32,32,32,32,106,105,110,46,103,114,97,112,104,105,99,115,46, +99,108,101,97,114,40,41,13,10,32,32,32,32,106,105,110,46,103,114,97, +112,104,105,99,115,46,112,114,105,110,116,40,34,78,111,32,71,97,109,101, +34,44,32,53,44,32,53,41,32,13,10,32,32,32,32,106,105,110,46,103, +114,97,112,104,105,99,115,46,112,114,101,115,101,110,116,40,41,13,10,32, +32,32,32,119,104,105,108,101,32,106,105,110,46,99,111,114,101,46,114,117, +110,110,105,110,103,40,41,32,100,111,32,13,10,32,32,32,32,32,32,32, +32,102,111,114,32,95,44,32,101,32,105,110,32,112,97,105,114,115,40,106, +105,110,46,101,118,101,110,116,46,112,111,108,108,40,41,41,32,100,111,32, +13,10,32,32,32,32,32,32,32,32,32,32,32,32,105,102,32,101,46,116, +121,112,101,32,61,61,32,34,81,117,105,116,34,32,116,104,101,110,32,13, +10,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,106,105,110, +46,99,111,114,101,46,115,116,111,112,40,41,13,10,32,32,32,32,32,32, +32,32,32,32,32,32,101,110,100,13,10,32,32,32,32,32,32,32,32,101, +110,100,13,10,32,32,32,32,32,32,32,32,106,105,110,46,116,105,109,101, +46,115,108,101,101,112,40,48,46,48,48,49,41,13,10,32,32,32,32,101, +110,100,13,10,101,110,100,13,10,13,10,108,111,99,97,108,32,102,117,110, +99,116,105,111,110,32,98,111,111,116,40,41,32,13,10,32,32,32,32,105, +102,32,106,105,110,46,102,105,108,101,115,121,115,116,101,109,46,101,120,105, +115,116,40,34,109,97,105,110,46,108,117,97,34,41,32,116,104,101,110,32, +13,10,32,32,32,32,32,32,32,32,99,97,108,108,40,102,117,110,99,116, +105,111,110,40,41,32,13,10,32,32,32,32,32,32,32,32,32,32,32,32, +114,101,113,117,105,114,101,34,109,97,105,110,34,32,13,10,32,32,32,32, +32,32,32,32,32,32,32,32,106,105,110,46,99,111,114,101,46,114,117,110, +40,41,13,10,32,32,32,32,32,32,32,32,101,110,100,41,13,10,32,32, +32,32,101,108,115,101,13,10,32,32,32,32,32,32,32,32,110,111,71,97, +109,101,40,41,13,10,32,32,32,32,101,110,100,13,10,101,110,100,13,10, +13,10,45,45,45,45,45,45,45,45,45,45,45,45,45,45,45,45,45,45, +45,45,45,45,45,45,45,45,45,45,45,45,45,45,45,45,45,45,45,45, +45,45,45,45,45,45,45,45,45,45,45,45,45,45,45,45,45,45,45,45, +45,45,45,45,45,45,45,45,45,45,45,45,45,45,45,13,10,45,45,32, +73,110,105,116,105,97,108,105,122,101,32,115,117,98,32,115,121,115,116,101, +109,115,13,10,45,45,45,45,45,45,45,45,45,45,45,45,45,45,45,45, 45,45,45,45,45,45,45,45,45,45,45,45,45,45,45,45,45,45,45,45, 45,45,45,45,45,45,45,45,45,45,45,45,45,45,45,45,45,45,45,45, +45,45,45,45,45,45,45,45,45,45,45,45,45,45,45,45,45,13,10,13, +10,106,105,110,46,97,117,100,105,111,46,105,110,105,116,40,41,13,10,13, +10,106,105,110,46,103,114,97,112,104,105,99,115,46,105,110,105,116,40,106, +105,110,46,99,111,110,102,105,103,41,13,10,13,10,45,45,45,45,45,45, 45,45,45,45,45,45,45,45,45,45,45,45,45,45,45,45,45,45,45,45, -45,45,45,45,45,13,10,45,45,32,66,111,111,116,32,103,97,109,101,13, -10,45,45,45,45,45,45,45,45,45,45,45,45,45,45,45,45,45,45,45, 45,45,45,45,45,45,45,45,45,45,45,45,45,45,45,45,45,45,45,45, 45,45,45,45,45,45,45,45,45,45,45,45,45,45,45,45,45,45,45,45, -45,45,45,45,45,45,45,45,45,45,45,45,45,45,13,10,13,10,45,45, -32,68,105,115,112,108,97,121,32,101,114,114,111,114,32,109,101,115,115,97, -103,101,46,13,10,108,111,99,97,108,32,102,117,110,99,116,105,111,110,32, -111,110,69,114,114,111,114,40,109,115,103,41,32,13,10,32,32,32,32,108, -111,99,97,108,32,101,114,114,32,61,32,34,69,114,114,111,114,32,111,99, -99,117,114,114,101,100,58,92,110,34,32,46,46,32,109,115,103,32,46,46, -32,34,92,110,34,32,46,46,32,100,101,98,117,103,46,116,114,97,99,101, -98,97,99,107,40,41,13,10,32,32,32,32,106,105,110,46,108,111,103,46, -101,114,114,111,114,40,101,114,114,41,13,10,32,32,32,32,106,105,110,46, -103,114,97,112,104,105,99,115,46,115,104,111,119,87,105,110,100,111,119,40, -41,13,10,32,32,32,32,106,105,110,46,103,114,97,112,104,105,99,115,46, -114,101,115,101,116,40,41,13,10,32,32,32,32,106,105,110,46,103,114,97, -112,104,105,99,115,46,115,101,116,67,108,101,97,114,67,111,108,111,114,40, -49,48,48,44,32,49,48,48,44,32,49,48,48,44,32,50,53,53,41,13, -10,32,32,32,32,106,105,110,46,103,114,97,112,104,105,99,115,46,99,108, -101,97,114,40,41,13,10,32,32,32,32,106,105,110,46,103,114,97,112,104, -105,99,115,46,112,114,105,110,116,40,101,114,114,44,32,53,44,32,53,41, -13,10,32,32,32,32,106,105,110,46,103,114,97,112,104,105,99,115,46,112, -114,101,115,101,110,116,40,41,13,10,32,32,32,32,119,104,105,108,101,32, -106,105,110,46,99,111,114,101,46,114,117,110,110,105,110,103,40,41,32,100, -111,32,13,10,32,32,32,32,32,32,32,32,102,111,114,32,95,44,32,101, -32,105,110,32,112,97,105,114,115,40,106,105,110,46,101,118,101,110,116,46, -112,111,108,108,40,41,41,32,100,111,32,13,10,32,32,32,32,32,32,32, -32,32,32,32,32,105,102,32,101,46,116,121,112,101,32,61,61,32,34,81, -117,105,116,34,32,116,104,101,110,32,13,10,32,32,32,32,32,32,32,32, -32,32,32,32,32,32,32,32,106,105,110,46,99,111,114,101,46,115,116,111, -112,40,41,13,10,32,32,32,32,32,32,32,32,32,32,32,32,101,110,100, -13,10,32,32,32,32,32,32,32,32,101,110,100,13,10,32,32,32,32,32, -32,32,32,106,105,110,46,116,105,109,101,46,115,108,101,101,112,40,48,46, -48,48,49,41,13,10,32,32,32,32,101,110,100,13,10,101,110,100,13,10, -13,10,45,45,32,78,111,32,103,97,109,101,32,115,99,114,101,101,110,46, -13,10,108,111,99,97,108,32,102,117,110,99,116,105,111,110,32,110,111,71, -97,109,101,40,41,13,10,32,32,32,32,106,105,110,46,103,114,97,112,104, -105,99,115,46,115,104,111,119,87,105,110,100,111,119,40,41,13,10,32,32, -32,32,106,105,110,46,103,114,97,112,104,105,99,115,46,114,101,115,101,116, -40,41,13,10,32,32,32,32,106,105,110,46,103,114,97,112,104,105,99,115, -46,115,101,116,67,108,101,97,114,67,111,108,111,114,40,49,48,48,44,32, -49,48,48,44,32,49,48,48,44,32,50,53,53,41,13,10,32,32,32,32, -106,105,110,46,103,114,97,112,104,105,99,115,46,99,108,101,97,114,40,41, -13,10,32,32,32,32,106,105,110,46,103,114,97,112,104,105,99,115,46,112, -114,105,110,116,40,34,78,111,32,71,97,109,101,34,44,32,53,44,32,53, -41,32,13,10,32,32,32,32,106,105,110,46,103,114,97,112,104,105,99,115, -46,112,114,101,115,101,110,116,40,41,13,10,32,32,32,32,119,104,105,108, -101,32,106,105,110,46,99,111,114,101,46,114,117,110,110,105,110,103,40,41, -32,100,111,32,13,10,32,32,32,32,32,32,32,32,102,111,114,32,95,44, -32,101,32,105,110,32,112,97,105,114,115,40,106,105,110,46,101,118,101,110, -116,46,112,111,108,108,40,41,41,32,100,111,32,13,10,32,32,32,32,32, -32,32,32,32,32,32,32,105,102,32,101,46,116,121,112,101,32,61,61,32, -34,81,117,105,116,34,32,116,104,101,110,32,13,10,32,32,32,32,32,32, -32,32,32,32,32,32,32,32,32,32,106,105,110,46,99,111,114,101,46,115, -116,111,112,40,41,13,10,32,32,32,32,32,32,32,32,32,32,32,32,101, -110,100,13,10,32,32,32,32,32,32,32,32,101,110,100,13,10,32,32,32, -32,32,32,32,32,106,105,110,46,116,105,109,101,46,115,108,101,101,112,40, -48,46,48,48,49,41,13,10,32,32,32,32,101,110,100,13,10,101,110,100, -13,10,13,10,108,111,99,97,108,32,102,117,110,99,116,105,111,110,32,98, -111,111,116,40,41,32,13,10,32,32,32,32,105,102,32,106,105,110,46,102, -105,108,101,115,121,115,116,101,109,46,101,120,105,115,116,40,34,109,97,105, -110,46,108,117,97,34,41,32,116,104,101,110,32,13,10,32,32,32,32,32, -32,32,32,99,97,108,108,40,102,117,110,99,116,105,111,110,40,41,32,13, -10,32,32,32,32,32,32,32,32,32,32,32,32,114,101,113,117,105,114,101, -34,109,97,105,110,34,32,13,10,32,32,32,32,32,32,32,32,32,32,32, -32,106,105,110,46,99,111,114,101,46,114,117,110,40,41,13,10,32,32,32, -32,32,32,32,32,101,110,100,41,13,10,32,32,32,32,101,108,115,101,13, -10,32,32,32,32,32,32,32,32,110,111,71,97,109,101,40,41,13,10,32, -32,32,32,101,110,100,13,10,101,110,100,13,10,13,10,45,45,45,45,45, -45,45,45,45,45,45,45,45,45,45,45,45,45,45,45,45,45,45,45,45, -45,45,45,45,45,45,45,45,45,45,45,45,45,45,45,45,45,45,45,45, -45,45,45,45,45,45,45,45,45,45,45,45,45,45,45,45,45,45,45,45, -45,45,45,45,45,45,45,45,13,10,45,45,32,73,110,105,116,105,97,108, -105,122,101,32,115,117,98,32,115,121,115,116,101,109,115,13,10,45,45,45, -45,45,45,45,45,45,45,45,45,45,45,45,45,45,45,45,45,45,45,45, -45,45,45,45,45,45,45,45,45,45,45,45,45,45,45,45,45,45,45,45, -45,45,45,45,45,45,45,45,45,45,45,45,45,45,45,45,45,45,45,45, -45,45,45,45,45,45,45,45,45,45,13,10,13,10,106,105,110,46,97,117, -100,105,111,46,105,110,105,116,40,41,13,10,13,10,106,105,110,46,103,114, -97,112,104,105,99,115,46,105,110,105,116,40,106,105,110,46,99,111,110,102, -105,103,41,13,10,13,10,106,105,110,46,108,111,103,46,105,110,102,111,40, -34,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,32, -83,116,97,114,116,32,103,97,109,101,32,61,61,61,61,61,61,61,61,61, -61,61,61,61,61,61,61,61,61,34,41,13,10,13,10,45,45,45,45,45, -45,45,45,45,45,45,45,45,45,45,45,45,45,45,45,45,45,45,45,45, -45,45,45,45,45,45,45,45,45,45,45,45,45,45,45,45,45,45,45,45, -45,45,45,45,45,45,45,45,45,45,45,45,45,45,45,45,45,45,45,45, -45,45,45,45,45,45,45,45,13,10,45,45,32,66,111,111,116,32,103,97, +45,45,45,45,45,45,45,13,10,45,45,32,83,116,97,114,116,32,103,97, 109,101,13,10,45,45,45,45,45,45,45,45,45,45,45,45,45,45,45,45, 45,45,45,45,45,45,45,45,45,45,45,45,45,45,45,45,45,45,45,45, 45,45,45,45,45,45,45,45,45,45,45,45,45,45,45,45,45,45,45,45, @@ -194,21 +192,17 @@ static char app_lua[] = { 45,45,45,45,45,45,45,45,45,45,45,45,45,45,45,45,45,45,45,45, 45,45,45,45,45,45,45,45,45,45,45,45,45,45,45,45,45,45,45,45, 45,45,45,45,45,45,45,45,45,45,45,45,45,45,45,45,45,45,13,10, -13,10,106,105,110,46,108,111,103,46,105,110,102,111,40,34,61,61,61,61, -61,61,61,61,61,61,61,61,61,61,61,61,61,61,32,81,117,105,116,32, -103,97,109,101,32,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61, -61,61,61,34,41,13,10,13,10,106,105,110,46,103,114,97,112,104,105,99, -115,46,100,101,115,116,114,111,121,40,41,13,10,13,10,106,105,110,46,97, -117,100,105,111,46,100,101,115,116,114,111,121,40,41,13,10,13,10,45,45, +13,10,106,105,110,46,103,114,97,112,104,105,99,115,46,100,101,115,116,114, +111,121,40,41,13,10,13,10,106,105,110,46,97,117,100,105,111,46,100,101, +115,116,114,111,121,40,41,13,10,13,10,45,45,45,45,45,45,45,45,45, 45,45,45,45,45,45,45,45,45,45,45,45,45,45,45,45,45,45,45,45, 45,45,45,45,45,45,45,45,45,45,45,45,45,45,45,45,45,45,45,45, 45,45,45,45,45,45,45,45,45,45,45,45,45,45,45,45,45,45,45,45, -45,45,45,45,45,45,45,45,45,45,45,13,10,45,45,32,81,117,105,116, -32,103,97,109,101,13,10,45,45,45,45,45,45,45,45,45,45,45,45,45, +45,45,45,45,13,10,45,45,32,81,117,105,116,32,103,97,109,101,13,10, 45,45,45,45,45,45,45,45,45,45,45,45,45,45,45,45,45,45,45,45, 45,45,45,45,45,45,45,45,45,45,45,45,45,45,45,45,45,45,45,45, 45,45,45,45,45,45,45,45,45,45,45,45,45,45,45,45,45,45,45,45, -13,10,13,10,106,105,110,46,99,111,114,101,46,113,117,105,116,40,41,13, -10 +45,45,45,45,45,45,45,45,45,45,45,45,45,13,10,13,10,106,105,110, +46,99,111,114,101,46,113,117,105,116,40,41,13,10 }; diff --git a/src/libjin/core/je_configuration.h b/src/libjin/core/je_configuration.h index 80e2748..40956b5 100644 --- a/src/libjin/core/je_configuration.h +++ b/src/libjin/core/je_configuration.h @@ -6,7 +6,7 @@ /// /// Debug output /// -#define jin_debug +//#define jin_debug #define jin_os_windows 0x01 #define jin_os_mac 0x02 |