Commits

Bart van Strien  committed 40e6e69 Merge

Merge to 0.7.0

  • Participants
  • Parent commits 6c12ac5, 9240be0

Comments (0)

Files changed (25)

   * Added shape:getBody.
   * Added love.filesystem.FileData for public usage.
   * Added base64 support for love.filesystem.FileData.
+  * Added table support for love.graphics.setColor and love.graphics.setBackgroundColor.
+  * Added love.graphics.hasFocus().
+  * Added ?/init.lua to the loader.
 
   * Fixed the debug module not being an upvalue of the error handlers. (you can now override debug)
   * Fixed some cases when love.audio.pause and friends, were acting on everything, not just the passed Source.
   * Changed fonts, they're now po2 safe.
   * Changed the traceback in the error screen.
   * Changed font origin to top-left.
-  * Changed behavior of love.physics.newWorld(w, h), it now creates a w*h world, not a 4*w*h world.
+  * Changed linux save dir location to obey to Freedesktop.org's XDG specs. (~/.local/share/love by default.)
 
   * Removed font functions from love.graphics.
+  * Removed love.physics.newWorld(w, h). Use love.physics.newWorld(x1, y1, x2, y2) instead.
 
 LOVE 0.6.2 [Jiggly Juice]
 -------------------------

File configure.in

 AC_SEARCH_LIBS([sqrt], [m], [], AC_MSG_ERROR([Can't LÖVE without C math library]))
 AC_SEARCH_LIBS([SDL_Init], [SDL], [], AC_MSG_ERROR([Can't LÖVE without SDL]))
 AC_SEARCH_LIBS([glLoadIdentity], [GL], [], AC_MSG_ERROR([Can't LÖVE without OpenGL]))
-AC_SEARCH_LIBS([gluOrtho2D], [GLU], [], AC_MSG_ERROR([Can't LÖVE without OpenGL Utility Library]))
+#AC_SEARCH_LIBS([gluOrtho2D], [GLU], [], AC_MSG_ERROR([Can't LÖVE without OpenGL Utility Library]))
 AC_SEARCH_LIBS([alSourcePlay], [openal], [], AC_MSG_ERROR([Can't LÖVE without OpenAL]))
 AC_ARG_ENABLE([luajit],
 	[  --enable-luajit Use LuaJIT instead of lua],

File platform/macosx/love.xcodeproj/project.pbxproj

 			isa = PBXProject;
 			buildConfigurationList = C01FCF4E08A954540054247B /* Build configuration list for PBXProject "love" */;
 			compatibilityVersion = "Xcode 3.1";
+			developmentRegion = English;
 			hasScannedForEncodings = 1;
+			knownRegions = (
+				English,
+				Japanese,
+				French,
+				German,
+			);
 			mainGroup = 29B97314FDCFA39411CA2CEA /* love */;
 			projectDirPath = "";
 			projectRoot = "";
 				GCC_WARN_UNUSED_VARIABLE = YES;
 				HEADER_SEARCH_PATHS = (
 					/Library/Frameworks/Lua.framework/Headers,
+					/Library/Frameworks/FreeType.framework/Headers,
 					/Library/Frameworks/SDL.framework/Headers,
 					../../src,
 					../../src/modules,

File platform/msvc2008/love.vcproj

 						>
 					</File>
 					<File
+						RelativePath="..\..\src\modules\graphics\opengl\Framebuffer.cpp"
+						>
+						<FileConfiguration
+							Name="Debug|Win32"
+							>
+							<Tool
+								Name="VCCLCompilerTool"
+								ObjectFile="$(IntDir)\graphics\opengl\"
+							/>
+						</FileConfiguration>
+					</File>
+					<File
+						RelativePath="..\..\src\modules\graphics\opengl\Framebuffer.h"
+						>
+					</File>
+					<File
 						RelativePath="..\..\src\modules\graphics\opengl\GLee.c"
 						>
 						<FileConfiguration
 						>
 					</File>
 					<File
-						RelativePath="..\..\src\modules\graphics\opengl\ImageFont.cpp"
-						>
-						<FileConfiguration
-							Name="Debug|Win32"
-							>
-							<Tool
-								Name="VCCLCompilerTool"
-								ObjectFile="$(IntDir)\graphics\opengl\"
-							/>
-						</FileConfiguration>
-						<FileConfiguration
-							Name="Release|Win32"
-							>
-							<Tool
-								Name="VCCLCompilerTool"
-								ObjectFile="$(IntDir)\graphics\opengl\"
-							/>
-						</FileConfiguration>
-					</File>
-					<File
-						RelativePath="..\..\src\modules\graphics\opengl\ImageFont.h"
-						>
-					</File>
-					<File
 						RelativePath="..\..\src\modules\graphics\opengl\ParticleSystem.cpp"
 						>
 						<FileConfiguration
 						>
 					</File>
 					<File
-						RelativePath="..\..\src\modules\graphics\opengl\TrueTypeFont.cpp"
-						>
-						<FileConfiguration
-							Name="Debug|Win32"
-							>
-							<Tool
-								Name="VCCLCompilerTool"
-								ObjectFile="$(IntDir)\graphics\opengl\"
-							/>
-						</FileConfiguration>
-						<FileConfiguration
-							Name="Release|Win32"
-							>
-							<Tool
-								Name="VCCLCompilerTool"
-								ObjectFile="$(IntDir)\graphics\opengl\"
-							/>
-						</FileConfiguration>
-					</File>
-					<File
-						RelativePath="..\..\src\modules\graphics\opengl\TrueTypeFont.h"
-						>
-					</File>
-					<File
 						RelativePath="..\..\src\modules\graphics\opengl\wrap_Font.cpp"
 						>
 						<FileConfiguration
 						>
 					</File>
 					<File
+						RelativePath="..\..\src\modules\graphics\opengl\wrap_Framebuffer.cpp"
+						>
+						<FileConfiguration
+							Name="Debug|Win32"
+							>
+							<Tool
+								Name="VCCLCompilerTool"
+								ObjectFile="$(IntDir)\graphics\opengl\"
+							/>
+						</FileConfiguration>
+					</File>
+					<File
+						RelativePath="..\..\src\modules\graphics\opengl\wrap_Framebuffer.h"
+						>
+					</File>
+					<File
 						RelativePath="..\..\src\modules\graphics\opengl\wrap_Glyph.cpp"
 						>
 						<FileConfiguration
 					</File>
 				</Filter>
 			</Filter>
+			<Filter
+				Name="font"
+				>
+				<File
+					RelativePath="..\..\src\modules\font\Font.h"
+					>
+				</File>
+				<File
+					RelativePath="..\..\src\modules\font\FontData.cpp"
+					>
+					<FileConfiguration
+						Name="Debug|Win32"
+						>
+						<Tool
+							Name="VCCLCompilerTool"
+							ObjectFile="$(IntDir)\font\"
+						/>
+					</FileConfiguration>
+				</File>
+				<File
+					RelativePath="..\..\src\modules\font\FontData.h"
+					>
+				</File>
+				<File
+					RelativePath="..\..\src\modules\font\GlyphData.cpp"
+					>
+					<FileConfiguration
+						Name="Debug|Win32"
+						>
+						<Tool
+							Name="VCCLCompilerTool"
+							ObjectFile="$(IntDir)\font\"
+						/>
+					</FileConfiguration>
+				</File>
+				<File
+					RelativePath="..\..\src\modules\font\GlyphData.h"
+					>
+				</File>
+				<File
+					RelativePath="..\..\src\modules\font\ImageRasterizer.cpp"
+					>
+					<FileConfiguration
+						Name="Debug|Win32"
+						>
+						<Tool
+							Name="VCCLCompilerTool"
+							ObjectFile="$(IntDir)\font\"
+						/>
+					</FileConfiguration>
+				</File>
+				<File
+					RelativePath="..\..\src\modules\font\ImageRasterizer.h"
+					>
+				</File>
+				<File
+					RelativePath="..\..\src\modules\font\Rasterizer.cpp"
+					>
+					<FileConfiguration
+						Name="Debug|Win32"
+						>
+						<Tool
+							Name="VCCLCompilerTool"
+							ObjectFile="$(IntDir)\font\"
+						/>
+					</FileConfiguration>
+				</File>
+				<File
+					RelativePath="..\..\src\modules\font\Rasterizer.h"
+					>
+				</File>
+				<File
+					RelativePath="..\..\src\modules\font\wrap_FontData.cpp"
+					>
+					<FileConfiguration
+						Name="Debug|Win32"
+						>
+						<Tool
+							Name="VCCLCompilerTool"
+							ObjectFile="$(IntDir)\font\"
+						/>
+					</FileConfiguration>
+				</File>
+				<File
+					RelativePath="..\..\src\modules\font\wrap_FontData.h"
+					>
+				</File>
+				<File
+					RelativePath="..\..\src\modules\font\wrap_GlyphData.cpp"
+					>
+					<FileConfiguration
+						Name="Debug|Win32"
+						>
+						<Tool
+							Name="VCCLCompilerTool"
+							ObjectFile="$(IntDir)\font\"
+						/>
+					</FileConfiguration>
+				</File>
+				<File
+					RelativePath="..\..\src\modules\font\wrap_GlyphData.h"
+					>
+				</File>
+				<File
+					RelativePath="..\..\src\modules\font\wrap_Rasterizer.cpp"
+					>
+					<FileConfiguration
+						Name="Debug|Win32"
+						>
+						<Tool
+							Name="VCCLCompilerTool"
+							ObjectFile="$(IntDir)\font\"
+						/>
+					</FileConfiguration>
+				</File>
+				<File
+					RelativePath="..\..\src\modules\font\wrap_Rasterizer.h"
+					>
+				</File>
+				<Filter
+					Name="freetype"
+					>
+					<File
+						RelativePath="..\..\src\modules\font\freetype\Font.cpp"
+						>
+						<FileConfiguration
+							Name="Debug|Win32"
+							>
+							<Tool
+								Name="VCCLCompilerTool"
+								ObjectFile="$(IntDir)\font\freetype\"
+							/>
+						</FileConfiguration>
+					</File>
+					<File
+						RelativePath="..\..\src\modules\font\freetype\Font.h"
+						>
+					</File>
+					<File
+						RelativePath="..\..\src\modules\font\freetype\TrueTypeRasterizer.cpp"
+						>
+						<FileConfiguration
+							Name="Debug|Win32"
+							>
+							<Tool
+								Name="VCCLCompilerTool"
+								ObjectFile="$(IntDir)\font\freetype\"
+							/>
+						</FileConfiguration>
+					</File>
+					<File
+						RelativePath="..\..\src\modules\font\freetype\TrueTypeRasterizer.h"
+						>
+					</File>
+					<File
+						RelativePath="..\..\src\modules\font\freetype\wrap_Font.cpp"
+						>
+						<FileConfiguration
+							Name="Debug|Win32"
+							>
+							<Tool
+								Name="VCCLCompilerTool"
+								ObjectFile="$(IntDir)\font\freetype\"
+							/>
+						</FileConfiguration>
+					</File>
+					<File
+						RelativePath="..\..\src\modules\font\freetype\wrap_Font.h"
+						>
+					</File>
+				</Filter>
+			</Filter>
 		</Filter>
 		<Filter
 			Name="common"
 			>
 			<File
+				RelativePath="..\..\src\common\b64.cpp"
+				>
+				<FileConfiguration
+					Name="Debug|Win32"
+					>
+					<Tool
+						Name="VCCLCompilerTool"
+						ObjectFile="$(IntDir)\common\"
+					/>
+				</FileConfiguration>
+			</File>
+			<File
 				RelativePath="..\..\src\common\config.h"
 				>
 			</File>
 			Name="scripts"
 			>
 		</Filter>
-		<Filter
-			Name="resources"
-			>
-			<File
-				RelativePath="..\..\src\resources\resources.cpp"
-				>
-				<FileConfiguration
-					Name="Debug|Win32"
-					>
-					<Tool
-						Name="VCCLCompilerTool"
-						ObjectFile="$(IntDir)\resources\"
-					/>
-				</FileConfiguration>
-				<FileConfiguration
-					Name="Release|Win32"
-					>
-					<Tool
-						Name="VCCLCompilerTool"
-						ObjectFile="$(IntDir)\resources\"
-					/>
-				</FileConfiguration>
-			</File>
-			<File
-				RelativePath="..\..\src\resources\resources.h"
-				>
-			</File>
-		</Filter>
 		<File
 			RelativePath=".\icon.rc"
 			>

File src/modules/filesystem/physfs/Filesystem.cpp

 #else
 			char * cwd_char = new char[LOVE_MAX_PATH];
 
-			getcwd(cwd_char, LOVE_MAX_PATH);
-			
-			cwd = cwd_char; // if getcwd fails, cwd_char (and thus cwd) will still be empty
-			
+			if(getcwd(cwd_char, LOVE_MAX_PATH))
+				cwd = cwd_char; // if getcwd fails, cwd_char (and thus cwd) will still be empty
+
 			delete [] cwd_char;
 #endif
 		}
 			appdata = udir;
 		}
 		return appdata.c_str();
+#elif defined(LOVE_LINUX)
+		if(appdata.empty())
+		{
+			char * xdgdatahome = getenv("XDG_DATA_HOME");
+			if (!xdgdatahome)
+				appdata = std::string(getUserDirectory()) + "/.local/share/";
+			else
+				appdata = xdgdatahome;
+		}
+		return appdata.c_str();
 #else
 		return getUserDirectory();
 #endif

File src/modules/filesystem/physfs/Filesystem.h

 /**
 * Copyright (c) 2006-2010 LOVE Development Team
-* 
+*
 * This software is provided 'as-is', without any express or implied
 * warranty.  In no event will the authors be held liable for any damages
 * arising from the use of this software.
-* 
+*
 * Permission is granted to anyone to use this software for any purpose,
 * including commercial applications, and to alter it and redistribute it
 * freely, subject to the following restrictions:
-* 
+*
 * 1. The origin of this software must not be misrepresented; you must not
 *    claim that you wrote the original software. If you use this software
 *    in a product, an acknowledgment in the product documentation would be
 #define LOVE_FILESYSTEM_PHYSFS_FILESYSTEM_H
 
 // STD
+#include <cstdlib>
 #include <cstring>
 #include <iostream>
 #include <string>
 #	include <unistd.h>
 #endif
 
-// In Windows, we would like to use "LOVE" as the 
+// In Windows, we would like to use "LOVE" as the
 // application folder, but in Linux, we like .love.
 #ifdef LOVE_WINDOWS
 #	define LOVE_APPDATA_FOLDER "LOVE"
 #else
 #	ifdef LOVE_MACOSX
 #		define LOVE_APPDATA_FOLDER "LOVE"
+#	elif defined(LOVE_LINUX)
+#		define LOVE_APPDATA_FOLDER "love"
 #	else
 #		define LOVE_APPDATA_FOLDER ".love"
 #	endif
 
 		// Pointer used for file reads.
 		char * buffer;
-		
+
 		// Contains the current working directory (UTF8).
 		std::string cwd;
 
 		// in the appdata/userdata folder.
 		std::string save_identity;
 
-		// Full and relative paths of the game save folder. 
+		// Full and relative paths of the game save folder.
 		// (Relative to the %APPDATA% folder, meaning that the
 		// relative string will look something like: ./LOVE/game)
 		std::string save_path_relative, save_path_full;
 		bool isInited;
 
 	protected:
-		
+
 	public:
 
 		Filesystem();
 		void init(const char * arg0);
 
 		/**
-		* This sets up the save directory. If the 
+		* This sets up the save directory. If the
 		* it is already set up, nothing happens.
 		* @return True on success, false otherwise.
 		**/
 
 		/**
 		* Gets the user home directory.
-		**/ 
+		**/
 		const char * getUserDirectory();
 
 		/**
 
 		/**
 		* Checks whether a file exists in the current search path
-		* or not. 
+		* or not.
 		* @param file The filename to check.
 		**/
 		bool exists(const char * file);
 		bool isDirectory(const char * file);
 
 		/**
-		* Checks if an existing file really is a file, 
+		* Checks if an existing file really is a file,
 		* and not a directory.
 		* @param file The filename to check.
 		**/
 
 		/**
 		* Reads count bytes from an open file.
-		* The first parameter is either a File or 
+		* The first parameter is either a File or
 		* a string. An optional second parameter specified the
 		* max number of bytes to read.
 		**/
 		/**
 		* Write the bytes in data to the file. File
 		* must be opened for write.
-		* The first parameter is either a File or 
+		* The first parameter is either a File or
 		* a string.
-		**/ 
+		**/
 		int write(lua_State * L);
 
 		/**
 		bool seek(File * file, int pos);
 
 		/**
-		* This "native" method returns a table of all 
+		* This "native" method returns a table of all
 		* files in a given directory.
 		**/
 		int enumerate(lua_State * L);

File src/modules/filesystem/physfs/wrap_Filesystem.cpp

 		}
 
 		// Check whether file exists.
-		if(!instance->exists(tmp.c_str()))
+		if(instance->exists(tmp.c_str()))
 		{
-			lua_pushfstring(L, "\n\tno file \"%s\" in LOVE game directories.\n", tmp.c_str());
-			return 1;
+			lua_pop(L, 1);
+			lua_pushstring(L, tmp.c_str());
+			// Ok, load it.
+			return instance->load(L);
 		}
 
-		lua_pop(L, 1);
-		lua_pushstring(L, tmp.c_str());
+		tmp = filename;
+		size = tmp.size();
+		for(int i=0;i<size;i++)
+		{
+			if(tmp[i] == '.')
+			{
+				tmp[i] = '/';
+			}
+		}
 
-		// Ok, load it.
-		return instance->load(L);
+		if (instance->isDirectory(tmp.c_str()))
+		{
+			tmp += "/init.lua";
+			if (instance->exists(tmp.c_str())) {
+				lua_pop(L, 1);
+				lua_pushstring(L, tmp.c_str());
+				// Ok, load it.
+				return instance->load(L);
+			}
+		}
+
+		lua_pushfstring(L, "\n\tno file \"%s\" in LOVE game directories.\n", tmp.c_str());
+		return 1;
 	}
 
 	// List of functions to wrap.

File src/modules/font/GlyphData.cpp

 	{
 		if (metrics.width && metrics.height) {
 			switch (f) {
-				case GlyphData::FORMAT_LUMINOSITY_ALPHA:
+				case GlyphData::FORMAT_LUMINANCE_ALPHA:
 					data = new unsigned char[metrics.width * metrics.height * 2];
 					break;
 				case GlyphData::FORMAT_RGBA:
 	int GlyphData::getSize() const
 	{
 		switch(format) {
-			case GlyphData::FORMAT_LUMINOSITY_ALPHA:
+			case GlyphData::FORMAT_LUMINANCE_ALPHA:
 				return getWidth() * getHeight() * 2;
 				break;
 			case GlyphData::FORMAT_RGBA:
 		int h = getHeight();
 		int pw = next_p2(w);
 		int ph = next_p2(h);
-		unsigned char * d = new unsigned char[pw * ph * (format == GlyphData::FORMAT_LUMINOSITY_ALPHA ? 2 : 4)];
+		unsigned char * d = new unsigned char[pw * ph * (format == GlyphData::FORMAT_LUMINANCE_ALPHA ? 2 : 4)];
 		for (int j = 0; j < ph; j++) {
 			for (int i = 0; i < pw; i++) {
 				int n = i+j*w;
 				int p = i+j*pw;
 				if (i < w && j < h) {
-					if (format == GlyphData::FORMAT_LUMINOSITY_ALPHA) {
+					if (format == GlyphData::FORMAT_LUMINANCE_ALPHA) {
 						p *= 2;
 						n *= 2;
 						d[p] = data[n];
 						d[p+3] = data[n+3];
 					}
 				} else {
-					if (format == GlyphData::FORMAT_LUMINOSITY_ALPHA) {
+					if (format == GlyphData::FORMAT_LUMINANCE_ALPHA) {
 						p *= 2;
 						d[p] = d[p+1] = 0;
 					} else {

File src/modules/font/GlyphData.h

 	public:
 		enum Format
 		{
-			FORMAT_LUMINOSITY_ALPHA,
+			FORMAT_LUMINANCE_ALPHA,
 			FORMAT_RGBA
 		};
 		

File src/modules/font/freetype/TrueTypeRasterizer.cpp

 		glyphMetrics.width = bitmap.width;
 		glyphMetrics.advance = face->glyph->metrics.horiAdvance >> 6;
 
-		GlyphData * glyphData = new GlyphData(glyph, glyphMetrics, GlyphData::FORMAT_RGBA);
+		GlyphData * glyphData = new GlyphData(glyph, glyphMetrics, GlyphData::FORMAT_LUMINANCE_ALPHA);
 
 		{
 			int size = bitmap.rows*bitmap.width;
 			// our luminosity-alpha format. 
 			for(int i = 0; i<size; i++)
 			{
-				dst[4*i] = dst[4*i+1] = dst[4*i+2] = 255;
-				dst[4*i+3] = bitmap.buffer[i];
+				dst[2*i] = 255;
+				dst[2*i+1] = bitmap.buffer[i];
 			}
 		}
 		

File src/modules/font/freetype/TrueTypeRasterizer.h

 #include <font/Rasterizer.h>
 
 // TrueType2
-#ifdef LOVE_MACOSX
-#include <freetype/ft2build.h>
-#else
 #include <ft2build.h>
-#endif
 #include <freetype/freetype.h>
 #include <freetype/ftglyph.h>
 #include <freetype/ftoutln.h>

File src/modules/graphics/opengl/Font.cpp

 **/
 
 #include "Font.h"
+#include <font/GlyphData.h>
 
 #include <common/math.h>
 #include <math.h>
 	: height(data->getHeight()), lineHeight(1.25), mSpacing(1)
 	{
 		glyphs = new Glyph*[MAX_CHARS];
+		type = FONT_UNKNOWN;
+		love::font::GlyphData * gd;
 
 		for(unsigned int i = 0; i < MAX_CHARS; i++)
 		{
-			glyphs[i] = new Glyph(data->getGlyphData(i));
+			gd = data->getGlyphData(i);
+			glyphs[i] = new Glyph(gd);
 			glyphs[i]->load();
-			widths[i] = data->getGlyphData(i)->getWidth();
-			spacing[i] = data->getGlyphData(i)->getAdvance();
-			bearingX[i] = data->getGlyphData(i)->getBearingX();
-			bearingY[i] = data->getGlyphData(i)->getBearingY();
+			widths[i] = gd->getWidth();
+			spacing[i] = gd->getAdvance();
+			bearingX[i] = gd->getBearingX();
+			bearingY[i] = gd->getBearingY();
+			if (type == FONT_UNKNOWN) type = (gd->getFormat() == love::font::GlyphData::FORMAT_LUMINANCE_ALPHA ? FONT_TRUETYPE : FONT_IMAGE);
 		}
 	}
 
 
 	void Font::print(std::string text, float x, float y, float angle, float sx, float sy) const
 	{
+		float dx = 0.0f; // spacing counter for newline handling
 		glPushMatrix();
 
 		glTranslatef(ceil(x), ceil(y), 0.0f);
 		glScalef(sx, sy, 1.0f);
 		for (unsigned int i = 0; i < text.size(); i++) {
 			unsigned char g = (unsigned char)text[i];
+			if (g == '\n') { // wrap newline, but do not print it
+				glTranslatef(-dx, floor(getHeight() + 0.5f), 0);
+				dx = 0.0f;
+				continue;
+			}
 			if (!glyphs[g]) g = 32; // space
 			glPushMatrix();
-			glTranslatef(0, round(getHeight()), 0);
+			if (type == FONT_TRUETYPE) glTranslatef(0, floor(getHeight() + 0.5f), 0);
 			glyphs[g]->draw(0, 0, 0, 1, 1, 0, 0);
 			glPopMatrix();
 			glTranslatef(spacing[g], 0, 0);
+			dx += spacing[g];
 		}
 		glPopMatrix();
 	}
 	{
 		if (!glyphs[character]) character = ' ';
 		glPushMatrix();
-		glTranslatef(x, round(y+getHeight()), 0.0f);
+		glTranslatef(x, floor(y+getHeight() + 0.5f), 0.0f);
 		glCallList(list+character);
 		glPopMatrix();
 	}

File src/modules/graphics/opengl/Font.h

 	class Font : public Object, public Volatile
 	{
 	private:
+		
+		enum FontType
+		{
+			FONT_TRUETYPE = 1,
+			FONT_IMAGE,
+			FONT_UNKNOWN
+		};
 
 		int height;
 		float lineHeight;
 		float mSpacing; // modifies the spacing by multiplying it with this value
 		Glyph ** glyphs;
 		GLuint list; // the list of glyphs, for quicker drawing
+		FontType type;
 
 	public:
 		static const unsigned int MAX_CHARS = 256;

File src/modules/graphics/opengl/Framebuffer.cpp

 #include "Framebuffer.h"
 #include <common/Matrix.h>
 
-#include <string.h>
+#include <cstring> // For memcpy
 
-#include <iostream>
-#include <string>
-#include <sstream>
-#include <vector>
-#include <algorithm>
-#include <iterator>
-using namespace std;
-
-namespace {
-
-	// functions to get opengl capabilities at runtime
-	vector<string> tokenize(const string& str)
-	{
-		vector<string> tokens;
-
-		istringstream iss( str );
-		copy(istream_iterator<string>(iss), istream_iterator<string>(),
-				back_inserter< vector<string> >(tokens));
-		return tokens;
-	}
-
-	float getOpenGLVersionNumber()
-	{
-		vector<string> tokens = tokenize( (const char*)glGetString(GL_VERSION) );
-		stringstream toNumber( tokens.at(0) );
-
-		double version;
-		toNumber >> version;
-		return version;
-	}
-
-	bool hasFramebufferExtension()
-	{
-		vector<string> ext = tokenize( (const char*)glGetString(GL_EXTENSIONS) );
-		return find(ext.begin(), ext.end(), "GL_EXT_framebuffer_object") != ext.end();
-	}
-
-
+namespace love
+{
+namespace graphics
+{
+namespace opengl
+{	
+		
 	// strategy for fbo creation, interchangable at runtime:
 	// none, opengl >= 3.0, extensions
 	struct FramebufferStrategy {
 		 * @param[in]  height      Height of framebuffer
 		 * @return Creation status
 		 */
-		virtual GLenum createFBO(GLuint& framebuffer, GLuint& depthbuffer, GLuint& img, int width, int height)
+		virtual GLenum createFBO(GLuint&, GLuint&, GLuint&, int, int)
 		{ return GL_FRAMEBUFFER_UNSUPPORTED; }
 		/// remove objects
 		/**
 		 * @param[in] depthbuffer Depthbuffer name
 		 * @param[in] img         Texture name
 		 */
-		virtual void deleteFBO(GLuint framebuffer, GLuint depthbuffer, GLuint img) {}
-		virtual void bindFBO(GLuint framebuffer) {}
+		virtual void deleteFBO(GLuint, GLuint, GLuint) {}
+		virtual void bindFBO(GLuint) {}
 	};
 
-#ifdef GL_VERSION_3_0
 	struct FramebufferStrategyGL3 : public FramebufferStrategy {
 		virtual GLenum createFBO(GLuint& framebuffer, GLuint& depthbuffer, GLuint& img, int width, int height)
 		{
 			glBindFramebuffer(GL_FRAMEBUFFER, framebuffer);
 		}
 	};
-#endif
 
 	struct FramebufferStrategyEXT : public FramebufferStrategy {
 
 			glBindFramebufferEXT(GL_FRAMEBUFFER_EXT, framebuffer);
 		}
 	};
-
-	FramebufferStrategy* strategy = NULL;
-
-	FramebufferStrategy    strategyNone;
-#ifdef GL_VERSION_3_0
+	
+	FramebufferStrategy* strategy;
+	
+	FramebufferStrategy strategyNone;
+	
 	FramebufferStrategyGL3 strategyGL3;
-#endif
+	
 	FramebufferStrategyEXT strategyEXT;
-
-};
-
-namespace love
-{
-namespace graphics
-{
-namespace opengl
-{
+	
 	Framebuffer* Framebuffer::current = NULL;
 
 	Framebuffer::Framebuffer(int width, int height) :
 		width(width), height(height)
 	{
+		strategy = NULL;
 
 		// world coordinates
 		vertices[0].x = 0;     vertices[0].y = 0;
 		vertices[3].s = 1;     vertices[3].t = 1;
 
 		if (!strategy) {
-#ifdef GL_VERSION_3_0
-			if (getOpenGLVersionNumber() >= 3.0)
+			if (GLEE_VERSION_3_0 || GLEE_ARB_framebuffer_object)
 				strategy = &strategyGL3;
-			else if (hasFramebufferExtension())
-#else
-			if (hasFramebufferExtension())
-#endif
-			  strategy = &strategyEXT;
+			else if (GLEE_EXT_framebuffer_object)
+				strategy = &strategyEXT;
 			else
-			  strategy = &strategyNone;
-			
+				strategy = &strategyNone;
 		}
 
 		loadVolatile();
 
 		// cleanup after previous fbo
 		if (current != NULL)
-			glPopAttrib();
+			current->stopGrab();
 
 		// bind buffer and clear screen
-		glPushAttrib(GL_VIEWPORT_BIT | GL_COLOR_BUFFER_BIT | GL_DEPTH_BUFFER_BIT);
+		glPushAttrib(GL_VIEWPORT_BIT | GL_COLOR_BUFFER_BIT | GL_DEPTH_BUFFER_BIT | GL_TRANSFORM_BIT);
 		strategy->bindFBO(fbo);
 		glClearColor(.0f, .0f, .0f, .0f);
 		glClear(GL_COLOR_BUFFER_BIT | GL_DEPTH_BUFFER_BIT);
 		glViewport(0, 0, width, height);
+		
+		// Reset the projection matrix
+		glMatrixMode(GL_PROJECTION);
+		glPushMatrix();
+		glLoadIdentity();
+		
+		// Set up orthographic view (no depth)
+		glOrtho(0.0, width, height, 0.0, -1.0, 1.0);
+		
+		// Switch back to modelview matrix
+		glMatrixMode(GL_MODELVIEW);
 
 		// indicate we are using this fbo
 		current = this;
 
 		// bind default
 		strategy->bindFBO( 0 );
+		glMatrixMode(GL_PROJECTION);
+		glPopMatrix();
 		glPopAttrib();
 		current = NULL;
 	}

File src/modules/graphics/opengl/Framebuffer.h

 #include <image/Image.h>
 #include <image/ImageData.h>
 #include <common/math.h>
-#include <map>
 #include "GLee.h"
 
 namespace love
 {
 namespace opengl
 {
-
 	class Framebuffer : public Drawable, public Volatile
 	{
 	public:

File src/modules/graphics/opengl/Glyph.cpp

 	bool Glyph::loadVolatile()
 	{
 		GLint format = GL_RGBA;
-		if (data->getFormat() == love::font::GlyphData::FORMAT_LUMINOSITY_ALPHA) format = GL_LUMINANCE_ALPHA;
+		if (data->getFormat() == love::font::GlyphData::FORMAT_LUMINANCE_ALPHA) format = GL_LUMINANCE_ALPHA;
 		
 		glGenTextures(1,&texture);
 		glBindTexture(GL_TEXTURE_2D, texture);

File src/modules/graphics/opengl/Graphics.cpp

 		return (int)max;
 	}
 
-	void Graphics::print( const char * str, float x, float y )
+	void Graphics::print( const char * str, float x, float y)
 	{
 		if(currentFont != 0)
 		{
 			std::string text(str);
-
-			if(text.find("\n") == std::string::npos)
-				currentFont->print(text, x, y);
-			else
-			{
-				int lines = 0;
-				text = "";
-
-				for(unsigned int i = 0; i < strlen(str); i++)
-				{
-					if(str[i] == '\n')
-					{
-						currentFont->print(text, x, y + (lines * currentFont->getHeight() * currentFont->getLineHeight()));
-						text = "";
-						lines++;
-					}
-					else
-						text += str[i];
-				}
-
-				if(text != "") // Print the last text (if applicable).
-					currentFont->print(text, x, y + (lines * currentFont->getHeight() * currentFont->getLineHeight()));
-			}
+			currentFont->print(text, x, y);
 		}
 	}
 
-	void Graphics::print( const char * str, float x, float y , float angle)
+	void Graphics::print( const char * str, float x, float y, float angle)
 	{
-		if(currentFont != 0)
-		{
-			std::string text(str);
-
-			if(text.find("\n") == std::string::npos)
-				currentFont->print(text, x, y, angle, 1, 1);
-			else
-			{
-				int lines = 0;
-				text = "";
-
-				for(unsigned int i = 0; i < strlen(str); i++)
-				{
-					if(str[i] == '\n')
-					{
-						currentFont->print(text, x, y + (lines * currentFont->getHeight() * currentFont->getLineHeight()), angle, 1, 1);
-						text = "";
-						lines++;
-					}
-					else
-						text += str[i];
-				}
-
-				if(text != "") // Print the last text (if applicable).
-					currentFont->print(text, x, y + (lines * currentFont->getHeight() * currentFont->getLineHeight()), angle, 1, 1);
-			}
-		}
+		print(str, x, y, angle, 1, 1);
 	}
 
-	void Graphics::print( const char * str, float x, float y , float angle, float s)
+	void Graphics::print( const char * str, float x, float y, float angle, float s)
 	{
-		if(currentFont != 0)
-		{
-			std::string text(str);
-
-			if(text.find("\n") == std::string::npos)
-				currentFont->print(text, x, y, angle, s, s);
-			else
-			{
-				int lines = 0;
-				text = "";
-
-				for(unsigned int i = 0; i < strlen(str); i++)
-				{
-					if(str[i] == '\n')
-					{
-						currentFont->print(text, x, y + (lines * currentFont->getHeight() * currentFont->getLineHeight() * s), angle, s, s);
-						text = "";
-						lines++;
-					}
-					else
-						text += str[i];
-				}
-
-				if(text != "") // Print the last text (if applicable).
-					currentFont->print(text, x, y + (lines * currentFont->getHeight() * currentFont->getLineHeight() * s), angle, s, s);
-			}
-		}
+		print(str, x, y, angle, s, s);
 	}
 
 	void Graphics::print( const char * str, float x, float y , float angle, float sx, float sy)
 		if(currentFont != 0)
 		{
 			std::string text(str);
-
-			if(text.find("\n") == std::string::npos)
-				currentFont->print(text, x, y, angle, sx, sy);
-			else
-			{
-				int lines = 0;
-				text = "";
-
-				for(unsigned int i = 0; i < strlen(str); i++)
-				{
-					if(str[i] == '\n')
-					{
-						currentFont->print(text, x, y + (lines * currentFont->getHeight() * currentFont->getLineHeight() * sy), angle, sx, sy);
-						text = "";
-						lines++;
-					}
-					else
-						text += str[i];
-				}
-
-				if(text != "") // Print the last text (if applicable).
-					currentFont->print(text, x, y + (lines * currentFont->getHeight() * currentFont->getLineHeight() * sy), angle, sx, sy);
-			}
+			currentFont->print(text, x, y, angle, sx, sy);
 		}
 	}
 
 		glDisableClientState(GL_VERTEX_ARRAY);
 	}
 
+	bool Graphics::hasFocus()
+	{
+		return SDL_GetAppState() & SDL_APPINPUTFOCUS;
+	}
 } // opengl
 } // graphics
 } // love

File src/modules/graphics/opengl/Graphics.h

 
 		void drawTest(Image * image, float x, float y, float a, float sx, float sy, float ox, float oy);
 
+		bool hasFocus();
+
 	}; // Graphics
 
 } // opengl

File src/modules/graphics/opengl/wrap_Graphics.cpp

 		// Convert to Data, if necessary.
 		if(luax_istype(L, 1, FILESYSTEM_FILE_T)) {
 			love::filesystem::File * f = luax_checktype<love::filesystem::File>(L, 1, "File", FILESYSTEM_FILE_T);
-			Data * d = f->read();
+			Data * d;
+			try {
+				d = f->read();
+			}
+			catch (love::Exception & e) {
+				return luaL_error(L, e.what());
+			}
 			lua_remove(L, 1); // get rid of the file
 			luax_newtype(L, "Data", DATA_T, (void*)d);
 			lua_insert(L, 1); // put it at the bottom of the stack
 	int w_setColor(lua_State * L)
 	{
 		Color c;
-		c.r = (unsigned char)luaL_checkint(L, 1);
-		c.g = (unsigned char)luaL_checkint(L, 2);
-		c.b = (unsigned char)luaL_checkint(L, 3);
-		c.a = (unsigned char)luaL_optint(L, 4, 255);
+		if (lua_istable(L, 1)) {
+			lua_pushinteger(L, 1);
+			lua_gettable(L, -2);
+			c.r = (unsigned char)luaL_checkint(L, -1);
+			lua_pop(L, 1);
+			lua_pushinteger(L, 2);
+			lua_gettable(L, -2);
+			c.g = (unsigned char)luaL_checkint(L, -1);
+			lua_pop(L, 1);
+			lua_pushinteger(L, 3);
+			lua_gettable(L, -2);
+			c.b = (unsigned char)luaL_checkint(L, -1);
+			lua_pop(L, 1);
+			lua_pushinteger(L, 4);
+			lua_gettable(L, -2);
+			c.a = (unsigned char)luaL_optint(L, -1, 255);
+			lua_pop(L, 1);
+		}
+		else
+		{
+			c.r = (unsigned char)luaL_checkint(L, 1);
+			c.g = (unsigned char)luaL_checkint(L, 2);
+			c.b = (unsigned char)luaL_checkint(L, 3);
+			c.a = (unsigned char)luaL_optint(L, 4, 255);
+		}
 		instance->setColor(c);
 		return 0;
 	}
 	int w_setBackgroundColor(lua_State * L)
 	{
 		Color c;
-		c.r = (unsigned char)luaL_checkint(L, 1);
-		c.g = (unsigned char)luaL_checkint(L, 2);
-		c.b = (unsigned char)luaL_checkint(L, 3);
+		if (lua_istable(L, 1)) {
+			lua_pushinteger(L, 1);
+			lua_gettable(L, -2);
+			c.r = (unsigned char)luaL_checkint(L, -1);
+			lua_pop(L, 1);
+			lua_pushinteger(L, 2);
+			lua_gettable(L, -2);
+			c.g = (unsigned char)luaL_checkint(L, -1);
+			lua_pop(L, 1);
+			lua_pushinteger(L, 3);
+			lua_gettable(L, -2);
+			c.b = (unsigned char)luaL_checkint(L, -1);
+			lua_pop(L, 1);
+		}
+		else
+		{
+			c.r = (unsigned char)luaL_checkint(L, 1);
+			c.g = (unsigned char)luaL_checkint(L, 2);
+			c.b = (unsigned char)luaL_checkint(L, 3);
+		}
 		c.a = 255;
 		instance->setBackgroundColor(c);
 		return 0;
 		return 0;
 	}
 
+	int w_hasFocus(lua_State * L)
+	{
+		luax_pushboolean(L, instance->hasFocus());
+		return 1;
+	}
+
 
 	// List of functions to wrap.
 	static const luaL_Reg functions[] = {
 
 		{ "translate", w_translate },
 
+		{ "hasFocus", w_hasFocus },
+
 		{ 0, 0 }
 	};
 

File src/modules/graphics/opengl/wrap_Graphics.h

 	int w_rotate(lua_State * L);
 	int w_scale(lua_State * L);
 	int w_translate(lua_State * L);
+	int w_hasFocus(lua_State * L);
 	extern "C" LOVE_EXPORT int luaopen_love_graphics(lua_State * L);
 
 } // opengl

File src/modules/physics/box2d/Physics.cpp

 		aabb.lowerBound.Set(lx, ly);
 		aabb.upperBound.Set(ux, uy);
 		return new World(aabb, b2Vec2(gx, gy), sleep, meter);
-	}
-
-	World * Physics::newWorld(float lx, float ly, float ux, float uy, float gx, float gy, bool sleep)
-	{
-		b2AABB aabb;
-		aabb.lowerBound.Set(lx, ly);
-		aabb.upperBound.Set(ux, uy);
-		return new World(aabb, b2Vec2(gx, gy), sleep);
-	}
-
-	World * Physics::newWorld(float w, float h)
-	{
-		return newWorld(0, 0, w, h, 0, 0, true);
 	}
 
 	Body * Physics::newBody(World * world, float x, float y, float mass, float i)

File src/modules/physics/box2d/Physics.h

 		World * newWorld(float lx, float ly, float ux, float uy, float gx, float gy, bool sleep, int meter);
 
 		/**
-		* Creates a new World.
-		* @param lx Lower bound on the x-axis.
-		* @param ly Lower bound on the y-axis.
-		* @param ux Upper bound on the x-axis.
-		* @param uy Upper bound on the y-axis.
-		* @param gx Gravity along x-axis.
-		* @param gy Gravity along y-axis.
-		* @param sleep Whether the World allows sleep.
-		**/
-		World * newWorld(float lx, float ly, float ux, float uy, float gx, float gy, bool sleep);
-
-		/**
-		* Creates a new World with with size (w,h).
-		* @param w The width of the world.
-		* @param h The height of the world.
-		**/
-		World * newWorld(float w, float h);
-
-		/**
 		* Creates a new Body at the specified position.
 		* @param world The world to create the Body in.
 		* @param x The position along the x-axis.

File src/modules/physics/box2d/wrap_Physics.cpp

 
 	int w_newWorld(lua_State * L)
 	{
-		int top = lua_gettop(L);
-		if (top == 2)
-		{
-			float x = (float)luaL_checknumber(L, 1);
-			float y = (float)luaL_checknumber(L, 2);
-			World * w = instance->newWorld(x, y);
-			luax_newtype(L, "World", PHYSICS_WORLD_T, (void*)w);
-			return 1;
-		}
-		else if (top == 6 || top == 7)
-		{
-			float lx = (float)luaL_checknumber(L, 1);
-			float ly = (float)luaL_checknumber(L, 2);
-			float ux = (float)luaL_checknumber(L, 3);
-			float uy = (float)luaL_checknumber(L, 4);
-			float gx = (float)luaL_checknumber(L, 5);
-			float gy = (float)luaL_checknumber(L, 6);
-			bool sleep = luax_optboolean(L, 7, true);
-			World * w = instance->newWorld(lx, ly, ux, uy, gx, gy, sleep);
-			luax_newtype(L, "World", PHYSICS_WORLD_T, (void*)w);
-			return 1;
-		}
-		else if (top == 8)
-		{
-			float lx = (float)luaL_checknumber(L, 1);
-			float ly = (float)luaL_checknumber(L, 2);
-			float ux = (float)luaL_checknumber(L, 3);
-			float uy = (float)luaL_checknumber(L, 4);
-			float gx = (float)luaL_checknumber(L, 5);
-			float gy = (float)luaL_checknumber(L, 6);
-			bool sleep = lua_toboolean(L, 7);
-			int meter = (int)luaL_checknumber(L, 8);
-			World * w = instance->newWorld(lx, ly, ux, uy, gx, gy, sleep, meter);
-			luax_newtype(L, "World", PHYSICS_WORLD_T, (void*)w);
-			return 1;
-		}
-		else
+		if (lua_gettop(L) < 4)
 			return luaL_error(L, "Incorrect number of parameters");
+
+		float lx = (float)luaL_checknumber(L, 1);
+		float ly = (float)luaL_checknumber(L, 2);
+		float ux = (float)luaL_checknumber(L, 3);
+		float uy = (float)luaL_checknumber(L, 4);
+		float gx = (float)luaL_optnumber(L, 5, 0);
+		float gy = (float)luaL_optnumber(L, 6, 0);
+		bool sleep = luax_optboolean(L, 7, true);
+		int meter = (int)luaL_optnumber(L, 8, World::DEFAULT_METER);
+
+		World * w = instance->newWorld(lx, ly, ux, uy, gx, gy, sleep, meter);
+		luax_newtype(L, "World", PHYSICS_WORLD_T, (void*)w);
+
+		return 1;
 	}
 
 	int w_newBody(lua_State * L)

File src/scripts/graphics.lua

 ]]
 
 	love.graphics.newFont = function(font, size)
-		if type(font) == "number" then
+		if type(font) == "number" or not font then
 			size = font
 			font = love.filesystem.newFileData(vera_ttf_b64, "Vera.ttf", "base64")
 		end
-		return love.graphics.newFont1(font, size)
+		return love.graphics.newFont1(font, size or 12)
 	end
 
 	love.graphics.setFont = function(font, size)
-		if type(font) == "number" then
+		if type(font) == "number" or not font then
 			size = font
 			font = love.filesystem.newFileData(vera_ttf_b64, "Vera.ttf", "base64")
 		end
-		return love.graphics.setFont1(font, size)
+		return love.graphics.setFont1(font, size or 12)
 	end
 
 	love.graphics.print = function (...)
-		if not love.graphics.getFont() then 
+		if not love.graphics.getFont() then
 			love.graphics.setFont(12)
 		end
 		love.graphics.print1(...)
 	end
 
 	love.graphics.printf = function (...)
-		if not love.graphics.getFont() then 
+		if not love.graphics.getFont() then
 			love.graphics.setFont(12)
 		end
 		love.graphics.printf1(...)

File src/scripts/graphics.lua.h

 	0x65,0x77,0x46,0x6F,0x6E,0x74,0x20,0x3D,0x20,0x66,0x75,0x6E,0x63,0x74,0x69,
 	0x6F,0x6E,0x28,0x66,0x6F,0x6E,0x74,0x2C,0x20,0x73,0x69,0x7A,0x65,0x29,0x0D,
 	0x0A,0x09,0x09,0x69,0x66,0x20,0x74,0x79,0x70,0x65,0x28,0x66,0x6F,0x6E,0x74,
-	0x29,0x20,0x3D,0x3D,0x20,0x22,0x6E,0x75,0x6D,0x62,0x65,0x72,0x22,0x20,0x74,
-	0x68,0x65,0x6E,0x0D,0x0A,0x09,0x09,0x09,0x73,0x69,0x7A,0x65,0x20,0x3D,0x20,
-	0x66,0x6F,0x6E,0x74,0x0D,0x0A,0x09,0x09,0x09,0x66,0x6F,0x6E,0x74,0x20,0x3D,
-	0x20,0x6C,0x6F,0x76,0x65,0x2E,0x66,0x69,0x6C,0x65,0x73,0x79,0x73,0x74,0x65,
-	0x6D,0x2E,0x6E,0x65,0x77,0x46,0x69,0x6C,0x65,0x44,0x61,0x74,0x61,0x28,0x76,
-	0x65,0x72,0x61,0x5F,0x74,0x74,0x66,0x5F,0x62,0x36,0x34,0x2C,0x20,0x22,0x56,
-	0x65,0x72,0x61,0x2E,0x74,0x74,0x66,0x22,0x2C,0x20,0x22,0x62,0x61,0x73,0x65,
-	0x36,0x34,0x22,0x29,0x0D,0x0A,0x09,0x09,0x65,0x6E,0x64,0x0D,0x0A,0x09,0x09,
-	0x72,0x65,0x74,0x75,0x72,0x6E,0x20,0x6C,0x6F,0x76,0x65,0x2E,0x67,0x72,0x61,
-	0x70,0x68,0x69,0x63,0x73,0x2E,0x6E,0x65,0x77,0x46,0x6F,0x6E,0x74,0x31,0x28,
-	0x66,0x6F,0x6E,0x74,0x2C,0x20,0x73,0x69,0x7A,0x65,0x29,0x0D,0x0A,0x09,0x65,
-	0x6E,0x64,0x0D,0x0A,0x0D,0x0A,0x09,0x6C,0x6F,0x76,0x65,0x2E,0x67,0x72,0x61,
-	0x70,0x68,0x69,0x63,0x73,0x2E,0x73,0x65,0x74,0x46,0x6F,0x6E,0x74,0x20,0x3D,
-	0x20,0x66,0x75,0x6E,0x63,0x74,0x69,0x6F,0x6E,0x28,0x66,0x6F,0x6E,0x74,0x2C,
-	0x20,0x73,0x69,0x7A,0x65,0x29,0x0D,0x0A,0x09,0x09,0x69,0x66,0x20,0x74,0x79,
-	0x70,0x65,0x28,0x66,0x6F,0x6E,0x74,0x29,0x20,0x3D,0x3D,0x20,0x22,0x6E,0x75,
-	0x6D,0x62,0x65,0x72,0x22,0x20,0x74,0x68,0x65,0x6E,0x0D,0x0A,0x09,0x09,0x09,
+	0x29,0x20,0x3D,0x3D,0x20,0x22,0x6E,0x75,0x6D,0x62,0x65,0x72,0x22,0x20,0x6F,
+	0x72,0x20,0x6E,0x6F,0x74,0x20,0x66,0x6F,0x6E,0x74,0x20,0x74,0x68,0x65,0x6E,
+	0x0D,0x0A,0x09,0x09,0x09,0x73,0x69,0x7A,0x65,0x20,0x3D,0x20,0x66,0x6F,0x6E,
+	0x74,0x0D,0x0A,0x09,0x09,0x09,0x66,0x6F,0x6E,0x74,0x20,0x3D,0x20,0x6C,0x6F,
+	0x76,0x65,0x2E,0x66,0x69,0x6C,0x65,0x73,0x79,0x73,0x74,0x65,0x6D,0x2E,0x6E,
+	0x65,0x77,0x46,0x69,0x6C,0x65,0x44,0x61,0x74,0x61,0x28,0x76,0x65,0x72,0x61,
+	0x5F,0x74,0x74,0x66,0x5F,0x62,0x36,0x34,0x2C,0x20,0x22,0x56,0x65,0x72,0x61,
+	0x2E,0x74,0x74,0x66,0x22,0x2C,0x20,0x22,0x62,0x61,0x73,0x65,0x36,0x34,0x22,
+	0x29,0x0D,0x0A,0x09,0x09,0x65,0x6E,0x64,0x0D,0x0A,0x09,0x09,0x72,0x65,0x74,
+	0x75,0x72,0x6E,0x20,0x6C,0x6F,0x76,0x65,0x2E,0x67,0x72,0x61,0x70,0x68,0x69,
+	0x63,0x73,0x2E,0x6E,0x65,0x77,0x46,0x6F,0x6E,0x74,0x31,0x28,0x66,0x6F,0x6E,
+	0x74,0x2C,0x20,0x73,0x69,0x7A,0x65,0x20,0x6F,0x72,0x20,0x31,0x32,0x29,0x0D,
+	0x0A,0x09,0x65,0x6E,0x64,0x0D,0x0A,0x0D,0x0A,0x09,0x6C,0x6F,0x76,0x65,0x2E,
+	0x67,0x72,0x61,0x70,0x68,0x69,0x63,0x73,0x2E,0x73,0x65,0x74,0x46,0x6F,0x6E,
+	0x74,0x20,0x3D,0x20,0x66,0x75,0x6E,0x63,0x74,0x69,0x6F,0x6E,0x28,0x66,0x6F,
+	0x6E,0x74,0x2C,0x20,0x73,0x69,0x7A,0x65,0x29,0x0D,0x0A,0x09,0x09,0x69,0x66,
+	0x20,0x74,0x79,0x70,0x65,0x28,0x66,0x6F,0x6E,0x74,0x29,0x20,0x3D,0x3D,0x20,
+	0x22,0x6E,0x75,0x6D,0x62,0x65,0x72,0x22,0x20,0x6F,0x72,0x20,0x6E,0x6F,0x74,
+	0x20,0x66,0x6F,0x6E,0x74,0x20,0x74,0x68,0x65,0x6E,0x0D,0x0A,0x09,0x09,0x09,
 	0x73,0x69,0x7A,0x65,0x20,0x3D,0x20,0x66,0x6F,0x6E,0x74,0x0D,0x0A,0x09,0x09,
 	0x09,0x66,0x6F,0x6E,0x74,0x20,0x3D,0x20,0x6C,0x6F,0x76,0x65,0x2E,0x66,0x69,
 	0x6C,0x65,0x73,0x79,0x73,0x74,0x65,0x6D,0x2E,0x6E,0x65,0x77,0x46,0x69,0x6C,
 	0x65,0x6E,0x64,0x0D,0x0A,0x09,0x09,0x72,0x65,0x74,0x75,0x72,0x6E,0x20,0x6C,
 	0x6F,0x76,0x65,0x2E,0x67,0x72,0x61,0x70,0x68,0x69,0x63,0x73,0x2E,0x73,0x65,
 	0x74,0x46,0x6F,0x6E,0x74,0x31,0x28,0x66,0x6F,0x6E,0x74,0x2C,0x20,0x73,0x69,
-	0x7A,0x65,0x29,0x0D,0x0A,0x09,0x65,0x6E,0x64,0x0D,0x0A,0x0D,0x0A,0x09,0x6C,
-	0x6F,0x76,0x65,0x2E,0x67,0x72,0x61,0x70,0x68,0x69,0x63,0x73,0x2E,0x70,0x72,
-	0x69,0x6E,0x74,0x20,0x3D,0x20,0x66,0x75,0x6E,0x63,0x74,0x69,0x6F,0x6E,0x20,
-	0x28,0x2E,0x2E,0x2E,0x29,0x0D,0x0A,0x09,0x09,0x69,0x66,0x20,0x6E,0x6F,0x74,
-	0x20,0x6C,0x6F,0x76,0x65,0x2E,0x67,0x72,0x61,0x70,0x68,0x69,0x63,0x73,0x2E,
-	0x67,0x65,0x74,0x46,0x6F,0x6E,0x74,0x28,0x29,0x20,0x74,0x68,0x65,0x6E,0x20,
-	0x0D,0x0A,0x09,0x09,0x09,0x6C,0x6F,0x76,0x65,0x2E,0x67,0x72,0x61,0x70,0x68,
-	0x69,0x63,0x73,0x2E,0x73,0x65,0x74,0x46,0x6F,0x6E,0x74,0x28,0x31,0x32,0x29,
-	0x0D,0x0A,0x09,0x09,0x65,0x6E,0x64,0x0D,0x0A,0x09,0x09,0x6C,0x6F,0x76,0x65,
-	0x2E,0x67,0x72,0x61,0x70,0x68,0x69,0x63,0x73,0x2E,0x70,0x72,0x69,0x6E,0x74,
-	0x31,0x28,0x2E,0x2E,0x2E,0x29,0x0D,0x0A,0x09,0x09,0x6C,0x6F,0x76,0x65,0x2E,
-	0x67,0x72,0x61,0x70,0x68,0x69,0x63,0x73,0x2E,0x70,0x72,0x69,0x6E,0x74,0x20,
-	0x3D,0x20,0x6C,0x6F,0x76,0x65,0x2E,0x67,0x72,0x61,0x70,0x68,0x69,0x63,0x73,
-	0x2E,0x70,0x72,0x69,0x6E,0x74,0x31,0x0D,0x0A,0x09,0x65,0x6E,0x64,0x0D,0x0A,
-	0x0D,0x0A,0x09,0x6C,0x6F,0x76,0x65,0x2E,0x67,0x72,0x61,0x70,0x68,0x69,0x63,
-	0x73,0x2E,0x70,0x72,0x69,0x6E,0x74,0x66,0x20,0x3D,0x20,0x66,0x75,0x6E,0x63,
-	0x74,0x69,0x6F,0x6E,0x20,0x28,0x2E,0x2E,0x2E,0x29,0x0D,0x0A,0x09,0x09,0x69,
-	0x66,0x20,0x6E,0x6F,0x74,0x20,0x6C,0x6F,0x76,0x65,0x2E,0x67,0x72,0x61,0x70,
-	0x68,0x69,0x63,0x73,0x2E,0x67,0x65,0x74,0x46,0x6F,0x6E,0x74,0x28,0x29,0x20,
-	0x74,0x68,0x65,0x6E,0x20,0x0D,0x0A,0x09,0x09,0x09,0x6C,0x6F,0x76,0x65,0x2E,
+	0x7A,0x65,0x20,0x6F,0x72,0x20,0x31,0x32,0x29,0x0D,0x0A,0x09,0x65,0x6E,0x64,
+	0x0D,0x0A,0x0D,0x0A,0x09,0x6C,0x6F,0x76,0x65,0x2E,0x67,0x72,0x61,0x70,0x68,
+	0x69,0x63,0x73,0x2E,0x70,0x72,0x69,0x6E,0x74,0x20,0x3D,0x20,0x66,0x75,0x6E,
+	0x63,0x74,0x69,0x6F,0x6E,0x20,0x28,0x2E,0x2E,0x2E,0x29,0x0D,0x0A,0x09,0x09,
+	0x69,0x66,0x20,0x6E,0x6F,0x74,0x20,0x6C,0x6F,0x76,0x65,0x2E,0x67,0x72,0x61,
+	0x70,0x68,0x69,0x63,0x73,0x2E,0x67,0x65,0x74,0x46,0x6F,0x6E,0x74,0x28,0x29,
+	0x20,0x74,0x68,0x65,0x6E,0x0D,0x0A,0x09,0x09,0x09,0x6C,0x6F,0x76,0x65,0x2E,
 	0x67,0x72,0x61,0x70,0x68,0x69,0x63,0x73,0x2E,0x73,0x65,0x74,0x46,0x6F,0x6E,
 	0x74,0x28,0x31,0x32,0x29,0x0D,0x0A,0x09,0x09,0x65,0x6E,0x64,0x0D,0x0A,0x09,
 	0x09,0x6C,0x6F,0x76,0x65,0x2E,0x67,0x72,0x61,0x70,0x68,0x69,0x63,0x73,0x2E,
-	0x70,0x72,0x69,0x6E,0x74,0x66,0x31,0x28,0x2E,0x2E,0x2E,0x29,0x0D,0x0A,0x09,
-	0x09,0x6C,0x6F,0x76,0x65,0x2E,0x67,0x72,0x61,0x70,0x68,0x69,0x63,0x73,0x2E,
-	0x70,0x72,0x69,0x6E,0x74,0x66,0x20,0x3D,0x20,0x6C,0x6F,0x76,0x65,0x2E,0x67,
-	0x72,0x61,0x70,0x68,0x69,0x63,0x73,0x2E,0x70,0x72,0x69,0x6E,0x74,0x66,0x31,
-	0x0D,0x0A,0x09,0x65,0x6E,0x64,0x0D,0x0A,0x0D,0x0A,0x65,0x6E,0x64,0x0D,0x0A,
-	
+	0x70,0x72,0x69,0x6E,0x74,0x31,0x28,0x2E,0x2E,0x2E,0x29,0x0D,0x0A,0x09,0x09,
+	0x6C,0x6F,0x76,0x65,0x2E,0x67,0x72,0x61,0x70,0x68,0x69,0x63,0x73,0x2E,0x70,
+	0x72,0x69,0x6E,0x74,0x20,0x3D,0x20,0x6C,0x6F,0x76,0x65,0x2E,0x67,0x72,0x61,
+	0x70,0x68,0x69,0x63,0x73,0x2E,0x70,0x72,0x69,0x6E,0x74,0x31,0x0D,0x0A,0x09,
+	0x65,0x6E,0x64,0x0D,0x0A,0x0D,0x0A,0x09,0x6C,0x6F,0x76,0x65,0x2E,0x67,0x72,
+	0x61,0x70,0x68,0x69,0x63,0x73,0x2E,0x70,0x72,0x69,0x6E,0x74,0x66,0x20,0x3D,
+	0x20,0x66,0x75,0x6E,0x63,0x74,0x69,0x6F,0x6E,0x20,0x28,0x2E,0x2E,0x2E,0x29,
+	0x0D,0x0A,0x09,0x09,0x69,0x66,0x20,0x6E,0x6F,0x74,0x20,0x6C,0x6F,0x76,0x65,
+	0x2E,0x67,0x72,0x61,0x70,0x68,0x69,0x63,0x73,0x2E,0x67,0x65,0x74,0x46,0x6F,
+	0x6E,0x74,0x28,0x29,0x20,0x74,0x68,0x65,0x6E,0x0D,0x0A,0x09,0x09,0x09,0x6C,
+	0x6F,0x76,0x65,0x2E,0x67,0x72,0x61,0x70,0x68,0x69,0x63,0x73,0x2E,0x73,0x65,
+	0x74,0x46,0x6F,0x6E,0x74,0x28,0x31,0x32,0x29,0x0D,0x0A,0x09,0x09,0x65,0x6E,
+	0x64,0x0D,0x0A,0x09,0x09,0x6C,0x6F,0x76,0x65,0x2E,0x67,0x72,0x61,0x70,0x68,
+	0x69,0x63,0x73,0x2E,0x70,0x72,0x69,0x6E,0x74,0x66,0x31,0x28,0x2E,0x2E,0x2E,
+	0x29,0x0D,0x0A,0x09,0x09,0x6C,0x6F,0x76,0x65,0x2E,0x67,0x72,0x61,0x70,0x68,
+	0x69,0x63,0x73,0x2E,0x70,0x72,0x69,0x6E,0x74,0x66,0x20,0x3D,0x20,0x6C,0x6F,
+	0x76,0x65,0x2E,0x67,0x72,0x61,0x70,0x68,0x69,0x63,0x73,0x2E,0x70,0x72,0x69,
+	0x6E,0x74,0x66,0x31,0x0D,0x0A,0x09,0x65,0x6E,0x64,0x0D,0x0A,0x0D,0x0A,0x65,
+	0x6E,0x64,0x0D,0x0A,
 };
 // [/graphics.lua]