Browse Source

Cleaned up boot.lua a tiny bit

Alex Szpakowski 12 years ago
parent
commit
73e9f327dc
3 changed files with 6 additions and 12 deletions
  1. 1 1
      src/modules/graphics/opengl/wrap_Graphics.cpp
  2. 2 5
      src/scripts/boot.lua
  3. 3 6
      src/scripts/boot.lua.h

+ 1 - 1
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

+ 2 - 5
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, "\\", "/")

+ 3 - 6
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,