From 73e9f327dcfb3c9047201328eb7bbee9c89f3f93 Mon Sep 17 00:00:00 2001 From: Alex Szpakowski Date: Thu, 8 Aug 2013 03:19:54 -0300 Subject: [PATCH] Cleaned up boot.lua a tiny bit --- src/modules/graphics/opengl/wrap_Graphics.cpp | 2 +- src/scripts/boot.lua | 7 ++----- src/scripts/boot.lua.h | 9 +++------ 3 files changed, 6 insertions(+), 12 deletions(-) diff --git a/src/modules/graphics/opengl/wrap_Graphics.cpp b/src/modules/graphics/opengl/wrap_Graphics.cpp index aff443fbd..f261092e9 100644 --- a/src/modules/graphics/opengl/wrap_Graphics.cpp +++ b/src/modules/graphics/opengl/wrap_Graphics.cpp @@ -435,7 +435,7 @@ int w_newSpriteBatch(lua_State *L) { const char *usagestr = luaL_checkstring(L, 3); if (!SpriteBatch::getConstant(usagestr, usage)) - return luaL_error(L, "Invalid SpriteBatch usage: %s", usagestr); + return luaL_error(L, "Invalid SpriteBatch usage hint: %s", usagestr); } SpriteBatch *t = NULL; try diff --git a/src/scripts/boot.lua b/src/scripts/boot.lua index 63abcdfe1..c10fa830a 100644 --- a/src/scripts/boot.lua +++ b/src/scripts/boot.lua @@ -18,16 +18,13 @@ freely, subject to the following restrictions: 3. This notice may not be removed or altered from any source distribution. --]] --- Make sure love table exists. -if not love then love = {} end +-- Make sure love exists. +local love = require("love") -- Used for setup: love.path = {} love.arg = {} --- Unparsed arguments: -argv = {} - -- Replace any \ with /. function love.path.normalslashes(p) return string.gsub(p, "\\", "/") diff --git a/src/scripts/boot.lua.h b/src/scripts/boot.lua.h index f31bb656d..5674fc790 100644 --- a/src/scripts/boot.lua.h +++ b/src/scripts/boot.lua.h @@ -80,15 +80,12 @@ const unsigned char boot_lua[] = 0x6e, 0x2e, 0x0a, 0x2d, 0x2d, 0x5d, 0x5d, 0x0a, 0x2d, 0x2d, 0x20, 0x4d, 0x61, 0x6b, 0x65, 0x20, 0x73, 0x75, 0x72, 0x65, 0x20, 0x6c, 0x6f, 0x76, 0x65, 0x20, - 0x74, 0x61, 0x62, 0x6c, 0x65, 0x20, 0x65, 0x78, 0x69, 0x73, 0x74, 0x73, 0x2e, 0x0a, - 0x69, 0x66, 0x20, 0x6e, 0x6f, 0x74, 0x20, 0x6c, 0x6f, 0x76, 0x65, 0x20, 0x74, 0x68, 0x65, 0x6e, 0x20, 0x6c, - 0x6f, 0x76, 0x65, 0x20, 0x3d, 0x20, 0x7b, 0x7d, 0x20, 0x65, 0x6e, 0x64, 0x0a, + 0x65, 0x78, 0x69, 0x73, 0x74, 0x73, 0x2e, 0x0a, + 0x6c, 0x6f, 0x63, 0x61, 0x6c, 0x20, 0x6c, 0x6f, 0x76, 0x65, 0x20, 0x3d, 0x20, 0x72, 0x65, 0x71, 0x75, 0x69, + 0x72, 0x65, 0x28, 0x22, 0x6c, 0x6f, 0x76, 0x65, 0x22, 0x29, 0x0a, 0x2d, 0x2d, 0x20, 0x55, 0x73, 0x65, 0x64, 0x20, 0x66, 0x6f, 0x72, 0x20, 0x73, 0x65, 0x74, 0x75, 0x70, 0x3a, 0x0a, 0x6c, 0x6f, 0x76, 0x65, 0x2e, 0x70, 0x61, 0x74, 0x68, 0x20, 0x3d, 0x20, 0x7b, 0x7d, 0x0a, 0x6c, 0x6f, 0x76, 0x65, 0x2e, 0x61, 0x72, 0x67, 0x20, 0x3d, 0x20, 0x7b, 0x7d, 0x0a, - 0x2d, 0x2d, 0x20, 0x55, 0x6e, 0x70, 0x61, 0x72, 0x73, 0x65, 0x64, 0x20, 0x61, 0x72, 0x67, 0x75, 0x6d, 0x65, - 0x6e, 0x74, 0x73, 0x3a, 0x0a, - 0x61, 0x72, 0x67, 0x76, 0x20, 0x3d, 0x20, 0x7b, 0x7d, 0x0a, 0x2d, 0x2d, 0x20, 0x52, 0x65, 0x70, 0x6c, 0x61, 0x63, 0x65, 0x20, 0x61, 0x6e, 0x79, 0x20, 0x5c, 0x20, 0x77, 0x69, 0x74, 0x68, 0x20, 0x2f, 0x2e, 0x0a, 0x66, 0x75, 0x6e, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x20, 0x6c, 0x6f, 0x76, 0x65, 0x2e, 0x70, 0x61, 0x74, 0x68,