Using LuaJIT 2.0.1 instead of stock Lua

This commit is contained in:
fysx
2014-01-06 10:24:33 +01:00
parent e80e17111a
commit 0ffae82186
310 changed files with 129414 additions and 28000 deletions
+4 -2
View File
@@ -32,7 +32,7 @@ LOCAL_C_INCLUDES := \
${LOCAL_PATH}/../mpg123-1.13.4/src/libmpg123 \
${LOCAL_PATH}/../libmodplug-0.8.8.4/src \
${LOCAL_PATH}/../libvorbis-1.3.2/include \
${LOCAL_PATH}/../lua-5.1.4/src \
${LOCAL_PATH}/../LuaJIT-2.0.1/src \
${LOCAL_PATH}/../libogg-1.3.0/include
LOCAL_SRC_FILES := \
@@ -94,7 +94,9 @@ LOCAL_SRC_FILES := \
LOCAL_CXXFLAGS := -std=c++0x
LOCAL_SHARED_LIBRARIES := SDL2 libphysfs liblua libvorbis libogg libopenal libmpg123 libmodplug libdevil libtiff libmng libfreetype liblcms libjasper libpng libjpeg
LOCAL_SHARED_LIBRARIES := SDL2 libphysfs libvorbis libogg libopenal libmpg123 libmodplug libdevil libtiff libmng libfreetype liblcms libjasper libpng libjpeg
LOCAL_STATIC_LIBRARIES := libluajit
# $(info liblove: include dirs $(LOCAL_C_INCLUDES))
# $(info liblove: src files $(LOCAL_SRC_FILES))
+9 -2
View File
@@ -243,6 +243,11 @@ end
-- This can't be overriden.
function love.boot()
if type(jit) == 'table' then
SDL.log ("Lua Version = " .. jit.version)
else
SDL.log ("Lua Version = Stock Lua")
end
-- This is absolutely needed.
require("love")
@@ -253,7 +258,7 @@ function love.boot()
local o = love.arg.options
local arg0 = love.arg.getLow(arg)
-- SDL.log("trying to load lovegame")
SDL.log("trying to load lovegame")
-- arg0 = "/sdcard/lovegame/"
love.filesystem.init(arg0)
@@ -285,7 +290,9 @@ function love.boot()
if can_has_game and not (love.filesystem.exists("main.lua") or love.filesystem.exists("conf.lua")) then
no_game_code = true
end
SDL.log("loaded game")
if not can_has_game then
love.nogame()
end
+16 -3
View File
@@ -443,6 +443,16 @@ const unsigned char boot_lua[] =
0x76, 0x65, 0x72, 0x72, 0x69, 0x64, 0x65, 0x6e, 0x2e, 0x0a,
0x66, 0x75, 0x6e, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x20, 0x6c, 0x6f, 0x76, 0x65, 0x2e, 0x62, 0x6f, 0x6f, 0x74,
0x28, 0x29, 0x0a,
0x09, 0x69, 0x66, 0x20, 0x74, 0x79, 0x70, 0x65, 0x28, 0x6a, 0x69, 0x74, 0x29, 0x20, 0x3d, 0x3d, 0x20, 0x27,
0x74, 0x61, 0x62, 0x6c, 0x65, 0x27, 0x20, 0x74, 0x68, 0x65, 0x6e, 0x0a,
0x09, 0x09, 0x53, 0x44, 0x4c, 0x2e, 0x6c, 0x6f, 0x67, 0x20, 0x28, 0x22, 0x4c, 0x75, 0x61, 0x20, 0x56, 0x65,
0x72, 0x73, 0x69, 0x6f, 0x6e, 0x20, 0x3d, 0x20, 0x22, 0x20, 0x2e, 0x2e, 0x20, 0x6a, 0x69, 0x74, 0x2e, 0x76,
0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e, 0x29, 0x0a,
0x09, 0x65, 0x6c, 0x73, 0x65, 0x0a,
0x09, 0x09, 0x53, 0x44, 0x4c, 0x2e, 0x6c, 0x6f, 0x67, 0x20, 0x28, 0x22, 0x4c, 0x75, 0x61, 0x20, 0x56, 0x65,
0x72, 0x73, 0x69, 0x6f, 0x6e, 0x20, 0x3d, 0x20, 0x53, 0x74, 0x6f, 0x63, 0x6b, 0x20, 0x4c, 0x75, 0x61, 0x22,
0x29, 0x20, 0x20, 0x20, 0x0a,
0x09, 0x65, 0x6e, 0x64, 0x0a,
0x09, 0x2d, 0x2d, 0x20, 0x54, 0x68, 0x69, 0x73, 0x20, 0x69, 0x73, 0x20, 0x61, 0x62, 0x73, 0x6f, 0x6c, 0x75,
0x74, 0x65, 0x6c, 0x79, 0x20, 0x6e, 0x65, 0x65, 0x64, 0x65, 0x64, 0x2e, 0x0a,
0x09, 0x72, 0x65, 0x71, 0x75, 0x69, 0x72, 0x65, 0x28, 0x22, 0x6c, 0x6f, 0x76, 0x65, 0x22, 0x29, 0x0a,
@@ -454,9 +464,8 @@ const unsigned char boot_lua[] =
0x67, 0x2e, 0x6f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x0a,
0x09, 0x6c, 0x6f, 0x63, 0x61, 0x6c, 0x20, 0x61, 0x72, 0x67, 0x30, 0x20, 0x3d, 0x20, 0x6c, 0x6f, 0x76, 0x65,
0x2e, 0x61, 0x72, 0x67, 0x2e, 0x67, 0x65, 0x74, 0x4c, 0x6f, 0x77, 0x28, 0x61, 0x72, 0x67, 0x29, 0x0a,
0x2d, 0x2d, 0x09, 0x53, 0x44, 0x4c, 0x2e, 0x6c, 0x6f, 0x67, 0x28, 0x22, 0x74, 0x72, 0x79, 0x69, 0x6e, 0x67,
0x20, 0x74, 0x6f, 0x20, 0x6c, 0x6f, 0x61, 0x64, 0x20, 0x6c, 0x6f, 0x76, 0x65, 0x67, 0x61, 0x6d, 0x65, 0x22,
0x29, 0x0a,
0x09, 0x53, 0x44, 0x4c, 0x2e, 0x6c, 0x6f, 0x67, 0x28, 0x22, 0x74, 0x72, 0x79, 0x69, 0x6e, 0x67, 0x20, 0x74,
0x6f, 0x20, 0x6c, 0x6f, 0x61, 0x64, 0x20, 0x6c, 0x6f, 0x76, 0x65, 0x67, 0x61, 0x6d, 0x65, 0x22, 0x29, 0x0a,
0x2d, 0x2d, 0x09, 0x61, 0x72, 0x67, 0x30, 0x20, 0x3d, 0x20, 0x22, 0x2f, 0x73, 0x64, 0x63, 0x61, 0x72, 0x64,
0x2f, 0x6c, 0x6f, 0x76, 0x65, 0x67, 0x61, 0x6d, 0x65, 0x2f, 0x22, 0x0a,
0x09, 0x6c, 0x6f, 0x76, 0x65, 0x2e, 0x66, 0x69, 0x6c, 0x65, 0x73, 0x79, 0x73, 0x74, 0x65, 0x6d, 0x2e, 0x69,
@@ -529,6 +538,10 @@ const unsigned char boot_lua[] =
0x09, 0x09, 0x6e, 0x6f, 0x5f, 0x67, 0x61, 0x6d, 0x65, 0x5f, 0x63, 0x6f, 0x64, 0x65, 0x20, 0x3d, 0x20, 0x74,
0x72, 0x75, 0x65, 0x0a,
0x09, 0x65, 0x6e, 0x64, 0x0a,
0x09, 0x0a,
0x09, 0x53, 0x44, 0x4c, 0x2e, 0x6c, 0x6f, 0x67, 0x28, 0x22, 0x6c, 0x6f, 0x61, 0x64, 0x65, 0x64, 0x20, 0x67,
0x61, 0x6d, 0x65, 0x22, 0x29, 0x0a,
0x09, 0x0a,
0x09, 0x69, 0x66, 0x20, 0x6e, 0x6f, 0x74, 0x20, 0x63, 0x61, 0x6e, 0x5f, 0x68, 0x61, 0x73, 0x5f, 0x67, 0x61,
0x6d, 0x65, 0x20, 0x74, 0x68, 0x65, 0x6e, 0x0a,
0x09, 0x09, 0x6c, 0x6f, 0x76, 0x65, 0x2e, 0x6e, 0x6f, 0x67, 0x61, 0x6d, 0x65, 0x28, 0x29, 0x0a,