From c1e2a3e47d57ea44a246b2beb78c13ea2669f227 Mon Sep 17 00:00:00 2001 From: chai Date: Thu, 20 Dec 2018 20:17:32 +0800 Subject: =?UTF-8?q?*=E4=BF=AE=E6=94=B9=E6=96=87=E4=BB=B6=E7=9B=AE=E5=BD=95?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/libjin-lua/embed/ai.lua.h | 12 +- src/libjin-lua/embed/app.lua.h | 209 +++++++++++++++++++++ src/libjin-lua/embed/boot.lua.h | 209 --------------------- src/libjin-lua/embed/embed.h | 10 +- src/libjin-lua/embed/path.lua.h | 18 +- src/libjin-lua/embed/scripts/ai.lua | 9 - src/libjin-lua/embed/scripts/ai/ai.lua | 8 + src/libjin-lua/embed/scripts/ai/state_machine.lua | 7 + src/libjin-lua/embed/scripts/app.lua | 136 ++++++++++++++ src/libjin-lua/embed/scripts/boot.lua | 136 -------------- src/libjin-lua/embed/scripts/graphics.lua | 136 -------------- src/libjin-lua/embed/scripts/graphics/graphics.lua | 136 ++++++++++++++ src/libjin-lua/embed/scripts/keyboard.lua | 14 -- src/libjin-lua/embed/scripts/keyboard/keyboard.lua | 14 ++ src/libjin-lua/embed/scripts/mouse.lua | 14 -- src/libjin-lua/embed/scripts/mouse/mouse.lua | 14 ++ src/libjin-lua/embed/scripts/net.lua | 4 - src/libjin-lua/embed/scripts/net/net.lua | 4 + src/libjin-lua/embed/scripts/path.lua | 13 -- src/libjin-lua/embed/scripts/path/path.lua | 13 ++ src/libjin-lua/embed/state_machine.lua.h | 8 + 21 files changed, 569 insertions(+), 555 deletions(-) create mode 100644 src/libjin-lua/embed/app.lua.h delete mode 100644 src/libjin-lua/embed/boot.lua.h delete mode 100644 src/libjin-lua/embed/scripts/ai.lua create mode 100644 src/libjin-lua/embed/scripts/ai/ai.lua create mode 100644 src/libjin-lua/embed/scripts/ai/state_machine.lua create mode 100644 src/libjin-lua/embed/scripts/app.lua delete mode 100644 src/libjin-lua/embed/scripts/boot.lua delete mode 100644 src/libjin-lua/embed/scripts/graphics.lua create mode 100644 src/libjin-lua/embed/scripts/graphics/graphics.lua delete mode 100644 src/libjin-lua/embed/scripts/keyboard.lua create mode 100644 src/libjin-lua/embed/scripts/keyboard/keyboard.lua delete mode 100644 src/libjin-lua/embed/scripts/mouse.lua create mode 100644 src/libjin-lua/embed/scripts/mouse/mouse.lua delete mode 100644 src/libjin-lua/embed/scripts/net.lua create mode 100644 src/libjin-lua/embed/scripts/net/net.lua delete mode 100644 src/libjin-lua/embed/scripts/path.lua create mode 100644 src/libjin-lua/embed/scripts/path/path.lua create mode 100644 src/libjin-lua/embed/state_machine.lua.h (limited to 'src/libjin-lua') diff --git a/src/libjin-lua/embed/ai.lua.h b/src/libjin-lua/embed/ai.lua.h index 112706e..1af475c 100644 --- a/src/libjin-lua/embed/ai.lua.h +++ b/src/libjin-lua/embed/ai.lua.h @@ -1,9 +1,9 @@ static unsigned char ai_lua[] = { -13,10,106,105,110,46,97,105,32,61,32,106,105,110,46,97,105,32,111,114, -32,123,125,32,13,10,13,10,108,111,99,97,108,32,106,97,32,61,32,106, -105,110,46,97,105,13,10,13,10,106,97,46,83,116,97,116,101,77,97,99, -104,105,110,101,84,121,112,101,32,61,32,123,13,10,32,32,32,32,83,84, -69,80,87,73,83,69,32,61,32,49,44,32,13,10,32,32,32,32,73,84, -69,82,65,84,73,86,69,32,61,32,50,44,13,10,125,13,10 +106,105,110,46,97,105,32,61,32,106,105,110,46,97,105,32,111,114,32,123, +125,32,13,10,13,10,108,111,99,97,108,32,106,97,32,61,32,106,105,110, +46,97,105,13,10,13,10,106,97,46,83,116,97,116,101,77,97,99,104,105, +110,101,84,121,112,101,32,61,32,123,13,10,32,32,32,32,83,84,69,80, +87,73,83,69,32,61,32,49,44,32,13,10,32,32,32,32,73,84,69,82, +65,84,73,86,69,32,61,32,50,44,13,10,125,13,10 }; diff --git a/src/libjin-lua/embed/app.lua.h b/src/libjin-lua/embed/app.lua.h new file mode 100644 index 0000000..1a9afd1 --- /dev/null +++ b/src/libjin-lua/embed/app.lua.h @@ -0,0 +1,209 @@ +static unsigned char app_lua[] = { +13,10,108,111,99,97,108,32,99,119,100,32,61,32,106,105,110,46,97,114, +103,115,91,39,99,119,100,39,93,32,111,114,32,39,46,39,13,10,106,105, +110,46,102,105,108,101,115,121,115,116,101,109,46,105,110,105,116,40,41,13, +10,106,105,110,46,102,105,108,101,115,121,115,116,101,109,46,109,111,117,110, +116,40,99,119,100,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,67,111,110,102,105,103,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,106,105, +110,46,99,111,110,102,105,103,32,32,61,32,123,125,32,13,10,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,99,111,110,102,105,103,46,108,117,97,34,41,32,116,104,101,110,32, +13,10,32,32,32,32,120,112,99,97,108,108,40,102,117,110,99,116,105,111, +110,40,41,106,105,110,46,99,111,110,102,105,103,32,61,32,114,101,113,117, +105,114,101,32,34,99,111,110,102,105,103,34,32,101,110,100,44,32,102,117, +110,99,116,105,111,110,40,41,101,110,100,41,32,32,32,32,13,10,101,110, +100,13,10,106,105,110,46,99,111,110,102,105,103,46,119,105,100,116,104,32, +32,32,32,32,32,61,32,106,105,110,46,99,111,110,102,105,103,46,119,105, +100,116,104,32,32,32,32,32,32,111,114,32,53,56,48,32,13,10,106,105, +110,46,99,111,110,102,105,103,46,104,101,105,103,104,116,32,32,32,32,32, +61,32,106,105,110,46,99,111,110,102,105,103,46,104,101,105,103,104,116,32, +32,32,32,32,111,114,32,52,53,48,32,13,10,106,105,110,46,99,111,110, +102,105,103,46,118,115,121,110,99,32,32,32,32,32,32,61,32,106,105,110, +46,99,111,110,102,105,103,46,118,115,121,110,99,32,32,32,32,32,32,111, +114,32,116,114,117,101,13,10,106,105,110,46,99,111,110,102,105,103,46,116, +105,116,108,101,32,32,32,32,32,32,61,32,106,105,110,46,99,111,110,102, +105,103,46,116,105,116,108,101,32,32,32,32,32,32,111,114,32,40,34,106, +105,110,32,118,34,32,46,46,32,106,105,110,46,118,101,114,115,105,111,110, +41,13,10,106,105,110,46,99,111,110,102,105,103,46,114,101,115,105,122,97, +98,108,101,32,32,61,32,106,105,110,46,99,111,110,102,105,103,46,114,101, +115,105,122,97,98,108,101,32,32,111,114,32,102,97,108,115,101,32,13,10, +106,105,110,46,99,111,110,102,105,103,46,102,117,108,108,115,99,114,101,101, +110,32,61,32,106,105,110,46,99,111,110,102,105,103,46,102,117,108,108,115, +99,114,101,101,110,32,111,114,32,102,97,108,115,101,13,10,106,105,110,46, +99,111,110,102,105,103,46,102,112,115,32,32,32,32,32,32,32,32,32,32, +61,32,106,105,110,46,99,111,110,102,105,103,46,102,112,115,32,32,32,32, +32,32,32,32,32,32,111,114,32,54,48,13,10,106,105,110,46,99,111,110, +102,105,103,46,105,99,111,110,32,32,32,32,32,32,32,61,32,106,105,110, +46,99,111,110,102,105,103,46,105,99,111,110,32,32,32,32,32,32,32,111, +114,32,34,34,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,68,101,102,97,117,108,116,32,103,97,109,101,32,108, +111,111,112,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,108,111,99,97,108,32,102,117,110,99,116,105,111,110,32,99,97,108, +108,40,102,117,110,99,44,32,46,46,46,41,13,10,32,32,32,32,105,102, +32,102,117,110,99,32,116,104,101,110,32,13,10,32,32,32,32,32,32,32, +32,114,101,116,117,114,110,32,102,117,110,99,40,46,46,46,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,115,116,101,112,32,61,32,106,105,110,46,116,105,109,101,46,115,116,101, +112,13,10,106,105,110,46,116,105,109,101,46,115,116,101,112,32,61,32,110, +105,108,13,10,13,10,102,117,110,99,116,105,111,110,32,106,105,110,46,99, +111,114,101,46,114,117,110,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,99,97,108,108,40,106,105,110,46,99,111,114,101,46,111,110,76,111,97, +100,41,13,10,32,32,32,32,108,111,99,97,108,32,100,116,32,61,32,48, +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,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,75,101,121,68,111,119,110,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,107,101,121,98,111,97,114,100,46,115,101,116,40,101, +46,107,101,121,44,32,116,114,117,101,41,32,13,10,32,32,32,32,32,32, +32,32,32,32,32,32,101,108,115,101,105,102,32,101,46,116,121,112,101,32, +61,61,32,34,75,101,121,85,112,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,107,101, +121,98,111,97,114,100,46,115,101,116,40,101,46,107,101,121,44,32,102,97, +108,115,101,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,32,32,32,32,99,97,108,108,40, +106,105,110,46,99,111,114,101,46,111,110,69,118,101,110,116,44,32,101,41, +13,10,32,32,32,32,32,32,32,32,101,110,100,13,10,32,32,32,32,32, +32,32,32,115,116,101,112,40,41,13,10,32,32,32,32,32,32,32,32,100, +116,32,61,32,106,105,110,46,116,105,109,101,46,103,101,116,68,101,108,116, +97,40,41,13,10,32,32,32,32,32,32,32,32,99,97,108,108,40,106,105, +110,46,99,111,114,101,46,111,110,85,112,100,97,116,101,44,32,100,116,41, +13,10,32,32,32,32,32,32,32,32,106,105,110,46,103,114,97,112,104,105, +99,115,46,99,108,101,97,114,40,41,32,32,32,32,32,32,32,32,13,10, +32,32,32,32,32,32,32,32,99,97,108,108,40,106,105,110,46,99,111,114, +101,46,111,110,68,114,97,119,41,13,10,32,32,32,32,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,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,45,45, +45,45,45,45,45,45,45,45,45,45,45,45,45,45,45,45,45,45,45,45, +45,45,45,45,45,45,45,45,45,45,45,45,45,45,45,45,45,45,45,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,106,105,110, +46,97,117,100,105,111,46,100,101,115,116,114,111,121,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,108,111,99,97,108,32,101, +114,114,32,61,32,34,69,114,114,111,114,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,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,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,45,45,45,45,45,45,45,45,45,45,45,45,45,45, +45,45,45,45,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,120,112,99,97,108,108,40,98,111,111,116,44,32,111,110,69,114,114,111, +114,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,68,101,115,116,114,111,121,32,115,117,98,45,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,103,114,97,112,104,105,99,115,46,100,101,115,116,114, +111,121,40,41,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,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,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-lua/embed/boot.lua.h b/src/libjin-lua/embed/boot.lua.h deleted file mode 100644 index 51f1044..0000000 --- a/src/libjin-lua/embed/boot.lua.h +++ /dev/null @@ -1,209 +0,0 @@ -static unsigned char boot_lua[] = { -13,10,108,111,99,97,108,32,99,119,100,32,61,32,106,105,110,46,97,114, -103,115,91,39,99,119,100,39,93,32,111,114,32,39,46,39,13,10,106,105, -110,46,102,105,108,101,115,121,115,116,101,109,46,105,110,105,116,40,41,13, -10,106,105,110,46,102,105,108,101,115,121,115,116,101,109,46,109,111,117,110, -116,40,99,119,100,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,67,111,110,102,105,103,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,106,105, -110,46,99,111,110,102,105,103,32,32,61,32,123,125,32,13,10,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,99,111,110,102,105,103,46,108,117,97,34,41,32,116,104,101,110,32, -13,10,32,32,32,32,120,112,99,97,108,108,40,102,117,110,99,116,105,111, -110,40,41,106,105,110,46,99,111,110,102,105,103,32,61,32,114,101,113,117, -105,114,101,32,34,99,111,110,102,105,103,34,32,101,110,100,44,32,102,117, -110,99,116,105,111,110,40,41,101,110,100,41,32,32,32,32,13,10,101,110, -100,13,10,106,105,110,46,99,111,110,102,105,103,46,119,105,100,116,104,32, -32,32,32,32,32,61,32,106,105,110,46,99,111,110,102,105,103,46,119,105, -100,116,104,32,32,32,32,32,32,111,114,32,53,56,48,32,13,10,106,105, -110,46,99,111,110,102,105,103,46,104,101,105,103,104,116,32,32,32,32,32, -61,32,106,105,110,46,99,111,110,102,105,103,46,104,101,105,103,104,116,32, -32,32,32,32,111,114,32,52,53,48,32,13,10,106,105,110,46,99,111,110, -102,105,103,46,118,115,121,110,99,32,32,32,32,32,32,61,32,106,105,110, -46,99,111,110,102,105,103,46,118,115,121,110,99,32,32,32,32,32,32,111, -114,32,116,114,117,101,13,10,106,105,110,46,99,111,110,102,105,103,46,116, -105,116,108,101,32,32,32,32,32,32,61,32,106,105,110,46,99,111,110,102, -105,103,46,116,105,116,108,101,32,32,32,32,32,32,111,114,32,40,34,106, -105,110,32,118,34,32,46,46,32,106,105,110,46,118,101,114,115,105,111,110, -41,13,10,106,105,110,46,99,111,110,102,105,103,46,114,101,115,105,122,97, -98,108,101,32,32,61,32,106,105,110,46,99,111,110,102,105,103,46,114,101, -115,105,122,97,98,108,101,32,32,111,114,32,102,97,108,115,101,32,13,10, -106,105,110,46,99,111,110,102,105,103,46,102,117,108,108,115,99,114,101,101, -110,32,61,32,106,105,110,46,99,111,110,102,105,103,46,102,117,108,108,115, -99,114,101,101,110,32,111,114,32,102,97,108,115,101,13,10,106,105,110,46, -99,111,110,102,105,103,46,102,112,115,32,32,32,32,32,32,32,32,32,32, -61,32,106,105,110,46,99,111,110,102,105,103,46,102,112,115,32,32,32,32, -32,32,32,32,32,32,111,114,32,54,48,13,10,106,105,110,46,99,111,110, -102,105,103,46,105,99,111,110,32,32,32,32,32,32,32,61,32,106,105,110, -46,99,111,110,102,105,103,46,105,99,111,110,32,32,32,32,32,32,32,111, -114,32,34,34,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,68,101,102,97,117,108,116,32,103,97,109,101,32,108, -111,111,112,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,108,111,99,97,108,32,102,117,110,99,116,105,111,110,32,99,97,108, -108,40,102,117,110,99,44,32,46,46,46,41,13,10,32,32,32,32,105,102, -32,102,117,110,99,32,116,104,101,110,32,13,10,32,32,32,32,32,32,32, -32,114,101,116,117,114,110,32,102,117,110,99,40,46,46,46,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,115,116,101,112,32,61,32,106,105,110,46,116,105,109,101,46,115,116,101, -112,13,10,106,105,110,46,116,105,109,101,46,115,116,101,112,32,61,32,110, -105,108,13,10,13,10,102,117,110,99,116,105,111,110,32,106,105,110,46,99, -111,114,101,46,114,117,110,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,99,97,108,108,40,106,105,110,46,99,111,114,101,46,111,110,76,111,97, -100,41,13,10,32,32,32,32,108,111,99,97,108,32,100,116,32,61,32,48, -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,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,75,101,121,68,111,119,110,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,107,101,121,98,111,97,114,100,46,115,101,116,40,101, -46,107,101,121,44,32,116,114,117,101,41,32,13,10,32,32,32,32,32,32, -32,32,32,32,32,32,101,108,115,101,105,102,32,101,46,116,121,112,101,32, -61,61,32,34,75,101,121,85,112,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,107,101, -121,98,111,97,114,100,46,115,101,116,40,101,46,107,101,121,44,32,102,97, -108,115,101,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,32,32,32,32,99,97,108,108,40, -106,105,110,46,99,111,114,101,46,111,110,69,118,101,110,116,44,32,101,41, -13,10,32,32,32,32,32,32,32,32,101,110,100,13,10,32,32,32,32,32, -32,32,32,115,116,101,112,40,41,13,10,32,32,32,32,32,32,32,32,100, -116,32,61,32,106,105,110,46,116,105,109,101,46,103,101,116,68,101,108,116, -97,40,41,13,10,32,32,32,32,32,32,32,32,99,97,108,108,40,106,105, -110,46,99,111,114,101,46,111,110,85,112,100,97,116,101,44,32,100,116,41, -13,10,32,32,32,32,32,32,32,32,106,105,110,46,103,114,97,112,104,105, -99,115,46,99,108,101,97,114,40,41,32,32,32,32,32,32,32,32,13,10, -32,32,32,32,32,32,32,32,99,97,108,108,40,106,105,110,46,99,111,114, -101,46,111,110,68,114,97,119,41,13,10,32,32,32,32,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,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,45,45, -45,45,45,45,45,45,45,45,45,45,45,45,45,45,45,45,45,45,45,45, -45,45,45,45,45,45,45,45,45,45,45,45,45,45,45,45,45,45,45,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,106,105,110, -46,97,117,100,105,111,46,100,101,115,116,114,111,121,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,108,111,99,97,108,32,101, -114,114,32,61,32,34,69,114,114,111,114,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,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,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,45,45,45,45,45,45,45,45,45,45,45,45,45,45, -45,45,45,45,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,120,112,99,97,108,108,40,98,111,111,116,44,32,111,110,69,114,114,111, -114,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,68,101,115,116,114,111,121,32,115,117,98,45,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,103,114,97,112,104,105,99,115,46,100,101,115,116,114, -111,121,40,41,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,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,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-lua/embed/embed.h b/src/libjin-lua/embed/embed.h index c1d1ef5..0609abc 100644 --- a/src/libjin-lua/embed/embed.h +++ b/src/libjin-lua/embed/embed.h @@ -1,5 +1,5 @@ -#ifndef __JIN_LUA_EMBED_H -#define __JIN_LUA_EMBED_H +#ifndef __JIN_LUA_EMBED_H__ +#define __JIN_LUA_EMBED_H__ #include namespace JinEngine @@ -18,7 +18,7 @@ namespace JinEngine #include "graphics.lua.h" #include "keyboard.lua.h" #include "mouse.lua.h" - #include "boot.lua.h" + #include "app.lua.h" // In order. static const jin_Embed modules[] = { @@ -28,7 +28,7 @@ namespace JinEngine { 0, 0 } }; - static const jin_Embed bootscript = { "boot.lua", boot_lua }; + static const jin_Embed bootscript = { "app.lua", app_lua }; static void run(lua_State* L) { @@ -49,4 +49,4 @@ namespace JinEngine } // namespace Embed } // namespace JinEngine -#endif \ No newline at end of file +#endif // __JIN_LUA_EMBED_H__ \ No newline at end of file diff --git a/src/libjin-lua/embed/path.lua.h b/src/libjin-lua/embed/path.lua.h index 859b35b..59e7d74 100644 --- a/src/libjin-lua/embed/path.lua.h +++ b/src/libjin-lua/embed/path.lua.h @@ -1,16 +1,16 @@ static unsigned char path_lua[] = { 13,10,106,105,110,46,112,97,116,104,32,61,32,106,105,110,46,112,97,116, 104,32,111,114,32,123,125,32,13,10,13,10,108,111,99,97,108,32,106,112, -32,61,32,106,105,110,46,112,97,116,104,13,10,13,10,45,45,32,103,97, +32,61,32,106,105,110,46,112,97,116,104,13,10,13,10,45,45,32,71,97, 109,101,32,114,111,111,116,32,100,105,114,101,99,116,111,114,121,32,13,10, 106,105,110,46,95,114,111,111,116,32,61,32,110,105,108,32,13,10,13,10, -45,45,32,114,101,116,117,114,110,32,102,117,108,108,32,112,97,116,104,32, -111,102,32,97,32,103,105,118,101,110,32,112,97,116,104,32,13,10,102,117, -110,99,116,105,111,110,32,106,105,110,46,112,97,116,104,46,102,117,108,108, -40,112,97,116,104,41,13,10,32,32,32,32,108,111,99,97,108,32,114,111, -111,116,32,61,32,106,105,110,46,95,100,105,114,32,46,46,32,39,47,39, -32,46,46,32,106,105,110,46,95,97,114,103,118,91,50,93,13,10,32,32, -32,32,114,101,116,117,114,110,32,114,111,111,116,32,46,46,32,39,47,39, -32,46,46,32,112,97,116,104,32,13,10,101,110,100,13,10 +45,45,32,71,101,116,32,102,117,108,108,32,112,97,116,104,32,111,102,32, +97,32,103,105,118,101,110,32,112,97,116,104,32,13,10,102,117,110,99,116, +105,111,110,32,106,105,110,46,112,97,116,104,46,102,117,108,108,40,112,97, +116,104,41,13,10,32,32,32,32,108,111,99,97,108,32,114,111,111,116,32, +61,32,106,105,110,46,95,100,105,114,32,46,46,32,39,47,39,32,46,46, +32,106,105,110,46,95,97,114,103,118,91,50,93,13,10,32,32,32,32,114, +101,116,117,114,110,32,114,111,111,116,32,46,46,32,39,47,39,32,46,46, +32,112,97,116,104,32,13,10,101,110,100,13,10 }; diff --git a/src/libjin-lua/embed/scripts/ai.lua b/src/libjin-lua/embed/scripts/ai.lua deleted file mode 100644 index c9f6ff1..0000000 --- a/src/libjin-lua/embed/scripts/ai.lua +++ /dev/null @@ -1,9 +0,0 @@ - -jin.ai = jin.ai or {} - -local ja = jin.ai - -ja.StateMachineType = { - STEPWISE = 1, - ITERATIVE = 2, -} diff --git a/src/libjin-lua/embed/scripts/ai/ai.lua b/src/libjin-lua/embed/scripts/ai/ai.lua new file mode 100644 index 0000000..fb8ffa7 --- /dev/null +++ b/src/libjin-lua/embed/scripts/ai/ai.lua @@ -0,0 +1,8 @@ +jin.ai = jin.ai or {} + +local ja = jin.ai + +ja.StateMachineType = { + STEPWISE = 1, + ITERATIVE = 2, +} diff --git a/src/libjin-lua/embed/scripts/ai/state_machine.lua b/src/libjin-lua/embed/scripts/ai/state_machine.lua new file mode 100644 index 0000000..b4ec768 --- /dev/null +++ b/src/libjin-lua/embed/scripts/ai/state_machine.lua @@ -0,0 +1,7 @@ +jin.ai = jin.ai or {} + +local statemachine = {} + +jin.ai.newStateMachine = function() + +end diff --git a/src/libjin-lua/embed/scripts/app.lua b/src/libjin-lua/embed/scripts/app.lua new file mode 100644 index 0000000..cfcf264 --- /dev/null +++ b/src/libjin-lua/embed/scripts/app.lua @@ -0,0 +1,136 @@ + +local cwd = jin.args['cwd'] or '.' +jin.filesystem.init() +jin.filesystem.mount(cwd) + +------------------------------------------------------------------------- +-- Config game +------------------------------------------------------------------------- + +jin.config = {} +if jin.filesystem.exist("config.lua") then + xpcall(function()jin.config = require "config" end, function()end) +end +jin.config.width = jin.config.width or 580 +jin.config.height = jin.config.height or 450 +jin.config.vsync = jin.config.vsync or true +jin.config.title = jin.config.title or ("jin v" .. jin.version) +jin.config.resizable = jin.config.resizable or false +jin.config.fullscreen = jin.config.fullscreen or false +jin.config.fps = jin.config.fps or 60 +jin.config.icon = jin.config.icon or "" + +------------------------------------------------------------------------- +-- Default game loop +------------------------------------------------------------------------- + +local function call(func, ...) + if func then + return func(...) + end +end + +local step = jin.time.step +jin.time.step = nil + +function jin.core.run() + jin.graphics.reset() + call(jin.core.onLoad) + local dt = 0 + while jin.core.running() do + for _, e in pairs(jin.event.poll()) do + if e.type == "KeyDown" then + jin.keyboard.set(e.key, true) + elseif e.type == "KeyUp" then + jin.keyboard.set(e.key, false) + end + call(jin.core.onEvent, e) + end + step() + dt = jin.time.getDelta() + call(jin.core.onUpdate, dt) + jin.graphics.clear() + call(jin.core.onDraw) + jin.graphics.present() + jin.time.sleep(0.001) + end +end + +------------------------------------------------------------------------- +-- Boot game +------------------------------------------------------------------------- + +-- Display error message. +local function onError(msg) + jin.audio.destroy() + jin.graphics.showWindow() + local err = "Error:\n" .. msg .. "\n" .. debug.traceback() + jin.graphics.reset() + jin.graphics.setClearColor(100, 100, 100, 255) + jin.graphics.clear() + jin.graphics.print(err, 5, 5) + jin.graphics.present() + while jin.core.running() do + for _, e in pairs(jin.event.poll()) do + if e.type == "Quit" then + jin.core.stop() + end + end + jin.time.sleep(0.001) + end +end + +-- No game screen. +local function noGame() + jin.graphics.showWindow() + jin.graphics.reset() + jin.graphics.setClearColor(100, 100, 100, 255) + jin.graphics.clear() + jin.graphics.print("No Game", 5, 5) + jin.graphics.present() + while jin.core.running() do + for _, e in pairs(jin.event.poll()) do + if e.type == "Quit" then + jin.core.stop() + end + end + jin.time.sleep(0.001) + end +end + +local function boot() + if jin.filesystem.exist("main.lua") then + call(function() + require"main" + jin.core.run() + end) + else + noGame() + end +end + +------------------------------------------------------------------------- +-- Initialize sub systems +------------------------------------------------------------------------- + +jin.audio.init() +jin.graphics.init(jin.config) + +------------------------------------------------------------------------- +-- Boot game +------------------------------------------------------------------------- + +xpcall(boot, onError) + +------------------------------------------------------------------------- +-- Destroy sub-systems +------------------------------------------------------------------------- + +jin.graphics.destroy() +jin.audio.destroy() + +------------------------------------------------------------------------- +-- Quit game +------------------------------------------------------------------------- + +jin.core.quit() diff --git a/src/libjin-lua/embed/scripts/boot.lua b/src/libjin-lua/embed/scripts/boot.lua deleted file mode 100644 index cfcf264..0000000 --- a/src/libjin-lua/embed/scripts/boot.lua +++ /dev/null @@ -1,136 +0,0 @@ - -local cwd = jin.args['cwd'] or '.' -jin.filesystem.init() -jin.filesystem.mount(cwd) - -------------------------------------------------------------------------- --- Config game -------------------------------------------------------------------------- - -jin.config = {} -if jin.filesystem.exist("config.lua") then - xpcall(function()jin.config = require "config" end, function()end) -end -jin.config.width = jin.config.width or 580 -jin.config.height = jin.config.height or 450 -jin.config.vsync = jin.config.vsync or true -jin.config.title = jin.config.title or ("jin v" .. jin.version) -jin.config.resizable = jin.config.resizable or false -jin.config.fullscreen = jin.config.fullscreen or false -jin.config.fps = jin.config.fps or 60 -jin.config.icon = jin.config.icon or "" - -------------------------------------------------------------------------- --- Default game loop -------------------------------------------------------------------------- - -local function call(func, ...) - if func then - return func(...) - end -end - -local step = jin.time.step -jin.time.step = nil - -function jin.core.run() - jin.graphics.reset() - call(jin.core.onLoad) - local dt = 0 - while jin.core.running() do - for _, e in pairs(jin.event.poll()) do - if e.type == "KeyDown" then - jin.keyboard.set(e.key, true) - elseif e.type == "KeyUp" then - jin.keyboard.set(e.key, false) - end - call(jin.core.onEvent, e) - end - step() - dt = jin.time.getDelta() - call(jin.core.onUpdate, dt) - jin.graphics.clear() - call(jin.core.onDraw) - jin.graphics.present() - jin.time.sleep(0.001) - end -end - -------------------------------------------------------------------------- --- Boot game -------------------------------------------------------------------------- - --- Display error message. -local function onError(msg) - jin.audio.destroy() - jin.graphics.showWindow() - local err = "Error:\n" .. msg .. "\n" .. debug.traceback() - jin.graphics.reset() - jin.graphics.setClearColor(100, 100, 100, 255) - jin.graphics.clear() - jin.graphics.print(err, 5, 5) - jin.graphics.present() - while jin.core.running() do - for _, e in pairs(jin.event.poll()) do - if e.type == "Quit" then - jin.core.stop() - end - end - jin.time.sleep(0.001) - end -end - --- No game screen. -local function noGame() - jin.graphics.showWindow() - jin.graphics.reset() - jin.graphics.setClearColor(100, 100, 100, 255) - jin.graphics.clear() - jin.graphics.print("No Game", 5, 5) - jin.graphics.present() - while jin.core.running() do - for _, e in pairs(jin.event.poll()) do - if e.type == "Quit" then - jin.core.stop() - end - end - jin.time.sleep(0.001) - end -end - -local function boot() - if jin.filesystem.exist("main.lua") then - call(function() - require"main" - jin.core.run() - end) - else - noGame() - end -end - -------------------------------------------------------------------------- --- Initialize sub systems -------------------------------------------------------------------------- - -jin.audio.init() -jin.graphics.init(jin.config) - -------------------------------------------------------------------------- --- Boot game -------------------------------------------------------------------------- - -xpcall(boot, onError) - -------------------------------------------------------------------------- --- Destroy sub-systems -------------------------------------------------------------------------- - -jin.graphics.destroy() -jin.audio.destroy() - -------------------------------------------------------------------------- --- Quit game -------------------------------------------------------------------------- - -jin.core.quit() diff --git a/src/libjin-lua/embed/scripts/graphics.lua b/src/libjin-lua/embed/scripts/graphics.lua deleted file mode 100644 index 41c481c..0000000 --- a/src/libjin-lua/embed/scripts/graphics.lua +++ /dev/null @@ -1,136 +0,0 @@ - -jin.graphics = jin.graphics or {} - -local jg = jin.graphics - -jg.RenderMode = { - FILL = 1, - LINE = 2, -} - -jg.SpriteOrigin = { - TOPLEFT = 0, - TOPCENTER = 1, - TOPRIGHT = 2, - MIDDLELEFT = 3, - MIDDLECENTER = 4, - MIDDLERIGHT = 5, - BOTTOMLEFT = 6, - BOTTOMCENTER = 7, - BOTTOMRIGHT = 8 -} - -jg.SpriteMode = { - SINGLE = 1, - RANDOM = 2, - ANIMATED = 3 -} - --- built in shaders -jg.Shaders = { - Font = nil, - Texture = nil, - Sprite = nil, - SpriteSheet = nil, - Default = nil -} - -local function compileBuiltInShaders() - jg.Shaders.Font = jg.newShader([[ - #VERTEX_SHADER - Vertex vert(Vertex v) - { - return v; - } - #END_VERTEX_SHADER - #FRAGMENT_SHADER - Color frag(Color col, Texture tex, Vertex v) - { - return Color(col.rgb, texel(tex, v.uv).a); - } - #END_FRAGMENT_SHADER - ]]) - jg.Shaders.Texture = jg.newShader([[ - #VERTEX_SHADER - Vertex vert(Vertex v) - { - return v; - } - #END_VERTEX_SHADER - #FRAGMENT_SHADER - Color frag(Color col, Texture tex, Vertex v) - { - return col * texel(tex, v.uv); - } - #END_FRAGMENT_SHADER - ]]) - jg.Shaders.Sprite = jg.newShader([[ - #VERTEX_SHADER - Vertex vert(Vertex v) - { - return v; - } - #END_VERTEX_SHADER - #FRAGMENT_SHADER - Color frag(Color col, Texture tex, Vertex v) - { - return col * texel(tex, v.uv); - } - #END_FRAGMENT_SHADER - ]]) - jg.Shaders.SpriteSheet = jg.newShader([[ - #VERTEX_SHADER - Vertex vert(Vertex v) - { - return v; - } - #END_VERTEX_SHADER - #FRAGMENT_SHADER - Color frag(Color col, Texture tex, Vertex v) - { - return col * texel(tex, v.uv); - } - #END_FRAGMENT_SHADER - ]]) - jg.Shaders.Default = jg.newShader([[ - #VERTEX_SHADER - Vertex vert(Vertex v) - { - return v; - } - #END_VERTEX_SHADER - #FRAGMENT_SHADER - Color frag(Color col, Texture tex, Vertex v) - { - return col * texel(tex, v.uv); - } - #END_FRAGMENT_SHADER - ]]) -end - -local _init = jg.init -local initialized = false -jg.init = function(setting) - if initialized then - return initialized - end - initialized = _init(setting) - if initialized then - compileBuiltInShaders() - jg.useShader(jg.Shaders.Default) - end - return initialized -end - -jg.unuseShader = function() - jg.useShader(jg.Shaders.Default) -end - --- Reset all attributes to default value. -jg.reset = function() - jg.setColor(255, 255, 255, 255) - jg.setClearColor(0, 0, 0, 255) - jg.clear() - jg.unsetFont() - jg.unuseShader() -end diff --git a/src/libjin-lua/embed/scripts/graphics/graphics.lua b/src/libjin-lua/embed/scripts/graphics/graphics.lua new file mode 100644 index 0000000..41c481c --- /dev/null +++ b/src/libjin-lua/embed/scripts/graphics/graphics.lua @@ -0,0 +1,136 @@ + +jin.graphics = jin.graphics or {} + +local jg = jin.graphics + +jg.RenderMode = { + FILL = 1, + LINE = 2, +} + +jg.SpriteOrigin = { + TOPLEFT = 0, + TOPCENTER = 1, + TOPRIGHT = 2, + MIDDLELEFT = 3, + MIDDLECENTER = 4, + MIDDLERIGHT = 5, + BOTTOMLEFT = 6, + BOTTOMCENTER = 7, + BOTTOMRIGHT = 8 +} + +jg.SpriteMode = { + SINGLE = 1, + RANDOM = 2, + ANIMATED = 3 +} + +-- built in shaders +jg.Shaders = { + Font = nil, + Texture = nil, + Sprite = nil, + SpriteSheet = nil, + Default = nil +} + +local function compileBuiltInShaders() + jg.Shaders.Font = jg.newShader([[ + #VERTEX_SHADER + Vertex vert(Vertex v) + { + return v; + } + #END_VERTEX_SHADER + #FRAGMENT_SHADER + Color frag(Color col, Texture tex, Vertex v) + { + return Color(col.rgb, texel(tex, v.uv).a); + } + #END_FRAGMENT_SHADER + ]]) + jg.Shaders.Texture = jg.newShader([[ + #VERTEX_SHADER + Vertex vert(Vertex v) + { + return v; + } + #END_VERTEX_SHADER + #FRAGMENT_SHADER + Color frag(Color col, Texture tex, Vertex v) + { + return col * texel(tex, v.uv); + } + #END_FRAGMENT_SHADER + ]]) + jg.Shaders.Sprite = jg.newShader([[ + #VERTEX_SHADER + Vertex vert(Vertex v) + { + return v; + } + #END_VERTEX_SHADER + #FRAGMENT_SHADER + Color frag(Color col, Texture tex, Vertex v) + { + return col * texel(tex, v.uv); + } + #END_FRAGMENT_SHADER + ]]) + jg.Shaders.SpriteSheet = jg.newShader([[ + #VERTEX_SHADER + Vertex vert(Vertex v) + { + return v; + } + #END_VERTEX_SHADER + #FRAGMENT_SHADER + Color frag(Color col, Texture tex, Vertex v) + { + return col * texel(tex, v.uv); + } + #END_FRAGMENT_SHADER + ]]) + jg.Shaders.Default = jg.newShader([[ + #VERTEX_SHADER + Vertex vert(Vertex v) + { + return v; + } + #END_VERTEX_SHADER + #FRAGMENT_SHADER + Color frag(Color col, Texture tex, Vertex v) + { + return col * texel(tex, v.uv); + } + #END_FRAGMENT_SHADER + ]]) +end + +local _init = jg.init +local initialized = false +jg.init = function(setting) + if initialized then + return initialized + end + initialized = _init(setting) + if initialized then + compileBuiltInShaders() + jg.useShader(jg.Shaders.Default) + end + return initialized +end + +jg.unuseShader = function() + jg.useShader(jg.Shaders.Default) +end + +-- Reset all attributes to default value. +jg.reset = function() + jg.setColor(255, 255, 255, 255) + jg.setClearColor(0, 0, 0, 255) + jg.clear() + jg.unsetFont() + jg.unuseShader() +end diff --git a/src/libjin-lua/embed/scripts/keyboard.lua b/src/libjin-lua/embed/scripts/keyboard.lua deleted file mode 100644 index 452e0f7..0000000 --- a/src/libjin-lua/embed/scripts/keyboard.lua +++ /dev/null @@ -1,14 +0,0 @@ - -jin.keyboard = jin.keyboard or {} - -local jk = jin.keyboard - -local keys = {} - -function jin.keyboard.isPressed(k) - return keys[k] -end - -function jin.keyboard.set(k, status) - keys[k] = status -end diff --git a/src/libjin-lua/embed/scripts/keyboard/keyboard.lua b/src/libjin-lua/embed/scripts/keyboard/keyboard.lua new file mode 100644 index 0000000..452e0f7 --- /dev/null +++ b/src/libjin-lua/embed/scripts/keyboard/keyboard.lua @@ -0,0 +1,14 @@ + +jin.keyboard = jin.keyboard or {} + +local jk = jin.keyboard + +local keys = {} + +function jin.keyboard.isPressed(k) + return keys[k] +end + +function jin.keyboard.set(k, status) + keys[k] = status +end diff --git a/src/libjin-lua/embed/scripts/mouse.lua b/src/libjin-lua/embed/scripts/mouse.lua deleted file mode 100644 index 876bf1d..0000000 --- a/src/libjin-lua/embed/scripts/mouse.lua +++ /dev/null @@ -1,14 +0,0 @@ - -jin.mouse = jin.mouse or {} - -local jm = jin.mouse - -local button = {} - -function jin.mouse.isDown(btn) - return button[btn] -end - -function jin.mouse.set(btn, status) - button[btn] = status -end diff --git a/src/libjin-lua/embed/scripts/mouse/mouse.lua b/src/libjin-lua/embed/scripts/mouse/mouse.lua new file mode 100644 index 0000000..876bf1d --- /dev/null +++ b/src/libjin-lua/embed/scripts/mouse/mouse.lua @@ -0,0 +1,14 @@ + +jin.mouse = jin.mouse or {} + +local jm = jin.mouse + +local button = {} + +function jin.mouse.isDown(btn) + return button[btn] +end + +function jin.mouse.set(btn, status) + button[btn] = status +end diff --git a/src/libjin-lua/embed/scripts/net.lua b/src/libjin-lua/embed/scripts/net.lua deleted file mode 100644 index 946b55f..0000000 --- a/src/libjin-lua/embed/scripts/net.lua +++ /dev/null @@ -1,4 +0,0 @@ - -jin.net = jin.net or {} - -local jn = jin.net diff --git a/src/libjin-lua/embed/scripts/net/net.lua b/src/libjin-lua/embed/scripts/net/net.lua new file mode 100644 index 0000000..946b55f --- /dev/null +++ b/src/libjin-lua/embed/scripts/net/net.lua @@ -0,0 +1,4 @@ + +jin.net = jin.net or {} + +local jn = jin.net diff --git a/src/libjin-lua/embed/scripts/path.lua b/src/libjin-lua/embed/scripts/path.lua deleted file mode 100644 index ede7f62..0000000 --- a/src/libjin-lua/embed/scripts/path.lua +++ /dev/null @@ -1,13 +0,0 @@ - -jin.path = jin.path or {} - -local jp = jin.path - --- game root directory -jin._root = nil - --- return full path of a given path -function jin.path.full(path) - local root = jin._dir .. '/' .. jin._argv[2] - return root .. '/' .. path -end diff --git a/src/libjin-lua/embed/scripts/path/path.lua b/src/libjin-lua/embed/scripts/path/path.lua new file mode 100644 index 0000000..015f602 --- /dev/null +++ b/src/libjin-lua/embed/scripts/path/path.lua @@ -0,0 +1,13 @@ + +jin.path = jin.path or {} + +local jp = jin.path + +-- Game root directory +jin._root = nil + +-- Get full path of a given path +function jin.path.full(path) + local root = jin._dir .. '/' .. jin._argv[2] + return root .. '/' .. path +end diff --git a/src/libjin-lua/embed/state_machine.lua.h b/src/libjin-lua/embed/state_machine.lua.h new file mode 100644 index 0000000..01dd1aa --- /dev/null +++ b/src/libjin-lua/embed/state_machine.lua.h @@ -0,0 +1,8 @@ +static unsigned char state_machine_lua[] = { +106,105,110,46,97,105,32,61,32,106,105,110,46,97,105,32,111,114,32,123, +125,32,13,10,13,10,108,111,99,97,108,32,115,116,97,116,101,109,97,99, +104,105,110,101,32,61,32,123,125,13,10,13,10,106,105,110,46,97,105,46, +110,101,119,83,116,97,116,101,77,97,99,104,105,110,101,32,61,32,102,117, +110,99,116,105,111,110,40,41,32,13,10,13,10,101,110,100,13,10 +}; + -- cgit v1.1-26-g67d0