Commits

Alex Szpakowski committed afe0217 Merge

Merged default into minor

  • Participants
  • Parent commits 43b3c57, 44e5f3d
  • Branches minor

Comments (0)

Files changed (50)

 bcca82b60d0f5cd724edbe4ed65db18ab95d4691 0.7.2
 e0f98d53debb62347c6433ca0534a0f77f15f76f 0.8.0
 38c00c788bcb03bda2ad40efebcdfe7a6be85b4a 0.9.0
+8b113c345e97e7bb7e963e5d67451abdfb05cfde 0.9.1
 LOVE 0.9.1 [Baby Inspector]
 ---------------------------
 
-  Released: N/A
+  Released: 2014-04-01
 
   * Added Source:clone.
+  * Added blend mode "screen".
   * Added ParticleSystem:clone.
   * Added ParticleSystem:moveTo, has smoother emitter movement compared to setPosition.
   * Added ParticleSystem:setRelativeRotation.
   * Added love.graphics.setWireframe for debugging.
   * Added Mesh:setDrawRange and Mesh:getDrawRange.
-  * Added instancing support to Meshes with Mesh:setInstanceCount.
   * Added CircleShape:getPoint and CircleShape:setPoint.
   * Added Mesh/SpriteBatch/ParticleSystem:setTexture, accepts Canvases and Images.
   * Added high-dpi window support for Retina displays in OS X, via the 'highdpi' window flag.
   * Added love.graphics.isSupported("srgb").
   * Added love.math.gammaToLinear and love.math.linearToGamma.
   * Added RandomGenerator:getState and RandomGenerator:setState.
+  * Added Body:setUserData and Body:getUserData.
+  * Added some missing obscure key constants.
+  * Added optional callback function argument to love.filesystem.getDirectoryItems.
+  * Added love.system.openURL.
 
   * Deprecated Mesh/SpriteBatch/ParticleSystem:setImage.
   * Deprecated love.graphics.getMaxImageSize and love.graphics.getMaxPointSize.
   * Fixed TrueType font glyphs which request a monochrome bitmap pixel mode.
   * Fixed love.graphics.reset causing crashes when called in between love.graphics.push/pop.
   * Fixed tab characters ("\t") to display properly with love.graphics.print.
+  * Fixed love.graphics.isCreated to return false when love.window.setMode fails completely.
+  * Fixed love.window.setMode to not destroy OpenGL resources before checking whether a fullsceren size is supported.
   * Fixed World:getBodyList and World:getJointList causing hard crashes.
-
-  * Renamed love.graphics.getMaxImageSize to love.graphics.getMaxTextureSize (old function still exists.)
+  * Fixed loading BC4 compressed textures.
+  * Fixed SoundData objects being initialized with garbage values.
+  * Fixed 8-bit SoundData samples when used in love.audio Sources.
 
   * Updated the error text for love.filesystem’s module searchers when require fails.
   * Updated the love.filesystem module searchers to be tried after package.preload instead of before.
   * Updated Source:play to return a boolean indicating success.
   * Updated t.console in conf.lua to create the console before modules are loaded in Windows.
   * Updated Mesh vertex maps (index buffers) to use less space in VRAM.
+  * Updated love.graphics.newMesh and Mesh:setVertices to default the UV parameters to 0,0.
+  * Updated Fixture:set/getUserData to work in Coroutines.
+  * Updated fullscreen-desktop and resizable window modes in OS X to use Mac OS 10.7's fullscreen Spaces.
+  * Updated love.filesystem's C library loader to look in paths added via love.filesystem.mount, in Fused mode.
+  * Updated the default love.run code to make initial love.math.random calls more random.
 
 LOVE 0.9.0 [Baby Inspector]
 ---------------------------
 
-	Released: 2013-12-13
+  Released: 2013-12-13
 
   * Added better multiplayer networking support via ENet.
   * Added --fused command line argument, to simulate fusing.
 LOVE 0.8.0 [Rubber Piggy]
 -------------------------
 
-	Released: 2012-04-02
+  Released: 2012-04-02
 
   * Added release error screen.
   * Added alpha to love.graphics.setBackgroundColor.
 LOVE 0.7.2 [Game Slave]
 -----------------------
 
-	Released: 2011-05-04
+  Released: 2011-05-04
 
   * Added Framebuffer:get/setWrap.
   * Added love.event.clear.
 LOVE 0.7.1 [Game Slave]
 -----------------------
 
-	Released: 2011-02-14
+  Released: 2011-02-14
 
   * Added source:isPaused()
   * Added error when initial window can't be created.
 LOVE 0.7.0 [Game Slave]
 -----------------------
 
-	Released: 2010-12-05
+  Released: 2010-12-05
 
   * Added love.thread.
   * Added love.font.
 LOVE 0.6.2 [Jiggly Juice]
 -------------------------
 
-	Released: 2010-03-06
+  Released: 2010-03-06
 
   * Fixed a bug causing ImageFonts to cut off some pixels.
   * Fixed a bug where filled rectangles were too small.
 LOVE 0.6.1 [Jiggly Juice]
 -------------------------
 
-	Released: 2010-02-07
+  Released: 2010-02-07
 
   * Added Shape:setGroupIndex and getGroupIndex.
   * Added Body:setFixedRotation and Body:getFixedRotation.
 LOVE 0.6.0 [Jiggly Juice]
 -------------------------
 
-	Released: 2009-12-24
+  Released: 2009-12-24
 
   * Lost track of 0.6.0 changes a long while ago. Don't trust the list below.
 
 LOVE 0.5.0 [Salted Nuts]
 ------------------------
 
-	Released: 2009-01-02
+  Released: 2009-01-02
 
   * Added love.joystick.
   * Added network support via LuaSocket.
 LOVE 0.4.0 [Taco Beam]
 ----------------------
 
-	Released: 2008-08-29
+  Released: 2008-08-29
 
   * Added love.physics. (YES!)
   * Added love.audio.setMode().
 LOVE 0.3.2 [Lemony Fresh]
 -------------------------
 
-	Released: 2008-07-04
+  Released: 2008-07-04
 
   * Added love.graphics.rectangle()
   * Added love.graphics.setLineWidth()
 LOVE 0.3.1 [Space Meat]
 -----------------------
 
-	Released: 2008-06-21
+  Released: 2008-06-21
 
   * Fixed segfault related to graphics.
   * Fixed wait-forever bug related to audio.
 LOVE 0.3.0 [Mutant Vermin]
 --------------------------
 
-	Released: 2008-06-17
+  Released: 2008-06-17
 
   * Added ParticleSystem.
   * Added visual error reporting.
 LOVE 0.2.1 [Impending Doom]
 ---------------------------
 
-	Released: 2008-03-29
+  Released: 2008-03-29
 
   * Added many functions in love.filesystem.
   * Added a dedicated save-folder for each game.
 LOVE 0.2.0 [Mini-Moose]
 -----------------------
 
-	Released: 2008-02-06
+  Released: 2008-02-06
 
   * Added ImageFont
   * Added Animation
 ------------------------
 
 	Initial release!
-	Released: 2008-01-13
+  Released: 2008-01-13
 
  * Image loading and rendering.
  * Sound loading and playing.

platform/macosx/love-framework.xcodeproj/project.pbxproj

 		FA9B4A0816E1578300074F42 /* SDL2.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = FA9B4A0716E1578300074F42 /* SDL2.framework */; };
 		FA9FC0B0173D6E3E005027FF /* wrap_Window.cpp in Sources */ = {isa = PBXBuildFile; fileRef = FA9FC0AE173D6E3E005027FF /* wrap_Window.cpp */; };
 		FA9FC0B1173D6E3E005027FF /* wrap_Window.h in Headers */ = {isa = PBXBuildFile; fileRef = FA9FC0AF173D6E3E005027FF /* wrap_Window.h */; };
+		FAA627CE18E7E1560080752D /* CoreServices.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = FAA627CD18E7E1560080752D /* CoreServices.framework */; };
 		FAAC6B02170A373B008A61C5 /* CompressedData.cpp in Sources */ = {isa = PBXBuildFile; fileRef = FAAC6B00170A373A008A61C5 /* CompressedData.cpp */; };
 		FAAC6B03170A373B008A61C5 /* CompressedData.h in Headers */ = {isa = PBXBuildFile; fileRef = FAAC6B01170A373A008A61C5 /* CompressedData.h */; };
 		FAAFF04416CB11C700CCDE45 /* OpenAL-Soft.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = FAAFF04316CB11C700CCDE45 /* OpenAL-Soft.framework */; };
 		FA9B4A0716E1578300074F42 /* SDL2.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = SDL2.framework; path = /Library/Frameworks/SDL2.framework; sourceTree = "<absolute>"; };
 		FA9FC0AE173D6E3E005027FF /* wrap_Window.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = wrap_Window.cpp; sourceTree = "<group>"; };
 		FA9FC0AF173D6E3E005027FF /* wrap_Window.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = wrap_Window.h; sourceTree = "<group>"; };
+		FAA627CD18E7E1560080752D /* CoreServices.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = CoreServices.framework; path = System/Library/Frameworks/CoreServices.framework; sourceTree = SDKROOT; };
 		FAAC6B00170A373A008A61C5 /* CompressedData.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = CompressedData.cpp; sourceTree = "<group>"; };
 		FAAC6B01170A373A008A61C5 /* CompressedData.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = CompressedData.h; sourceTree = "<group>"; };
 		FAAFF04316CB11C700CCDE45 /* OpenAL-Soft.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = "OpenAL-Soft.framework"; path = "/Library/Frameworks/OpenAL-Soft.framework"; sourceTree = "<absolute>"; };
 			isa = PBXFrameworksBuildPhase;
 			buildActionMask = 2147483647;
 			files = (
+				FAA627CE18E7E1560080752D /* CoreServices.framework in Frameworks */,
 				FA9B4A0816E1578300074F42 /* SDL2.framework in Frameworks */,
 				FAAFF04416CB11C700CCDE45 /* OpenAL-Soft.framework in Frameworks */,
 				FA577AB016C7507900860150 /* Cocoa.framework in Frameworks */,
 		FA577A6616C7199700860150 /* Frameworks */ = {
 			isa = PBXGroup;
 			children = (
-				FA9B4A0716E1578300074F42 /* SDL2.framework */,
 				FA577A7916C71A1700860150 /* Cocoa.framework */,
+				FAA627CD18E7E1560080752D /* CoreServices.framework */,
 				FA577A6716C719D900860150 /* FreeType.framework */,
 				FA577A6916C719DE00860150 /* IL.framework */,
 				FA577A8216C71A5300860150 /* libmodplug.framework */,
 				FAAFF04316CB11C700CCDE45 /* OpenAL-Soft.framework */,
 				FA577A7C16C71A2600860150 /* OpenGL.framework */,
 				FA577A7316C719F900860150 /* physfs.framework */,
+				FA9B4A0716E1578300074F42 /* SDL2.framework */,
 				FA577A7716C71A0800860150 /* Vorbis.framework */,
 			);
 			name = Frameworks;
 				ARCHS = "$(ARCHS_STANDARD_64_BIT)";
 				CLANG_CXX_LANGUAGE_STANDARD = "c++0x";
 				CLANG_ENABLE_MODULES = YES;
+				CLANG_WARN_BOOL_CONVERSION = YES;
+				CLANG_WARN_CONSTANT_CONVERSION = YES;
+				CLANG_WARN_ENUM_CONVERSION = YES;
+				CLANG_WARN_INT_CONVERSION = YES;
 				DEAD_CODE_STRIPPING = YES;
 				FRAMEWORK_SEARCH_PATHS = /Library/Frameworks;
 				GCC_OPTIMIZATION_LEVEL = 3;
 				GCC_PREPROCESSOR_DEFINITIONS = LOVE_MACOSX_USE_FRAMEWORKS;
 				GCC_WARN_ABOUT_MISSING_FIELD_INITIALIZERS = YES;
+				GCC_WARN_ABOUT_MISSING_NEWLINE = YES;
 				GCC_WARN_ABOUT_RETURN_TYPE = YES;
 				GCC_WARN_INITIALIZER_NOT_FULLY_BRACKETED = YES;
 				GCC_WARN_NON_VIRTUAL_DESTRUCTOR = YES;
 				ARCHS = "$(ARCHS_STANDARD_64_BIT)";
 				CLANG_CXX_LANGUAGE_STANDARD = "c++0x";
 				CLANG_ENABLE_MODULES = YES;
+				CLANG_WARN_BOOL_CONVERSION = YES;
+				CLANG_WARN_CONSTANT_CONVERSION = YES;
+				CLANG_WARN_ENUM_CONVERSION = YES;
+				CLANG_WARN_INT_CONVERSION = YES;
 				COPY_PHASE_STRIP = NO;
 				FRAMEWORK_SEARCH_PATHS = /Library/Frameworks;
 				GCC_OPTIMIZATION_LEVEL = 0;
 				GCC_PREPROCESSOR_DEFINITIONS = LOVE_MACOSX_USE_FRAMEWORKS;
 				GCC_WARN_ABOUT_MISSING_FIELD_INITIALIZERS = YES;
+				GCC_WARN_ABOUT_MISSING_NEWLINE = YES;
 				GCC_WARN_ABOUT_RETURN_TYPE = YES;
 				GCC_WARN_INITIALIZER_NOT_FULLY_BRACKETED = YES;
 				GCC_WARN_NON_VIRTUAL_DESTRUCTOR = YES;
 				ARCHS = "$(ARCHS_STANDARD_64_BIT)";
 				CLANG_CXX_LANGUAGE_STANDARD = "c++0x";
 				CLANG_ENABLE_MODULES = YES;
+				CLANG_WARN_BOOL_CONVERSION = YES;
+				CLANG_WARN_CONSTANT_CONVERSION = YES;
+				CLANG_WARN_ENUM_CONVERSION = YES;
+				CLANG_WARN_INT_CONVERSION = YES;
 				DEAD_CODE_STRIPPING = YES;
 				FRAMEWORK_SEARCH_PATHS = /Library/Frameworks;
 				GCC_OPTIMIZATION_LEVEL = 3;
 				GCC_PREPROCESSOR_DEFINITIONS = LOVE_MACOSX_USE_FRAMEWORKS;
 				GCC_WARN_ABOUT_MISSING_FIELD_INITIALIZERS = YES;
+				GCC_WARN_ABOUT_MISSING_NEWLINE = YES;
 				GCC_WARN_ABOUT_RETURN_TYPE = YES;
 				GCC_WARN_INITIALIZER_NOT_FULLY_BRACKETED = YES;
 				GCC_WARN_NON_VIRTUAL_DESTRUCTOR = YES;

platform/unix/configure.ac

 	  AC_DEFINE([LOVE_BUILD_EXE], [], [Skip building launcher]))
 
 AM_CONDITIONAL([LOVE_BUILD_EXE], [test "x$enable_exe" != xno])
-AM_CONDITIONAL([LOVE_NOMPG123], [test "x$enable_mpg123" == xno])
+AM_CONDITIONAL([LOVE_NOMPG123], [test "x$enable_mpg123" = xno])
 AM_CONDITIONAL([LOVE_TARGET_OSX], [test "x$enable_osx" != xno])
 
 # Automatic script file rebuilding

platform/unix/debian/control.in

          libgl1-mesa-glx,
          libluajit-5.1-2,
          libphysfs-1.0-0,
-         libsdl2 (>= 2.0.0),
+         libsdl2-2.0-0 (>= 2.0.0),
          libopenal1,
          libogg0,
          libvorbis0a,

platform/unix/genmodules

 		amflag="$(upper $(echo love-$flag | sed 's/-/_/g'))"
 		printf "AC_ARG_ENABLE([$flag], [  --disable-$flag    Turn off $prettyflag], [], [$varflag=true])\n"
 		printf "AH_TEMPLATE([$defineflag], [])\n"
-		printf "if test x\"\$$varflag\" == xtrue; then\n"
+		printf "if test x\"\$$varflag\" = xtrue; then\n"
 		printf "    AC_DEFINE([$defineflag], [])\n"
 		printf "fi\n"
-		printf "AM_CONDITIONAL([$amflag], [test x\$$varflag == xtrue])\n\n"
+		printf "AM_CONDITIONAL([$amflag], [test x\$$varflag = xtrue])\n\n"
 	done
 }
 

src/common/Data.h

 #include "config.h"
 #include "Object.h"
 
+// C
+#include <stddef.h>
+
 namespace love
 {
 
 	/**
 	 * Gets the size of the Data in bytes.
 	 **/
-	virtual int getSize() const = 0;
+	virtual size_t getSize() const = 0;
 
 }; // Data
 

src/common/utf8.cpp

 	return ret;
 }
 
+std::wstring to_widestr(const std::string &str)
+{
+	if (str.empty())
+		return std::wstring();
+
+	int wide_size = MultiByteToWideChar(CP_UTF8, 0, str.c_str(), (int) str.length(), nullptr, 0);
+
+	if (wide_size == 0)
+		return std::wstring();
+
+	std::wstring widestr;
+	widestr.resize(wide_size);
+
+	int ok = MultiByteToWideChar(CP_UTF8, 0, str.c_str(), (int) str.length(), &widestr[0], widestr.length());
+
+	if (!ok)
+		return std::wstring();
+
+	return widestr;
+}
+
 void replace_char(std::string &str, char find, char replace)
 {
 	int length = str.length();

src/common/utf8.h

 std::string to_utf8(LPCWSTR wstr);
 
 /**
+ * Convert a UTF-8 encoded string to a wide string.
+ * @param str The UTF-8 string.
+ * @return A wide string.
+**/
+std::wstring to_widestr(const std::string &str);
+
+/**
  * Replace all occurences of 'find' with 'replace' in a string.
  * @param str The string to modify.
  * @param find The character to match.

src/common/wrap_Data.cpp

 int w_Data_getString(lua_State *L)
 {
 	Data *t = luax_checkdata(L, 1);
-	lua_pushlstring(L, (const char *) t->getData(), (size_t) t->getSize());
+	lua_pushlstring(L, (const char *) t->getData(), t->getSize());
 	return 1;
 }
 
 int w_Data_getSize(lua_State *L)
 {
 	Data *t = luax_checkdata(L, 1);
-	lua_pushinteger(L, t->getSize());
+	lua_pushnumber(L, (lua_Number) t->getSize());
 	return 1;
 }
 

src/libraries/enet/enet.cpp

 /**
  * Find the index of a given peer for which we only have the pointer.
  */
-size_t find_peer_index (lua_State *l, ENetHost *enet_host, ENetPeer *peer) {
+static size_t find_peer_index(lua_State *l, ENetHost *enet_host, ENetPeer *peer) {
 	size_t peer_index;
 	for (peer_index = 0; peer_index < enet_host->peerCount; peer_index++) {
 		if (peer == &(enet_host->peers[peer_index]))

src/libraries/enet/libenet/ChangeLog

+ENet 1.3.11 (December 26, 2013):
+
+* allow an ENetHost to connect to itself
+* fixed possible bug with disconnect notifications during connect attempts
+* fixed some preprocessor definition bugs
+
 ENet 1.3.10 (October 23, 2013);
 
 * doubled maximum reliable window size

src/libraries/enet/libenet/include/enet/enet.h

 
 #define ENET_VERSION_MAJOR 1
 #define ENET_VERSION_MINOR 3
-#define ENET_VERSION_PATCH 10
+#define ENET_VERSION_PATCH 11
 #define ENET_VERSION_CREATE(major, minor, patch) (((major)<<16) | ((minor)<<8) | (patch))
 #define ENET_VERSION_GET_MAJOR(version) (((version)>>16)&0xFF)
 #define ENET_VERSION_GET_MINOR(version) (((version)>>8)&0xFF)

src/libraries/enet/libenet/include/enet/protocol.h

    ENET_PROTOCOL_HEADER_SESSION_SHIFT   = 12
 } ENetProtocolFlag;
 
-#ifdef _MSC_VER_
+#ifdef _MSC_VER
 #pragma pack(push, 1)
 #define ENET_PACKED
 #elif defined(__GNUC__) || defined(__clang__)
    ENetProtocolThrottleConfigure throttleConfigure;
 } ENET_PACKED ENetProtocol;
 
-#ifdef _MSC_VER_
+#ifdef _MSC_VER
 #pragma pack(pop)
 #endif
 

src/libraries/enet/libenet/include/enet/unix.h

 
 #define ENET_SOCKETSET_EMPTY(sockset)          FD_ZERO (& (sockset))
 #define ENET_SOCKETSET_ADD(sockset, socket)    FD_SET (socket, & (sockset))
-#define ENET_SOCKETSET_REMOVE(sockset, socket) FD_CLEAR (socket, & (sockset))
+#define ENET_SOCKETSET_REMOVE(sockset, socket) FD_CLR (socket, & (sockset))
 #define ENET_SOCKETSET_CHECK(sockset, socket)  FD_ISSET (socket, & (sockset))
     
 #endif /* __ENET_UNIX_H__ */

src/libraries/enet/libenet/include/enet/win32.h

 
 #define ENET_SOCKETSET_EMPTY(sockset)          FD_ZERO (& (sockset))
 #define ENET_SOCKETSET_ADD(sockset, socket)    FD_SET (socket, & (sockset))
-#define ENET_SOCKETSET_REMOVE(sockset, socket) FD_CLEAR (socket, & (sockset))
+#define ENET_SOCKETSET_REMOVE(sockset, socket) FD_CLR (socket, & (sockset))
 #define ENET_SOCKETSET_CHECK(sockset, socket)  FD_ISSET (socket, & (sockset))
 
 #endif /* __ENET_WIN32_H__ */

src/libraries/enet/libenet/protocol.c

               peer = currentPeer;
         }
         else 
-        if (currentPeer -> address.host == host -> receivedAddress.host)
+        if (currentPeer -> state != ENET_PEER_STATE_CONNECTING &&
+            currentPeer -> address.host == host -> receivedAddress.host)
         {
             if (currentPeer -> address.port == host -> receivedAddress.port &&
                 currentPeer -> connectID == command -> connect.connectID)
 
     enet_peer_reset_queues (peer);
 
-    if (peer -> state == ENET_PEER_STATE_CONNECTION_SUCCEEDED || peer -> state == ENET_PEER_STATE_DISCONNECTING)
+    if (peer -> state == ENET_PEER_STATE_CONNECTION_SUCCEEDED || peer -> state == ENET_PEER_STATE_DISCONNECTING || peer -> state == ENET_PEER_STATE_CONNECTING)
         enet_protocol_dispatch_state (host, peer, ENET_PEER_STATE_ZOMBIE);
     else
     if (peer -> state != ENET_PEER_STATE_CONNECTED && peer -> state != ENET_PEER_STATE_DISCONNECT_LATER)

src/modules/audio/openal/Source.cpp

 
 void Source::setCone(float innerAngle, float outerAngle, float outerVolume)
 {
-	cone.innerAngle = LOVE_TODEG(innerAngle);
-	cone.outerAngle = LOVE_TODEG(outerAngle);
+	cone.innerAngle = (int) LOVE_TODEG(innerAngle);
+	cone.outerAngle = (int) LOVE_TODEG(outerAngle);
 	cone.outerVolume = outerVolume;
 
 	if (valid)

src/modules/event/sdl/Event.cpp

 #include "graphics/Graphics.h"
 #include "window/Window.h"
 #include "common/Exception.h"
+#include "common/config.h"
 
 #include <cmath>
 
 			int px_w = e.window.data1;
 			int px_h = e.window.data2;
 
-#if SDL_VERSION_ATLEAST(2,0,1)
+			// FIXME: disabled in Linux for runtime SDL 2.0.0 compatibility.
+#if SDL_VERSION_ATLEAST(2,0,1) && !defined(LOVE_LINUX)
 			SDL_Window *sdlwin = SDL_GetWindowFromID(e.window.windowID);
 			if (sdlwin)
 				SDL_GL_GetDrawableSize(sdlwin, &px_w, &px_h);

src/modules/filesystem/FileData.cpp

 
 #include "FileData.h"
 
-// STD
+// C++
 #include <iostream>
-#include <climits>
+#include <limits>
 
 namespace love
 {
 
 FileData::FileData(uint64 size, const std::string &filename)
 	: data(new char[(size_t) size])
-	, size(size)
+	, size((size_t) size)
 	, filename(filename)
 {
 	if (filename.rfind('.') != std::string::npos)
 	return (void *)data;
 }
 
-// TODO: Enable this
-/*uint64 FileData::getSize() const
+size_t FileData::getSize() const
 {
-	return size;
-}*/
-
-int FileData::getSize() const
-{
-	return size > INT_MAX ? INT_MAX : (int) size;
+	size_t sizemax = std::numeric_limits<size_t>::max();
+	return size > sizemax ? sizemax : (size_t) size;
 }
 
 const std::string &FileData::getFilename() const

src/modules/filesystem/FileData.h

 
 	// Implements Data.
 	void *getData() const;
-	//TODO: Enable this
-	//uint64 getSize() const;
-	int getSize() const;
+	size_t getSize() const;
 
 	const std::string &getFilename() const;
 	const std::string &getExtension() const;

src/modules/filesystem/physfs/Filesystem.cpp

 	return game_source.substr(0, base_end_pos);
 }
 
+std::string Filesystem::getRealDirectory(const char *filename) const
+{
+	const char *dir = PHYSFS_getRealDir(filename);
+
+	if (dir == nullptr)
+		throw love::Exception("File does not exist.");
+
+	return std::string(dir);
+}
+
 bool Filesystem::exists(const char *file) const
 {
 	return PHYSFS_exists(file);
 int Filesystem::getDirectoryItems(lua_State *L)
 {
 	const char *dir = luaL_checkstring(L, 1);
+	bool hascallback = !lua_isnoneornil(L, 2);
+
+	if (hascallback)
+		luaL_checktype(L, 2, LUA_TFUNCTION);
 
 	char **rc = PHYSFS_enumerateFiles(dir);
 	int index = 1;
 
 	for (char **i = rc; *i != 0; i++)
 	{
+		if (hascallback)
+		{
+			lua_pushvalue(L, 2);
+			lua_pushstring(L, *i);
+			lua_call(L, 1, 0);
+		}
+
 		lua_pushstring(L, *i);
 		lua_rawseti(L, -2, index);
 		index++;

src/modules/filesystem/physfs/Filesystem.h

 	std::string getSourceBaseDirectory() const;
 
 	/**
+	 * Gets the real directory path containing the file.
+	 **/
+	std::string getRealDirectory(const char *filename) const;
+
+	/**
 	 * Checks whether a file exists in the current search path
 	 * or not.
 	 * @param file The filename to check.

src/modules/filesystem/physfs/wrap_Filesystem.cpp

 
 	tokenized_name += library_extension();
 
-	void *handle = SDL_LoadObject((std::string(instance->getAppdataDirectory()) + LOVE_PATH_SEPARATOR LOVE_APPDATA_FOLDER LOVE_PATH_SEPARATOR + tokenized_name).c_str());
-	if (!handle && instance->isFused())
-		handle = SDL_LoadObject((std::string(instance->getSaveDirectory()) + LOVE_PATH_SEPARATOR + tokenized_name).c_str());
+	void *handle = nullptr;
+
+	// If the game is fused, try looking for the DLL in the game's read paths.
+	if (instance->isFused())
+	{
+		try
+		{
+			std::string dir = instance->getRealDirectory(tokenized_name.c_str());
+
+			// We don't want to look in the game's source, because it can be a
+			// zip sometimes and a folder other times.
+			if (dir.find(instance->getSource()) == std::string::npos)
+				handle = SDL_LoadObject((dir + LOVE_PATH_SEPARATOR + tokenized_name).c_str());
+		}
+		catch (love::Exception &)
+		{
+			// Nothing...
+		}
+	}
+
+	if (!handle)
+	{
+		std::string path = std::string(instance->getAppdataDirectory()) + LOVE_PATH_SEPARATOR LOVE_APPDATA_FOLDER LOVE_PATH_SEPARATOR + tokenized_name;
+		handle = SDL_LoadObject(path.c_str());
+	}
 
 	if (!handle)
 	{

src/modules/font/GlyphData.cpp

 	return (void *) data;
 }
 
-int GlyphData::getSize() const
+size_t GlyphData::getSize() const
 {
 	switch (format)
 	{
 	case GlyphData::FORMAT_LUMINANCE_ALPHA:
-		return getWidth() * getHeight() * 2;
+		return size_t(getWidth() * getHeight() * 2);
 		break;
 	case GlyphData::FORMAT_RGBA:
 	default:
-		return getWidth() * getHeight() * 4;
+		return size_t(getWidth() * getHeight() * 4);
 		break;
 	}
 

src/modules/font/GlyphData.h

 
 	// Implements Data.
 	void *getData() const;
-	int getSize() const;
+	size_t getSize() const;
 
 	/**
 	 * Gets the height of the glyph.

src/modules/font/freetype/TrueTypeRasterizer.cpp

 TrueTypeRasterizer::TrueTypeRasterizer(FT_Library library, Data *data, int size)
 	: data(data)
 {
-	if (FT_New_Memory_Face(library,
-	                      (const FT_Byte *)data->getData(), /* first byte in memory */
-	                      data->getSize(),                  /* size in bytes        */
-	                      0,                                /* face_index           */
-	                      &face))
-		throw love::Exception("TrueTypeFont Loading error: FT_New_Face failed (there is probably a problem with your font file)");
+	FT_Error err = FT_Err_Ok;
+	err = FT_New_Memory_Face(library,
+	                         (const FT_Byte *)data->getData(), /* first byte in memory */
+	                         data->getSize(),                  /* size in bytes        */
+	                         0,                                /* face_index           */
+	                         &face);
+
+	if (err != FT_Err_Ok)
+		throw love::Exception("TrueType Font Loading error: FT_New_Face failed: 0x%x (problem with font file?)", err);
 
 	FT_Set_Pixel_Sizes(face, size, size);
 
 	love::font::GlyphMetrics glyphMetrics = {};
 	FT_Glyph ftglyph;
 
+	FT_Error err = FT_Err_Ok;
+
 	// Initialize
-	if (FT_Load_Glyph(face, FT_Get_Char_Index(face, glyph), FT_LOAD_DEFAULT))
-		throw love::Exception("TrueTypeFont Loading error: FT_Load_Glyph failed");
+	err = FT_Load_Glyph(face, FT_Get_Char_Index(face, glyph), FT_LOAD_DEFAULT);
 
-	if (FT_Get_Glyph(face->glyph, &ftglyph))
-		throw love::Exception("TrueTypeFont Loading error: FT_Get_Glyph failed");
+	if (err != FT_Err_Ok)
+		throw love::Exception("TrueType Font Loading error: FT_Load_Glyph failed (0x%x)", err);
+
+	err = FT_Get_Glyph(face->glyph, &ftglyph);
+
+	if (err != FT_Err_Ok)
+		throw love::Exception("TrueType Font Loading error: FT_Get_Glyph failed (0x%x)", err);
 
 	FT_Glyph_To_Bitmap(&ftglyph, FT_RENDER_MODE_NORMAL, 0, 1);
 

src/modules/graphics/Graphics.cpp

 	{ "subtractive", Graphics::BLEND_SUBTRACTIVE },
 	{ "multiplicative", Graphics::BLEND_MULTIPLICATIVE },
 	{ "premultiplied", Graphics::BLEND_PREMULTIPLIED },
+	{ "screen", Graphics::BLEND_SCREEN },
 	{ "replace", Graphics::BLEND_REPLACE },
 };
 

src/modules/graphics/Graphics.h

 		BLEND_SUBTRACTIVE,
 		BLEND_MULTIPLICATIVE,
 		BLEND_PREMULTIPLIED,
+		BLEND_SCREEN,
 		BLEND_REPLACE,
 		BLEND_MAX_ENUM
 	};

src/modules/graphics/opengl/Graphics.cpp

 
 void Graphics::unSetMode()
 {
+	if (!isCreated())
+		return;
+
 	// Window re-creation may destroy the GL context, so we must save the state.
-	if (isCreated())
-		savedState = saveState();
+	savedState = saveState();
 
 	// Unload all volatile objects. These must be reloaded after the display
 	// mode change.
 	Volatile::unloadAll();
 
 	gl.deInitContext();
+
+	created = false;
 }
 
 static void APIENTRY debugCB(GLenum source, GLenum type, GLuint id, GLenum severity, GLsizei /*len*/, const GLchar *msg, GLvoid* /*usr*/)
 		state.srcRGB = state.srcA = GL_SRC_ALPHA;
 		state.dstRGB = state.dstA = GL_ONE;
 		break;
+	case BLEND_SCREEN:
+		state.srcRGB = state.srcA = GL_ONE;
+		state.dstRGB = state.dstA = GL_ONE_MINUS_SRC_COLOR;
+		break;
 	case BLEND_REPLACE:
 	default:
 		state.srcRGB = state.srcA = GL_ONE;
 			return BLEND_MULTIPLICATIVE;
 		else if (state.srcRGB == GL_ONE && state.dstRGB == GL_ONE_MINUS_SRC_ALPHA)
 			return BLEND_PREMULTIPLIED;
+		else if (state.srcRGB == GL_ONE && state.dstRGB == GL_ONE_MINUS_SRC_COLOR)
+			return BLEND_SCREEN;
 		else if (state.srcRGB == GL_ONE && state.dstRGB == GL_ZERO)
 			return BLEND_REPLACE;
 	}

src/modules/graphics/opengl/wrap_Mesh.cpp

 	{ "getVertexCount", w_Mesh_getVertexCount },
 	{ "setVertexMap", w_Mesh_setVertexMap },
 	{ "getVertexMap", w_Mesh_getVertexMap },
-	{ "setInstanceCount", w_Mesh_setInstanceCount },
-	{ "getInstanceCount", w_Mesh_getInstanceCount },
+
+	// Disabled for now, since implementation is incomplete and might change
+	// if/when VertexBuffers / custom vertex attributes are added.
+	// { "setInstanceCount", w_Mesh_setInstanceCount },
+	// { "getInstanceCount", w_Mesh_getInstanceCount },
+
 	{ "setTexture", w_Mesh_setTexture },
 	{ "getTexture", w_Mesh_getTexture },
 	{ "setDrawMode", w_Mesh_setDrawMode },

src/modules/image/CompressedData.cpp

 {
 }
 
-int CompressedData::getSize() const
+size_t CompressedData::getSize() const
 {
-	return int(dataSize);
+	return dataSize;
 }
 
 void *CompressedData::getData() const
 	return dataImages.size();
 }
 
-int CompressedData::getSize(int miplevel) const
+size_t CompressedData::getSize(int miplevel) const
 {
 	checkMipmapLevelExists(miplevel);
 
-	return int(dataImages[miplevel].size);
+	return dataImages[miplevel].size;
 }
 
 void *CompressedData::getData(int miplevel) const

src/modules/image/CompressedData.h

 
 	// Implements Data.
 	virtual void *getData() const;
-	virtual int getSize() const;
+	virtual size_t getSize() const;
 
 	/**
 	 * Gets the number of mipmaps in this Compressed Image Data.
 	/**
 	 * Gets the size in bytes of a sub-image at the specified mipmap level.
 	 **/
-	int getSize(int miplevel) const;
+	size_t getSize(int miplevel) const;
 
 	/**
 	 * Gets the byte data of a sub-image at the specified mipmap level.

src/modules/image/ImageData.cpp

 	delete mutex;
 }
 
-int ImageData::getSize() const
+size_t ImageData::getSize() const
 {
-	return getWidth()*getHeight()*sizeof(pixel);
+	return size_t(getWidth()*getHeight())*sizeof(pixel);
 }
 
 void *ImageData::getData() const

src/modules/image/ImageData.h

 
 	// Implements Data.
 	virtual void *getData() const;
-	virtual int getSize() const;
+	virtual size_t getSize() const;
 
 protected:
 

src/modules/math/MathModule.cpp

  **/
 float Math::gammaToLinear(float c) const
 {
-	if (c > 1.0)
-		return 1.0;
-	else if (c < 0.0)
-		return 0.0;
+	if (c > 1.0f)
+		return 1.0f;
+	else if (c < 0.0f)
+		return 0.0f;
 	else if (c <= 0.04045)
-		return c / 12.92;
+		return c / 12.92f;
 	else
-		return powf((c + 0.055) / 1.055, 2.4);
+		return powf((c + 0.055f) / 1.055f, 2.4f);
 }
 
 /**
  **/
 float Math::linearToGamma(float c) const
 {
-	if (c > 1.0)
-		return 1.0;
-	else if (c < 0.0)
-		return 0.0;
-	else if (c < 0.0031308)
-		return c * 12.92;
+	if (c > 1.0f)
+		return 1.0f;
+	else if (c < 0.0f)
+		return 0.0f;
+	else if (c < 0.0031308f)
+		return c * 12.92f;
 	else
-		return 1.055 * powf(c, 0.41666) - 0.055;
+		return 1.055f * powf(c, 0.41666f) - 0.055f;
 }
 
 } // math

src/modules/math/wrap_Math.cpp

 		for (int i = 1; i <= n && i <= 4; i++)
 		{
 			lua_rawgeti(L, 1, i);
-			color[i - 1] = (float) luaL_checknumber(L, -1) / 255.0;
+			color[i - 1] = (float) luaL_checknumber(L, -1) / 255.0f;
 			numcomponents++;
 		}
 
 		int n = lua_gettop(L);
 		for (int i = 1; i <= n && i <= 4; i++)
 		{
-			color[i - 1] = (float) luaL_checknumber(L, i) / 255.0;
+			color[i - 1] = (float) luaL_checknumber(L, i) / 255.0f;
 			numcomponents++;
 		}
 	}

src/modules/physics/box2d/Fixture.cpp

 	{
 		size_t bpos = (size_t)(lua_tointeger(L, i)-1);
 		if (bpos >= 16)
-			return luaL_error(L, "Values must be in range 1-16.");
+			luaL_error(L, "Values must be in range 1-16.");
 		b.set(bpos, true);
 	}
 

src/modules/sound/SoundData.cpp

 #include "SoundData.h"
 
 // C
-#include <climits>
 #include <cstdlib>
 #include <cstring>
 
-// STL
+// C++
+#include <limits>
 #include <iostream>
 #include <vector>
 
 	{
 		// Expand or allocate buffer. Note that realloc may move
 		// memory to other locations.
-		if (!data || bufferSize < (size_t) size + decoded)
+		if (!data || bufferSize < size + decoded)
 		{
-			while (bufferSize < (size_t) size + decoded)
+			while (bufferSize < size + decoded)
 				bufferSize <<= 1;
-			data = (int8 *) realloc(data, bufferSize);
+			data = (uint8 *) realloc(data, bufferSize);
 		}
 
 		if (!data)
 		// Copy memory into new part of memory.
 		memcpy(data + size, decoder->getBuffer(), decoded);
 
-		// Keep this up to date.
-		size += decoded;
-
 		// Overflow check.
-		if (size < 0)
+		if (size > std::numeric_limits<size_t>::max() - decoded)
 		{
 			free(data);
 			throw love::Exception("Not enough memory.");
 		}
 
+		// Keep this up to date.
+		size += decoded;
+
 		decoded = decoder->decode();
 	}
 
 	// Shrink buffer if necessary.
-	if (data && bufferSize > (size_t) size)
-		data = (int8 *) realloc(data, size);
+	if (data && bufferSize > size)
+		data = (uint8 *) realloc(data, size);
 
 	channels = decoder->getChannels();
 	bitDepth = decoder->getBitDepth();
 
 	double realsize = samples;
 	realsize *= (bitDepth / 8) * channels;
-	if (realsize > INT_MAX)
+	if (realsize > std::numeric_limits<size_t>::max())
 		throw love::Exception("Data is too big!");
 
-	data = (int8 *) malloc(size);
+	data = (uint8 *) malloc(size);
 	if (!data)
 		throw love::Exception("Not enough memory.");
 
 	if (newData)
 		memcpy(data, newData, size);
+	else
+		memset(data, bitDepth == 8 ? 128 : 0, size);
 }
 
 void *SoundData::getData() const
 	return (void *)data;
 }
 
-int SoundData::getSize() const
+size_t SoundData::getSize() const
 {
-	return (int)size;
+	return size;
 }
 
 int SoundData::getChannels() const
 void SoundData::setSample(int i, float sample)
 {
 	// Check range.
-	if (i < 0 || i >= size/(bitDepth/8))
+	if (i < 0 || (size_t) i >= size/(bitDepth/8))
 		throw love::Exception("Attempt to set out-of-range sample!");
 
 	if (bitDepth == 16)
 	{
+		// 16-bit sample values are signed.
 		int16 *s = (int16 *) data;
 		s[i] = (int16) (sample * (float) LOVE_INT16_MAX);
 	}
 	else
 	{
-		data[i] = (int8) (sample * (float) LOVE_INT8_MAX);
+		// 8-bit sample values are unsigned internally.
+		data[i] = (uint8) ((sample * 127.0f) + 128.0f);
 	}
 }
 
 float SoundData::getSample(int i) const
 {
 	// Check range.
-	if (i < 0 || i >= size/(bitDepth/8))
+	if (i < 0 || (size_t) i >= size/(bitDepth/8))
 		throw love::Exception("Attempt to get out-of-range sample!");
 
 	if (bitDepth == 16)
 	{
+		// 16-bit sample values are signed.
 		int16 *s = (int16 *) data;
 		return (float) s[i] / (float) LOVE_INT16_MAX;
 	}
 	else
 	{
-		return (float) data[i] / (float) LOVE_INT8_MAX;
+		// 8-bit sample values are unsigned internally.
+		return ((float) data[i] - 128.0f) / 127.0f;
 	}
 }
 

src/modules/sound/SoundData.h

 
 	// Implements Data.
 	void *getData() const;
-	int getSize() const;
+	size_t getSize() const;
 
 	virtual int getChannels() const;
 	virtual int getBitDepth() const;
 
 	void load(int samples, int sampleRate, int bitDepth, int channels, void *newData = 0);
 
-	int8 *data;
-	int size;
+	uint8 *data;
+	size_t size;
 
 	int sampleRate;
 	int bitDepth;

src/modules/system/System.cpp

  * 3. This notice may not be removed or altered from any source distribution.
  **/
 
+// LOVE
+#include "common/config.h"
 #include "System.h"
 
+#if defined(LOVE_MACOSX)
+#include <CoreServices/CoreServices.h>
+#elif defined(LOVE_LINUX)
+#include <stdlib.h>
+#include <unistd.h>
+#include <sys/wait.h>
+#elif defined(LOVE_WINDOWS)
+#include "common/utf8.h"
+#include <shlobj.h>
+#include <shellapi.h>
+#pragma comment(lib, "shell32.lib")
+#endif
+
 namespace love
 {
 namespace system
 
 std::string System::getOS() const
 {
-#ifdef LOVE_MACOSX
+#if defined(LOVE_MACOSX)
 	return "OS X";
-#elif LOVE_WINDOWS
+#elif defined(LOVE_WINDOWS)
 	return "Windows";
-#elif LOVE_LINUX
+#elif defined(LOVE_LINUX)
 	return "Linux";
 #else
 	return "Unknown";
 #endif
 }
 
+bool System::openURL(const std::string &url) const
+{
+	bool success = false;
+
+#if defined(LOVE_MACOSX)
+
+	// We could be lazy and use system("open " + url), but this is safer.
+	CFURLRef cfurl = CFURLCreateWithBytes(nullptr,
+	                                      (const UInt8 *) url.c_str(),
+	                                      url.length(),
+	                                      kCFStringEncodingUTF8,
+	                                      nullptr);
+
+	success = LSOpenCFURLRef(cfurl, nullptr) == noErr;
+	CFRelease(cfurl);
+
+#elif defined(LOVE_LINUX)
+
+	// Spawn a child process, which we'll replace with xdg-open.
+	pid_t pid = vfork();
+
+	if (pid == 0) // Child process.
+	{
+		// Replace the child process with xdg-open and pass in the URL.
+		execlp("xdg-open", "xdg-open", url.c_str(), nullptr);
+
+		// exec will only return if it errored, so we should exit with non-zero.
+		_exit(1);
+	}
+	else if (pid > 0) // Parent process.
+	{
+		// Wait for xdg-open to complete (or fail.)
+		int status = 0;
+		if (waitpid(pid, &status, 0) == pid)
+			success = (status == 0);
+		else
+			success = false;
+	}
+	else
+	{
+		// vfork() failed.
+		success = false;
+	}
+
+#elif defined(LOVE_WINDOWS)
+
+	// Unicode-aware WinAPI functions don't accept UTF-8, so we need to convert.
+	std::wstring wurl = to_widestr(url);
+
+	HINSTANCE result = ShellExecuteW(nullptr,
+	                                 L"open",
+	                                 wurl.c_str(),
+	                                 nullptr,
+	                                 nullptr,
+	                                 SW_SHOW);
+
+	success = (int) result > 32;
+
+#endif
+
+	return success;
+}
+
 bool System::getConstant(const char *in, System::PowerState &out)
 {
 	return powerStates.find(in, out);

src/modules/system/System.h

 	 **/
 	virtual PowerState getPowerInfo(int &seconds, int &percent) const = 0;
 
+	/**
+	 * Opens the specified URL with the user's default program to handle that
+	 * particular URL type.
+	 *
+	 * @param url The URL to open.
+	 *
+	 * @return Whether the URL was opened successfully.
+	 **/
+	virtual bool openURL(const std::string &url) const;
+
 	static bool getConstant(const char *in, PowerState &out);
 	static bool getConstant(PowerState in, const char *&out);
 

src/modules/system/wrap_System.cpp

 	return 3;
 }
 
+int w_openURL(lua_State *L)
+{
+	std::string url = luax_checkstring(L, 1);
+	luax_pushboolean(L, instance->openURL(url));
+	return 1;
+}
+
 static const luaL_Reg functions[] =
 {
 	{ "getOS", w_getOS },
 	{ "setClipboardText", w_setClipboardText },
 	{ "getClipboardText", w_getClipboardText },
 	{ "getPowerInfo", w_getPowerInfo },
+	{ "openURL", w_openURL },
 	{ 0, 0 }
 };
 

src/modules/system/wrap_System.h

 int w_setClipboardText(lua_State *L);
 int w_getClipboardText(lua_State *L);
 int w_getPowerInfo(lua_State *L);
+int w_openURL(lua_State *L);
 extern "C" LOVE_EXPORT int luaopen_love_system(lua_State *L);
 
 } // system

src/modules/window/sdl/Window.cpp

 
 bool Window::setWindow(int width, int height, WindowSettings *settings)
 {
-	graphics::Graphics *gfx = (graphics::Graphics *) Module::findInstance("love.graphics.");
-	if (gfx != nullptr)
-		gfx->unSetMode();
-
 	WindowSettings f;
 
 	if (settings)
 	if (f.borderless)
 		sdlflags |= SDL_WINDOW_BORDERLESS;
 
-#if SDL_VERSION_ATLEAST(2,0,1)
+	// FIXME: disabled in Linux for runtime SDL 2.0.0 compatibility.
+#if SDL_VERSION_ATLEAST(2,0,1) && !defined(LOVE_LINUX)
 	if (f.highdpi)
 		sdlflags |= SDL_WINDOW_ALLOW_HIGHDPI;
 #endif
 
+	graphics::Graphics *gfx = (graphics::Graphics *) Module::findInstance("love.graphics.");
+	if (gfx != nullptr)
+		gfx->unSetMode();
+
 	// Destroy and recreate the window if the dimensions or flags have changed.
 	if (window)
 	{
 		Uint32 testflags = SDL_WINDOW_OPENGL | SDL_WINDOW_FULLSCREEN_DESKTOP
 			| SDL_WINDOW_RESIZABLE | SDL_WINDOW_BORDERLESS;
 
-#if SDL_VERSION_ATLEAST(2,0,1)
+		// FIXME: disabled in Linux for runtime SDL 2.0.0 compatibility.
+#if SDL_VERSION_ATLEAST(2,0,1) && !defined(LOVE_LINUX)
 		testflags |= SDL_WINDOW_ALLOW_HIGHDPI;
 #endif
 
 
 	if (!window)
 	{
+		created = false;
+
 		// In Windows and Linux, some GL attributes are set on window creation.
 		setWindowGLAttributes(f.fsaa, f.sRGB);
 
 		int width = curMode.width;
 		int height = curMode.height;
 
-#if SDL_VERSION_ATLEAST(2,0,1)
+		// FIXME: disabled in Linux for runtime SDL 2.0.0 compatibility.
+#if SDL_VERSION_ATLEAST(2,0,1) && !defined(LOVE_LINUX)
 		SDL_GL_GetDrawableSize(window, &width, &height);
 #endif
 
 			int width = curMode.width;
 			int height = curMode.height;
 
-#if SDL_VERSION_ATLEAST(2,0,1)
+			// FIXME: disabled in Linux for runtime SDL 2.0.0 compatibility.
+#if SDL_VERSION_ATLEAST(2,0,1) && !defined(LOVE_LINUX)
 			SDL_GL_GetDrawableSize(window, &width, &height);
 #endif
 
 {
 	double scale = 1.0;
 
-#if SDL_VERSION_ATLEAST(2,0,1)
+	// FIXME: disabled in Linux for runtime SDL 2.0.0 compatibility.
+#if SDL_VERSION_ATLEAST(2,0,1) && !defined(LOVE_LINUX)
 	if (window)
 	{
 		int wheight;

src/scripts/auto.lua

 {
 %s
 }; // [%s]
-} // love]]
+} // love
+]]
 --formatting parameters:
 -- - input file name
 -- - c variable name

src/scripts/boot.lua

 
 	if love.math then
 		love.math.setRandomSeed(os.time())
+		for i=1,3 do love.math.random() end
 	end
 
 	if love.event then

src/scripts/boot.lua.h

 	0x09, 0x69, 0x66, 0x20, 0x6c, 0x6f, 0x76, 0x65, 0x2e, 0x6d, 0x61, 0x74, 0x68, 0x20, 0x74, 0x68, 0x65, 0x6e, 0x0a,
 	0x09, 0x09, 0x6c, 0x6f, 0x76, 0x65, 0x2e, 0x6d, 0x61, 0x74, 0x68, 0x2e, 0x73, 0x65, 0x74, 0x52, 0x61, 0x6e, 
 	0x64, 0x6f, 0x6d, 0x53, 0x65, 0x65, 0x64, 0x28, 0x6f, 0x73, 0x2e, 0x74, 0x69, 0x6d, 0x65, 0x28, 0x29, 0x29, 0x0a,
+	0x09, 0x09, 0x66, 0x6f, 0x72, 0x20, 0x69, 0x3d, 0x31, 0x2c, 0x33, 0x20, 0x64, 0x6f, 0x20, 0x6c, 0x6f, 0x76, 
+	0x65, 0x2e, 0x6d, 0x61, 0x74, 0x68, 0x2e, 0x72, 0x61, 0x6e, 0x64, 0x6f, 0x6d, 0x28, 0x29, 0x20, 0x65, 0x6e, 
+	0x64, 0x0a,
 	0x09, 0x65, 0x6e, 0x64, 0x0a,
 	0x09, 0x69, 0x66, 0x20, 0x6c, 0x6f, 0x76, 0x65, 0x2e, 0x65, 0x76, 0x65, 0x6e, 0x74, 0x20, 0x74, 0x68, 0x65, 
 	0x6e, 0x0a,
 	0x65, 0x74, 0x76, 0x61, 0x6c, 0x29, 0x20, 0x6f, 0x72, 0x20, 0x30, 0x0a,
 	0x65, 0x6e, 0x64, 0x0a,
 }; // [boot.lua]
-} // love
+} // love

src/scripts/graphics.lua

 #define VaryingTexCoord gl_TexCoord[0]
 #define VaryingColor gl_FrontColor
 
-#if defined(GL_ARB_draw_instanced)
-	#extension GL_ARB_draw_instanced : enable
-	#define love_InstanceID gl_InstanceIDARB
-#else
-	attribute float love_PseudoInstanceID;
-	int love_InstanceID = int(love_PseudoInstanceID);
-#endif]],
+// #if defined(GL_ARB_draw_instanced)
+//	#extension GL_ARB_draw_instanced : enable
+//	#define love_InstanceID gl_InstanceIDARB
+// #else
+//	attribute float love_PseudoInstanceID;
+//	int love_InstanceID = int(love_PseudoInstanceID);
+// #endif
+]],
 
 		FOOTER = [[
 void main() {

src/scripts/graphics.lua.h

 	0x30, 0x5d, 0x0a,
 	0x23, 0x64, 0x65, 0x66, 0x69, 0x6e, 0x65, 0x20, 0x56, 0x61, 0x72, 0x79, 0x69, 0x6e, 0x67, 0x43, 0x6f, 0x6c, 
 	0x6f, 0x72, 0x20, 0x67, 0x6c, 0x5f, 0x46, 0x72, 0x6f, 0x6e, 0x74, 0x43, 0x6f, 0x6c, 0x6f, 0x72, 0x0a,
-	0x23, 0x69, 0x66, 0x20, 0x64, 0x65, 0x66, 0x69, 0x6e, 0x65, 0x64, 0x28, 0x47, 0x4c, 0x5f, 0x41, 0x52, 0x42, 
-	0x5f, 0x64, 0x72, 0x61, 0x77, 0x5f, 0x69, 0x6e, 0x73, 0x74, 0x61, 0x6e, 0x63, 0x65, 0x64, 0x29, 0x0a,
-	0x09, 0x23, 0x65, 0x78, 0x74, 0x65, 0x6e, 0x73, 0x69, 0x6f, 0x6e, 0x20, 0x47, 0x4c, 0x5f, 0x41, 0x52, 0x42, 
-	0x5f, 0x64, 0x72, 0x61, 0x77, 0x5f, 0x69, 0x6e, 0x73, 0x74, 0x61, 0x6e, 0x63, 0x65, 0x64, 0x20, 0x3a, 0x20, 
-	0x65, 0x6e, 0x61, 0x62, 0x6c, 0x65, 0x0a,
-	0x09, 0x23, 0x64, 0x65, 0x66, 0x69, 0x6e, 0x65, 0x20, 0x6c, 0x6f, 0x76, 0x65, 0x5f, 0x49, 0x6e, 0x73, 0x74, 
-	0x61, 0x6e, 0x63, 0x65, 0x49, 0x44, 0x20, 0x67, 0x6c, 0x5f, 0x49, 0x6e, 0x73, 0x74, 0x61, 0x6e, 0x63, 0x65, 
-	0x49, 0x44, 0x41, 0x52, 0x42, 0x0a,
-	0x23, 0x65, 0x6c, 0x73, 0x65, 0x0a,
-	0x09, 0x61, 0x74, 0x74, 0x72, 0x69, 0x62, 0x75, 0x74, 0x65, 0x20, 0x66, 0x6c, 0x6f, 0x61, 0x74, 0x20, 0x6c, 
-	0x6f, 0x76, 0x65, 0x5f, 0x50, 0x73, 0x65, 0x75, 0x64, 0x6f, 0x49, 0x6e, 0x73, 0x74, 0x61, 0x6e, 0x63, 0x65, 
-	0x49, 0x44, 0x3b, 0x0a,
-	0x09, 0x69, 0x6e, 0x74, 0x20, 0x6c, 0x6f, 0x76, 0x65, 0x5f, 0x49, 0x6e, 0x73, 0x74, 0x61, 0x6e, 0x63, 0x65, 
-	0x49, 0x44, 0x20, 0x3d, 0x20, 0x69, 0x6e, 0x74, 0x28, 0x6c, 0x6f, 0x76, 0x65, 0x5f, 0x50, 0x73, 0x65, 0x75, 
-	0x64, 0x6f, 0x49, 0x6e, 0x73, 0x74, 0x61, 0x6e, 0x63, 0x65, 0x49, 0x44, 0x29, 0x3b, 0x0a,
-	0x23, 0x65, 0x6e, 0x64, 0x69, 0x66, 0x5d, 0x5d, 0x2c, 0x0a,
+	0x2f, 0x2f, 0x20, 0x23, 0x69, 0x66, 0x20, 0x64, 0x65, 0x66, 0x69, 0x6e, 0x65, 0x64, 0x28, 0x47, 0x4c, 0x5f, 
+	0x41, 0x52, 0x42, 0x5f, 0x64, 0x72, 0x61, 0x77, 0x5f, 0x69, 0x6e, 0x73, 0x74, 0x61, 0x6e, 0x63, 0x65, 0x64, 
+	0x29, 0x0a,
+	0x2f, 0x2f, 0x09, 0x23, 0x65, 0x78, 0x74, 0x65, 0x6e, 0x73, 0x69, 0x6f, 0x6e, 0x20, 0x47, 0x4c, 0x5f, 0x41, 
+	0x52, 0x42, 0x5f, 0x64, 0x72, 0x61, 0x77, 0x5f, 0x69, 0x6e, 0x73, 0x74, 0x61, 0x6e, 0x63, 0x65, 0x64, 0x20, 
+	0x3a, 0x20, 0x65, 0x6e, 0x61, 0x62, 0x6c, 0x65, 0x0a,
+	0x2f, 0x2f, 0x09, 0x23, 0x64, 0x65, 0x66, 0x69, 0x6e, 0x65, 0x20, 0x6c, 0x6f, 0x76, 0x65, 0x5f, 0x49, 0x6e, 
+	0x73, 0x74, 0x61, 0x6e, 0x63, 0x65, 0x49, 0x44, 0x20, 0x67, 0x6c, 0x5f, 0x49, 0x6e, 0x73, 0x74, 0x61, 0x6e, 
+	0x63, 0x65, 0x49, 0x44, 0x41, 0x52, 0x42, 0x0a,
+	0x2f, 0x2f, 0x20, 0x23, 0x65, 0x6c, 0x73, 0x65, 0x0a,
+	0x2f, 0x2f, 0x09, 0x61, 0x74, 0x74, 0x72, 0x69, 0x62, 0x75, 0x74, 0x65, 0x20, 0x66, 0x6c, 0x6f, 0x61, 0x74, 
+	0x20, 0x6c, 0x6f, 0x76, 0x65, 0x5f, 0x50, 0x73, 0x65, 0x75, 0x64, 0x6f, 0x49, 0x6e, 0x73, 0x74, 0x61, 0x6e, 
+	0x63, 0x65, 0x49, 0x44, 0x3b, 0x0a,
+	0x2f, 0x2f, 0x09, 0x69, 0x6e, 0x74, 0x20, 0x6c, 0x6f, 0x76, 0x65, 0x5f, 0x49, 0x6e, 0x73, 0x74, 0x61, 0x6e, 
+	0x63, 0x65, 0x49, 0x44, 0x20, 0x3d, 0x20, 0x69, 0x6e, 0x74, 0x28, 0x6c, 0x6f, 0x76, 0x65, 0x5f, 0x50, 0x73, 
+	0x65, 0x75, 0x64, 0x6f, 0x49, 0x6e, 0x73, 0x74, 0x61, 0x6e, 0x63, 0x65, 0x49, 0x44, 0x29, 0x3b, 0x0a,
+	0x2f, 0x2f, 0x20, 0x23, 0x65, 0x6e, 0x64, 0x69, 0x66, 0x0a,
+	0x5d, 0x5d, 0x2c, 0x0a,
 	0x09, 0x09, 0x46, 0x4f, 0x4f, 0x54, 0x45, 0x52, 0x20, 0x3d, 0x20, 0x5b, 0x5b, 0x0a,
 	0x76, 0x6f, 0x69, 0x64, 0x20, 0x6d, 0x61, 0x69, 0x6e, 0x28, 0x29, 0x20, 0x7b, 0x0a,
 	0x09, 0x56, 0x61, 0x72, 0x79, 0x69, 0x6e, 0x67, 0x54, 0x65, 0x78, 0x43, 0x6f, 0x6f, 0x72, 0x64, 0x20, 0x3d, 
 	0x09, 0x65, 0x6e, 0x64, 0x0a,
 	0x65, 0x6e, 0x64, 0x0a,
 }; // [graphics.lua]
-} // love
+} // love