Browse Source

Merged default into minor.

--HG--
branch : minor
Alex Szpakowski 9 years ago
parent
commit
50087bd60e
100 changed files with 3529 additions and 875 deletions
  1. 54 31
      .hgignore
  2. 1 0
      .hgtags
  3. 76 15
      CMakeLists.txt
  4. 140 25
      changes.txt
  5. 43 0
      extra/appveyor/appveyor.yml
  6. BIN
      extra/windows/love.rc
  7. 5 4
      license.txt
  8. 1 1
      platform/unix/Makefile.am
  9. 14 22
      platform/unix/configure.ac
  10. 69 0
      platform/unix/cpp11.m4
  11. 1 1
      platform/unix/debian/changelog.in
  12. 22 32
      platform/unix/debian/control.in
  13. 25 18
      platform/unix/debian/copyright
  14. 1 0
      platform/unix/debian/liblove-unstable0.docs
  15. 1 0
      platform/unix/debian/liblove-unstable0.install
  16. 1 0
      platform/unix/debian/liblove0.docs
  17. 1 0
      platform/unix/debian/liblove0.install
  18. 1 0
      platform/unix/debian/love-unstable.manpages
  19. 5 6
      platform/unix/debian/love.install
  20. 1 1
      platform/unix/debian/love.manpages
  21. 22 7
      platform/unix/debian/rules.in
  22. 4 5
      platform/unix/genmodules
  23. 0 36
      platform/unix/love.1
  24. 33 0
      platform/unix/love.6
  25. 0 5
      platform/unix/postinst
  26. 0 4
      platform/unix/postrm
  27. 4 4
      platform/xcode/ios/Images.xcassets/AppIcon.appiconset/Contents.json
  28. BIN
      platform/xcode/ios/Images.xcassets/AppIcon.appiconset/[email protected]
  29. BIN
      platform/xcode/ios/Images.xcassets/AppIcon.appiconset/[email protected]
  30. 2 28
      platform/xcode/ios/Launch Screen.xib
  31. 2 2
      platform/xcode/ios/love-ios.plist
  32. 52 0
      platform/xcode/ios/luajit-iOS.sh
  33. 295 97
      platform/xcode/liblove.xcodeproj/project.pbxproj
  34. 54 24
      platform/xcode/love.xcodeproj/project.pbxproj
  35. 2 4
      platform/xcode/macosx/liblove-macosx.plist
  36. 5 3
      platform/xcode/macosx/love-macosx.plist
  37. 67 0
      readme-iOS.rtf
  38. 26 4
      readme.md
  39. 1 1
      src/common/Data.h
  40. 1 1
      src/common/EnumMap.h
  41. 6 2
      src/common/Exception.cpp
  42. 2 2
      src/common/Exception.h
  43. 146 26
      src/common/Matrix.cpp
  44. 101 13
      src/common/Matrix.h
  45. 1 1
      src/common/Memoizer.cpp
  46. 1 1
      src/common/Memoizer.h
  47. 1 1
      src/common/Module.cpp
  48. 2 1
      src/common/Module.h
  49. 1 1
      src/common/Object.cpp
  50. 12 2
      src/common/Object.h
  51. 15 27
      src/common/Reference.cpp
  52. 8 27
      src/common/Reference.h
  53. 64 0
      src/common/Stream.h
  54. 1 1
      src/common/StringMap.h
  55. 6 8
      src/common/Variant.cpp
  56. 2 2
      src/common/Variant.h
  57. 1 1
      src/common/Vector.cpp
  58. 1 1
      src/common/Vector.h
  59. 231 0
      src/common/android.cpp
  60. 73 0
      src/common/android.h
  61. 1 1
      src/common/b64.cpp
  62. 1 1
      src/common/b64.h
  63. 25 6
      src/common/config.h
  64. 1 1
      src/common/delay.cpp
  65. 1 1
      src/common/delay.h
  66. 4 4
      src/common/int.h
  67. 11 1
      src/common/ios.h
  68. 64 34
      src/common/ios.mm
  69. 13 3
      src/common/macosx.h
  70. 24 4
      src/common/macosx.mm
  71. 1 1
      src/common/math.h
  72. 138 50
      src/common/runtime.cpp
  73. 53 18
      src/common/runtime.h
  74. 18 92
      src/common/types.cpp
  75. 11 4
      src/common/types.h
  76. 1 1
      src/common/utf8.cpp
  77. 1 1
      src/common/utf8.h
  78. 5 5
      src/common/version.h
  79. 2 2
      src/common/wrap_Data.cpp
  80. 2 4
      src/common/wrap_Data.h
  81. 6 3
      src/libraries/Box2D/Collision/Shapes/b2ChainShape.cpp
  82. 3 0
      src/libraries/Box2D/Collision/Shapes/b2ChainShape.h
  83. 9 1
      src/libraries/Box2D/Collision/Shapes/b2PolygonShape.cpp
  84. 1 0
      src/libraries/Box2D/Common/b2BlockAllocator.cpp
  85. 3 3
      src/libraries/Box2D/Common/b2Draw.h
  86. 0 1
      src/libraries/Box2D/Common/b2Math.h
  87. 1 1
      src/libraries/Box2D/Common/b2Settings.cpp
  88. 23 18
      src/libraries/Box2D/Dynamics/Contacts/b2ContactSolver.cpp
  89. 3 0
      src/libraries/Box2D/Dynamics/Joints/b2PrismaticJoint.cpp
  90. 17 1
      src/libraries/Box2D/Dynamics/Joints/b2WeldJoint.cpp
  91. 2 3
      src/libraries/Box2D/Dynamics/Joints/b2WheelJoint.h
  92. 19 19
      src/libraries/Box2D/Dynamics/b2World.cpp
  93. 1 1
      src/libraries/Box2D/Dynamics/b2World.h
  94. 32 28
      src/libraries/enet/enet.cpp
  95. 1 1
      src/libraries/enet/lua-enet.h
  96. 496 8
      src/libraries/glad/glad.cpp
  97. 594 29
      src/libraries/glad/glad.hpp
  98. 228 24
      src/libraries/glad/gladfuncs.hpp
  99. 3 1
      src/libraries/luasocket/libluasocket/except.c
  100. 3 1
      src/libraries/luasocket/libluasocket/inet.c

+ 54 - 31
.hgignore

@@ -1,34 +1,57 @@
-glob:extra/reshax/Release/
-glob:extra/reshax/Debug/
-glob:extra/reshax/resources.h
-glob:extra/reshax/resources.cpp
-glob:*.obj
-glob:*.o
-glob:*.dirstamp
-glob:*.m4
-glob:*.Po
-glob:*.lo
-glob:*.Plo
-glob:*.dll
-glob:*.user
-glob:*.suo
-glob:*/Release*
-glob:*/Debug*
-glob:*.lib
-glob:*.ncb
-glob:*.exe
-glob:*.bat
+glob:extra/reshax/Release/
+glob:extra/reshax/Debug/
+glob:extra/reshax/resources.h
+glob:extra/reshax/resources.cpp
+glob:*.obj
+glob:*.o
+glob:*.dirstamp
+glob:*.m4
+glob:*.Po
+glob:*.lo
+glob:*.Plo
+glob:*.dll
+glob:*.user
+glob:*.suo
+glob:*/Release*
+glob:*/Debug*
+glob:*.lib
+glob:*.ncb
+glob:*.exe
+glob:*.bat
 glob:platform/xcode/Build
 glob:platform/xcode/DerivedData
 glob:platform/xcode/ios/include
-glob:platform/xcode/ios/libraries
-glob:*xcuserdata*
-glob:*.DS_Store
-glob:*.dylib
-glob:*.dmg*
-glob:demos
-glob:*.orig
-glob:.*.swp
-glob:autom4te.cache/
-glob:src/.libs/
-glob:*~
+glob:platform/xcode/ios/libraries
+glob:*xcuserdata*
+glob:*.DS_Store
+glob:*.dylib
+glob:*.dmg*
+glob:demos
+glob:*.orig
+glob:.*.swp
+glob:autom4te.cache/
+glob:src/.libs/
+glob:*~
+glob:Makefile*
+glob:config*
+glob:libtool
+glob:platform/unix/ar-lib
+glob:platform/unix/compile
+glob:platform/unix/config.guess
+glob:platform/unix/config.sub
+glob:platform/unix/debian/changelog
+glob:platform/unix/debian/control
+glob:platform/unix/debian/rules
+glob:platform/unix/depcomp
+glob:platform/unix/install-sh
+glob:platform/unix/love.desktop
+glob:platform/unix/ltmain.sh
+glob:platform/unix/missing
+glob:.lineno
+glob:*.la
+glob:*.Tpo
+glob:*.rej
+glob:*/.deps
+glob:stamp-h1
+glob:src/love
+glob:src/tags

+ 1 - 0
.hgtags

@@ -8,3 +8,4 @@ e0f98d53debb62347c6433ca0534a0f77f15f76f 0.8.0
 38c00c788bcb03bda2ad40efebcdfe7a6be85b4a 0.9.0
 8b113c345e97e7bb7e963e5d67451abdfb05cfde 0.9.1
 a5e405cdf14d030b71d09a105086797942ae91a9 0.9.2
+14717f0fb5d96d380c10fe6f41b74b7652c7d836 0.10.0

+ 76 - 15
CMakeLists.txt

@@ -1,5 +1,5 @@
 #
-# Copyright (c) 2006-2015 LOVE Development Team
+# Copyright (c) 2006-2016 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
@@ -235,6 +235,8 @@ set(LOVE_SRC_MODULE_FONT_ROOT
 	src/modules/font/ImageRasterizer.h
 	src/modules/font/Rasterizer.cpp
 	src/modules/font/Rasterizer.h
+	src/modules/font/TrueTypeRasterizer.cpp
+	src/modules/font/TrueTypeRasterizer.h
 	src/modules/font/wrap_Font.cpp
 	src/modules/font/wrap_Font.h
 	src/modules/font/wrap_GlyphData.cpp
@@ -267,6 +269,8 @@ set(LOVE_SRC_MODULE_GRAPHICS_ROOT
 	src/modules/graphics/Drawable.h
 	src/modules/graphics/Graphics.cpp
 	src/modules/graphics/Graphics.h
+	src/modules/graphics/ParticleSystem.cpp
+	src/modules/graphics/ParticleSystem.h
 	src/modules/graphics/Quad.cpp
 	src/modules/graphics/Quad.h
 	src/modules/graphics/Texture.cpp
@@ -284,6 +288,8 @@ set(LOVE_SRC_MODULE_GRAPHICS_OPENGL
 	src/modules/graphics/opengl/Canvas.h
 	src/modules/graphics/opengl/Font.cpp
 	src/modules/graphics/opengl/Font.h
+	src/modules/graphics/opengl/GLBuffer.cpp
+	src/modules/graphics/opengl/GLBuffer.h
 	src/modules/graphics/opengl/Graphics.cpp
 	src/modules/graphics/opengl/Graphics.h
 	src/modules/graphics/opengl/Image.cpp
@@ -302,8 +308,8 @@ set(LOVE_SRC_MODULE_GRAPHICS_OPENGL
 	src/modules/graphics/opengl/SpriteBatch.h
 	src/modules/graphics/opengl/Text.cpp
 	src/modules/graphics/opengl/Text.h
-	src/modules/graphics/opengl/VertexBuffer.cpp
-	src/modules/graphics/opengl/VertexBuffer.h
+	src/modules/graphics/opengl/Video.cpp
+	src/modules/graphics/opengl/Video.h
 	src/modules/graphics/opengl/wrap_Canvas.cpp
 	src/modules/graphics/opengl/wrap_Canvas.h
 	src/modules/graphics/opengl/wrap_Font.cpp
@@ -322,6 +328,8 @@ set(LOVE_SRC_MODULE_GRAPHICS_OPENGL
 	src/modules/graphics/opengl/wrap_SpriteBatch.h
 	src/modules/graphics/opengl/wrap_Text.cpp
 	src/modules/graphics/opengl/wrap_Text.h
+	src/modules/graphics/opengl/wrap_Video.cpp
+	src/modules/graphics/opengl/wrap_Video.h
 )
 
 set(LOVE_SRC_MODULE_GRAPHICS
@@ -337,13 +345,13 @@ source_group("modules\\graphics\\opengl" FILES ${LOVE_SRC_MODULE_GRAPHICS_OPENGL
 #
 
 set(LOVE_SRC_MODULE_IMAGE_ROOT
-	src/modules/image/CompressedData.cpp
-	src/modules/image/CompressedData.h
+	src/modules/image/CompressedImageData.cpp
+	src/modules/image/CompressedImageData.h
 	src/modules/image/Image.h
 	src/modules/image/ImageData.cpp
 	src/modules/image/ImageData.h
-	src/modules/image/wrap_CompressedData.cpp
-	src/modules/image/wrap_CompressedData.h
+	src/modules/image/wrap_CompressedImageData.cpp
+	src/modules/image/wrap_CompressedImageData.h
 	src/modules/image/wrap_Image.cpp
 	src/modules/image/wrap_Image.h
 	src/modules/image/wrap_ImageData.cpp
@@ -351,8 +359,10 @@ set(LOVE_SRC_MODULE_IMAGE_ROOT
 )
 
 set(LOVE_SRC_MODULE_IMAGE_MAGPIE
-	src/modules/image/magpie/CompressedData.cpp
-	src/modules/image/magpie/CompressedData.h
+	src/modules/image/magpie/ASTCHandler.cpp
+	src/modules/image/magpie/ASTCHandler.h
+	src/modules/image/magpie/CompressedImageData.cpp
+	src/modules/image/magpie/CompressedImageData.h
 	src/modules/image/magpie/CompressedFormatHandler.h
 	src/modules/image/magpie/ddsHandler.cpp
 	src/modules/image/magpie/ddsHandler.h
@@ -362,8 +372,6 @@ set(LOVE_SRC_MODULE_IMAGE_MAGPIE
 	src/modules/image/magpie/Image.h
 	src/modules/image/magpie/ImageData.cpp
 	src/modules/image/magpie/ImageData.h
-	src/modules/image/magpie/JPEGHandler.cpp
-	src/modules/image/magpie/JPEGHandler.h
 	src/modules/image/magpie/KTXHandler.cpp
 	src/modules/image/magpie/KTXHandler.h
 	src/modules/image/magpie/PKMHandler.cpp
@@ -444,12 +452,18 @@ source_group("modules\\keyboard\\sdl" FILES ${LOVE_SRC_MODULE_KEYBOARD_SDL})
 set(LOVE_SRC_MODULE_MATH
 	src/modules/math/BezierCurve.cpp
 	src/modules/math/BezierCurve.h
+	src/modules/math/CompressedData.cpp
+	src/modules/math/CompressedData.h
+	src/modules/math/Compressor.cpp
+	src/modules/math/Compressor.h
 	src/modules/math/MathModule.cpp
 	src/modules/math/MathModule.h
 	src/modules/math/RandomGenerator.cpp
 	src/modules/math/RandomGenerator.h
 	src/modules/math/wrap_BezierCurve.cpp
 	src/modules/math/wrap_BezierCurve.h
+	src/modules/math/wrap_CompressedData.cpp
+	src/modules/math/wrap_CompressedData.h
 	src/modules/math/wrap_Math.cpp
 	src/modules/math/wrap_Math.h
 	src/modules/math/wrap_RandomGenerator.cpp
@@ -475,7 +489,6 @@ source_group("modules\\love" FILES ${LOVE_SRC_MODULE_LOVE})
 set(LOVE_SRC_MODULE_MOUSE_ROOT
 	src/modules/mouse/Cursor.cpp
 	src/modules/mouse/Cursor.h
-	src/modules/mouse/Mouse.cpp
 	src/modules/mouse/Mouse.h
 	src/modules/mouse/wrap_Cursor.cpp
 	src/modules/mouse/wrap_Cursor.h
@@ -727,6 +740,7 @@ source_group("modules\\thread\\sdl" FILES ${LOVE_SRC_MODULE_THREAD_SDL})
 #
 
 set(LOVE_SRC_MODULE_TIMER_ROOT
+	src/modules/timer/Timer.cpp
 	src/modules/timer/Timer.h
 	src/modules/timer/wrap_Timer.cpp
 	src/modules/timer/wrap_Timer.h
@@ -768,6 +782,35 @@ set(LOVE_SRC_MODULE_TOUCH
 source_group("modules\\touch" FILES ${LOVE_SRC_MODULE_TOUCH_ROOT})
 source_group("modules\\touch\\sdl" FILES ${LOVE_SRC_MODULE_TOUCH_SDL})
 
+#
+# love.video
+#
+
+set(LOVE_SRC_MODULE_VIDEO_ROOT
+	src/modules/video/Video.h
+	src/modules/video/VideoStream.cpp
+	src/modules/video/VideoStream.h
+	src/modules/video/wrap_Video.cpp
+	src/modules/video/wrap_Video.h
+	src/modules/video/wrap_VideoStream.cpp
+	src/modules/video/wrap_VideoStream.h
+)
+
+set(LOVE_SRC_MODULE_VIDEO_THEORA
+	src/modules/video/theora/Video.cpp
+	src/modules/video/theora/Video.h
+	src/modules/video/theora/VideoStream.cpp
+	src/modules/video/theora/VideoStream.h
+)
+
+set(LOVE_SRC_MODULE_VIDEO
+	${LOVE_SRC_MODULE_VIDEO_ROOT}
+	${LOVE_SRC_MODULE_VIDEO_THEORA}
+)
+
+source_group("modules\\video" FILES ${LOVE_SRC_MODULE_VIDEO_ROOT})
+source_group("modules\\video\\theora" FILES ${LOVE_SRC_MODULE_VIDEO_THEORA})
+
 #
 # love.window
 #
@@ -1072,6 +1115,7 @@ target_link_libraries(love_3p_luasocket ${MEGA_LUA})
 #
 # Lua 5.3's UTF-8 library
 #
+
 set(LOVE_SRC_3P_LUAUTF8
 	src/libraries/luautf8/lprefix.h
 	src/libraries/luautf8/lutf8lib.c
@@ -1081,11 +1125,26 @@ set(LOVE_SRC_3P_LUAUTF8
 add_library(love_3p_luautf8 ${LOVE_SRC_3P_LUAUTF8})
 target_link_libraries(love_3p_luautf8 ${MEGA_LUA})
 
+#
+# lz4
+#
+
+set(LOVE_SRC_3P_LZ4
+	src/libraries/lz4/lz4.c
+	src/libraries/lz4/lz4.h
+	src/libraries/lz4/lz4hc.c
+	src/libraries/lz4/lz4hc.h
+)
+
+add_library(love_3p_lz4 ${LOVE_SRC_3P_LZ4})
+
 #
 # noise1234
 #
 
 set(LOVE_SRC_3P_NOISE1234
+	src/libraries/noise1234/noise1234.cpp
+	src/libraries/noise1234/noise1234.h
 	src/libraries/noise1234/simplexnoise1234.cpp
 	src/libraries/noise1234/simplexnoise1234.h
 )
@@ -1147,6 +1206,7 @@ set(LOVE_3P
 	love_3p_lodepng
 	love_3p_luasocket
 	love_3p_luautf8
+	love_3p_lz4
 	love_3p_noise1234
 	love_3p_wuff
 )
@@ -1176,6 +1236,7 @@ set(LOVE_LIB_SRC
 	${LOVE_SRC_MODULE_THREAD}
 	${LOVE_SRC_MODULE_TIMER}
 	${LOVE_SRC_MODULE_TOUCH}
+	${LOVE_SRC_MODULE_VIDEO}
 	${LOVE_SRC_MODULE_WINDOW}
 )
 
@@ -1192,10 +1253,10 @@ link_directories(${SDL_LINK_DIR})
 
 set(LOVE_MEGA_3P
 	${MEGA_FREETYPE}
-	${MEGA_JPEG_TURBO}
 	${MEGA_LIBOGG}
 	${MEGA_LIBVORBISFILE}
 	${MEGA_LIBVORBIS}
+	${MEGA_LIBTHEORA}
 	${MEGA_LUA}
 	${MEGA_MODPLUG}
 	${MEGA_OPENAL}
@@ -1349,7 +1410,7 @@ set(CPACK_RESOURCE_FILE_LICENSE "${CMAKE_CURRENT_SOURCE_DIR}/license.txt")
 
 set(CPACK_NSIS_EXECUTABLES_DIRECTORY .)
 set(CPACK_NSIS_PACKAGE_NAME "LOVE")
-set(CPACK_NSIS_DISPLAY_NAME "LÖVE ${LOVE_VERSION_STR}")
+set(CPACK_NSIS_DISPLAY_NAME "LOVE ${LOVE_VERSION_STR}")
 set(CPACK_NSIS_MODIFY_PATH OFF)
 
 if(LOVE_X64)
@@ -1369,7 +1430,7 @@ set(NSIS_MUI_ICON "${CMAKE_CURRENT_SOURCE_DIR}/extra/nsis\\\\love.ico")
 set(NSIS_MUI_UNICON "${CMAKE_CURRENT_SOURCE_DIR}/extra/nsis\\\\love.ico")
 
 set(CPACK_NSIS_INSTALLER_MUI_ICON_CODE "
-	!define MUI_WELCOMEPAGE_TITLE \\\"LÖVE ${LOVE_VERSION_STR} Setup\\\"
+	!define MUI_WELCOMEPAGE_TITLE \\\"LOVE ${LOVE_VERSION_STR} Setup\\\"
 	!define MUI_WELCOMEFINISHPAGE_BITMAP \\\"${NSIS_LEFT_BMP}\\\"
 	!define MUI_HEADERIMAGE_BITMAP \\\"${NSIS_TOP_BMP}\\\"
 	!define MUI_ICON \\\"${NSIS_MUI_ICON}\\\"

+ 140 - 25
changes.txt

@@ -1,51 +1,166 @@
-LOVE 0.10.0 []
+LOVE 0.10.0 [Super Toast]
 --------------
 
-Released: N/A
-
+Released: 2015-12-22
+
+  * Added an iOS port.
+  * Added an Android port.
+  * Added the flag t.accelerometerjoystick to love.conf. Disables accelerometer-as-joystick functionality on mobile devices when false.
+  * Added the flag t.gammacorrect to love.conf (replaces t.window.srgb.) Enabling it globally enables gamma-correct rendering, when supported.
+  * Added video playback support for Ogg Theora videos, via love.graphics.newVideo and Video objects.
+  * Added love.video module. It is not used for displaying videos on-screen, only decoding them.
+  * Added love.touch module. Note that it has important differences from the touch implementation in the LÖVE 0.9 Android and iOS ports.
+  * Added love.touchpressed, love.touchreleased, and love.touchmoved.
+  * Added love.system.vibrate.
   * Added love.filesystem.setRequirePath and love.filesystem.getRequirePath.
+  * Added an optional program exit argument to love.event.quit.
   * Added love.filedropped and love.directorydropped event callback functions.
+  * Added love.lowmemory event callback function, called when the app is running out of memory on mobile operating systems.
+  * Added love.textedited event callback function, called when the user is compositing text (e.g. via an IME.)
   * Added love.wheelmoved event callback function (replaces "wu" and "wd" constants for love.mousepressed.)
+  * Added love.mouse.hasCursor.
+  * Added a boolean argument to love.mousepressed and love.mousereleased indicating whether the button event originated from a touch press.
+  * Added optional x/y/width/height arguments to love.keyboard.setTextInput. They tell the system where text will show up so on-screen keyboards can avoid that area.
   * Added Source:getType (replaces Source:isStatic.)
+  * Added Source:getDuration and Decoder:getDuration.
+  * Added an optional string argument containing raw pixel byte data to the width/height variant of love.image.newImageData.
+  * Added love.graphics.ellipse.
+  * Added rounded-rectangle support to love.graphics.rectangle.
+  * Added love.graphics.points (replaces love.graphics.point.)
+  * Added love.graphics.intersectScissor.
+  * Added an optional argument to love.graphics.setBlendMode which indicates whether to treat the colors of drawn objects as having pre-multiplied alpha.
   * Added love.graphics.getSupported (replaces love.graphics.isSupported.)
   * Added love.graphics.getSystemLimits (replaces love.graphics.getSystemLimit.)
-  * Added love.graphics.stencil and love.graphics.setStencilTest (replaces love.graphics.setStencil.)
-  * Added optional x/y/width/height arguments to Image:refresh.
-  * Added support for OpenGL ES.
-  * Added support for loading ETC1/2, EAC, and PVRTC compressed textures.
+  * Added love.graphics.stencil and love.graphics.set/getStencilTest (replaces love.graphics.setStencil.)
+  * Added love.graphics.isActive.
+  * Added color arguments to love.graphics.clear. It no longer always uses the background color value.
+  * Added love.graphics.discard.
+  * Added love.graphics.isGammaCorrect.
+  * Added the "clampzero" WrapMode.
+  * Added the ability to specify custom mipmaps when creating an image, via love.graphics.newImage(filename, {mipmaps={mip1, mip2, ...}})
+  * Added optional x/y/width/height arguments to Image:refresh and Canvas:newImageData.
+  * Added Image:getFlags.
+  * Added one- and two-channel Canvas formats: r8, rg8, r16f, rg16f, r32f, and rg32f.
+  * Added support for different formats in each Canvas when using multi-canvas rendering. Added the "multicanvasformats" Graphics Feature constant.
+  * Added support for OpenGL ES 2 and 3.
+  * Added support for loading ETC, EAC, PVRTC, and ASTC compressed textures on systems that support them.
+  * Added custom vertex attribute support for Meshes via new variants of love.graphics.newMesh.
+  * Added Mesh:setVertexAttribute and Mesh:getVertexAttribute.
+  * Added Mesh:getVertexFormat.
+  * Added Mesh:flush.
+  * Added an optional 'startvertex' argument to Mesh:setVertices.
+  * Added the ability for love.graphics.newMesh and Mesh:setVertices to accept a Data object.
+  * Added Mesh:setAttributeEnabled and Mesh:isAttributeEnabled.
+  * Added Mesh:attachAttribute.
+  * Added SpriteBatch:attachAttribute.
+  * Added Shader:sendColor.
+  * Added new shader functions: gammaCorrectColor, gammaToLinear, and linearToGamma. The functions also have 'precise' and 'fast' variants.
   * Added Text objects and love.graphics.newText.
+  * Added per-character color support to love.graphics.print/printf and to Text objects.
   * Added BMFont bitmap font file support to love.graphics.newFont and love.font.
-
-  * Removed love.filesystem.exists (use love.filesystem.isFile or love.filesystem.isDirectory instead.)
+  * Added kerning support for TrueType/OpenType and BMFont Fonts.
+  * Added an optional font hinting argument to love.graphics.newFont when loading TrueType fonts.
+  * Added an optional spacing argument to love.graphics.newImageFont, which applies additional spacing to all rendered glyphs.
+  * Added Font:setFallbacks.
+  * Added love.window.maximize.
+  * Added love.window.close.
+  * Added love.window.requestAttention.
+  * Added love.window.setDisplaySleepEnabled and love.window.isDisplaySleepEnabled.
+  * Added BezierCurve:renderSegment and BezierCurve:removeControlPoint.
+  * Added BezierCurve:getSegment.
+  * Added love.math.compress and love.math.decompress.
+  * Added Channel:performAtomic.
+
+  * Changed love.mousepressed, love.mousereleased, and love.mouse.isDown to use button numbers instead of named button constants.
+  * Changed love.keypressed to be love.keypressed(key, scancode, isrepeat).
+  * Changed love.keyreleased to be love.keyreleased(key, scancode).
+  * Changed Font:getWrap's second return value to be a table containing the text split into lines.
+  * Changed love.graphics.newImage's optional second argument to be a table of flags (flags are "mipmaps" and "linear".)
+  * Changed the arguments for the standard variants of love.graphics.newMesh to newMesh(vertices [, drawmode, usage]) and newMesh(vertexcount [, drawmode, usage]).
+  * Changed ImageData:encode to return a FileData object. ImageData:encode's first parameter is now the format to encode to, and the second parameter is an optional filename to write to.
+
+  * Renamed the "normal" Fullscreen Type to "exclusive".
+  * Renamed the DistanceModel constants "inverse clamped", "linear clamped", and "exponent clamped" to "inverseclamped", "linearclamped", and "exponentclamped".
+  * Renamed the "additive", "subtractive", and "multiplicative" BlendModes to "add", "subtract", and "multiply".
+  * Renamed the KeyConstant and Scancode representing the spacebar from " " to "space".
+  * Renamed File:eof to File:isEOF.
+  * Renamed Canvas:getImageData to Canvas:newImageData.
+  * Renamed love.image's CompressedData type to CompressedImageData.
+
+  * Removed callback variant of love.filesystem.getDirectoryItems.
   * Removed the "wu" and "wd" constants for love.mousepressed (replaced by love.wheelmoved.)
+  * Removed the named mouse button constants (replaced by button numbers.)
   * Removed Source:isStatic (replaced by Source:getType.)
   * Removed image loading support for all (non-compressed texture) file formats except for PNG, JPEG, TGA, and BMP.
+  * Removed JPEG encoding support from ImageData:encode.
+  * Removed love.graphics.point (replaced by love.graphics.points.)
   * Removed love.graphics.setPointStyle and love.graphics.getPointStyle.
   * Removed love.graphics.isSupported (replaced by love.graphics.getSupported.)
   * Removed love.graphics.getSystemLimit (replaced by love.graphics.getSystemLimits.)
   * Removed love.graphics.setStencil (replaced by love.graphics.stencil and love.graphics.setStencilTest.)
-  * Removed the "canvas", "shader", "npot", "subtractive", and "mipmap" Graphics Feature enums.
-  * Removed functions deprecated in LOVE 0.9.x:
-    * Removed Canvas:getType (replaced by Canvas:getFormat.)
-    * Removed love.graphics.getMaxTextureSize/getMaxImageSize (replaced by love.graphics.getSystemLimits.)
-    * Removed love.graphics.getMaxPointSize (replaced by love.graphics.getSystemLimits.)
+  * Removed the "canvas", "shader", "npot", "subtractive", and "mipmap" Graphics Feature constants (the features always have guaranteed support now.)
+  * Removed the "multicanvas" Graphics Feature constant (use love.graphics.getSystemLimits instead.)
+  * Removed the "srgb" Graphics Feature constant (use love.graphics.isGammaCorrect() or love.graphics.getCanvasFormats().srgb instead.)
+  * Removed the "srgb" flag in love.window.setMode and in the t.window table in love.conf (Replaced by t.gammacorrect.)
+  * Removed the "premultiplied" blend mode (love.graphics.setBlendMode("alpha", "premultiplied") now does the same thing.)
+  * Removed Canvas:getPixel (use Canvas:newImageData instead.)
+  * Removed Canvas:clear (use love.graphics.clear instead.)
+  * Removed Mesh:getVertices.
+  * Removed Mesh:setVertexColors and Mesh:hasVertexColors (use Mesh:setAttributeEnabled("VertexColor", enable) instead.)
+  * Removed functions deprecated in LOVE 0.9.1 and 0.9.2:
+    * Removed love.graphics.getMaxImageSize and love.graphics.getMaxPointSize (replaced by love.graphics.getSystemLimits.)
     * Removed Mesh:set/getImage, SpriteBatch:set/getImage, and ParticleSystem:set/getImage (replaced by set/getTexture.)
     * Removed SpriteBatch:bind/unbind.
     * Removed Canvas:getFSAA and the "fsaa" flag in love.conf and love.window.setMode (replaced by Canvas:getMSAA and "msaa".)
-    * Removed the "dxt" and "bc5" Graphics Feature enums (replaced by love.graphics.getCompressedImageFormats.)
-    * Removed the "hdrcanvas" Graphics Feature enum (replaced by love.graphics.getCanvasFormats.)
-    * Removed love.window.getWidth/getHeight (use love.graphics.getWidth/getHeight or love.window.getMode instead.)
-
-  * Renamed the fullscreen type "normal" to "exclusive".
-  * Renamed the Distance Model enums "inverse clamped", "linear clamped", and "exponent clamped" to "inverseclamped", "linearclamped", and "exponentclamped".
-  * Renamed blend modes "additive", "subtractive", and "multiplicative" to "add", "subtract", and "multiply".
-
+    * Removed the "dxt" and "bc5" Graphics Feature constant (replaced by love.graphics.getCompressedImageFormats.)
+    * Removed the "hdrcanvas" Graphics Feature constant (replaced by love.graphics.getCanvasFormats.)
+    * Removed love.window.getWidth/getHeight/getDimensions (use love.graphics.getWidth/getHeight/getDimensions or love.window.getMode instead.)
+
+  * Fixed utf8.char.
+  * Fixed detection of fused love games.
+  * Fixed World:getCallbacks and World:getContactFilter when used in coroutines.
+  * Fixed crashes when objects which store Lua callback functions are garbage collected after being used in coroutines.
+  * Fixed memory leaks in love.physics if World:destroy is never called. When a World is GCed it now destroys all objects it owns.
+  * Fixed love.keyboard.getKeyFromScancode crashing when an invalid scancode is given.
+  * Fixed decoding of 8-bit WAV files.
+  * Fixed a crash issue when rewinding streaming ogg Sources, when certain versions of libvorbis are used.
+  * Fixed love.audio.stop() not rewinding streaming Sources.
+  * Fixed the stencil buffer in Canvases when an unsupported MSAA value is used to create the Canvas.
+  * Fixed Canvas:renderTo to restore the previous Canvas if an error occurs in the passed function.
+  * Fixed love.graphics.draw(canvas) to cause an error if that Canvas is the active one.
+  * Fixed Mesh:getVertexMap to return nil rather than an empty table, if no vertex map has been set.
+  * Fixed love.graphics.getColorMask.
+  * Fixed the default offset for particles when ParticleSystem:setQuads or ParticleSystem:setTexture is used.
+  * Fixed love.graphics.shear resetting all love.graphics transformations.
+  * Fixed the "add" and "subtract" blend modes to no longer modify the alpha of the Canvas / screen.
+
+  * Improved the performance of World:rayCast and World:queryBoundingBox.
+  * Improved the performance of love.graphics.line and other line drawing functions, when the "smooth" LineStyle is used.
+  * Improved the performance of Shader:send when matrices are used.
+  * Improved the performance of ImageData and SoundData methods when LuaJIT's JIT compiler is enabled, by using efficient FFI code.
+  * Improved the performance of love.math.noise, love.math.gammaToLinear, love.math.linearToGamma, love.math.random, and RandomGenerator:random when LuaJIT's JIT compiler is enabled.
+
+  * Updated the compatibility warning notice to use a message box and to show the version specified in love.conf.
+  * Updated the compatibility warning notice to display before main.lua is loaded.
+  * Updated the __tostring metamethod of love objects to output the pointer value, similar to tostring(table).
+  * Updated World:setCallbacks, World:setContactFilter, World:queryBoundingBox, and World:rayCast to have improved argument type checking.
+  * Updated threads to load love.filesystem automatically.
+  * Updated love.filesystem to enable symlinks by default.
   * Updated love.math.setRandomSeed and RandomGenerator:setSeed to produce better results for the first few random() calls.
+  * Updated love.math.random and RandomGenerator:random to produce slightly better results in general.
   * Updated Source methods that deal with spatial audio to error rather than failing silently if the Source isn't mono.
+  * Updated the 3D and 4D variants of love.math.noise to use Perlin noise rather than Simplex noise, to avoid patent issues.
   * Updated ImageFonts to no longer treat separator pixels as spacing.
-  * Updated the minimum runtime system requirements of LOVE to require OpenGL 2.1 support.
+  * Updated the default font to use less memory.
+  * Updated the behavior of text wrapping with love.graphics.printf and Font:getWrap to work better.
+  * Updated love.graphics.print and love.graphics.printf to no longer automatically round the x and y position arguments.
+  * Updated some error messages for love.graphics.newImage to be more descriptive.
+  * Updated love.graphics color functions to automatically apply love.math.gammaToLinear to color values when gamma-correct rendering is enabled.
+  * Updated the 'normal' Canvas format to internally use 'srgb' rather than 'rgba8' when gamma-correct rendering is enabled.
+  * Updated love.graphics.setColor to affect all drawn objects, including ParticleSystems, SpriteBatches, and Meshes.
+  * Updated the default fullscreen type to be "desktop" rather than "exclusive".
+  * Updated the minimum runtime system requirements of LOVE to require OpenGL 2.1 or OpenGL ES 2 support.
   * Updated the pixel shader effect function so screen_coords.y is 0 at the top of the screen instead of the bottom.
-  * Updated love.graphics.newImage's optional second argument to be a table of flags (flags are "mipmaps" and "srgb".)
   * Updated Images to require setting the mipmaps flag to true on creation in order to use mipmaps.
   * Updated Images to allow mipmaps for non-power-of-two sizes.
 
@@ -290,7 +405,7 @@ LOVE 0.9.0 [Baby Inspector]
   * Added love.window.getIcon.
   * Added t.window.icon to love.conf.
   * Added love.mousefocus and love.window.hasMouseFocus.
-  * Added custom hardware cursors via love.mouse.newCursor. 
+  * Added custom hardware cursors via love.mouse.newCursor.
   * Added love.mouse.setX/setY.
   * Added Joystick objects.
   * Added love.joystick.getJoystick.

+ 43 - 0
extra/appveyor/appveyor.yml

@@ -0,0 +1,43 @@
+version: 0.10.1.{build}
+
+os:
+- Windows Server 2012 R2
+
+shallow_clone: true
+
+init:
+# Make VS 2013 command line tools available
+- call "C:\Program Files (x86)\Microsoft Visual Studio 12.0\VC\vcvarsall.bat" %platform%
+
+install:
+# We need to install NSIS to create the packaged installer executable.
+- choco install nsis -pre -y
+
+# Move all woking directory items except `appveyor.yml` to `love` subdirectory.
+- md love
+- for /D %%i in (*) do @if "%%i" NEQ "love" @move %%i love\%%i
+- for %%i in (*) do @if "%%i" NEQ "appveyor.yml" @move %%i love\%%i
+# clone megasource and move into top directory.
+- hg clone https://bitbucket.org/rude/megasource megasource
+- cd megasource
+- for /D %%i in (*) do @move %%i ..\%%i
+- for %%i in (*) do @move %%i ..\%%i
+- cd ..
+# move love source to megasource's libs\love.
+- move love libs\love
+
+before_build:
+- cmake -G "Visual Studio 12" -H. -Bbuild
+
+build_script:
+- cmake --build build --target PACKAGE --config Release
+
+after_build:
+
+before_test:
+
+test_script:
+
+artifacts:
+- path: build\*.zip
+- path: build\*.exe

BIN
extra/windows/love.rc


+ 5 - 4
license.txt

@@ -1,6 +1,6 @@
-This software uses LÖVE:
+This software uses LOVE:
 
-LÖVE is Copyright (c) 2006-2015 LOVE Development Team
+LOVE is Copyright (c) 2006-2016 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
@@ -25,7 +25,7 @@ distribution.
 
 This software uses LuaJIT:
 
-LuaJIT is Copyright (c) 2005-2014 Mike Pall
+LuaJIT is Copyright (c) 2005-2015 Mike Pall
 
 Permission is hereby granted, free of charge, to any person obtaining a copy
 of this software and associated documentation files (the "Software"), to deal
@@ -123,7 +123,8 @@ DEALINGS IN THE SOFTWARE.
 
 ---------
 
-This software uses the following LGPL libraries on Windows, Mac OS X, and Linux:
+This software uses the following LGPL libraries on Windows, Mac OS X, Linux,
+and Android:
 
  - libmpg123
      Website: http://www.mpg123.de/

+ 1 - 1
platform/unix/Makefile.am

@@ -2,7 +2,7 @@ ACLOCAL_AMFLAGS = -I platform/unix/m4
 SUBDIRS = src
 EXTRA_DIST = changes.txt license.txt readme.md \
 	platform/unix/love.desktop.in
-dist_man1_MANS = platform/unix/love.1
+dist_man1_MANS = platform/unix/love.6
 
 applicationsdir=$(datarootdir)/applications
 mimeinfodir=$(datarootdir)/mime/packages

+ 14 - 22
platform/unix/configure.ac

@@ -7,34 +7,26 @@ AM_INIT_AUTOMAKE([foreign -Wall foreign tar-ustar silent-rules])
 AM_SILENT_RULES
 AC_PREFIX_DEFAULT([/usr])
 m4_ifdef([AM_PROG_AR], [AM_PROG_AR])
-AC_PROG_LIBTOOL
+LT_INIT([disable-static])
 AC_PROG_CC
 AC_PROG_CXX
 AC_PROG_SED
 AC_PROG_MKDIR_P
 AC_PROG_OBJCXX
+PKG_PROG_PKG_CONFIG
 AC_C_BIGENDIAN
 AC_LANG([C++])
 
-includes=
+dnl Workaround for old aclocal versions
+m4_include([platform/unix/cpp11.m4])
 
-AC_DEFUN([ACLOVE_CXX_FLAG_TEST], # WARNING: NOT REENTRANT
-		 [aclove_cxx_flag_test_save_cflags="$CXXFLAGS"
-		  CXXFLAGS="$1"
-		  AC_MSG_CHECKING([whether $CXX supports flag $1])
-		  AC_COMPILE_IFELSE([AC_LANG_PROGRAM([])],
-			  [AC_MSG_RESULT([yes])]; $2,
-			  [AC_MSG_RESULT([no]); $3])
-		  CXXFLAGS="$aclove_cxx_flag_test_save_cflags"])
+includes=
 
 AC_DEFUN([LOVE_MSG_ERROR],
 		 [AC_MSG_ERROR([LÖVE needs "$1"[,] please install "$1" with development files and try again])])
 
-# C++11 support
-cxx11name="no"
-ACLOVE_CXX_FLAG_TEST([-std=c++0x], cxx11name="c++0x", [])
-ACLOVE_CXX_FLAG_TEST([-std=c++11], cxx11name="c++11", [])
-AS_VAR_IF([cxx11name], [no], AC_MSG_ERROR([LÖVE needs a C++ compiler with C++11 support]), CXXFLAGS="$CXXFLAGS -std=$cxx11name")
+# C++11 support in cpp11.m4
+ACLOVE_CPP11_TEST
 
 # Allow people on OSX to use autotools, they need their platform files
 AC_ARG_ENABLE([osx],
@@ -52,32 +44,32 @@ AC_ARG_WITH([luaversion], [AS_HELP_STRING([--with-luaversion], [Select the lua v
 
 # pkg-config libraries
 AM_PATH_SDL2([], [], [LOVE_MSG_ERROR([SDL 2])])
+with_clean_luaversion=`printf ${with_luaversion} | sed 's/\.//g'`
 PKG_CHECK_MODULES([lua], [${with_lua}${with_luaversion}], [lua_found=yes],
-				  [PKG_CHECK_MODULES([lua], [${with_lua}], [lua_found=yes], [lua_found=no])])
+	[PKG_CHECK_MODULES([lua], [${with_lua}${with_clean_luaversion}], [lua_found=yes],
+	[PKG_CHECK_MODULES([lua], [${with_lua}], [lua_found=yes], [lua_found=no])])])
 PKG_CHECK_MODULES([freetype2], [freetype2], [], [LOVE_MSG_ERROR([FreeType2])])
 PKG_CHECK_MODULES([openal], [openal], [], [LOVE_MSG_ERROR([OpenAL])])
 PKG_CHECK_MODULES([libmodplug], [libmodplug], [], [LOVE_MSG_ERROR([libmodplug])])
 PKG_CHECK_MODULES([vorbisfile], [vorbisfile], [], [LOVE_MSG_ERROR([libvorbis and libvorbisfile])])
 PKG_CHECK_MODULES([zlib], [zlib], [], [LOVE_MSG_ERROR([zlib])])
+PKG_CHECK_MODULES([theora], [theoradec], [], [LOVE_MSG_ERROR([libtheora])])
 
 # Other libraries
 AC_SEARCH_LIBS([sqrt], [m], [], [LOVE_MSG_ERROR([the C math library])])
 AC_SEARCH_LIBS([PHYSFS_init], [physfs], [], [LOVE_MSG_ERROR([PhysicsFS])])
-AC_SEARCH_LIBS([glDrawArrays], [GL], [], [LOVE_MSG_ERROR([OpenGL])])
-AC_SEARCH_LIBS([tjInitCompress], [turbojpeg], [], [LOVE_MSG_ERROR([TurboJPEG])])
 
 # Lua, treated seperately because of --with-lua
-AS_VAR_IF([with_luaversion], [5.2], [luatest=lua_version], [luatest=lua_pcall]) # use lua_version for 5.2
 AS_VAR_IF([lua_found], [yes],
 		  #if
 		  [
 		   luaheaders_found=yes
-		   AC_MSG_CHECKING([for library containing ${luatest}])
+		   AC_MSG_CHECKING([for library containing lua_call])
 		   AC_MSG_RESULT([${lua_LIBS}])],
 		  #else
 		  [
-		   AC_MSG_WARN([Could not find pkg-config definition for ${with_lua}${with_luaversion} or ${with_lua}, falling back to manual detection])
-		   AC_SEARCH_LIBS([$luatest], ["${with_lua}${with_luaversion}" "${with_lua}"], [],
+		   AC_MSG_WARN([Could not find pkg-config definition for ${with_lua}${with_luaversion} or ${with_lua}${with_clean_luaversion}${with_lua}, falling back to manual detection])
+		   AC_SEARCH_LIBS([lua_call], ["${with_lua}${with_luaversion}" "${with_lua}"], [],
 						  [LOVE_MSG_ERROR([$with_lua])])
 		   luaheaders_found=no
 		   AC_CHECK_HEADER(["${with_lua}${with_luaversion}/lua.h"], [luaheaders_found=yes includes="$includes -I/usr/include/${with_lua}${with_luaversion}"], [])

+ 69 - 0
platform/unix/cpp11.m4

@@ -0,0 +1,69 @@
+AC_DEFUN([ACLOVE_CXX_FLAG_TEST], [ dnl WARNING: NOT REENTRANT
+	aclove_cxx_flag_test_save_cflags="$CXXFLAGS"
+	CXXFLAGS="$1"
+	AC_MSG_CHECKING([whether $CXX supports flag $1])
+	AC_COMPILE_IFELSE([AC_LANG_PROGRAM([])],
+		[AC_MSG_RESULT([yes])]; $2,
+		[AC_MSG_RESULT([no]); $3])
+	CXXFLAGS="$aclove_cxx_flag_test_save_cflags"
+])
+
+AC_DEFUN([ACLOVE_GET_GCC_VERSION], [
+	aclove_gcc_version_found="yes"
+	AC_COMPUTE_INT(aclove_gcc_version_major, __GNUC__,, aclove_gcc_version_found="no")
+	AC_COMPUTE_INT(aclove_gcc_version_minor, __GNUC_MINOR__,, aclove_gcc_version_found="no")
+	AC_COMPUTE_INT(aclove_gcc_version_patch, __GNUC_PATCHLEVEL__,, aclove_gcc_version_found="no")
+])
+
+AC_DEFUN([ACLOVE_GET_CLANG_VERSION], [
+	aclove_clang_version_found="yes"
+	AC_COMPUTE_INT(aclove_clang_version_major, __clang_major__,, aclove_clang_version_found="no")
+	AC_COMPUTE_INT(aclove_clang_version_minor, __clang_minor__,, aclove_clang_version_found="no")
+	AC_COMPUTE_INT(aclove_clang_version_patch, __clang_patchlevel__,, aclove_clang_version_found="no")
+])
+
+AC_DEFUN([ACLOVE_CPP11_TEST_FLAG], [
+	aclove_cpp11_test_cxx11name="no"
+	ACLOVE_CXX_FLAG_TEST([-std=c++0x], aclove_cpp11_test_cxx11name="c++0x", [])
+	ACLOVE_CXX_FLAG_TEST([-std=c++11], aclove_cpp11_test_cxx11name="c++11", [])
+	AS_VAR_IF([aclove_cpp11_test_cxx11name], [no],
+		[AC_MSG_ERROR([LÖVE needs a C++ compiler with C++11 support])],
+		[CXXFLAGS="$CXXFLAGS -std=$aclove_cpp11_test_cxx11name"])
+])
+
+AC_DEFUN([ACLOVE_CPP11_CHECK_VERSION], [ dnl compiler, targetmajor, targetminor, on-failure
+	aclove_cpp11_check_version_status="no"
+	AC_MSG_CHECKING([whether $1 version is at least $2.$3])
+	AS_IF([test "$aclove_[]$1[]_version_major" -gt $2], aclove_cpp11_check_version_status="yes")
+	AS_IF([test "$aclove_[]$1[]_version_major" -eq $2 && test "$aclove_[]$1[]_version_minor" -ge $3], aclove_cpp11_check_version_status="yes")
+	AC_MSG_RESULT([$aclove_cpp11_check_version_status])
+	AS_VAR_IF([aclove_cpp11_check_version_status], [no],
+		[$4])
+])
+
+AC_DEFUN([ACLOVE_CPP11_TEST_VERSION_GCC], [
+	ACLOVE_CPP11_CHECK_VERSION([gcc], 4, 7,
+		[AC_MSG_ERROR([LÖVE needs a GCC version of at least 4.7])])
+])
+
+AC_DEFUN([ACLOVE_CPP11_TEST_VERSION_CLANG], [
+	ACLOVE_CPP11_CHECK_VERSION([clang], 3, 1,
+		[AC_MSG_ERROR([LÖVE needs a clang version of at least 3.1])])
+])
+
+AC_DEFUN([ACLOVE_CPP11_TEST], [
+	ACLOVE_CPP11_TEST_FLAG
+
+	ACLOVE_GET_GCC_VERSION
+	ACLOVE_GET_CLANG_VERSION
+
+	# Since clang also sets gcc headers, check clang after
+	aclove_cpp11_test_compiler="unknown"
+	AS_VAR_IF([aclove_gcc_version_found], [yes], aclove_cpp11_test_compiler="gcc")
+	AS_VAR_IF([aclove_clang_version_found], [yes], aclove_cpp11_test_compiler="clang")
+
+	AS_CASE([$aclove_cpp11_test_compiler],
+		[gcc], [ACLOVE_CPP11_TEST_VERSION_GCC],
+		[clang], [ACLOVE_CPP11_TEST_VERSION_CLANG],
+		[AC_MSG_WARN([Could not determine compiler version])])
+])

+ 1 - 1
platform/unix/debian/changelog.in

@@ -1,4 +1,4 @@
-love@LOVE_SUFFIX@ (0.9.2~rc1ppa3) precise; urgency=medium
+love@LOVE_SUFFIX@ (0.10.0~pre2657ppa2) trusty; urgency=medium
 
   * Upstream testing release
 

+ 22 - 32
platform/unix/debian/control.in

@@ -3,58 +3,48 @@ Section: games
 Priority: extra
 Maintainer: Bart van Strien <[email protected]>
 Build-Depends: debhelper (>= 9),
-               autotools-dev,
-               autoconf,
-               automake,
-               libtool,
+               dh-autoreconf,
                pkg-config,
+               libtool,
+               g++ (>= 4.7.0),
                libfreetype6-dev,
+               luajit,
                libluajit-5.1-dev,
-               libphysfs-dev,
-               libsdl2-dev (>= 2.0.0),
+               libmodplug-dev,
+               libmpg123-dev,
                libopenal-dev,
+               libphysfs-dev,
+               libsdl2-dev (>= 2.0.1),
                libogg-dev,
                libvorbis-dev,
-               libmodplug-dev,
-               libmpg123-dev,
-               zlib1g-dev,
-               libjpeg-turbo8-dev
+               libtheora-dev,
+               zlib1g-dev
 Standards-Version: 3.9.5
 Homepage: http://love2d.org
 
-Package: liblove@LOVE_SUFFIX@
+Package: liblove@LOVE_SUFFIX@0
+Section: libs
 Architecture: any
 Multi-Arch: same
 Pre-Depends: ${misc:Pre-Depends}
 Depends: ${misc:Depends},
-         ${shlibs:Depends},
-         libfreetype6,
-         libgl1-mesa-glx,
-         libluajit-5.1-2,
-         libphysfs-1.0-0,
-         libsdl2-2.0-0 (>= 2.0.0),
-         libopenal1,
-         libogg0,
-         libvorbis0a,
-         libvorbisfile3,
-         libmodplug1,
-         libmpg123-0,
-         zlib1g,
-         libjpeg-turbo8
-Description: LOVE is a free 2D game engine which enables easy game creation in Lua.
+         ${shlibs:Depends}
+Description: 2D game engine - runtime
+ LOVE is a free 2D game engine which enables easy game creation in Lua.
 
 Package: love@LOVE_SUFFIX@
 Architecture: any
-Multi-Arch: same
 Depends: ${misc:Depends},
-         liblove@LOVE_SUFFIX@ (= ${binary:Version})
-Description: LOVE is a free 2D game engine which enables easy game creation in Lua.
+         ${shlibs:Depends}
+Description: 2D game engine
+ LOVE is a free 2D game engine which enables easy game creation in Lua.
 
-Package: love@LOVE_SUFFIX@-dbg
+Package: liblove@LOVE_SUFFIX@-dbg
 Priority: extra
 Section: debug
 Architecture: any
 Multi-Arch: same
 Depends: ${misc:Depends},
-         love@LOVE_SUFFIX@ (= ${binary:Version}),
-Description: LOVE is a free 2D game engine which enables easy game creation in Lua.
+         liblove@LOVE_SUFFIX@0 (= ${binary:Version})
+Description: 2D game engine - debug symbols
+ LOVE is a free 2D game engine which enables easy game creation in Lua.

+ 25 - 18
platform/unix/debian/copyright

@@ -1,20 +1,27 @@
-Copyright (c) 2006-2015 LOVE Development Team
+Format: http://www.debian.org/doc/packaging-manuals/copyright-format/1.0/
+Upstream-Name: LÖVE
+Upstream-Contact: Bart van Strien <[email protected]>
+Source: http://www.love2d.org/
 
-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.
+Files: *
+Copyright: 2006-2015 LOVE Development Team
+License: zlib
+ 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
+ appreciated but is not required.
+ .
+ 2. Altered source versions must be plainly marked as such, and must not be
+ misrepresented as being the original software.
+ .
+ 3. This notice may not be removed or altered from any source
+ distribution.
 
-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
-appreciated but is not required.
-
-2. Altered source versions must be plainly marked as such, and must not be
-misrepresented as being the original software.
-
-3. This notice may not be removed or altered from any source
-distribution.

+ 1 - 0
platform/unix/debian/liblove-unstable0.docs

@@ -0,0 +1 @@
+readme.md

+ 1 - 0
platform/unix/debian/liblove-unstable0.install

@@ -0,0 +1 @@
+usr/lib/*/liblove-unstable.so.*

+ 1 - 0
platform/unix/debian/liblove0.docs

@@ -0,0 +1 @@
+readme.md

+ 1 - 0
platform/unix/debian/liblove0.install

@@ -0,0 +1 @@
+usr/lib/*/liblove.so.*

+ 1 - 0
platform/unix/debian/love-unstable.manpages

@@ -0,0 +1 @@
+platform/unix/love-unstable.6

+ 5 - 6
platform/unix/debian/love.install

@@ -1,6 +1,5 @@
-usr/bin/love
-usr/share/man/man1/love.1
-usr/share/pixmaps/love.svg
-usr/share/mime/packages/love.xml
-usr/share/icons/hicolor/scalable/mimetypes/application-x-love-game.svg
-usr/share/applications/love.desktop
+usr/bin
+usr/share/applications
+usr/share/mime
+usr/share/pixmaps
+usr/share/icons

+ 1 - 1
platform/unix/debian/love.manpages

@@ -1 +1 @@
-platform/unix/love.1
+platform/unix/love.6

+ 22 - 7
platform/unix/debian/rules.in

@@ -1,16 +1,31 @@
 #!/usr/bin/make -f
 
-DEB_HOST_ARCH_CPU ?= $(shell dpkg-architecture -qDEB_HOST_ARCH_CPU)
-DEB_HOST_MULTIARCH ?= $(shell dpkg-architecture -qDEB_HOST_MULTIARCH)
+commonflags = -Wall -Wno-maybe-uninitialized -Wno-strict-aliasing
+CFLAGS += $(commonflags)
+CXXFLAGS += $(commonflags)
+
+
+%:
+	dh  $@ --parallel --with autoreconf
+
+override_dh_auto_clean:
+	dh_auto_clean
+	rm -f platform/unix/love-unstable.6
 
 override_dh_auto_configure:
 	dh_auto_configure -- --with-lua=luajit
 
-override_dh_link:
-	dh_link -plove@LOVE_SUFFIX@-dev usr/lib/$(DEB_HOST_MULTIARCH)/liblove@[email protected] usr/lib/$(DEB_HOST_MULTIARCH)/liblove@[email protected]
+override_dh_installdocs:
+	dh_installdocs --link-doc=liblove@LOVE_SUFFIX@0
+
+override_dh_installchangelogs:
+	dh_installchangelogs changes.txt
+
+override_dh_installman:
+	cp -f platform/unix/love.6 platform/unix/love-unstable.6
+	dh_installman
 
 override_dh_strip:
-	dh_strip --dbg-package=love@LOVE_SUFFIX@-dbg
+	dh_strip -pliblove@LOVE_SUFFIX@0 --dbg-package=liblove@LOVE_SUFFIX@-dbg
+	dh_strip --remaining-packages
 
-%:
-	dh  $@ --parallel

+ 4 - 5
platform/unix/genmodules

@@ -16,7 +16,7 @@ implfind()
 
 sourcefind()
 {
-	find "$1" $2 -type f \( -iname "*.c" -o -iname "*.cpp" -o -iname "*.h" -o -iname "*.lch" \) | awk "{print \"./$prefix\"\$0\" \\\\\"}" | grep -v -f"$LOVEROOT/platform/unix/exclude"
+	find "$1" $2 -type f \( -iname "*.c" -o -iname "*.cpp" -o -iname "*.h" -o -iname "*.hpp" -o -iname "*.lch" \) | awk "{print \"./$prefix\"\$0\" \\\\\"}" | grep -v -f"$LOVEROOT/platform/unix/exclude"
 }
 
 handlemodule()
@@ -114,7 +114,7 @@ cat > src/Makefile.am << EOF
 AM_CPPFLAGS = -I$inc_current -I$inc_modules -I$inc_libraries -I$inc_libraries/enet/libenet/include \$(LOVE_INCLUDES) \$(FILE_OFFSET)\
 	\$(SDL_CFLAGS) \$(lua_CFLAGS) \$(freetype2_CFLAGS)\
 	\$(openal_CFLAGS) \$(zlib_CFLAGS) \$(libmodplug_CFLAGS)\
-	\$(vorbisfile_CFLAGS)
+	\$(vorbisfile_CFLAGS) \$(theora_CFLAGS)
 AUTOMAKE_OPTIONS = subdir-objects
 SUBDIRS =
 SUFFIXES = .lua .lua.h
@@ -129,8 +129,7 @@ love${love_amsuffix}_SOURCES = love.cpp
 if LOVE_TARGET_OSX
 love${love_amsuffix}_LIBTOOLFLAGS = --tag=OBJCXX
 love${love_amsuffix}_SOURCES += \\
-    ../platform/macosx/OSX.h \\
-    ../platform/macosx/OSX.mm
+    ./common/macosx.mm
 else
 love${love_amsuffix}_LIBTOOLFLAGS = --tag=CXX
 endif
@@ -147,7 +146,7 @@ liblove${love_amsuffix}_la_LDFLAGS = -module -export-dynamic \$(LDFLAGS)
 liblove${love_amsuffix}_la_LIBADD = \
 	\$(SDL_LIBS) \$(freetype2_LIBS) \$(lua_LIBS)\
 	\$(openal_LIBS) \$(zlib_LIBS) \$(libmodplug_LIBS)\
-	\$(vorbisfile_LIBS)
+	\$(vorbisfile_LIBS) \$(theora_LIBS)
 EOF
 
 genmodules >> src/Makefile.am

+ 0 - 36
platform/unix/love.1

@@ -1,36 +0,0 @@
-.\" (c) 2008-2011 Miriam Ruiz <[email protected]>
-.\" (c) 2013 Bart van Strien <[email protected]>
-.\"
-.\" This software is provided 'as-is', without any express or implied warranty. In no event will the authors be held liable for any damagesarising 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 appreciated but is not required.
-.\"
-.\" 2. Altered source versions must be plainly marked as such, and must not be misrepresented as being the original software.
-.\"
-.\" 3. This notice may not be removed or altered from any source distribution.
-.\"
-.\" Modifications:
-.\" - Update version to 0.9 and remove reference to doc dir
-.\" - Add fused and version flags
-
-.TH "LÖVE" "1" "0.9" "" ""
-.SH "NAME"
-love \- 2D game development framework
-
-.SH "SYNOPSIS"
-.B love
-[--fused] <\fIgame.love\fR>
-.PP
-.B love
---version
-.PP
-
-.SH "DESCRIPTION"
-LÖVE was created to be a user\-friendly engine in which simple (or complicated) games could be made without having extensive knowledge of system or graphics functions and without having to dedicate time towards developing the same engine features time and time again.
-.P
-Developed with cross\-platform implementation in mind, it utilizes the latest open source libraries to deliver a similar game experience, independent of operating system. By relying on the Lua scripting language for game\-specific programming, it allows even the novice game creator to quickly and efficiently develop an idea into a fully working game.
-
-.SH "SEE ALSO"
-You can find more information at \fIhttp://love2d.org/\fR

+ 33 - 0
platform/unix/love.6

@@ -0,0 +1,33 @@
+.\" (c) 2008-2011 Miriam Ruiz <[email protected]>
+.\" (c) 2013 Bart van Strien <[email protected]>
+.\"
+.\" This software is provided 'as-is', without any express or implied warranty. In no event will the authors be held liable for any damagesarising 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 appreciated but is not required.
+.\"
+.\" 2. Altered source versions must be plainly marked as such, and must not be misrepresented as being the original software.
+.\"
+.\" 3. This notice may not be removed or altered from any source distribution.
+.Dd December 23, 2015
+.Dt LOVE 6
+.Os LÖVE 0.10.0
+.Sh NAME
+.Nm love
+.Nd 2D game development framework
+.Sh SYNOPSIS
+.Nm love
+.Op Fl Fl fused
+.Ar game Ns .love
+.Pp
+.Nm love
+.Fl Fl version
+.Sh DESCRIPTION
+LÖVE was created to be a user-friendly engine in which simple (or complicated) games could be made without having extensive knowledge of system or graphics functions and without having to dedicate time towards developing the same engine features time and time again.
+.Pp
+Developed with cross-platform implementation in mind, it utilizes the latest open source libraries to deliver a similar game experience, independent of operating system.
+By relying on the Lua scripting language for game-specific programming, it allows even the novice game creator to quickly and efficiently develop an idea into a fully working game.
+.Sh SEE ALSO
+You can find more information at
+.Lk http://love2d.org/

+ 0 - 5
platform/unix/postinst

@@ -1,5 +0,0 @@
-#!/bin/sh
-
-update-mime-database /usr/share/mime
-gtk-update-icon-cache --force /usr/share/icons/gnome
-xdg-mime default love.desktop application/x-love-game

+ 0 - 4
platform/unix/postrm

@@ -1,4 +0,0 @@
-#!/bin/sh
-
-update-mime-database /usr/share/mime
-gtk-update-icon-cache --force /usr/share/icons/gnome

+ 4 - 4
platform/xcode/ios/Images.xcassets/AppIcon.appiconset/Contents.json

@@ -115,10 +115,10 @@
       "scale" : "2x"
     },
     {
-      "size" : "120x120",
-      "idiom" : "car",
-      "filename" : "pig-120pt@1x.png",
-      "scale" : "1x"
+      "size" : "83.5x83.5",
+      "idiom" : "ipad",
+      "filename" : "pig-83.5pt@2x.png",
+      "scale" : "2x"
     }
   ],
   "info" : {

BIN
platform/xcode/ios/Images.xcassets/AppIcon.appiconset/[email protected]


BIN
platform/xcode/ios/Images.xcassets/AppIcon.appiconset/[email protected]


+ 2 - 28
platform/xcode/ios/Launch Screen.xib

@@ -1,9 +1,8 @@
 <?xml version="1.0" encoding="UTF-8" standalone="no"?>
-<document type="com.apple.InterfaceBuilder3.CocoaTouch.XIB" version="3.0" toolsVersion="6254" systemVersion="14C109" targetRuntime="iOS.CocoaTouch" propertyAccessControl="none" useAutolayout="YES" launchScreen="YES" useTraitCollections="YES">
+<document type="com.apple.InterfaceBuilder3.CocoaTouch.XIB" version="3.0" toolsVersion="7531" systemVersion="14D131" targetRuntime="iOS.CocoaTouch" propertyAccessControl="none" useAutolayout="YES" launchScreen="YES" useTraitCollections="YES">
     <dependencies>
         <deployment identifier="iOS"/>
-        <plugIn identifier="com.apple.InterfaceBuilder.IBCocoaTouchPlugin" version="6247"/>
-        <capability name="Constraints with non-1.0 multipliers" minToolsVersion="5.1"/>
+        <plugIn identifier="com.apple.InterfaceBuilder.IBCocoaTouchPlugin" version="7520"/>
     </dependencies>
     <objects>
         <placeholder placeholderIdentifier="IBFilesOwner" id="-1" userLabel="File's Owner"/>
@@ -11,32 +10,7 @@
         <view contentMode="scaleToFill" id="iN0-l3-epB">
             <rect key="frame" x="0.0" y="0.0" width="480" height="480"/>
             <autoresizingMask key="autoresizingMask" widthSizable="YES" heightSizable="YES"/>
-            <subviews>
-                <label opaque="NO" clipsSubviews="YES" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" misplaced="YES" text="" textAlignment="center" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" minimumFontSize="9" translatesAutoresizingMaskIntoConstraints="NO" id="8ie-xW-0ye">
-                    <rect key="frame" x="20" y="439" width="441" height="21"/>
-                    <fontDescription key="fontDescription" type="system" pointSize="17"/>
-                    <color key="textColor" cocoaTouchSystemColor="darkTextColor"/>
-                    <nil key="highlightedColor"/>
-                    <variation key="widthClass=compact">
-                        <fontDescription key="fontDescription" type="system" pointSize="11"/>
-                    </variation>
-                </label>
-                <label opaque="NO" clipsSubviews="YES" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" text="LÖVE" textAlignment="center" lineBreakMode="middleTruncation" baselineAdjustment="alignBaselines" minimumFontSize="18" translatesAutoresizingMaskIntoConstraints="NO" id="kId-c2-rCX">
-                    <rect key="frame" x="20" y="140" width="441" height="43"/>
-                    <fontDescription key="fontDescription" type="boldSystem" pointSize="36"/>
-                    <color key="textColor" cocoaTouchSystemColor="darkTextColor"/>
-                    <nil key="highlightedColor"/>
-                </label>
-            </subviews>
             <color key="backgroundColor" white="1" alpha="1" colorSpace="custom" customColorSpace="calibratedWhite"/>
-            <constraints>
-                <constraint firstItem="kId-c2-rCX" firstAttribute="centerY" secondItem="iN0-l3-epB" secondAttribute="bottom" multiplier="1/3" constant="1" id="Kid-kn-2rF"/>
-                <constraint firstAttribute="centerX" secondItem="kId-c2-rCX" secondAttribute="centerX" id="Koa-jz-hwk"/>
-                <constraint firstAttribute="bottom" secondItem="8ie-xW-0ye" secondAttribute="bottom" constant="20" id="Kzo-t9-V3l"/>
-                <constraint firstItem="8ie-xW-0ye" firstAttribute="leading" secondItem="iN0-l3-epB" secondAttribute="leading" constant="20" symbolic="YES" id="MfP-vx-nX0"/>
-                <constraint firstAttribute="centerX" secondItem="8ie-xW-0ye" secondAttribute="centerX" id="ZEH-qu-HZ9"/>
-                <constraint firstItem="kId-c2-rCX" firstAttribute="leading" secondItem="iN0-l3-epB" secondAttribute="leading" constant="20" symbolic="YES" id="fvb-Df-36g"/>
-            </constraints>
             <nil key="simulatedStatusBarMetrics"/>
             <freeformSimulatedSizeMetrics key="simulatedDestinationMetrics"/>
             <point key="canvasLocation" x="404" y="445"/>

+ 2 - 2
platform/xcode/ios/love-ios.plist

@@ -32,7 +32,7 @@
 	<key>CFBundleIcons~ipad</key>
 	<dict/>
 	<key>CFBundleIdentifier</key>
-	<string>love.${PRODUCT_NAME:rfc1034identifier}</string>
+	<string>$(PRODUCT_BUNDLE_IDENTIFIER)</string>
 	<key>CFBundleInfoDictionaryVersion</key>
 	<string>6.0</string>
 	<key>CFBundleName</key>
@@ -40,7 +40,7 @@
 	<key>CFBundlePackageType</key>
 	<string>APPL</string>
 	<key>CFBundleShortVersionString</key>
-	<string>1.0</string>
+	<string>0.10.1</string>
 	<key>CFBundleSignature</key>
 	<string>????</string>
 	<key>CFBundleVersion</key>

+ 52 - 0
platform/xcode/ios/luajit-iOS.sh

@@ -0,0 +1,52 @@
+mkdir -p include/luajit
+mkdir -p libraries/luajit
+
+git clone https://github.com/LuaJIT/LuaJIT.git luajit-git
+cd luajit-git
+git pull
+git checkout v2.1
+
+# iOS device binaries
+
+ISDKP=$(xcrun --sdk iphoneos --show-sdk-path)
+ICC=$(xcrun --sdk iphoneos --find clang)
+
+ISDKF="-arch armv7 -isysroot $ISDKP -mios-version-min=6.0"
+make clean
+make -j8 HOST_CC="clang -m32 -arch i386" CROSS="$(dirname $ICC)/" TARGET_FLAGS="$ISDKF" TARGET_SYS=iOS
+cp src/libluajit.a ../libraries/luajit/libluajit_arm7.a
+
+ISDKF="-arch arm64 -isysroot $ISDKP -mios-version-min=6.0"
+make clean
+make -j8 CROSS="$(dirname $ICC)/" TARGET_FLAGS="$ISDKF" TARGET_SYS=iOS
+cp src/libluajit.a ../libraries/luajit/libluajit_arm64.a
+
+
+# iOS simulator binaries
+
+ISDKP=$(xcrun --sdk iphonesimulator --show-sdk-path)
+ICC=$(xcrun --sdk iphonesimulator --find clang)
+
+ISDKF="-arch i386 -isysroot $ISDKP -mios-simulator-version-min=6.0"
+make clean
+make -j8 HOST_CC="clang -m32 -arch i386" CROSS="$(dirname $ICC)/" TARGET_FLAGS="$ISDKF" TARGET_SYS=iOS
+cp src/libluajit.a ../libraries/luajit/libluajit_x86.a
+
+ISDKF="-arch x86_64 -isysroot $ISDKP -mios-simulator-version-min=6.0"
+make clean
+make -j8 CROSS="$(dirname $ICC)/" TARGET_FLAGS="$ISDKF" TARGET_SYS=iOS
+cp src/libluajit.a ../libraries/luajit/libluajit_x86_64.a
+
+
+# copy includes
+cp src/lua.hpp ../include/luajit
+
+cp src/lauxlib.h ../include/luajit
+cp src/lua.h ../include/luajit
+cp src/luaconf.h ../include/luajit
+cp src/lualib.h ../include/luajit
+cp src/luajit.h ../include/luajit
+
+# combine lib
+cd ../libraries/luajit
+lipo -create -output libluajit.a libluajit_arm7.a libluajit_arm64.a libluajit_x86.a libluajit_x86_64.a

File diff suppressed because it is too large
+ 295 - 97
platform/xcode/liblove.xcodeproj/project.pbxproj


+ 54 - 24
platform/xcode/love.xcodeproj/project.pbxproj

@@ -8,39 +8,39 @@
 
 /* Begin PBXBuildFile section */
 		8D11072F0486CEB800E47090 /* Cocoa.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 1058C7A1FEA54F0111CA2CBB /* Cocoa.framework */; };
-		A9255DD11043183600BA1496 /* FreeType.framework in Copy Frameworks */ = {isa = PBXBuildFile; fileRef = A93E6E4810420B4A007D418B /* FreeType.framework */; };
-		A9255DD31043183600BA1496 /* Lua.framework in Copy Frameworks */ = {isa = PBXBuildFile; fileRef = A93E6E5310420B57007D418B /* Lua.framework */; };
-		A9255E031043195A00BA1496 /* Vorbis.framework in Copy Frameworks */ = {isa = PBXBuildFile; fileRef = A9255E021043195A00BA1496 /* Vorbis.framework */; };
-		A9255F58104324E100BA1496 /* Ogg.framework in Copy Frameworks */ = {isa = PBXBuildFile; fileRef = A9255F51104324D700BA1496 /* Ogg.framework */; };
+		A9255DD11043183600BA1496 /* FreeType.framework in Copy Frameworks */ = {isa = PBXBuildFile; fileRef = A93E6E4810420B4A007D418B /* FreeType.framework */; settings = {ATTRIBUTES = (CodeSignOnCopy, ); }; };
+		A9255DD31043183600BA1496 /* Lua.framework in Copy Frameworks */ = {isa = PBXBuildFile; fileRef = A93E6E5310420B57007D418B /* Lua.framework */; settings = {ATTRIBUTES = (CodeSignOnCopy, ); }; };
+		A9255E031043195A00BA1496 /* Vorbis.framework in Copy Frameworks */ = {isa = PBXBuildFile; fileRef = A9255E021043195A00BA1496 /* Vorbis.framework */; settings = {ATTRIBUTES = (CodeSignOnCopy, ); }; };
+		A9255F58104324E100BA1496 /* Ogg.framework in Copy Frameworks */ = {isa = PBXBuildFile; fileRef = A9255F51104324D700BA1496 /* Ogg.framework */; settings = {ATTRIBUTES = (CodeSignOnCopy, ); }; };
 		A93E6E5510420B57007D418B /* Lua.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = A93E6E5310420B57007D418B /* Lua.framework */; };
 		A93E6EED10420BA8007D418B /* love.cpp in Sources */ = {isa = PBXBuildFile; fileRef = A93E6A3410420AC0007D418B /* love.cpp */; };
 		A9D307F2106635D3004FEDF8 /* physfs.framework in Copy Frameworks */ = {isa = PBXBuildFile; fileRef = A9D307E9106635C3004FEDF8 /* physfs.framework */; settings = {ATTRIBUTES = (CodeSignOnCopy, ); }; };
 		A9F169AC109E825000FC83D1 /* mpg123.framework in Copy Frameworks */ = {isa = PBXBuildFile; fileRef = A9F169A6109E824900FC83D1 /* mpg123.framework */; settings = {ATTRIBUTES = (CodeSignOnCopy, ); }; };
 		A9F169AD109E825000FC83D1 /* libmodplug.framework in Copy Frameworks */ = {isa = PBXBuildFile; fileRef = A9F16926109E7BAD00FC83D1 /* libmodplug.framework */; settings = {ATTRIBUTES = (CodeSignOnCopy, ); }; };
+		FA0797991BF480A200034B7C /* GameController.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = FA0797981BF480A200034B7C /* GameController.framework */; };
 		FA08F69616C766E000F007B5 /* love.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = FA08F69116C765A200F007B5 /* love.framework */; };
-		FA08F69716C766E700F007B5 /* love.framework in Copy Frameworks */ = {isa = PBXBuildFile; fileRef = FA08F69116C765A200F007B5 /* love.framework */; };
+		FA08F69716C766E700F007B5 /* love.framework in Copy Frameworks */ = {isa = PBXBuildFile; fileRef = FA08F69116C765A200F007B5 /* love.framework */; settings = {ATTRIBUTES = (CodeSignOnCopy, ); }; };
 		FA0B78D21A95814A000E1D17 /* love.icns in Resources */ = {isa = PBXBuildFile; fileRef = FA0B78D01A95814A000E1D17 /* love.icns */; };
 		FA0B78D31A95814A000E1D17 /* lovedocument.icns in Resources */ = {isa = PBXBuildFile; fileRef = FA0B78D11A95814A000E1D17 /* lovedocument.icns */; };
 		FA0B7F301A95AC7D000E1D17 /* love.cpp in Sources */ = {isa = PBXBuildFile; fileRef = A93E6A3410420AC0007D418B /* love.cpp */; };
+		FA27B3CB1B498696008A9DCE /* Theora.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = FA27B3CA1B498696008A9DCE /* Theora.framework */; };
 		FA5D24821A96CA1800C6FC8F /* OpenAL.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = FA5D24811A96CA1800C6FC8F /* OpenAL.framework */; };
 		FA5D24841A96CA2700C6FC8F /* OpenGLES.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = FA5D24831A96CA2700C6FC8F /* OpenGLES.framework */; };
 		FA5D24881A96CA8A00C6FC8F /* UIKit.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = FA5D24871A96CA8A00C6FC8F /* UIKit.framework */; };
 		FA5D248A1A96CA9600C6FC8F /* AudioToolbox.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = FA5D24891A96CA9600C6FC8F /* AudioToolbox.framework */; };
 		FA5D248C1A96CA9E00C6FC8F /* QuartzCore.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = FA5D248B1A96CA9E00C6FC8F /* QuartzCore.framework */; };
 		FA5D248E1A96CAA700C6FC8F /* CoreGraphics.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = FA5D248D1A96CAA700C6FC8F /* CoreGraphics.framework */; };
-		FA5D24901A96CAAE00C6FC8F /* ImageIO.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = FA5D248F1A96CAAE00C6FC8F /* ImageIO.framework */; };
-		FA5D24921A96CAB300C6FC8F /* MobileCoreServices.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = FA5D24911A96CAB300C6FC8F /* MobileCoreServices.framework */; };
 		FA5D24941A96CABA00C6FC8F /* libz.dylib in Frameworks */ = {isa = PBXBuildFile; fileRef = FA5D24931A96CABA00C6FC8F /* libz.dylib */; };
 		FA5D24961A96CAC200C6FC8F /* CoreMotion.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = FA5D24951A96CAC200C6FC8F /* CoreMotion.framework */; };
 		FA5D249C1A96CF4300C6FC8F /* Images.xcassets in Resources */ = {isa = PBXBuildFile; fileRef = FA5D249A1A96CF4300C6FC8F /* Images.xcassets */; };
 		FA5D24C21A96D78000C6FC8F /* Foundation.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = FA5D24C11A96D78000C6FC8F /* Foundation.framework */; };
 		FA5D24D11A96E73300C6FC8F /* liblove.a in Frameworks */ = {isa = PBXBuildFile; fileRef = FA0B7EEF1A95924A000E1D17 /* liblove.a */; };
-		FA77A36518F1172600D23AE9 /* jpeg-turbo.framework in Copy Frameworks */ = {isa = PBXBuildFile; fileRef = FA77A36418F1172600D23AE9 /* jpeg-turbo.framework */; };
 		FA7C636A1A9C49570000FD29 /* Launch Screen.xib in Resources */ = {isa = PBXBuildFile; fileRef = FA7C63691A9C49570000FD29 /* Launch Screen.xib */; };
 		FA9B4A0A16E1579F00074F42 /* SDL2.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = FA9B4A0916E1579F00074F42 /* SDL2.framework */; };
 		FA9B4A0B16E157B500074F42 /* SDL2.framework in Copy Frameworks */ = {isa = PBXBuildFile; fileRef = FA9B4A0916E1579F00074F42 /* SDL2.framework */; settings = {ATTRIBUTES = (CodeSignOnCopy, ); }; };
 		FAAFF04716CB120000CCDE45 /* OpenAL-Soft.framework in Copy Frameworks */ = {isa = PBXBuildFile; fileRef = FAAFF04616CB120000CCDE45 /* OpenAL-Soft.framework */; settings = {ATTRIBUTES = (CodeSignOnCopy, ); }; };
 		FAC1A449196F5DC600125284 /* license.txt in Resources */ = {isa = PBXBuildFile; fileRef = FAC1A448196F5DC600125284 /* license.txt */; };
+		FAD4B1731C1F50A3004CF150 /* Theora.framework in Copy Frameworks */ = {isa = PBXBuildFile; fileRef = FA27B3CA1B498696008A9DCE /* Theora.framework */; settings = {ATTRIBUTES = (CodeSignOnCopy, ); }; };
 /* End PBXBuildFile section */
 
 /* Begin PBXContainerItemProxy section */
@@ -65,6 +65,13 @@
 			remoteGlobalIDString = FA0B78DC1A958B90000E1D17;
 			remoteInfo = "liblove-ios";
 		};
+		FAA287711B0ABF1400B82827 /* PBXContainerItemProxy */ = {
+			isa = PBXContainerItemProxy;
+			containerPortal = FA577A9316C7217800860150 /* liblove.xcodeproj */;
+			proxyType = 1;
+			remoteGlobalIDString = FA577AAE16C7507900860150;
+			remoteInfo = "liblove-macosx";
+		};
 /* End PBXContainerItemProxy section */
 
 /* Begin PBXCopyFilesBuildPhase section */
@@ -74,9 +81,9 @@
 			dstPath = "";
 			dstSubfolderSpec = 10;
 			files = (
-				FA77A36518F1172600D23AE9 /* jpeg-turbo.framework in Copy Frameworks */,
 				FA08F69716C766E700F007B5 /* love.framework in Copy Frameworks */,
 				FA9B4A0B16E157B500074F42 /* SDL2.framework in Copy Frameworks */,
+				FAD4B1731C1F50A3004CF150 /* Theora.framework in Copy Frameworks */,
 				FAAFF04716CB120000CCDE45 /* OpenAL-Soft.framework in Copy Frameworks */,
 				A9F169AC109E825000FC83D1 /* mpg123.framework in Copy Frameworks */,
 				A9F169AD109E825000FC83D1 /* libmodplug.framework in Copy Frameworks */,
@@ -104,10 +111,12 @@
 		A9D307E9106635C3004FEDF8 /* physfs.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = physfs.framework; path = /Library/Frameworks/physfs.framework; sourceTree = "<absolute>"; };
 		A9F16926109E7BAD00FC83D1 /* libmodplug.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = libmodplug.framework; path = /Library/Frameworks/libmodplug.framework; sourceTree = "<absolute>"; };
 		A9F169A6109E824900FC83D1 /* mpg123.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = mpg123.framework; path = /Library/Frameworks/mpg123.framework; sourceTree = "<absolute>"; };
+		FA0797981BF480A200034B7C /* GameController.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = GameController.framework; path = Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS9.1.sdk/System/Library/Frameworks/GameController.framework; sourceTree = DEVELOPER_DIR; };
 		FA08F69116C765A200F007B5 /* love.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; path = love.framework; sourceTree = BUILT_PRODUCTS_DIR; };
 		FA0B78D01A95814A000E1D17 /* love.icns */ = {isa = PBXFileReference; lastKnownFileType = image.icns; name = love.icns; path = macosx/love.icns; sourceTree = "<group>"; };
 		FA0B78D11A95814A000E1D17 /* lovedocument.icns */ = {isa = PBXFileReference; lastKnownFileType = image.icns; name = lovedocument.icns; path = macosx/lovedocument.icns; sourceTree = "<group>"; };
 		FA0B7F061A95AAF3000E1D17 /* love.app */ = {isa = PBXFileReference; explicitFileType = wrapper.application; includeInIndex = 0; path = love.app; sourceTree = BUILT_PRODUCTS_DIR; };
+		FA27B3CA1B498696008A9DCE /* Theora.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = Theora.framework; path = /Library/Frameworks/Theora.framework; sourceTree = "<absolute>"; };
 		FA577A9316C7217800860150 /* liblove.xcodeproj */ = {isa = PBXFileReference; lastKnownFileType = "wrapper.pb-project"; path = liblove.xcodeproj; sourceTree = "<group>"; };
 		FA5D24811A96CA1800C6FC8F /* OpenAL.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = OpenAL.framework; path = Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS8.1.sdk/System/Library/Frameworks/OpenAL.framework; sourceTree = DEVELOPER_DIR; };
 		FA5D24831A96CA2700C6FC8F /* OpenGLES.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = OpenGLES.framework; path = Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS8.1.sdk/System/Library/Frameworks/OpenGLES.framework; sourceTree = DEVELOPER_DIR; };
@@ -115,14 +124,11 @@
 		FA5D24891A96CA9600C6FC8F /* AudioToolbox.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = AudioToolbox.framework; path = Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS8.1.sdk/System/Library/Frameworks/AudioToolbox.framework; sourceTree = DEVELOPER_DIR; };
 		FA5D248B1A96CA9E00C6FC8F /* QuartzCore.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = QuartzCore.framework; path = Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS8.1.sdk/System/Library/Frameworks/QuartzCore.framework; sourceTree = DEVELOPER_DIR; };
 		FA5D248D1A96CAA700C6FC8F /* CoreGraphics.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = CoreGraphics.framework; path = Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS8.1.sdk/System/Library/Frameworks/CoreGraphics.framework; sourceTree = DEVELOPER_DIR; };
-		FA5D248F1A96CAAE00C6FC8F /* ImageIO.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = ImageIO.framework; path = Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS8.1.sdk/System/Library/Frameworks/ImageIO.framework; sourceTree = DEVELOPER_DIR; };
-		FA5D24911A96CAB300C6FC8F /* MobileCoreServices.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = MobileCoreServices.framework; path = Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS8.1.sdk/System/Library/Frameworks/MobileCoreServices.framework; sourceTree = DEVELOPER_DIR; };
 		FA5D24931A96CABA00C6FC8F /* libz.dylib */ = {isa = PBXFileReference; lastKnownFileType = "compiled.mach-o.dylib"; name = libz.dylib; path = Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS8.1.sdk/usr/lib/libz.dylib; sourceTree = DEVELOPER_DIR; };
 		FA5D24951A96CAC200C6FC8F /* CoreMotion.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = CoreMotion.framework; path = Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS8.1.sdk/System/Library/Frameworks/CoreMotion.framework; sourceTree = DEVELOPER_DIR; };
 		FA5D24971A96CE1E00C6FC8F /* love-ios.plist */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.plist.xml; name = "love-ios.plist"; path = "ios/love-ios.plist"; sourceTree = "<group>"; };
 		FA5D249A1A96CF4300C6FC8F /* Images.xcassets */ = {isa = PBXFileReference; lastKnownFileType = folder.assetcatalog; name = Images.xcassets; path = ios/Images.xcassets; sourceTree = "<group>"; };
 		FA5D24C11A96D78000C6FC8F /* Foundation.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = Foundation.framework; path = Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS8.1.sdk/System/Library/Frameworks/Foundation.framework; sourceTree = DEVELOPER_DIR; };
-		FA77A36418F1172600D23AE9 /* jpeg-turbo.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = "jpeg-turbo.framework"; path = "/Library/Frameworks/jpeg-turbo.framework"; sourceTree = "<absolute>"; };
 		FA7C63691A9C49570000FD29 /* Launch Screen.xib */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = file.xib; name = "Launch Screen.xib"; path = "ios/Launch Screen.xib"; sourceTree = "<group>"; };
 		FA9B4A0916E1579F00074F42 /* SDL2.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = SDL2.framework; path = /Library/Frameworks/SDL2.framework; sourceTree = "<absolute>"; };
 		FAAFF04616CB120000CCDE45 /* OpenAL-Soft.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = "OpenAL-Soft.framework"; path = "/Library/Frameworks/OpenAL-Soft.framework"; sourceTree = "<absolute>"; };
@@ -137,6 +143,7 @@
 				FA08F69616C766E000F007B5 /* love.framework in Frameworks */,
 				8D11072F0486CEB800E47090 /* Cocoa.framework in Frameworks */,
 				A93E6E5510420B57007D418B /* Lua.framework in Frameworks */,
+				FA27B3CB1B498696008A9DCE /* Theora.framework in Frameworks */,
 				FA9B4A0A16E1579F00074F42 /* SDL2.framework in Frameworks */,
 			);
 			runOnlyForDeploymentPostprocessing = 0;
@@ -148,9 +155,8 @@
 				FA5D24D11A96E73300C6FC8F /* liblove.a in Frameworks */,
 				FA5D24C21A96D78000C6FC8F /* Foundation.framework in Frameworks */,
 				FA5D24961A96CAC200C6FC8F /* CoreMotion.framework in Frameworks */,
+				FA0797991BF480A200034B7C /* GameController.framework in Frameworks */,
 				FA5D24941A96CABA00C6FC8F /* libz.dylib in Frameworks */,
-				FA5D24921A96CAB300C6FC8F /* MobileCoreServices.framework in Frameworks */,
-				FA5D24901A96CAAE00C6FC8F /* ImageIO.framework in Frameworks */,
 				FA5D248E1A96CAA700C6FC8F /* CoreGraphics.framework in Frameworks */,
 				FA5D248C1A96CA9E00C6FC8F /* QuartzCore.framework in Frameworks */,
 				FA5D248A1A96CA9600C6FC8F /* AudioToolbox.framework in Frameworks */,
@@ -218,9 +224,9 @@
 		FA0B7EEC1A959249000E1D17 /* macosx */ = {
 			isa = PBXGroup;
 			children = (
+				FA27B3CA1B498696008A9DCE /* Theora.framework */,
 				1058C7A1FEA54F0111CA2CBB /* Cocoa.framework */,
 				A93E6E4810420B4A007D418B /* FreeType.framework */,
-				FA77A36418F1172600D23AE9 /* jpeg-turbo.framework */,
 				A9F16926109E7BAD00FC83D1 /* libmodplug.framework */,
 				FA08F69116C765A200F007B5 /* love.framework */,
 				A93E6E5310420B57007D418B /* Lua.framework */,
@@ -246,13 +252,12 @@
 		FA5D24801A96C97900C6FC8F /* ios */ = {
 			isa = PBXGroup;
 			children = (
+				FA0797981BF480A200034B7C /* GameController.framework */,
 				FA5D24C11A96D78000C6FC8F /* Foundation.framework */,
 				FA5D24891A96CA9600C6FC8F /* AudioToolbox.framework */,
 				FA5D248D1A96CAA700C6FC8F /* CoreGraphics.framework */,
 				FA5D24951A96CAC200C6FC8F /* CoreMotion.framework */,
-				FA5D248F1A96CAAE00C6FC8F /* ImageIO.framework */,
 				FA5D24931A96CABA00C6FC8F /* libz.dylib */,
-				FA5D24911A96CAB300C6FC8F /* MobileCoreServices.framework */,
 				FA5D24811A96CA1800C6FC8F /* OpenAL.framework */,
 				FA5D24831A96CA2700C6FC8F /* OpenGLES.framework */,
 				FA5D248B1A96CA9E00C6FC8F /* QuartzCore.framework */,
@@ -286,6 +291,7 @@
 			buildRules = (
 			);
 			dependencies = (
+				FAA287721B0ABF1400B82827 /* PBXTargetDependency */,
 			);
 			name = "love-macosx";
 			productInstallPath = "$(HOME)/Applications";
@@ -317,7 +323,7 @@
 		29B97313FDCFA39411CA2CEA /* Project object */ = {
 			isa = PBXProject;
 			attributes = {
-				LastUpgradeCheck = 0610;
+				LastUpgradeCheck = 0700;
 				TargetAttributes = {
 					FA0B7F051A95AAF3000E1D17 = {
 						CreatedOnToolsVersion = 6.1.1;
@@ -415,19 +421,24 @@
 			name = "liblove-ios";
 			targetProxy = FA5D24BA1A96D6FC00C6FC8F /* PBXContainerItemProxy */;
 		};
+		FAA287721B0ABF1400B82827 /* PBXTargetDependency */ = {
+			isa = PBXTargetDependency;
+			name = "liblove-macosx";
+			targetProxy = FAA287711B0ABF1400B82827 /* PBXContainerItemProxy */;
+		};
 /* End PBXTargetDependency section */
 
 /* Begin XCBuildConfiguration section */
 		C01FCF4B08A954540054247B /* Debug */ = {
 			isa = XCBuildConfiguration;
 			buildSettings = {
-				ARCHS = "$(ARCHS_STANDARD_64_BIT)";
 				COMBINE_HIDPI_IMAGES = YES;
 				FRAMEWORK_SEARCH_PATHS = (
 					"$(inherited)",
 					/Library/Frameworks,
 					"\"$(SRCROOT)/build/Release\"",
 					"\"$(SRCROOT)/build/Debug\"",
+					"$(LOCAL_LIBRARY_DIR)/Frameworks",
 				);
 				GCC_DYNAMIC_NO_PIC = NO;
 				GCC_OPTIMIZATION_LEVEL = 0;
@@ -438,6 +449,8 @@
 				);
 				INFOPLIST_FILE = "macosx/love-macosx.plist";
 				INSTALL_PATH = /Applications;
+				LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/../Frameworks";
+				PRODUCT_BUNDLE_IDENTIFIER = org.love2d.love;
 				PRODUCT_NAME = love;
 			};
 			name = Debug;
@@ -445,7 +458,6 @@
 		C01FCF4C08A954540054247B /* Release */ = {
 			isa = XCBuildConfiguration;
 			buildSettings = {
-				ARCHS = "$(ARCHS_STANDARD_64_BIT)";
 				COMBINE_HIDPI_IMAGES = YES;
 				DEBUG_INFORMATION_FORMAT = "dwarf-with-dsym";
 				FRAMEWORK_SEARCH_PATHS = (
@@ -453,6 +465,7 @@
 					/Library/Frameworks,
 					"\"$(SRCROOT)/build/Release\"",
 					"\"$(SRCROOT)/build/Debug\"",
+					"$(LOCAL_LIBRARY_DIR)/Frameworks",
 				);
 				HEADER_SEARCH_PATHS = (
 					"$(inherited)",
@@ -461,6 +474,8 @@
 				);
 				INFOPLIST_FILE = "macosx/love-macosx.plist";
 				INSTALL_PATH = /Applications;
+				LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/../Frameworks";
+				PRODUCT_BUNDLE_IDENTIFIER = org.love2d.love;
 				PRODUCT_NAME = love;
 			};
 			name = Release;
@@ -473,6 +488,7 @@
 				CLANG_CXX_LIBRARY = "libc++";
 				CLANG_ENABLE_MODULES = YES;
 				CLANG_ENABLE_OBJC_ARC = YES;
+				ENABLE_TESTABILITY = YES;
 				FRAMEWORK_SEARCH_PATHS = "";
 				GCC_INCREASE_PRECOMPILED_HEADER_SHARING = YES;
 				GCC_OPTIMIZATION_LEVEL = 0;
@@ -499,6 +515,7 @@
 					"\"$(SRCROOT)/../../src/modules\"",
 				);
 				INFOPLIST_FILE = "love-Info.plist";
+				IPHONEOS_DEPLOYMENT_TARGET = 6.0;
 				LD_RUNPATH_SEARCH_PATHS = "@loader_path/../Frameworks";
 				MACOSX_DEPLOYMENT_TARGET = 10.7;
 				ONLY_ACTIVE_ARCH = YES;
@@ -510,6 +527,7 @@
 					100000000,
 				);
 				PRODUCT_NAME = love;
+				SDKROOT = macosx;
 				WARNING_CFLAGS = (
 					"-Wall",
 					"-W",
@@ -554,6 +572,7 @@
 					"\"$(SRCROOT)/../../src/modules\"",
 				);
 				INFOPLIST_FILE = "love-Info.plist";
+				IPHONEOS_DEPLOYMENT_TARGET = 6.0;
 				LD_RUNPATH_SEARCH_PATHS = "@loader_path/../Frameworks";
 				LLVM_LTO = YES;
 				MACOSX_DEPLOYMENT_TARGET = 10.7;
@@ -567,6 +586,7 @@
 				);
 				PRODUCT_NAME = love;
 				SCAN_ALL_SOURCE_FILES_FOR_INCLUDES = YES;
+				SDKROOT = macosx;
 				WARNING_CFLAGS = (
 					"-Wall",
 					"-W",
@@ -590,6 +610,7 @@
 				CLANG_WARN__DUPLICATE_METHOD_MATCH = YES;
 				"CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Developer";
 				COPY_PHASE_STRIP = NO;
+				ENABLE_BITCODE = NO;
 				ENABLE_STRICT_OBJC_MSGSEND = YES;
 				GCC_DYNAMIC_NO_PIC = NO;
 				GCC_PREPROCESSOR_DEFINITIONS = (
@@ -605,13 +626,14 @@
 				HEADER_SEARCH_PATHS = (
 					"$(inherited)",
 					ios/include,
-					ios/include/lua,
+					ios/include/luajit,
 					ios/include/SDL2,
 				);
 				INFOPLIST_FILE = "$(SRCROOT)/ios/love-ios.plist";
 				IPHONEOS_DEPLOYMENT_TARGET = 6.0;
 				LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks";
 				MTL_ENABLE_DEBUG_INFO = YES;
+				PRODUCT_BUNDLE_IDENTIFIER = org.love2d.love;
 				PRODUCT_NAME = love;
 				SDKROOT = iphoneos;
 				TARGETED_DEVICE_FAMILY = "1,2";
@@ -634,6 +656,7 @@
 				CLANG_WARN__DUPLICATE_METHOD_MATCH = YES;
 				"CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Developer";
 				COPY_PHASE_STRIP = YES;
+				ENABLE_BITCODE = NO;
 				ENABLE_NS_ASSERTIONS = NO;
 				ENABLE_STRICT_OBJC_MSGSEND = YES;
 				GCC_WARN_64_TO_32_BIT_CONVERSION = YES;
@@ -644,13 +667,14 @@
 				HEADER_SEARCH_PATHS = (
 					"$(inherited)",
 					ios/include,
-					ios/include/lua,
+					ios/include/luajit,
 					ios/include/SDL2,
 				);
 				INFOPLIST_FILE = "$(SRCROOT)/ios/love-ios.plist";
 				IPHONEOS_DEPLOYMENT_TARGET = 6.0;
 				LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks";
 				MTL_ENABLE_DEBUG_INFO = NO;
+				PRODUCT_BUNDLE_IDENTIFIER = org.love2d.love;
 				PRODUCT_NAME = love;
 				SDKROOT = iphoneos;
 				TARGETED_DEVICE_FAMILY = "1,2";
@@ -674,6 +698,7 @@
 				CLANG_WARN__DUPLICATE_METHOD_MATCH = YES;
 				"CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Developer";
 				COPY_PHASE_STRIP = YES;
+				ENABLE_BITCODE = NO;
 				ENABLE_NS_ASSERTIONS = NO;
 				ENABLE_STRICT_OBJC_MSGSEND = YES;
 				GCC_WARN_64_TO_32_BIT_CONVERSION = YES;
@@ -684,13 +709,14 @@
 				HEADER_SEARCH_PATHS = (
 					"$(inherited)",
 					ios/include,
-					ios/include/lua,
+					ios/include/luajit,
 					ios/include/SDL2,
 				);
 				INFOPLIST_FILE = "$(SRCROOT)/ios/love-ios.plist";
 				IPHONEOS_DEPLOYMENT_TARGET = 6.0;
 				LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks";
 				MTL_ENABLE_DEBUG_INFO = NO;
+				PRODUCT_BUNDLE_IDENTIFIER = org.love2d.love;
 				PRODUCT_NAME = love;
 				SDKROOT = iphoneos;
 				TARGETED_DEVICE_FAMILY = "1,2";
@@ -735,6 +761,7 @@
 					"\"$(SRCROOT)/../../src/modules\"",
 				);
 				INFOPLIST_FILE = "love-Info.plist";
+				IPHONEOS_DEPLOYMENT_TARGET = 6.0;
 				LD_RUNPATH_SEARCH_PATHS = "@loader_path/../Frameworks";
 				LLVM_LTO = YES;
 				MACOSX_DEPLOYMENT_TARGET = 10.7;
@@ -748,6 +775,7 @@
 				);
 				PRODUCT_NAME = love;
 				SCAN_ALL_SOURCE_FILES_FOR_INCLUDES = YES;
+				SDKROOT = macosx;
 				WARNING_CFLAGS = (
 					"-Wall",
 					"-W",
@@ -758,7 +786,6 @@
 		FA5326C718971A0900F7BBF4 /* Distribution */ = {
 			isa = XCBuildConfiguration;
 			buildSettings = {
-				ARCHS = "$(ARCHS_STANDARD_64_BIT)";
 				COMBINE_HIDPI_IMAGES = YES;
 				DEBUG_INFORMATION_FORMAT = "dwarf-with-dsym";
 				FRAMEWORK_SEARCH_PATHS = (
@@ -766,6 +793,7 @@
 					/Library/Frameworks,
 					"\"$(SRCROOT)/build/Release\"",
 					"\"$(SRCROOT)/build/Debug\"",
+					"$(LOCAL_LIBRARY_DIR)/Frameworks",
 				);
 				HEADER_SEARCH_PATHS = (
 					"$(inherited)",
@@ -774,6 +802,8 @@
 				);
 				INFOPLIST_FILE = "macosx/love-macosx.plist";
 				INSTALL_PATH = /Applications;
+				LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/../Frameworks";
+				PRODUCT_BUNDLE_IDENTIFIER = org.love2d.love;
 				PRODUCT_NAME = love;
 			};
 			name = Distribution;

+ 2 - 4
platform/xcode/macosx/liblove-macosx.plist

@@ -9,7 +9,7 @@
 	<key>CFBundleIconFile</key>
 	<string></string>
 	<key>CFBundleIdentifier</key>
-	<string>love2d.${PRODUCT_NAME:rfc1034identifier}</string>
+	<string>$(PRODUCT_BUNDLE_IDENTIFIER)</string>
 	<key>CFBundleInfoDictionaryVersion</key>
 	<string>6.0</string>
 	<key>CFBundleName</key>
@@ -17,11 +17,9 @@
 	<key>CFBundlePackageType</key>
 	<string>FMWK</string>
 	<key>CFBundleShortVersionString</key>
-	<string>0.10.0</string>
+	<string>0.10.1</string>
 	<key>CFBundleSignature</key>
 	<string>LoVe</string>
-	<key>CFBundleVersion</key>
-	<string>0.10.0</string>
 	<key>NSPrincipalClass</key>
 	<string></string>
 </dict>

+ 5 - 3
platform/xcode/macosx/love-macosx.plist

@@ -50,7 +50,7 @@
 	<key>CFBundleIconFile</key>
 	<string>love.icns</string>
 	<key>CFBundleIdentifier</key>
-	<string>org.love2d.love</string>
+	<string>$(PRODUCT_BUNDLE_IDENTIFIER)</string>
 	<key>CFBundleInfoDictionaryVersion</key>
 	<string>6.0</string>
 	<key>CFBundleName</key>
@@ -58,13 +58,15 @@
 	<key>CFBundlePackageType</key>
 	<string>APPL</string>
 	<key>CFBundleShortVersionString</key>
-	<string>0.10.0</string>
+	<string>0.10.1</string>
 	<key>CFBundleSignature</key>
 	<string>LoVe</string>
 	<key>LSApplicationCategoryType</key>
 	<string>public.app-category.games</string>
+	<key>NSHighResolutionCapable</key>
+	<true/>
 	<key>NSHumanReadableCopyright</key>
-	<string>© 2006-2015 LÖVE Development Team</string>
+	<string>© 2006-2016 LÖVE Development Team</string>
 	<key>NSPrincipalClass</key>
 	<string>NSApplication</string>
 	<key>UTExportedTypeDeclarations</key>

+ 67 - 0
readme-iOS.rtf

@@ -0,0 +1,67 @@
+{\rtf1\ansi\ansicpg1252\cocoartf1404\cocoasubrtf340
+{\fonttbl\f0\fswiss\fcharset0 Helvetica;\f1\fnil\fcharset0 Monaco;\f2\fnil\fcharset0 LucidaGrande;
+}
+{\colortbl;\red255\green255\blue255;}
+{\*\listtable{\list\listtemplateid1\listhybrid{\listlevel\levelnfc23\levelnfcn23\leveljc0\leveljcn0\levelfollow0\levelstartat1\levelspace360\levelindent0{\*\levelmarker \{disc\}}{\leveltext\leveltemplateid1\'01\uc0\u8226 ;}{\levelnumbers;}\fi-360\li720\lin720 }{\listname ;}\listid1}
+{\list\listtemplateid2\listhybrid{\listlevel\levelnfc23\levelnfcn23\leveljc0\leveljcn0\levelfollow0\levelstartat1\levelspace360\levelindent0{\*\levelmarker \{disc\}}{\leveltext\leveltemplateid101\'01\uc0\u8226 ;}{\levelnumbers;}\fi-360\li720\lin720 }{\listname ;}\listid2}
+{\list\listtemplateid3\listhybrid{\listlevel\levelnfc23\levelnfcn23\leveljc0\leveljcn0\levelfollow0\levelstartat1\levelspace360\levelindent0{\*\levelmarker \{disc\}}{\leveltext\leveltemplateid201\'01\uc0\u8226 ;}{\levelnumbers;}\fi-360\li720\lin720 }{\listname ;}\listid3}
+{\list\listtemplateid4\listhybrid{\listlevel\levelnfc23\levelnfcn23\leveljc0\leveljcn0\levelfollow0\levelstartat1\levelspace360\levelindent0{\*\levelmarker \{disc\}}{\leveltext\leveltemplateid301\'01\uc0\u8226 ;}{\levelnumbers;}\fi-360\li720\lin720 }{\listname ;}\listid4}
+{\list\listtemplateid5\listhybrid{\listlevel\levelnfc23\levelnfcn23\leveljc0\leveljcn0\levelfollow0\levelstartat1\levelspace360\levelindent0{\*\levelmarker \{disc\}}{\leveltext\leveltemplateid401\'01\uc0\u8226 ;}{\levelnumbers;}\fi-360\li720\lin720 }{\listname ;}\listid5}
+{\list\listtemplateid6\listhybrid{\listlevel\levelnfc23\levelnfcn23\leveljc0\leveljcn0\levelfollow0\levelstartat1\levelspace360\levelindent0{\*\levelmarker \{disc\}}{\leveltext\leveltemplateid501\'01\uc0\u8226 ;}{\levelnumbers;}\fi-360\li720\lin720 }{\listname ;}\listid6}}
+{\*\listoverridetable{\listoverride\listid1\listoverridecount0\ls1}{\listoverride\listid2\listoverridecount0\ls2}{\listoverride\listid3\listoverridecount0\ls3}{\listoverride\listid4\listoverridecount0\ls4}{\listoverride\listid5\listoverridecount0\ls5}{\listoverride\listid6\listoverridecount0\ls6}}
+\margl1440\margr1440\vieww14040\viewh10200\viewkind0
+\pard\tx566\tx1133\tx1700\tx2267\tx2834\tx3401\tx3968\tx4535\tx5102\tx5669\tx6236\tx6803\pardirnatural\partightenfactor0
+
+\f0\b\fs36 \cf0 Building L\'d6VE for iOS
+\b0\fs24 \
+\pard\tx566\tx1133\tx1700\tx2267\tx2834\tx3401\tx3968\tx4535\tx5102\tx5669\tx6236\tx6803\pardirnatural\partightenfactor0
+\cf0 \
+In order to run L\'d6VE for iOS, it must first be compiled and installed. To do that, you\'92ll need Mac OS X and {\field{\*\fldinst{HYPERLINK "https://developer.apple.com/xcode/"}}{\fldrslt Xcode 7 or newer}}.\
+\
+\pard\tx220\tx720\tx1133\tx1700\tx2267\tx2834\tx3401\tx3968\tx4535\tx5102\tx5669\tx6236\tx6803\li720\fi-720\pardirnatural\partightenfactor0
+\ls1\ilvl0\cf0 {\listtext	\'95	}If the 
+\f1\fs22 include
+\f0\fs24  and 
+\f1\fs22 libraries
+\f0\fs24  folders are not present in the 
+\f1\fs22 love/platform/xcode/ios
+\f0\fs24  folder, {\field{\*\fldinst{HYPERLINK "https://bitbucket.org/rude/love/downloads/love-0.10.0-ios-libraries.zip"}}{\fldrslt download them}} and place them there. They contain the third-party library dependencies used by L\'d6VE.\
+\pard\tx566\tx1133\tx1700\tx2267\tx2834\tx3401\tx3968\tx4535\tx5102\tx5669\tx6236\tx6803\pardirnatural\partightenfactor0
+\cf0 \
+\pard\tx220\tx720\tx1133\tx1700\tx2267\tx2834\tx3401\tx3968\tx4535\tx5102\tx5669\tx6236\tx6803\li720\fi-720\pardirnatural\partightenfactor0
+\ls2\ilvl0\cf0 {\listtext	\'95	}Open the Xcode project found at 
+\f1\fs22 love/platform/xcode/love.xcodeproj
+\f0\fs24 , and select the \'93love-ios\'94 target in the dropdown menu at the top of the window.\
+\pard\tx566\tx1133\tx1700\tx2267\tx2834\tx3401\tx3968\tx4535\tx5102\tx5669\tx6236\tx6803\pardirnatural\partightenfactor0
+\cf0 \
+\pard\tx220\tx720\tx1133\tx1700\tx2267\tx2834\tx3401\tx3968\tx4535\tx5102\tx5669\tx6236\tx6803\li720\fi-720\pardirnatural\partightenfactor0
+\ls3\ilvl0\cf0 {\listtext	\'95	}You may want to change the Build Configuration from Debug to Release mode for better runtime performance, by opening the \'93Edit Scheme\'85\'94 menu from the same dropdown selection.\
+\pard\tx566\tx1133\tx1700\tx2267\tx2834\tx3401\tx3968\tx4535\tx5102\tx5669\tx6236\tx6803\pardirnatural\partightenfactor0
+\cf0 \
+\pard\tx220\tx720\tx1133\tx1700\tx2267\tx2834\tx3401\tx3968\tx4535\tx5102\tx5669\tx6236\tx6803\li720\fi-720\pardirnatural\partightenfactor0
+\ls4\ilvl0\cf0 {\listtext	\'95	}Choose either an iOS Simulator device or your plugged-in iOS device from the dropdown selection to the right of the previous one, and click the Build-and-Run 
+\f2 \uc0\u9654 \u65038 
+\f0  button to the left, which will install and run L\'d6VE on the target device after compiling it.\
+\pard\tx566\tx1133\tx1700\tx2267\tx2834\tx3401\tx3968\tx4535\tx5102\tx5669\tx6236\tx6803\pardirnatural\partightenfactor0
+\cf0 \
+
+\b\fs36 Running Games on iOS
+\b0\fs24 \
+\pard\tx566\tx1133\tx1700\tx2267\tx2834\tx3401\tx3968\tx4535\tx5102\tx5669\tx6236\tx6803\pardirnatural\partightenfactor0
+\cf0 \
+L\'d6VE on iOS includes a simple list interface of games that are installed (until you {\field{\*\fldinst{HYPERLINK "https://love2d.org/wiki/Game_Distribution"}}{\fldrslt fuse}} a .love to it for distribution.)\
+\
+\pard\tx220\tx720\tx1133\tx1700\tx2267\tx2834\tx3401\tx3968\tx4535\tx5102\tx5669\tx6236\tx6803\li720\fi-720\pardirnatural\partightenfactor0
+\ls5\ilvl0\cf0 {\listtext	\'95	}To put a .love file on the iOS Simulator after L\'d6VE is installed, drag the file onto the iOS Simulator\'92s window while it\'92s open. L\'d6VE will launch if it\'92s not running already. If another game is currently active you may need to quit L\'d6VE for the new game to show up (press Shift-Command-H twice to open the App Switcher menu on the iOS Simulator.)\
+\pard\tx566\tx1133\tx1700\tx2267\tx2834\tx3401\tx3968\tx4535\tx5102\tx5669\tx6236\tx6803\pardirnatural\partightenfactor0
+\cf0 \
+\pard\tx220\tx720\tx1133\tx1700\tx2267\tx2834\tx3401\tx3968\tx4535\tx5102\tx5669\tx6236\tx6803\li720\fi-720\pardirnatural\partightenfactor0
+\ls6\ilvl0\cf0 {\listtext	\'95	}To put a .love file or game folder on your iOS device after L\'d6VE is installed, you can either download it with the Safari, or transfer it from your computer through iTunes when your device is connected: open iTunes, go to the iOS device which has L\'d6VE installed, go to the \'91Apps\'92 section and scroll down and find L\'d6VE, and add the .love file or game folder to L\'d6VE\'92s Documents section.\
+\pard\tx566\tx1133\tx1700\tx2267\tx2834\tx3401\tx3968\tx4535\tx5102\tx5669\tx6236\tx6803\pardirnatural\partightenfactor0
+\cf0 \
+
+\b\fs36 Distributing a Game on iOS
+\b0\fs24 \
+\
+Refer to the {\field{\*\fldinst{HYPERLINK "https://love2d.org/wiki/Game_Distribution#iOS"}}{\fldrslt Game Distribution}} L\'d6VE wiki page.\
+}

+ 26 - 4
readme.md

@@ -1,4 +1,6 @@
-LÖVE is an *awesome* framework you can use to make 2D games in Lua. It's free, open-source, and works on Windows, Mac OS X and Linux.
+LÖVE is an *awesome* framework you can use to make 2D games in Lua. It's free, open-source, and works on Windows, Mac OS X, Linux, Android, and iOS.
+
+[![Build Status: Windows](https://ci.appveyor.com/api/projects/status/u1a69u5o5ej1pus4?svg=true)](https://ci.appveyor.com/project/AlexSzpakowski/love)
 
 Documentation
 -------------
@@ -24,6 +26,17 @@ Download the required frameworks from [here][dependencies] and place them in `/L
 
 Then use the Xcode project found at `platform/xcode/love.xcodeproj` to build the `love-macosx` target.
 
+###iOS
+Download the required libraries from [here][dependencies-ios] and place the `include` and `libraries` folders
+into the `platform/xcode/ios` folder.
+
+Then use the Xcode project found at `platform/xcode/love.xcodeproj` to build the `love-ios` target.
+
+See `readme-iOS.rtf` for more information.
+
+###Android
+Visit the [Android build repository][android-repository] for build instructions.
+
 Repository information
 ----------------------
 
@@ -35,6 +48,12 @@ We tag all our releases (since we started using mercurial), and have binary down
 
 Experimental changes are developed in the separate [love-experiments][love-experiments] repository.
 
+Contributing
+------------
+
+The best places to contribute are through the Bitbucket issue tracker and the official IRC channel.
+For code contributions, pull requests and patches are welcome. Be sure to read the [source code style guide][codestyle].
+
 Builds
 ------
 
@@ -51,24 +70,27 @@ Dependencies
 ------------
 
 - SDL2
-- OpenGL
+- OpenGL 2.1+ / OpenGL ES 2+
 - OpenAL
 - Lua / LuaJIT / LLVM-lua
-- DevIL with MNG and TIFF
 - FreeType
 - PhysicsFS
 - ModPlug
 - mpg123
 - Vorbisfile
+- Theora
 
 [site]: http://love2d.org
 [wiki]: http://love2d.org/wiki
 [forums]: http://love2d.org/forums
 [irc]: irc://irc.oftc.net/love
 [dependencies]: http://love2d.org/sdk
+[dependencies-ios]: https://bitbucket.org/rude/love/downloads/love-0.10.0-ios-libraries.zip
 [megasource]: https://bitbucket.org/rude/megasource
 [builds]: http://love2d.org/builds
 [stableppa]: https://launchpad.net/~bartbes/+archive/love-stable
 [unstableppa]: https://launchpad.net/~bartbes/+archive/love-unstable
-[aur]: http://aur.archlinux.org/packages.php?ID=35279
+[aur]: http://aur.archlinux.org/packages/love-hg
 [love-experiments]: https://bitbucket.org/bartbes/love-experiments
+[codestyle]: https://love2d.org/wiki/Code_Style
+[android-repository]: https://bitbucket.org/MartinFelis/love-android-sdl2

+ 1 - 1
src/common/Data.h

@@ -1,5 +1,5 @@
 /**
- * Copyright (c) 2006-2015 LOVE Development Team
+ * Copyright (c) 2006-2016 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

+ 1 - 1
src/common/EnumMap.h

@@ -1,5 +1,5 @@
 /**
- * Copyright (c) 2006-2015 LOVE Development Team
+ * Copyright (c) 2006-2016 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

+ 6 - 2
src/common/Exception.cpp

@@ -1,5 +1,5 @@
 /**
- * Copyright (c) 2006-2015 LOVE Development Team
+ * Copyright (c) 2006-2016 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
@@ -18,8 +18,8 @@
  * 3. This notice may not be removed or altered from any source distribution.
  **/
 
-#include "Exception.h"
 #include "common/config.h"
+#include "Exception.h"
 
 #include <iostream>
 
@@ -60,4 +60,8 @@ Exception::Exception(const char *fmt, ...)
 	delete[] buffer;
 }
 
+Exception::~Exception() throw()
+{
+}
+
 }

+ 2 - 2
src/common/Exception.h

@@ -1,5 +1,5 @@
 /**
- * Copyright (c) 2006-2015 LOVE Development Team
+ * Copyright (c) 2006-2016 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
@@ -45,7 +45,7 @@ public:
 	 * @param fmt The format string (see printf).
 	 **/
 	Exception(const char *fmt, ...);
-	virtual ~Exception() throw() {}
+	virtual ~Exception() throw();
 
 	/**
 	 * Returns a string containing reason for the exception.

+ 146 - 26
src/common/Matrix.cpp

@@ -1,5 +1,5 @@
 /**
- * Copyright (c) 2006-2015 LOVE Development Team
+ * Copyright (c) 2006-2016 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
@@ -32,17 +32,17 @@ namespace love
 // | e2 e6 e10 e14 |
 // | e3 e7 e11 e15 |
 
-Matrix::Matrix()
+Matrix4::Matrix4()
 {
 	setIdentity();
 }
 
-Matrix::Matrix(float x, float y, float angle, float sx, float sy, float ox, float oy, float kx, float ky)
+Matrix4::Matrix4(float x, float y, float angle, float sx, float sy, float ox, float oy, float kx, float ky)
 {
 	setTransformation(x, y, angle, sx, sy, ox, oy, kx, ky);
 }
 
-Matrix::~Matrix()
+Matrix4::~Matrix4()
 {
 }
 
@@ -55,9 +55,9 @@ Matrix::~Matrix()
 // | e2 e6 e10 e14 |
 // | e3 e7 e11 e15 |
 
-Matrix Matrix::operator * (const Matrix &m) const
+Matrix4 Matrix4::operator * (const Matrix4 &m) const
 {
-	Matrix t;
+	Matrix4 t;
 
 	t.e[0] = (e[0]*m.e[0]) + (e[4]*m.e[1]) + (e[8]*m.e[2]) + (e[12]*m.e[3]);
 	t.e[4] = (e[0]*m.e[4]) + (e[4]*m.e[5]) + (e[8]*m.e[6]) + (e[12]*m.e[7]);
@@ -82,31 +82,31 @@ Matrix Matrix::operator * (const Matrix &m) const
 	return t;
 }
 
-void Matrix::operator *= (const Matrix &m)
+void Matrix4::operator *= (const Matrix4 &m)
 {
-	Matrix t = (*this) * m;
-	memcpy((void *)this->e, (void *)t.e, sizeof(float)*16);
+	Matrix4 t = (*this) * m;
+	memcpy(this->e, t.e, sizeof(float)*16);
 }
 
-const float *Matrix::getElements() const
+const float *Matrix4::getElements() const
 {
 	return e;
 }
 
-void Matrix::setIdentity()
+void Matrix4::setIdentity()
 {
 	memset(e, 0, sizeof(float)*16);
 	e[0] = e[5] = e[10] = e[15] = 1;
 }
 
-void Matrix::setTranslation(float x, float y)
+void Matrix4::setTranslation(float x, float y)
 {
 	setIdentity();
 	e[12] = x;
 	e[13] = y;
 }
 
-void Matrix::setRotation(float rad)
+void Matrix4::setRotation(float rad)
 {
 	setIdentity();
 	float c = cosf(rad), s = sinf(rad);
@@ -116,21 +116,21 @@ void Matrix::setRotation(float rad)
 	e[5] = c;
 }
 
-void Matrix::setScale(float sx, float sy)
+void Matrix4::setScale(float sx, float sy)
 {
 	setIdentity();
 	e[0] = sx;
 	e[5] = sy;
 }
 
-void Matrix::setShear(float kx, float ky)
+void Matrix4::setShear(float kx, float ky)
 {
 	setIdentity();
 	e[1] = ky;
 	e[4] = kx;
 }
 
-void Matrix::setTransformation(float x, float y, float angle, float sx, float sy, float ox, float oy, float kx, float ky)
+void Matrix4::setTransformation(float x, float y, float angle, float sx, float sy, float ox, float oy, float kx, float ky)
 {
 	memset(e, 0, sizeof(float)*16); // zero out matrix
 	float c = cosf(angle), s = sinf(angle);
@@ -149,37 +149,37 @@ void Matrix::setTransformation(float x, float y, float angle, float sx, float sy
 	e[13] = y - ox * e[1] - oy * e[5];
 }
 
-void Matrix::translate(float x, float y)
+void Matrix4::translate(float x, float y)
 {
-	Matrix t;
+	Matrix4 t;
 	t.setTranslation(x, y);
 	this->operator *=(t);
 }
 
-void Matrix::rotate(float rad)
+void Matrix4::rotate(float rad)
 {
-	Matrix t;
+	Matrix4 t;
 	t.setRotation(rad);
 	this->operator *=(t);
 }
 
-void Matrix::scale(float sx, float sy)
+void Matrix4::scale(float sx, float sy)
 {
-	Matrix t;
+	Matrix4 t;
 	t.setScale(sx, sy);
 	this->operator *=(t);
 }
 
-void Matrix::shear(float kx, float ky)
+void Matrix4::shear(float kx, float ky)
 {
-	Matrix t;
+	Matrix4 t;
 	t.setShear(kx,ky);
 	this->operator *=(t);
 }
 
-Matrix Matrix::ortho(float left, float right, float bottom, float top)
+Matrix4 Matrix4::ortho(float left, float right, float bottom, float top)
 {
-	Matrix m;
+	Matrix4 m;
 
 	m.e[0] = 2.0f / (right - left);
 	m.e[5] = 2.0f / (top - bottom);
@@ -191,5 +191,125 @@ Matrix Matrix::ortho(float left, float right, float bottom, float top)
 	return m;
 }
 
+/**
+ * | e0 e3 e6 |
+ * | e1 e4 e7 |
+ * | e2 e5 e8 |
+ **/
+Matrix3::Matrix3()
+{
+	setIdentity();
+}
+
+Matrix3::Matrix3(const Matrix4 &mat4)
+{
+	const float *mat4elems = mat4.getElements();
+
+	// Column 0.
+	e[0] = mat4elems[0];
+	e[1] = mat4elems[1];
+	e[2] = mat4elems[2];
+
+	// Column 1.
+	e[3] = mat4elems[4];
+	e[4] = mat4elems[5];
+	e[5] = mat4elems[6];
+
+	// Column 2.
+	e[6] = mat4elems[8];
+	e[7] = mat4elems[9];
+	e[8] = mat4elems[10];
+}
+
+Matrix3::Matrix3(float x, float y, float angle, float sx, float sy, float ox, float oy, float kx, float ky)
+{
+	setTransformation(x, y, angle, sx, sy, ox, oy, kx, ky);
+}
+
+Matrix3::~Matrix3()
+{
+}
+
+void Matrix3::setIdentity()
+{
+	memset(e, 0, sizeof(float) * 9);
+	e[8] = e[4] = e[0] = 1.0f;
+}
+
+Matrix3 Matrix3::operator * (const love::Matrix3 &m) const
+{
+	Matrix3 t;
+
+	t.e[0] = (e[0]*m.e[0]) + (e[3]*m.e[1]) + (e[6]*m.e[2]);
+	t.e[3] = (e[0]*m.e[3]) + (e[3]*m.e[4]) + (e[6]*m.e[5]);
+	t.e[6] = (e[0]*m.e[6]) + (e[3]*m.e[7]) + (e[6]*m.e[8]);
+
+	t.e[1] = (e[1]*m.e[0]) + (e[4]*m.e[1]) + (e[7]*m.e[2]);
+	t.e[4] = (e[1]*m.e[3]) + (e[4]*m.e[4]) + (e[7]*m.e[5]);
+	t.e[7] = (e[1]*m.e[6]) + (e[4]*m.e[7]) + (e[7]*m.e[8]);
+
+	t.e[2] = (e[2]*m.e[0]) + (e[5]*m.e[1]) + (e[8]*m.e[2]);
+	t.e[5] = (e[2]*m.e[3]) + (e[5]*m.e[4]) + (e[8]*m.e[5]);
+	t.e[8] = (e[2]*m.e[6]) + (e[5]*m.e[7]) + (e[8]*m.e[8]);
+
+	return t;
+}
+
+void Matrix3::operator *= (const Matrix3 &m)
+{
+	Matrix3 t = (*this) * m;
+	memcpy(e, t.e, sizeof(float) * 9);
+}
+
+const float *Matrix3::getElements() const
+{
+	return e;
+}
+
+Matrix3 Matrix3::transposedInverse() const
+{
+	// e0 e3 e6
+	// e1 e4 e7
+	// e2 e5 e8
+
+	float det = e[0] * (e[4]*e[8] - e[7]*e[5])
+	          - e[1] * (e[3]*e[8] - e[5]*e[6])
+	          + e[2] * (e[3]*e[7] - e[4]*e[6]);
+
+	float invdet = 1.0f / det;
+
+	Matrix3 m;
+
+	m.e[0] =  invdet * (e[4]*e[8] - e[7]*e[5]);
+	m.e[3] = -invdet * (e[1]*e[8] - e[2]*e[7]);
+	m.e[6] =  invdet * (e[1]*e[5] - e[2]*e[4]);
+	m.e[1] = -invdet * (e[3]*e[8] - e[5]*e[6]);
+	m.e[4] =  invdet * (e[0]*e[8] - e[2]*e[6]);
+	m.e[7] = -invdet * (e[0]*e[5] - e[3]*e[2]);
+	m.e[2] =  invdet * (e[3]*e[7] - e[6]*e[4]);
+	m.e[5] = -invdet * (e[0]*e[7] - e[6]*e[1]);
+	m.e[8] =  invdet * (e[0]*e[4] - e[3]*e[1]);
+
+	return m;
+}
+
+void Matrix3::setTransformation(float x, float y, float angle, float sx, float sy, float ox, float oy, float kx, float ky)
+{
+	float c = cosf(angle), s = sinf(angle);
+	// matrix multiplication carried out on paper:
+	// |1    x| |c -s  | |sx     | | 1 ky  | |1   -ox|
+	// |  1  y| |s  c  | |   sy  | |kx  1  | |  1 -oy|
+	// |     1| |     1| |      1| |      1| |     1 |
+	//   move    rotate    scale     skew      origin
+	e[0] = c * sx - ky * s * sy; // = a
+	e[1] = s * sx + ky * c * sy; // = b
+	e[3] = kx * c * sx - s * sy; // = c
+	e[4] = kx * s * sx + c * sy; // = d
+	e[6] = x - ox * e[0] - oy * e[3];
+	e[7] = y - ox * e[1] - oy * e[4];
+
+	e[2] = e[5] = 0.0f;
+	e[8] = 1.0f;
+}
 
 } // love

+ 101 - 13
src/common/Matrix.h

@@ -1,5 +1,5 @@
 /**
- * Copyright (c) 2006-2015 LOVE Development Team
+ * Copyright (c) 2006-2016 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
@@ -28,41 +28,41 @@ namespace love
 {
 
 /**
- * This class is the basis for all transformations in LOVE. Althought not
- * really needed for 2D, it contains 4x4 elements to be compatible with
- * OpenGL without conversions.
+ * This class is the basis for all transformations in LOVE. Although not really
+ * needed for 2D, it contains 4x4 elements to be compatible with OpenGL without
+ * conversions.
  **/
-class Matrix
+class Matrix4
 {
 public:
 
 	/**
 	 * Creates a new identity matrix.
 	 **/
-	Matrix();
+	Matrix4();
 
 	/**
 	 * Creates a new matrix set to a transformation.
 	 **/
-	Matrix(float x, float y, float angle, float sx, float sy, float ox, float oy, float kx, float ky);
+	Matrix4(float x, float y, float angle, float sx, float sy, float ox, float oy, float kx, float ky);
 
 	/**
 	 * Destructor.
 	 **/
-	~Matrix();
+	~Matrix4();
 
 	/**
 	 * Multiplies this Matrix with another Matrix, changing neither.
 	 * @param m The Matrix to multiply with this Matrix.
 	 * @return The combined matrix.
 	 **/
-	Matrix operator * (const Matrix &m) const;
+	Matrix4 operator * (const Matrix4 &m) const;
 
 	/**
 	 * Multiplies a Matrix into this Matrix.
 	 * @param m The Matrix to combine into this Matrix.
 	 **/
-	void operator *= (const Matrix &m);
+	void operator *= (const Matrix4 &m);
 
 	/**
 	 * Gets a pointer to the 16 array elements.
@@ -160,7 +160,7 @@ public:
 	 * Creates a new orthographic projection matrix with depth in the range of
 	 * [-1, 1].
 	 **/
-	static Matrix ortho(float left, float right, float bottom, float top);
+	static Matrix4 ortho(float left, float right, float bottom, float top);
 
 private:
 
@@ -172,7 +172,76 @@ private:
 	 **/
 	float e[16];
 
-}; // Matrix
+}; // Matrix4
+
+class Matrix3
+{
+public:
+
+	Matrix3();
+
+	/**
+	 * Constructs a 3x3 matrix from the upper left section of a 4x4 matrix.
+	 **/
+	Matrix3(const Matrix4 &mat4);
+
+	/**
+	 * Creates a new matrix set to a transformation.
+	 **/
+	Matrix3(float x, float y, float angle, float sx, float sy, float ox, float oy, float kx, float ky);
+
+	~Matrix3();
+
+	/**
+	 * Resets this matrix to the identity matrix.
+	 **/
+	void setIdentity();
+
+	Matrix3 operator * (const Matrix3 &m) const;
+	void operator *= (const Matrix3 &m);
+
+	/**
+	 * Gets a pointer to the 9 array elements.
+	 **/
+	const float *getElements() const;
+
+	/**
+	 * Calculates the inverse of the transpose of this matrix.
+	 **/
+	Matrix3 transposedInverse() const;
+
+	/**
+	 * Creates a transformation with a certain position, orientation, scale
+	 * and offset.
+	 *
+	 * @param x The translation along the x-axis.
+	 * @param y The translation along the y-axis.
+	 * @param angle The rotation (rad) around the center with offset (ox,oy).
+	 * @param sx Scale along x-axis.
+	 * @param sy Scale along y-axis.
+	 * @param ox The offset for rotation along the x-axis.
+	 * @param oy The offset for rotation along the y-axis.
+	 * @param kx Shear along x-axis
+	 * @param ky Shear along y-axis
+	 **/
+	void setTransformation(float x, float y, float angle, float sx, float sy, float ox, float oy, float kx, float ky);
+
+	/**
+	 * Transforms an array of vertices by this matrix.
+	 **/
+	template <typename V>
+	void transform(V *dst, const V *src, int size) const;
+
+private:
+
+	/**
+	 * | e0 e3 e6
+	 * | e1 e4 e7
+	 * | e2 e5 e8
+	 **/
+	float e[9];
+
+}; // Matrix3
 
 //                 | x |
 //                 | y |
@@ -184,7 +253,7 @@ private:
 // | e3 e7 e11 e15 |
 
 template <typename V>
-void Matrix::transform(V *dst, const V *src, int size) const
+void Matrix4::transform(V *dst, const V *src, int size) const
 {
 	for (int i = 0; i < size; i++)
 	{
@@ -197,6 +266,25 @@ void Matrix::transform(V *dst, const V *src, int size) const
 	}
 }
 
+//            | x |
+//            | y |
+//            | 1 |
+// | e0 e3 e6 |
+// | e1 e4 e7 |
+// | e2 e5 e8 |
+template <typename V>
+void Matrix3::transform(V *dst, const V *src, int size) const
+{
+	for (int i = 0; i < size; i++)
+	{
+		float x = (e[0]*src[i].x) + (e[3]*src[i].y) + (e[6]);
+		float y = (e[1]*src[i].x) + (e[4]*src[i].y) + (e[7]);
+
+		dst[i].x = x;
+		dst[i].y = y;
+	}
+}
+
 } //love
 
 #endif// LOVE_MATRIX_H

+ 1 - 1
src/common/Memoizer.cpp

@@ -1,5 +1,5 @@
 /**
- * Copyright (c) 2006-2015 LOVE Development Team
+ * Copyright (c) 2006-2016 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

+ 1 - 1
src/common/Memoizer.h

@@ -1,5 +1,5 @@
 /**
- * Copyright (c) 2006-2015 LOVE Development Team
+ * Copyright (c) 2006-2016 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

+ 1 - 1
src/common/Module.cpp

@@ -1,5 +1,5 @@
 /**
- * Copyright (c) 2006-2015 LOVE Development Team
+ * Copyright (c) 2006-2016 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

+ 2 - 1
src/common/Module.h

@@ -1,5 +1,5 @@
 /**
- * Copyright (c) 2006-2015 LOVE Development Team
+ * Copyright (c) 2006-2016 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
@@ -53,6 +53,7 @@ public:
 		M_TIMER,
 		M_TOUCH,
 		M_WINDOW,
+		M_VIDEO,
 		M_MAX_ENUM
 	};
 

+ 1 - 1
src/common/Object.cpp

@@ -1,5 +1,5 @@
 /**
- * Copyright (c) 2006-2015 LOVE Development Team
+ * Copyright (c) 2006-2016 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

+ 12 - 2
src/common/Object.h

@@ -1,5 +1,5 @@
 /**
- * Copyright (c) 2006-2015 LOVE Development Team
+ * Copyright (c) 2006-2016 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
@@ -117,6 +117,16 @@ public:
 		return object;
 	}
 
+	operator bool() const
+	{
+		return object != nullptr;
+	}
+
+	operator T*() const
+	{
+		return object;
+	}
+
 	void set(T *obj)
 	{
 		if (obj) obj->retain();
@@ -132,7 +142,7 @@ public:
 private:
 
 	T *object;
-	
+
 }; // StrongRef
 
 } // love

+ 15 - 27
src/common/Reference.cpp

@@ -1,5 +1,5 @@
 /**
- * Copyright (c) 2006-2015 LOVE Development Team
+ * Copyright (c) 2006-2016 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
@@ -26,13 +26,13 @@ namespace love
 const char REFERENCE_TABLE_NAME[] = "love-references";
 
 Reference::Reference()
-	: L(nullptr)
+	: pinnedL(nullptr)
 	, idx(LUA_REFNIL)
 {
 }
 
 Reference::Reference(lua_State *L)
-	: L(L)
+	: pinnedL(nullptr)
 	, idx(LUA_REFNIL)
 {
 	ref(L);
@@ -46,7 +46,7 @@ Reference::~Reference()
 void Reference::ref(lua_State *L)
 {
 	unref(); // Just to be safe.
-	this->L = L;
+	pinnedL = luax_getpinnedthread(L);
 	luax_insist(L, LUA_REGISTRYINDEX, REFERENCE_TABLE_NAME);
 	lua_insert(L, -2); // Move reference table behind value.
 	idx = luaL_ref(L, -2);
@@ -57,38 +57,26 @@ void Reference::unref()
 {
 	if (idx != LUA_REFNIL)
 	{
-		luax_insist(L, LUA_REGISTRYINDEX, REFERENCE_TABLE_NAME);
-		luaL_unref(L, -1, idx);
-		lua_pop(L, 1);
+		// We use a pinned thread/coroutine for the Lua state because we know it
+		// hasn't been garbage collected and is valid, as long as the whole lua
+		// state is still open.
+		luax_insist(pinnedL, LUA_REGISTRYINDEX, REFERENCE_TABLE_NAME);
+		luaL_unref(pinnedL, -1, idx);
+		lua_pop(pinnedL, 1);
 		idx = LUA_REFNIL;
 	}
 }
 
-void Reference::push(lua_State *newL)
+void Reference::push(lua_State *L)
 {
 	if (idx != LUA_REFNIL)
 	{
-		luax_insist(newL, LUA_REGISTRYINDEX, REFERENCE_TABLE_NAME);
-		lua_rawgeti(newL, -1, idx);
-		lua_remove(newL, -2);
+		luax_insist(L, LUA_REGISTRYINDEX, REFERENCE_TABLE_NAME);
+		lua_rawgeti(L, -1, idx);
+		lua_remove(L, -2);
 	}
 	else
-		lua_pushnil(newL);
-}
-
-void Reference::push()
-{
-	push(L);
-}
-
-lua_State *Reference::getL() const
-{
-	return L;
-}
-
-void Reference::setL(lua_State *newL)
-{
-	L = newL;
+		lua_pushnil(L);
 }
 
 } // love

+ 8 - 27
src/common/Reference.h

@@ -1,5 +1,5 @@
 /**
- * Copyright (c) 2006-2015 LOVE Development Team
+ * Copyright (c) 2006-2016 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
@@ -64,36 +64,17 @@ public:
 	void unref();
 
 	/**
-	 * Pushes the referred value onto the stack of a different coroutine
-	 * in the same main Lua state.
-	 * THIS SHOULD NOT BE USED FOR DIFFERENT LUA STATES (created with
-	 * luaL_newstate)! Only with different coroutines!
+	 * Pushes the referred value onto the stack of the specified Lua coroutine.
+	 * NOTE: The coroutine *must* belong to the same Lua state that was used for
+	 * Reference::ref.
 	 **/
-	void push(lua_State *newL);
-
-	/**
-	 * Pushes the referred value onto the stack.
-	 **/
-	void push();
-
-	/**
-	 * Gets the Lua state associated with this
-	 * reference.
-	 **/
-	lua_State *getL() const;
-
-	/**
-	 * Associates a new Lua state with this reference.
-	 * THIS IS DANGEROUS! It is only designed to be
-	 * used with different coroutines from the same
-	 * main Lua state!
-	 **/
-	void setL(lua_State *newL);
+	void push(lua_State *L);
 
 private:
 
-	// The Lua state in which the reference resides.
-	lua_State *L;
+	// A pinned coroutine (probably the main thread) belonging to the Lua state
+	// in which the reference resides.
+	lua_State *pinnedL;
 
 	// Index to the Lua reference.
 	int idx;

+ 64 - 0
src/common/Stream.h

@@ -0,0 +1,64 @@
+/**
+ * Copyright (c) 2006-2015 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
+ *    appreciated but is not required.
+ * 2. Altered source versions must be plainly marked as such, and must not be
+ *    misrepresented as being the original software.
+ * 3. This notice may not be removed or altered from any source distribution.
+ **/
+
+#ifndef LOVE_STREAM_H
+#define LOVE_STREAM_H
+
+// LOVE
+#include <stddef.h>
+#include "Object.h"
+
+namespace love
+{
+
+class Stream : public Object
+{
+public:
+	virtual ~Stream() {}
+
+	// getData and getSize are assumed to talk about
+	// the buffer
+
+	/**
+	 * A callback, gets called when some Stream consumer exhausts the data
+	 **/
+	virtual void fillBackBuffer() {}
+
+	/**
+	 * Get the front buffer, Streams are supposed to be (at least) double-buffered
+	 **/
+	virtual const void *getFrontBuffer() const = 0;
+
+	/**
+	 * Get the size of any (and in particular the front) buffer
+	 **/
+	virtual size_t getSize() const = 0;
+
+	/**
+	 * Swap buffers. Returns true if there is new data in the front buffer,
+     * false otherwise.
+	 * NOTE: If there is no back buffer ready, this call must be ignored
+	 **/
+	virtual bool swapBuffers() = 0;
+}; // Stream
+
+} // love
+
+#endif // LOVE_STREAM_H

+ 1 - 1
src/common/StringMap.h

@@ -1,5 +1,5 @@
 /**
- * Copyright (c) 2006-2015 LOVE Development Team
+ * Copyright (c) 2006-2016 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

+ 6 - 8
src/common/Variant.cpp

@@ -1,5 +1,5 @@
 /**
- * Copyright (c) 2006-2015 LOVE Development Team
+ * Copyright (c) 2006-2016 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
@@ -24,19 +24,17 @@
 namespace love
 {
 
-extern StringMap<Type, TYPE_MAX_ENUM> types;
-
 static love::Type extractudatatype(lua_State *L, int idx)
 {
 	Type t = INVALID_ID;
 	if (!lua_isuserdata(L, idx))
 		return t;
-	if (luaL_getmetafield(L, idx, "__tostring") == 0)
+	if (luaL_getmetafield(L, idx, "type") == 0)
 		return t;
 	lua_pushvalue(L, idx);
 	int result = lua_pcall(L, 1, 1, 0);
 	if (result == 0)
-		types.find(lua_tostring(L, -1), t);
+		getTypeName(lua_tostring(L, -1), t);
 	if (result == 0 || result == LUA_ERRRUN)
 		lua_pop(L, 1);
 	return t;
@@ -134,7 +132,7 @@ Variant::~Variant()
 
 Variant *Variant::fromLua(lua_State *L, int n, bool allowTables)
 {
-	Variant *v = NULL;
+	Variant *v = nullptr;
 	size_t len;
 	const char *str;
 	if (n < 0) // Fix the stack position, we might modify it later
@@ -165,7 +163,7 @@ Variant *Variant::fromLua(lua_State *L, int n, bool allowTables)
 		if (allowTables)
 		{
 			bool success = true;
-			std::vector<std::pair<Variant*, Variant*> > *table = new std::vector<std::pair<Variant*, Variant*> >();
+			std::vector<std::pair<Variant*, Variant*>> *table = new std::vector<std::pair<Variant*, Variant*>>();
 			lua_pushnil(L);
 			while (lua_next(L, n))
 			{
@@ -230,7 +228,7 @@ void Variant::toLua(lua_State *L)
 		// I can do (at the moment).
 		break;
 	case TABLE:
-		lua_newtable(L);
+		lua_createtable(L, 0, (int) data.table->size());
 		for (size_t i = 0; i < data.table->size(); ++i)
 		{
 			std::pair<Variant*, Variant*> &kv = data.table->at(i);

+ 2 - 2
src/common/Variant.h

@@ -1,5 +1,5 @@
 /**
- * Copyright (c) 2006-2015 LOVE Development Team
+ * Copyright (c) 2006-2016 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
@@ -71,7 +71,7 @@ public:
 			size_t len;
 		} string;
 		void *userdata;
-		std::vector<std::pair<Variant*, Variant*> > *table;
+		std::vector<std::pair<Variant*, Variant*>> *table;
 	} data;
 
 private:

+ 1 - 1
src/common/Vector.cpp

@@ -1,5 +1,5 @@
 /**
- * Copyright (c) 2006-2015 LOVE Development Team
+ * Copyright (c) 2006-2016 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

+ 1 - 1
src/common/Vector.h

@@ -1,5 +1,5 @@
 /**
- * Copyright (c) 2006-2015 LOVE Development Team
+ * Copyright (c) 2006-2016 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

+ 231 - 0
src/common/android.cpp

@@ -0,0 +1,231 @@
+/**
+ * Copyright (c) 2006-2016 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
+ *    appreciated but is not required.
+ * 2. Altered source versions must be plainly marked as such, and must not be
+ *    misrepresented as being the original software.
+ * 3. This notice may not be removed or altered from any source distribution.
+ **/
+
+#include "android.h"
+
+#ifdef LOVE_ANDROID
+
+#include "SDL.h"
+#include "jni.h"
+
+#include <sys/stat.h>
+#include <sys/types.h>
+#include <unistd.h>
+#include <errno.h>
+
+namespace love
+{
+namespace android
+{
+
+void setImmersive(bool immersive_active)
+{
+	JNIEnv *env = (JNIEnv*) SDL_AndroidGetJNIEnv();
+
+	jobject activity = (jobject) SDL_AndroidGetActivity();
+
+	jclass clazz(env->GetObjectClass(activity));
+	jmethodID method_id = env->GetMethodID(clazz, "setImmersiveMode", "(Z)V");
+
+	env->CallVoidMethod(activity, method_id, immersive_active);
+
+	env->DeleteLocalRef(activity);
+	env->DeleteLocalRef(clazz);
+}
+
+bool getImmersive()
+{
+	JNIEnv *env = (JNIEnv*) SDL_AndroidGetJNIEnv();
+
+	jobject activity = (jobject) SDL_AndroidGetActivity();
+
+	jclass clazz(env->GetObjectClass(activity));
+	jmethodID method_id = env->GetMethodID(clazz, "getImmersiveMode", "()Z");
+
+	jboolean immersive_active = env->CallBooleanMethod(activity, method_id);
+
+	env->DeleteLocalRef(activity);
+	env->DeleteLocalRef(clazz);
+
+	return immersive_active;
+}
+
+double getScreenScale()
+{
+	static double result = -1.;
+
+	if (result == -1.)
+	{
+		JNIEnv *env = (JNIEnv*) SDL_AndroidGetJNIEnv();
+		jclass activity = env->FindClass("org/love2d/android/GameActivity");
+
+		jmethodID getMetrics = env->GetStaticMethodID(activity, "getMetrics", "()Landroid/util/DisplayMetrics;");
+		jobject metrics = env->CallStaticObjectMethod(activity, getMetrics);
+		jclass metricsClass = env->GetObjectClass(metrics);
+
+		result = env->GetFloatField(metrics, env->GetFieldID(metricsClass, "density", "F"));
+
+		env->DeleteLocalRef(metricsClass);
+		env->DeleteLocalRef(metrics);
+		env->DeleteLocalRef(activity);
+	}
+
+	return result;
+}
+
+const char *getSelectedGameFile()
+{
+	static const char *path = NULL;
+
+	if (path)
+	{
+		delete path;
+		path = NULL;
+	}
+
+	JNIEnv *env = (JNIEnv*) SDL_AndroidGetJNIEnv();
+	jclass activity = env->FindClass("org/love2d/android/GameActivity");
+
+	jmethodID getGamePath = env->GetStaticMethodID(activity, "getGamePath", "()Ljava/lang/String;");
+	jstring gamePath = (jstring) env->CallStaticObjectMethod(activity, getGamePath);
+	const char *utf = env->GetStringUTFChars(gamePath, 0);
+	if (utf)
+	{
+		path = SDL_strdup(utf);
+		env->ReleaseStringUTFChars(gamePath, utf);
+	}
+
+	env->DeleteLocalRef(gamePath);
+	env->DeleteLocalRef(activity);
+
+	return path;
+}
+
+bool openURL(const std::string &url)
+{
+	JNIEnv *env = (JNIEnv*) SDL_AndroidGetJNIEnv();
+	jclass activity = env->FindClass("org/love2d/android/GameActivity");
+
+	jmethodID openURL= env->GetStaticMethodID(activity, "openURL", "(Ljava/lang/String;)V");
+	jstring url_jstring = (jstring) env->NewStringUTF(url.c_str());
+
+	env->CallStaticVoidMethod(activity, openURL, url_jstring);
+
+	env->DeleteLocalRef(url_jstring);
+	env->DeleteLocalRef(activity);
+	return true;
+}
+
+void vibrate(double seconds)
+{
+	JNIEnv *env = (JNIEnv*) SDL_AndroidGetJNIEnv();
+	jclass activity = env->FindClass("org/love2d/android/GameActivity");
+
+	jmethodID vibrate_method = env->GetStaticMethodID(activity, "vibrate", "(D)V");
+	env->CallStaticVoidMethod(activity, vibrate_method, seconds);
+
+	env->DeleteLocalRef(activity);
+}
+
+/*
+ * Helper functions for the filesystem module
+ */
+void freeGameArchiveMemory(void *ptr)
+{
+	char *game_love_data = static_cast<char*>(ptr);
+	delete[] game_love_data;
+}
+
+bool loadGameArchiveToMemory(const char* filename, char **ptr, size_t *size)
+{
+	SDL_RWops *asset_game_file = SDL_RWFromFile(filename, "rb");
+	if (!asset_game_file) {
+		SDL_Log("Could not find %s", filename);
+		return false;
+	}
+
+	Sint64 file_size = asset_game_file->size(asset_game_file);
+	if (file_size <= 0) {
+		SDL_Log("Could not load game from %s. File has invalid file size: %d.", filename, (int) file_size);
+		return false;
+	}
+
+	*ptr = new char[file_size];
+	if (!*ptr) {
+		SDL_Log("Could not allocate memory for in-memory game archive");
+		return false;
+	}
+
+	size_t bytes_copied = asset_game_file->read(asset_game_file, (void*) *ptr, sizeof(char), (size_t) file_size);
+	if (bytes_copied != file_size) {
+		SDL_Log("Incomplete copy of in-memory game archive!");
+		delete[] *ptr;
+		return false;
+	}
+
+	*size = (size_t) file_size;
+	return true;
+}
+
+bool directoryExists(const char *path)
+{
+	struct stat s;
+	int err = stat(path, &s);
+	if (err == -1)
+	{
+		if (errno != ENOENT)
+			SDL_Log("Error checking for directory %s errno = %d: %s", path, errno, strerror(errno));
+		return false;
+	}
+
+	return S_ISDIR(s.st_mode);
+}
+
+bool mkdir(const char *path)
+{
+	int err = ::mkdir(path, 0770);
+	if (err == -1)
+	{
+		SDL_Log("Error: Could not create directory %s", path);
+		return false;
+	}
+
+	return true;
+}
+
+bool createStorageDirectories()
+{
+	std::string internal_storage_path = SDL_AndroidGetInternalStoragePath();
+
+	std::string save_directory = internal_storage_path + "/save";
+	if (!directoryExists(save_directory.c_str()) && !mkdir(save_directory.c_str()))
+		return false;
+
+	std::string game_directory = internal_storage_path + "/game";
+	if (!directoryExists (game_directory.c_str()) && !mkdir(game_directory.c_str()))
+		return false;
+
+	return true;
+}
+
+} // android
+} // love
+
+#endif // LOVE_ANDROID

+ 73 - 0
src/common/android.h

@@ -0,0 +1,73 @@
+/**
+ * Copyright (c) 2006-2016 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
+ *    appreciated but is not required.
+ * 2. Altered source versions must be plainly marked as such, and must not be
+ *    misrepresented as being the original software.
+ * 3. This notice may not be removed or altered from any source distribution.
+ **/
+
+#ifndef LOVE_ANDROID_H
+#define LOVE_ANDROID_H
+
+#include "config.h"
+
+#ifdef LOVE_ANDROID
+
+#include <string>
+
+namespace love
+{
+namespace android
+{
+
+/**
+ * Enables or disables immersive mode where the navigation bar is hidden.
+ **/
+void setImmersive(bool immersive_active);
+bool getImmersive();
+
+/**
+ * Gets the scale factor of the window's screen, e.g. on Retina displays this
+ * will return 2.0.
+ **/
+double getScreenScale();
+
+/**
+ * Gets the selected love file in the device filesystem.
+ **/
+const char *getSelectedGameFile();
+
+bool openURL(const std::string &url);
+
+void vibrate(double seconds);
+
+/*
+ * Helper functions for the filesystem module
+ */
+void freeGameArchiveMemory(void *ptr);
+
+bool loadGameArchiveToMemory(const char *filename, char **ptr, size_t *size);
+
+bool directoryExists(const char *path);
+
+bool mkdir(const char *path);
+
+bool createStorageDirectories();
+
+} // android
+} // love
+
+#endif // LOVE_ANDROID
+#endif // LOVE_ANDROID_H

+ 1 - 1
src/common/b64.cpp

@@ -1,5 +1,5 @@
 /**
- * Copyright (c) 2006-2015 LOVE Development Team
+ * Copyright (c) 2006-2016 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

+ 1 - 1
src/common/b64.h

@@ -1,5 +1,5 @@
 /**
- * Copyright (c) 2006-2015 LOVE Development Team
+ * Copyright (c) 2006-2016 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

+ 25 - 6
src/common/config.h

@@ -1,5 +1,5 @@
 /**
- * Copyright (c) 2006-2015 LOVE Development Team
+ * Copyright (c) 2006-2016 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
@@ -26,7 +26,10 @@
 #	define LOVE_WINDOWS 1
 #endif
 #if defined(linux) || defined(__linux) || defined(__linux__)
-#	define LOVE_LINUX 1
+# define LOVE_LINUX 1
+#endif
+#if defined(__ANDROID__)
+#  define LOVE_ANDROID 1
 #endif
 #if defined(__APPLE__)
 #	include <TargetConditionals.h>
@@ -36,13 +39,16 @@
 #		define LOVE_MACOSX 1
 #	endif
 #endif
+#if defined(__FreeBSD__) || defined(__NetBSD__) || defined(__OpenBSD__)
+// I know it's not linux, but it seems most "linux-only" code is bsd-compatible
+#	define LOVE_LINUX 1
+#endif
 
 // Endianness.
-#if defined(__i386__) || defined(__i386)
-#	define LOVE_LITTLE_ENDIAN 1
-#endif
 #if defined(__ppc__) || defined(__ppc) || defined(__powerpc__) || defined(__powerpc)
 #	define LOVE_BIG_ENDIAN 1
+#else
+#	define LOVE_LITTLE_ENDIAN 1
 #endif
 
 // Warnings.
@@ -70,7 +76,6 @@
 #endif
 
 #if defined(LOVE_WINDOWS)
-#	define LOVE_LEGENDARY_UTF8_ARGV_HACK
 #	define LOVE_LEGENDARY_CONSOLE_IO_HACK
 #	define NOMINMAX
 #endif
@@ -79,6 +84,10 @@
 #	define LOVE_LEGENDARY_APP_ARGV_HACK
 #endif
 
+#if defined(LOVE_ANDROID) || defined(LOVE_IOS)
+#	define LOVE_LEGENDARY_ACCELEROMETER_AS_JOYSTICK_HACK
+#endif
+
 // Autotools config.h
 #ifdef HAVE_CONFIG_H
 #	include <../config.h>
@@ -131,9 +140,19 @@
 #	define LOVE_ENABLE_TOUCH
 #	define LOVE_ENABLE_TOUCH_SDL
 #	define LOVE_ENABLE_UTF8
+#	define LOVE_ENABLE_VIDEO
+#	define LOVE_ENABLE_VIDEO_THEORA
 #	define LOVE_ENABLE_WINDOW
 #	define LOVE_ENABLE_WINDOW_SDL
 #	define LOVE_ENABLE_WUFF
 #endif
 
+// Check we have a sane configuration
+#if !defined(LOVE_WINDOWS) && !defined(LOVE_LINUX) && !defined(LOVE_IOS) && !defined(LOVE_MACOSX)
+#	error Could not detect target platform
+#endif
+#if !defined(LOVE_LITTLE_ENDIAN) && !defined(LOVE_BIG_ENDIAN)
+#	error Could not detect endianness
+#endif
+
 #endif // LOVE_CONFIG_H

+ 1 - 1
src/common/delay.cpp

@@ -1,5 +1,5 @@
 /**
- * Copyright (c) 2006-2015 LOVE Development Team
+ * Copyright (c) 2006-2016 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

+ 1 - 1
src/common/delay.h

@@ -1,5 +1,5 @@
 /**
- * Copyright (c) 2006-2015 LOVE Development Team
+ * Copyright (c) 2006-2016 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

+ 4 - 4
src/common/int.h

@@ -1,5 +1,5 @@
 /**
- * Copyright (c) 2006-2015 LOVE Development Team
+ * Copyright (c) 2006-2016 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
@@ -45,12 +45,12 @@ typedef uint32_t uint32;
 typedef int64_t int64;
 typedef uint64_t uint64;
 
-static inline uint16 swap16(uint16 x)
+static inline uint16 swapuint16(uint16 x)
 {
 	return (x >> 8) | (x << 8);
 }
 
-static inline uint32 swap32(uint32 x)
+static inline uint32 swapuint32(uint32 x)
 {
 	return ((x & 0x000000FF) << 24) |
 	       ((x & 0x0000FF00) <<  8) |
@@ -58,7 +58,7 @@ static inline uint32 swap32(uint32 x)
 	       ((x & 0xFF000000) >> 24);
 }
 
-static inline uint64 swap64(uint64 x)
+static inline uint64 swapuint64(uint64 x)
 {
 	return ((x << 56) & 0xFF00000000000000ULL) | ((x << 40) & 0x00FF000000000000ULL) |
 	       ((x << 24) & 0x0000FF0000000000ULL) | ((x <<  8) & 0x000000FF00000000ULL) |

+ 11 - 1
src/common/iOS.h → src/common/ios.h

@@ -1,5 +1,5 @@
 /**
- * Copyright (c) 2006-2015 LOVE Development Team
+ * Copyright (c) 2006-2016 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
@@ -54,6 +54,16 @@ std::string getHomeDirectory();
  **/
 bool openURL(const std::string &url);
 
+/**
+ * Returns the full path to the executable.
+ **/
+std::string getExecutablePath();
+
+/**
+ * Causes devices with vibration support to vibrate for about 0.5 seconds.
+ **/
+void vibrate();
+
 } // ios
 } // love
 

+ 64 - 34
src/common/iOS.mm → src/common/ios.mm

@@ -1,5 +1,5 @@
 /**
- * Copyright (c) 2006-2015 LOVE Development Team
+ * Copyright (c) 2006-2016 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
@@ -18,13 +18,15 @@
  * 3. This notice may not be removed or altered from any source distribution.
  **/
 
-#include "iOS.h"
+#include "ios.h"
 
 #ifdef LOVE_IOS
 
 #import <Foundation/Foundation.h>
 #import <UIKit/UIKit.h>
 
+#import <AudioToolbox/AudioServices.h>
+
 #include <vector>
 
 #include <SDL_events.h>
@@ -128,9 +130,22 @@ static NSString *getDocumentsDirectory()
 
 static NSArray *getLovesInDocuments()
 {
-	NSString *documents = getDocumentsDirectory();
-	NSArray *filepaths = [[NSFileManager defaultManager] subpathsOfDirectoryAtPath:documents error:nil];
-	return [filepaths pathsMatchingExtensions:@[@"love"]];
+	NSMutableArray *paths = [NSMutableArray new];
+
+	NSFileManager *manager = [NSFileManager defaultManager];
+	NSDirectoryEnumerator *enumerator = [manager enumeratorAtPath:getDocumentsDirectory()];
+
+	NSString *path = nil;
+	while ((path = [enumerator nextObject]))
+	{
+		//  Add .love files plus folders that contain main.lua to our list.
+		if ([path.pathExtension isEqualToString:@"love"])
+			[paths addObject:path];
+		else if ([path.lastPathComponent isEqualToString:@"main.lua"])
+			[paths addObject:path.stringByDeletingLastPathComponent];
+	}
+
+	return paths;
 }
 
 static bool deleteFileInDocuments(NSString *filename)
@@ -148,35 +163,38 @@ static bool deleteFileInDocuments(NSString *filename)
 
 static int dropFileEventFilter(void *userdata, SDL_Event *event)
 {
-	if (event->type != SDL_DROPFILE)
-		return 1;
-
-	NSString *fname = @(event->drop.file);
-	NSFileManager *fmanager = [NSFileManager defaultManager];
-
-	if ([fmanager fileExistsAtPath:fname] && [fname.pathExtension isEqual:@"love"])
+	@autoreleasepool
 	{
-		NSString *documents = getDocumentsDirectory();
+		if (event->type != SDL_DROPFILE)
+			return 1;
 
-		documents = [[documents stringByStandardizingPath] stringByResolvingSymlinksInPath];
-		fname = [[fname stringByStandardizingPath] stringByResolvingSymlinksInPath];
+		NSString *fname = @(event->drop.file);
+		NSFileManager *fmanager = [NSFileManager defaultManager];
 
-		// Is the file inside the Documents directory?
-		if ([fname hasPrefix:documents])
+		if ([fmanager fileExistsAtPath:fname] && [fname.pathExtension isEqual:@"love"])
 		{
-			LOVETableViewController *vc = (__bridge LOVETableViewController *) userdata;
+			NSString *documents = getDocumentsDirectory();
 
-			// Update the game list.
-			NSArray *games = getLovesInDocuments();
-			vc.gameList = [[NSMutableArray alloc] initWithArray:games copyItems:YES];
-			[vc.tableView reloadData];
+			documents = documents.stringByStandardizingPath.stringByResolvingSymlinksInPath;
+			fname = fname.stringByStandardizingPath.stringByResolvingSymlinksInPath;
 
-			SDL_free(event->drop.file);
-			return 0;
+			// Is the file inside the Documents directory?
+			if ([fname hasPrefix:documents])
+			{
+				LOVETableViewController *vc = (__bridge LOVETableViewController *) userdata;
+
+				// Update the game list.
+				NSArray *games = getLovesInDocuments();
+				vc.gameList = [[NSMutableArray alloc] initWithArray:games copyItems:YES];
+				[vc.tableView reloadData];
+
+				SDL_free(event->drop.file);
+				return 0;
+			}
 		}
-	}
 
-	return 1;
+		return 1;
+	}
 }
 
 namespace love
@@ -245,7 +263,6 @@ std::string getLoveInResources(bool &fused)
 		{
 			// The game should be fused if we have something here.
 			fused = true;
-			NSLog(@".love files in main Bundle: %@", bundlepaths);
 			return [bundlepaths[0] UTF8String];
 		}
 
@@ -253,9 +270,6 @@ std::string getLoveInResources(bool &fused)
 		// fused.
 		NSArray *filepaths = getLovesInDocuments();
 
-		if (filepaths.count > 0)
-			NSLog(@".love files in Documents: %@", filepaths);
-
 		// Let the user select a game from the un-fused list.
 		NSString *selectedfile = showGameList(filepaths);
 
@@ -263,8 +277,7 @@ std::string getLoveInResources(bool &fused)
 		if (selectedfile != nil && selectedfile.length > 0)
 		{
 			NSString *documents = getDocumentsDirectory();
-			path = [[documents stringByAppendingPathComponent:selectedfile] UTF8String];
-			NSLog(@"Using unfused .love file: %@", selectedfile);
+			path = [documents stringByAppendingPathComponent:selectedfile].UTF8String;
 		}
 	}
 
@@ -305,15 +318,32 @@ bool openURL(const std::string &url)
 
 	@autoreleasepool
 	{
+		UIApplication *app = [UIApplication sharedApplication];
 		NSURL *nsurl = [NSURL URLWithString:@(url.c_str())];
 
-		if ([[UIApplication sharedApplication] canOpenURL:nsurl])
-			success = [[UIApplication sharedApplication] openURL:nsurl];
+		if ([app canOpenURL:nsurl])
+			success = [app openURL:nsurl];
 	}
 
 	return success;
 }
 
+std::string getExecutablePath()
+{
+	@autoreleasepool
+	{
+		return std::string([NSBundle mainBundle].executablePath.UTF8String);
+	}
+}
+
+void vibrate()
+{
+	@autoreleasepool
+	{
+		AudioServicesPlaySystemSound(kSystemSoundID_Vibrate);
+	}
+}
+
 } // ios
 } // love
 

+ 13 - 3
src/common/OSX.h → src/common/macosx.h

@@ -1,5 +1,5 @@
 /**
- * Copyright (c) 2006-2015 LOVE Development Team
+ * Copyright (c) 2006-2016 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
@@ -29,7 +29,7 @@
 
 namespace love
 {
-namespace osx
+namespace macosx
 {
 
 /**
@@ -45,7 +45,17 @@ std::string getLoveInResources();
  **/
 std::string checkDropEvents();
 
-} // osx
+/**
+ * Returns the full path to the executable.
+ **/
+std::string getExecutablePath();
+
+/**
+ * Bounce the dock icon, if the app isn't in the foreground.
+ **/
+void requestAttention(bool continuous);
+
+} // macosx
 } // love
 
 #endif // LOVE_MACOSX

+ 24 - 4
src/common/OSX.mm → src/common/macosx.mm

@@ -1,5 +1,5 @@
 /**
- * Copyright (c) 2006-2015 LOVE Development Team
+ * Copyright (c) 2006-2016 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
@@ -18,17 +18,18 @@
  * 3. This notice may not be removed or altered from any source distribution.
  **/
 
-#include "OSX.h"
+#include "macosx.h"
 
 #ifdef LOVE_MACOSX
 
 #import <Foundation/Foundation.h>
+#import <Cocoa/Cocoa.h>
 
 #include <SDL2/SDL.h>
 
 namespace love
 {
-namespace osx
+namespace macosx
 {
 
 std::string getLoveInResources()
@@ -41,7 +42,7 @@ std::string getLoveInResources()
 		NSString *lovepath = [[NSBundle mainBundle] pathForResource:nil ofType:@"love"];
 
 		if (lovepath != nil)
-			path = [lovepath UTF8String];
+			path = lovepath.UTF8String;
 	}
 
 	return path;
@@ -69,6 +70,25 @@ std::string checkDropEvents()
 	return dropstr;
 }
 
+std::string getExecutablePath()
+{
+	@autoreleasepool
+	{
+		return std::string([NSBundle mainBundle].executablePath.UTF8String);
+	}
+}
+
+void requestAttention(bool continuous)
+{
+	@autoreleasepool
+	{
+		if (continuous)
+			[NSApp requestUserAttention:NSCriticalRequest];
+		else
+			[NSApp requestUserAttention:NSInformationalRequest];
+	}
+}
+
 } // osx
 } // love
 

+ 1 - 1
src/common/math.h

@@ -1,5 +1,5 @@
 /**
- * Copyright (c) 2006-2015 LOVE Development Team
+ * Copyright (c) 2006-2016 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

+ 138 - 50
src/common/runtime.cpp

@@ -1,5 +1,5 @@
 /**
- * Copyright (c) 2006-2015 LOVE Development Team
+ * Copyright (c) 2006-2016 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
@@ -47,6 +47,14 @@ static int w__gc(lua_State *L)
 }
 
 static int w__tostring(lua_State *L)
+{
+	Proxy *p = (Proxy *) lua_touserdata(L, 1);
+	const char *typname = lua_tostring(L, lua_upvalueindex(1));
+	lua_pushfstring(L, "%s: %p", typname, p->object);
+	return 1;
+}
+
+static int w__type(lua_State *L)
 {
 	lua_pushvalue(L, lua_upvalueindex(1));
 	return 1;
@@ -70,7 +78,7 @@ static int w__eq(lua_State *L)
 
 Reference *luax_refif(lua_State *L, int type)
 {
-	Reference *r = 0;
+	Reference *r = nullptr;
 
 	// Create a reference only if the test succeeds.
 	if (lua_type(L, -1) == type)
@@ -83,10 +91,8 @@ Reference *luax_refif(lua_State *L, int type)
 
 void luax_printstack(lua_State *L)
 {
-	for (int i = 1; i<=lua_gettop(L); i++)
-	{
+	for (int i = 1; i <= lua_gettop(L); i++)
 		std::cout << i << " - " << luaL_typename(L, i) << std::endl;
-	}
 }
 
 bool luax_toboolean(lua_State *L, int idx)
@@ -133,7 +139,7 @@ bool luax_boolflag(lua_State *L, int table_index, const char *key, bool defaultV
 	if (lua_isnoneornil(L, -1))
 		retval = defaultValue;
 	else
-		retval = lua_toboolean(L, -1);
+		retval = lua_toboolean(L, -1) != 0;
 
 	lua_pop(L, 1);
 	return retval;
@@ -190,18 +196,28 @@ int luax_assert_nilerror(lua_State *L, int idx)
 
 void luax_setfuncs(lua_State *L, const luaL_Reg *l)
 {
-	if (l == 0)
+	if (l == nullptr)
 		return;
 
-	for (; l->name != 0; l++)
+	for (; l->name != nullptr; l++)
 	{
 		lua_pushcfunction(L, l->func);
 		lua_setfield(L, -2, l->name);
 	}
 }
 
+int luax_require(lua_State *L, const char *name)
+{
+	lua_getglobal(L, "require");
+	lua_pushstring(L, name);
+	lua_call(L, 1, 1);
+	return 1;
+}
+
 int luax_register_module(lua_State *L, const WrappedModule &m)
 {
+	love::addTypeName(m.type, m.name);
+
 	// Put a reference to the C++ module in Lua.
 	luax_insistregistry(L, REGISTRY_MODULES);
 
@@ -226,13 +242,15 @@ int luax_register_module(lua_State *L, const WrappedModule &m)
 	lua_newtable(L);
 
 	// Register all the functions.
-	if (m.functions != 0)
+	if (m.functions != nullptr)
 		luax_setfuncs(L, m.functions);
 
 	// Register types.
-	if (m.types != 0)
-		for (const lua_CFunction *t = m.types; *t != 0; t++)
+	if (m.types != nullptr)
+	{
+		for (const lua_CFunction *t = m.types; *t != nullptr; t++)
 			(*t)(L);
+	}
 
 	lua_pushvalue(L, -1);
 	lua_setfield(L, -3, m.name); // love.graphics = table
@@ -254,17 +272,14 @@ int luax_preload(lua_State *L, lua_CFunction f, const char *name)
 	return 0;
 }
 
-int luax_register_type(lua_State *L, love::Type type, const luaL_Reg *f)
+int luax_register_type(lua_State *L, love::Type type, const char *name, ...)
 {
-	// Verify that this type name has a matching Type ID and type name mapping.
-	const char *tname = "Invalid";
-	if (!love::getType(type, tname))
-		printf("Missing type name entry for type ID %d\n", type);
+	love::addTypeName(type, name);
 
 	// Get the place for storing and re-using instantiated love types.
-	luax_getregistry(L, REGISTRY_TYPES);
+	luax_getregistry(L, REGISTRY_OBJECTS);
 
-	// Create registry._lovetypes if it doesn't exist yet.
+	// Create registry._loveobjects if it doesn't exist yet.
 	if (!lua_istable(L, -1))
 	{
 		lua_newtable(L);
@@ -280,13 +295,13 @@ int luax_register_type(lua_State *L, love::Type type, const luaL_Reg *f)
 		// setmetatable(newtable, metatable)
 		lua_setmetatable(L, -2);
 
-		// registry._lovetypes = newtable
-		lua_setfield(L, LUA_REGISTRYINDEX, "_lovetypes");
+		// registry._loveobjects = newtable
+		lua_setfield(L, LUA_REGISTRYINDEX, "_loveobjects");
 	}
 	else
 		lua_pop(L, 1);
 
-	luaL_newmetatable(L, tname);
+	luaL_newmetatable(L, name);
 
 	// m.__index = m
 	lua_pushvalue(L, -1);
@@ -301,26 +316,38 @@ int luax_register_type(lua_State *L, love::Type type, const luaL_Reg *f)
 	lua_setfield(L, -2, "__eq");
 
 	// Add tostring function.
-	lua_pushstring(L, tname);
+	lua_pushstring(L, name);
 	lua_pushcclosure(L, w__tostring, 1);
 	lua_setfield(L, -2, "__tostring");
 
-	// Add tostring to as type() as well.
-	lua_pushstring(L, tname);
-	lua_pushcclosure(L, w__tostring, 1);
+	// Add type
+	lua_pushstring(L, name);
+	lua_pushcclosure(L, w__type, 1);
 	lua_setfield(L, -2, "type");
 
 	// Add typeOf
 	lua_pushcfunction(L, w__typeOf);
 	lua_setfield(L, -2, "typeOf");
 
-	if (f != 0)
+	va_list fs;
+	va_start(fs, name);
+	for (const luaL_Reg *f = va_arg(fs, const luaL_Reg *); f; f = va_arg(fs, const luaL_Reg *))
 		luax_setfuncs(L, f);
+	va_end(fs);
 
 	lua_pop(L, 1); // Pops metatable.
 	return 0;
 }
 
+void luax_gettypemetatable(lua_State *L, love::Type type)
+{
+	const char *name = nullptr;
+	if (getTypeName(type, name))
+		lua_getfield(L, LUA_REGISTRYINDEX, name);
+	else
+		lua_pushnil(L);
+}
+
 int luax_table_insert(lua_State *L, int tindex, int vindex, int pos)
 {
 	if (tindex < 0)
@@ -331,13 +358,13 @@ int luax_table_insert(lua_State *L, int tindex, int vindex, int pos)
 	if (pos == -1)
 	{
 		lua_pushvalue(L, vindex);
-		lua_rawseti(L, tindex, (int) lua_objlen(L, tindex)+1);
+		lua_rawseti(L, tindex, (int) luax_objlen(L, tindex)+1);
 		return 0;
 	}
 	else if (pos < 0)
-		pos = (int) lua_objlen(L, tindex)+1+pos;
+		pos = (int) luax_objlen(L, tindex)+1+pos;
 
-	for (int i = (int) lua_objlen(L, tindex)+1; i > pos; i--)
+	for (int i = (int) luax_objlen(L, tindex)+1; i > pos; i--)
 	{
 		lua_rawgeti(L, tindex, i-1);
 		lua_rawseti(L, tindex, i);
@@ -384,7 +411,7 @@ void luax_rawnewtype(lua_State *L, love::Type type, love::Object *object)
 	u->type = type;
 
 	const char *name = "Invalid";
-	getType(type, name);
+	getTypeName(type, name);
 
 	luaL_newmetatable(L, name);
 	lua_setmetatable(L, -2);
@@ -398,8 +425,8 @@ void luax_pushtype(lua_State *L, love::Type type, love::Object *object)
 		return;
 	}
 
-	// Fetch the registry table of instantiated types.
-	luax_getregistry(L, REGISTRY_TYPES);
+	// Fetch the registry table of instantiated objects.
+	luax_getregistry(L, REGISTRY_OBJECTS);
 
 	// The table might not exist - it should be insisted in luax_register_type.
 	if (!lua_istable(L, -1))
@@ -408,7 +435,7 @@ void luax_pushtype(lua_State *L, love::Type type, love::Object *object)
 		return luax_rawnewtype(L, type, object);
 	}
 
-	// Get the value of lovetypes[object] on the stack.
+	// Get the value of loveobjects[object] on the stack.
 	lua_pushlightuserdata(L, object);
 	lua_gettable(L, -2);
 
@@ -422,11 +449,11 @@ void luax_pushtype(lua_State *L, love::Type type, love::Object *object)
 		lua_pushlightuserdata(L, object);
 		lua_pushvalue(L, -2);
 
-		// lovetypes[object] = Proxy.
+		// loveobjects[object] = Proxy.
 		lua_settable(L, -4);
 	}
 
-	// Remove the lovetypes table from the stack.
+	// Remove the loveobjects table from the stack.
 	lua_remove(L, -2);
 
 	// Keep the Proxy userdata on the stack.
@@ -438,7 +465,11 @@ bool luax_istype(lua_State *L, int idx, love::Type type)
 		return false;
 
 	Proxy *p = (Proxy *) lua_touserdata(L, idx);
-	return typeFlags[p->type][type];
+
+	if (p->type > INVALID_ID && p->type < TYPE_MAX_ENUM)
+		return typeFlags[p->type][type];
+	else
+		return false;
 }
 
 int luax_getfunction(lua_State *L, const char *mod, const char *fn)
@@ -481,7 +512,8 @@ int luax_convobj(lua_State *L, int idxs[], int n, const char *mod, const char *f
 	lua_call(L, n, 2); // Call the function, n args, one return value (plus optional errstring.)
 	luax_assert_nilerror(L, -2); // Make sure the function returned something.
 	lua_pop(L, 1); // Pop the second return value now that we don't need it.
-	lua_replace(L, idxs[0]); // Replace the initial argument with the new object.
+	if (n > 0)
+		lua_replace(L, idxs[0]); // Replace the initial argument with the new object.
 	return 0;
 }
 
@@ -544,6 +576,11 @@ int luax_insistglobal(lua_State *L, const char *k)
 	return 1;
 }
 
+int luax_c_insistglobal(lua_State *L, const char *k)
+{
+	return luax_insistglobal(L, k);
+}
+
 int luax_insistlove(lua_State *L, const char *k)
 {
 	luax_insistglobal(L, "love");
@@ -573,12 +610,10 @@ int luax_insistregistry(lua_State *L, Registry r)
 {
 	switch (r)
 	{
-	case REGISTRY_GC:
-		return luax_insistlove(L, "_gc");
 	case REGISTRY_MODULES:
 		return luax_insistlove(L, "_modules");
-	case REGISTRY_TYPES:
-		return luax_insist(L, LUA_REGISTRYINDEX, "_lovetypes");
+	case REGISTRY_OBJECTS:
+		return luax_insist(L, LUA_REGISTRYINDEX, "_loveobjects");
 	default:
 		return luaL_error(L, "Attempted to use invalid registry.");
 	}
@@ -588,35 +623,66 @@ int luax_getregistry(lua_State *L, Registry r)
 {
 	switch (r)
 	{
-	case REGISTRY_GC:
-		return luax_getlove(L, "_gc");
 	case REGISTRY_MODULES:
 		return luax_getlove(L, "_modules");
-	case REGISTRY_TYPES:
-		lua_getfield(L, LUA_REGISTRYINDEX, "_lovetypes");
+	case REGISTRY_OBJECTS:
+		lua_getfield(L, LUA_REGISTRYINDEX, "_loveobjects");
 		return 1;
 	default:
 		return luaL_error(L, "Attempted to use invalid registry.");
 	}
 }
 
+static const char *MAIN_THREAD_KEY = "_love_mainthread";
+
+lua_State *luax_insistpinnedthread(lua_State *L)
+{
+	lua_getfield(L, LUA_REGISTRYINDEX, MAIN_THREAD_KEY);
+
+	if (lua_isnoneornil(L, -1))
+	{
+		lua_pop(L, 1);
+
+		// lua_pushthread returns 1 if it's actually the main thread, but we
+		// can't actually get the real main thread if lua_pushthread doesn't
+		// return it (in Lua 5.1 at least), so we ignore that for now...
+		// We do store a strong reference to the current thread/coroutine in
+		// the registry, however.
+		lua_pushthread(L);
+		lua_pushvalue(L, -1);
+		lua_setfield(L, LUA_REGISTRYINDEX, MAIN_THREAD_KEY);
+	}
+
+	lua_State *thread = lua_tothread(L, -1);
+	lua_pop(L, 1);
+	return thread;
+}
+
+lua_State *luax_getpinnedthread(lua_State *L)
+{
+	lua_getfield(L, LUA_REGISTRYINDEX, MAIN_THREAD_KEY);
+	lua_State *thread = lua_tothread(L, -1);
+	lua_pop(L, 1);
+	return thread;
+}
+
 extern "C" int luax_typerror(lua_State *L, int narg, const char *tname)
 {
 	int argtype = lua_type(L, narg);
 	const char *argtname = 0;
 
 	// We want to use the love type name for userdata, if possible.
-	if (argtype == LUA_TUSERDATA && luaL_getmetafield(L, narg, "__tostring") != 0)
+	if (argtype == LUA_TUSERDATA && luaL_getmetafield(L, narg, "type") != 0)
 	{
 		lua_pushvalue(L, narg);
 		if (lua_pcall(L, 1, 1, 0) == 0 && lua_type(L, -1) == LUA_TSTRING)
 		{
 			argtname = lua_tostring(L, -1);
 
-			// Non-love userdata might have a tostring metamethod which doesn't
-			// describe its type, so we only use __tostring for love types.
+			// Non-love userdata might have a type metamethod which doesn't
+			// describe its type properly, so we only use it for love types.
 			love::Type t;
-			if (!love::getType(argtname, t))
+			if (!love::getTypeName(argtname, t))
 				argtname = 0;
 		}
 	}
@@ -628,10 +694,32 @@ extern "C" int luax_typerror(lua_State *L, int narg, const char *tname)
 	return luaL_argerror(L, narg, msg);
 }
 
+size_t luax_objlen(lua_State *L, int ndx)
+{
+#if LUA_VERSION_NUM == 501
+	return lua_objlen(L, ndx);
+#else
+	return lua_rawlen(L, ndx);
+#endif
+}
+
+void luax_register(lua_State *L, const char *name, const luaL_Reg *l)
+{
+	if (name)
+		lua_newtable(L);
+
+	luax_setfuncs(L, l);
+	if (name)
+	{
+		lua_pushvalue(L, -1);
+		lua_setglobal(L, name);
+	}
+}
+
 Type luax_type(lua_State *L, int idx)
 {
 	Type t = INVALID_ID;
-	getType(luaL_checkstring(L, idx), t);
+	getTypeName(luaL_checkstring(L, idx), t);
 	return t;
 }
 

+ 53 - 18
src/common/runtime.h

@@ -1,5 +1,5 @@
 /**
- * Copyright (c) 2006-2015 LOVE Development Team
+ * Copyright (c) 2006-2016 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
@@ -49,9 +49,8 @@ class Reference;
  **/
 enum Registry
 {
-	REGISTRY_GC,
 	REGISTRY_MODULES,
-	REGISTRY_TYPES
+	REGISTRY_OBJECTS
 };
 
 /**
@@ -222,6 +221,13 @@ int luax_assert_nilerror(lua_State *L, int idx);
  **/
 void luax_setfuncs(lua_State *L, const luaL_Reg *l);
 
+/**
+ * Loads a Lua module using the 'require' function. Leaves the return result on
+ * the stack.
+ * @param name The name of the module to require.
+ **/
+int luax_require(lua_State *L, const char *name);
+
 /**
  * Register a module in the love table. The love table will be created if it does not exist.
  * NOTE: The module-object is expected to have a +1 reference count before calling
@@ -241,9 +247,15 @@ int luax_preload(lua_State *L, lua_CFunction f, const char *name);
 /**
  * Register a new type.
  * @param type The type.
- * @param f The list of member functions for the type.
+ * @param name The type's human-readable name
+ * @param ... The list of lists of member functions for the type. (of type luaL_Reg*)
  **/
-int luax_register_type(lua_State *L, love::Type type, const luaL_Reg *f = 0);
+int luax_register_type(lua_State *L, love::Type type, const char *name, ...);
+
+/**
+ * Pushes the metatable of the specified type onto the stack.
+**/
+void luax_gettypemetatable(lua_State *L, love::Type type);
 
 /**
  * Do a table.insert from C
@@ -268,7 +280,6 @@ int luax_register_searcher(lua_State *L, lua_CFunction f, int pos = -1);
  * storing the Lua representation in a weak table if it doesn't exist yet.
  * NOTE: The object will be retained by Lua and released upon garbage collection.
  * @param L The Lua state.
- * @param name The name of the type. This must match the name used with luax_register_type.
  * @param type The type information of the object.
  * @param object The pointer to the actual object.
  **/
@@ -282,7 +293,6 @@ void luax_pushtype(lua_State *L, const love::Type type, love::Object *object);
  * Lua-side objects from working in some cases when used as keys in tables.
  * NOTE: The object will be retained by Lua and released upon garbage collection.
  * @param L The Lua state.
- * @param name The name of the type. This must match the name used with luax_register_type.
  * @param type The type information of the object.
  * @param object The pointer to the actual object.
  **/
@@ -384,16 +394,43 @@ int luax_insistregistry(lua_State *L, Registry r);
  **/
 int luax_getregistry(lua_State *L, Registry r);
 
+/**
+ * Gets (and pins if needed) a "pinned" Lua thread (coroutine) in the specified
+ * Lua state. This will usually be the main Lua thread, unless the first call
+ * to this function for a specific Lua state is made from within a coroutine.
+ * NOTE: This does not push anything to the stack.
+ **/
+lua_State *luax_insistpinnedthread(lua_State *L);
+
+/**
+ * Gets a "pinned" Lua thread (coroutine) in the specified Lua state. This will
+ * usually be the main Lua thread. This can be used to access global variables
+ * in a specific Lua state without needing another alive lua_State value.
+ * PRECONDITION: luax_insistpinnedthread must have been called on a lua_State
+ * value corresponding to the Lua state which will be used with this function.
+ * NOTE: This does not push anything to the stack.
+ **/
+lua_State *luax_getpinnedthread(lua_State *L);
+
 extern "C" { // Also called from luasocket
 	int luax_typerror(lua_State *L, int narg, const char *tname);
 }
 
+/**
+ * Calls luax_objlen/lua_rawlen depending on version
+ **/
+size_t luax_objlen(lua_State *L, int ndx);
+
+extern "C" { // Called by enet and luasocket
+	void luax_register(lua_State *L, const char *name, const luaL_Reg *l);
+	int luax_c_insistglobal(lua_State *L, const char *k);
+}
+
 /**
  * Like luax_totype, but causes an error if the value at idx is not Proxy,
  * or is not the specified type.
  * @param L The Lua state.
  * @param idx The index on the stack.
- * @param name The name of the type.
  * @param type The type bit.
  **/
 template <typename T>
@@ -402,7 +439,7 @@ T *luax_checktype(lua_State *L, int idx, love::Type type)
 	if (lua_type(L, idx) != LUA_TUSERDATA)
 	{
 		const char *name = "Invalid";
-		getType(type, name);
+		getTypeName(type, name);
 		luax_typerror(L, idx, name);
 	}
 
@@ -411,7 +448,7 @@ T *luax_checktype(lua_State *L, int idx, love::Type type)
 	if (!typeFlags[u->type][type])
 	{
 		const char *name = "Invalid";
-		getType(type, name);
+		getTypeName(type, name);
 		luax_typerror(L, idx, name);
 	}
 
@@ -422,7 +459,7 @@ template <typename T>
 T *luax_getmodule(lua_State *L, love::Type type)
 {
 	const char *name = "Invalid";
-	getType(type, name);
+	getTypeName(type, name);
 
 	luax_insistregistry(L, REGISTRY_MODULES);
 	lua_getfield(L, -1, name);
@@ -444,7 +481,7 @@ template <typename T>
 T *luax_optmodule(lua_State *L, love::Type type)
 {
 	const char *name = "Invalid";
-	getType(type, name);
+	getTypeName(type, name);
 
 	luax_insistregistry(L, REGISTRY_MODULES);
 	lua_getfield(L, -1, name);
@@ -459,9 +496,9 @@ T *luax_optmodule(lua_State *L, love::Type type)
 
 	if (!typeFlags[u->type][type])
 		luaL_error(L, "Incorrect module %s", name);
-	
+
 	lua_pop(L, 2);
-	
+
 	return (T *) u->object;
 }
 
@@ -506,7 +543,6 @@ int luax_catchexcept(lua_State *L, const T& func)
 		return luaL_error(L, "%s", lua_tostring(L, -1));
 
 	return 0;
-
 }
 
 template <typename T, typename F>
@@ -524,13 +560,12 @@ int luax_catchexcept(lua_State *L, const T& func, const F& finallyfunc)
 		lua_pushstring(L, e.what());
 	}
 
-	finallyfunc();
+	finallyfunc(should_error);
 
 	if (should_error)
 		return luaL_error(L, "%s", lua_tostring(L, -1));
-	
+
 	return 0;
-	
 }
 
 } // love

+ 18 - 92
src/common/types.cpp

@@ -1,5 +1,5 @@
 /**
- * Copyright (c) 2006-2015 LOVE Development Team
+ * Copyright (c) 2006-2016 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
@@ -34,6 +34,7 @@ static const TypeBits *createTypeFlags()
 	b[OBJECT_ID] = one << OBJECT_ID;
 	b[DATA_ID] = (one << DATA_ID) | b[OBJECT_ID];
 	b[MODULE_ID] = (one << MODULE_ID) | b[OBJECT_ID];
+	b[STREAM_ID] = (one << STREAM_ID) | b[OBJECT_ID];
 
 	// Filesystem.
 	b[FILESYSTEM_FILE_ID] = (one << FILESYSTEM_FILE_ID) | b[OBJECT_ID];
@@ -55,10 +56,11 @@ static const TypeBits *createTypeFlags()
 	b[GRAPHICS_SHADER_ID] = (one << GRAPHICS_SHADER_ID) | b[OBJECT_ID];
 	b[GRAPHICS_MESH_ID] = (one << GRAPHICS_MESH_ID) | b[GRAPHICS_DRAWABLE_ID];
 	b[GRAPHICS_TEXT_ID] = (one << GRAPHICS_TEXT_ID) | b[GRAPHICS_DRAWABLE_ID];
+	b[GRAPHICS_VIDEO_ID] = (one << GRAPHICS_VIDEO_ID) | b[GRAPHICS_DRAWABLE_ID];
 
 	// Image.
 	b[IMAGE_IMAGE_DATA_ID] = (one << IMAGE_IMAGE_DATA_ID) | b[DATA_ID];
-	b[IMAGE_COMPRESSED_DATA_ID] = (one << IMAGE_COMPRESSED_DATA_ID) | b[DATA_ID];
+	b[IMAGE_COMPRESSED_IMAGE_DATA_ID] = (one << IMAGE_COMPRESSED_IMAGE_DATA_ID) | b[DATA_ID];
 
 	// Joystick.
 	b[JOYSTICK_JOYSTICK_ID] = (one << JOYSTICK_JOYSTICK_ID) | b[OBJECT_ID];
@@ -66,6 +68,7 @@ static const TypeBits *createTypeFlags()
 	// Math.
 	b[MATH_RANDOM_GENERATOR_ID] = (one << MATH_RANDOM_GENERATOR_ID) | b[OBJECT_ID];
 	b[MATH_BEZIER_CURVE_ID] = (one << MATH_BEZIER_CURVE_ID) | b[OBJECT_ID];
+	b[MATH_COMPRESSED_DATA_ID] = (one <<MATH_COMPRESSED_DATA_ID) | b[DATA_ID];
 
 	// Audio.
 	b[AUDIO_SOURCE_ID] = (one << AUDIO_SOURCE_ID) | b[OBJECT_ID];
@@ -104,6 +107,9 @@ static const TypeBits *createTypeFlags()
 	b[THREAD_THREAD_ID] = (one << THREAD_THREAD_ID) | b[OBJECT_ID];
 	b[THREAD_CHANNEL_ID] = (one << THREAD_CHANNEL_ID) | b[OBJECT_ID];
 
+	// Video
+	b[VIDEO_VIDEO_STREAM_ID] = (one << VIDEO_VIDEO_STREAM_ID) | b[STREAM_ID];
+
 	// Modules.
 	b[MODULE_FILESYSTEM_ID] = (one << MODULE_FILESYSTEM_ID) | b[MODULE_ID];
 	b[MODULE_GRAPHICS_ID] = (one << MODULE_GRAPHICS_ID) | b[MODULE_ID];
@@ -115,101 +121,21 @@ static const TypeBits *createTypeFlags()
 
 const TypeBits *typeFlags = createTypeFlags();
 
-StringMap<Type, TYPE_MAX_ENUM>::Entry typeEntries[] =
+static StringMap<Type, TYPE_MAX_ENUM> types(nullptr, 0);
+
+void addTypeName(Type type, const char *name)
 {
-	{"Invalid", INVALID_ID},
-
-	{"Object", OBJECT_ID},
-	{"Data", DATA_ID},
-	{"Module", MODULE_ID},
-
-	// Filesystem
-	{"File", FILESYSTEM_FILE_ID},
-	{"DroppedFile", FILESYSTEM_DROPPED_FILE_ID},
-	{"FileData", FILESYSTEM_FILE_DATA_ID},
-
-	// Font
-	{"GlyphData", FONT_GLYPH_DATA_ID},
-	{"Rasterizer", FONT_RASTERIZER_ID},
-
-	// Graphics
-	{"Drawable", GRAPHICS_DRAWABLE_ID},
-	{"Texture", GRAPHICS_TEXTURE_ID},
-	{"Image", GRAPHICS_IMAGE_ID},
-	{"Quad", GRAPHICS_QUAD_ID},
-	{"Font", GRAPHICS_FONT_ID},
-	{"ParticleSystem", GRAPHICS_PARTICLE_SYSTEM_ID},
-	{"SpriteBatch", GRAPHICS_SPRITE_BATCH_ID},
-	{"Canvas", GRAPHICS_CANVAS_ID},
-	{"Shader", GRAPHICS_SHADER_ID},
-	{"Mesh", GRAPHICS_MESH_ID},
-	{"Text", GRAPHICS_TEXT_ID},
-
-	// Image
-	{"ImageData", IMAGE_IMAGE_DATA_ID},
-	{"CompressedData", IMAGE_COMPRESSED_DATA_ID},
-
-	// Joystick
-	{"Joystick", JOYSTICK_JOYSTICK_ID},
-
-	// Math
-	{"RandomGenerator", MATH_RANDOM_GENERATOR_ID},
-	{"BezierCurve", MATH_BEZIER_CURVE_ID},
-
-	// Audio
-	{"Source", AUDIO_SOURCE_ID},
-
-	// Sound
-	{"SoundData", SOUND_SOUND_DATA_ID},
-	{"Decoder", SOUND_DECODER_ID},
-
-	// Mouse
-	{"Cursor", MOUSE_CURSOR_ID},
-
-	// Physics
-	{"World", PHYSICS_WORLD_ID},
-	{"Contact", PHYSICS_CONTACT_ID},
-	{"Body", PHYSICS_BODY_ID},
-	{"Fixture", PHYSICS_FIXTURE_ID},
-	{"Shape", PHYSICS_SHAPE_ID},
-	{"CircleShape", PHYSICS_CIRCLE_SHAPE_ID},
-	{"PolygonShape", PHYSICS_POLYGON_SHAPE_ID},
-	{"EdgeShape", PHYSICS_EDGE_SHAPE_ID},
-	{"ChainShape", PHYSICS_CHAIN_SHAPE_ID},
-	{"Joint", PHYSICS_JOINT_ID},
-	{"MouseJoint", PHYSICS_MOUSE_JOINT_ID},
-	{"DistanceJoint", PHYSICS_DISTANCE_JOINT_ID},
-	{"PrismaticJoint", PHYSICS_PRISMATIC_JOINT_ID},
-	{"RevoluteJoint", PHYSICS_REVOLUTE_JOINT_ID},
-	{"PulleyJoint", PHYSICS_PULLEY_JOINT_ID},
-	{"GearJoint", PHYSICS_GEAR_JOINT_ID},
-	{"FrictionJoint", PHYSICS_FRICTION_JOINT_ID},
-	{"WeldJoint", PHYSICS_WELD_JOINT_ID},
-	{"RopeJoint", PHYSICS_ROPE_JOINT_ID},
-	{"WheelJoint", PHYSICS_WHEEL_JOINT_ID},
-	{"MotorJoint", PHYSICS_MOTOR_JOINT_ID},
-
-	// Thread
-	{"Thread", THREAD_THREAD_ID},
-	{"Channel", THREAD_CHANNEL_ID},
-
-	// The modules themselves. Only add abstracted modules here.
-	{"filesystem", MODULE_FILESYSTEM_ID},
-	{"graphics", MODULE_GRAPHICS_ID},
-	{"image", MODULE_IMAGE_ID},
-	{"sound", MODULE_SOUND_ID},
-};
-
-StringMap<Type, TYPE_MAX_ENUM> types(typeEntries, sizeof(typeEntries));
-
-static_assert((sizeof(typeEntries) / sizeof(typeEntries[0])) == TYPE_MAX_ENUM, "Type name array size doesn't match the total number of type IDs!");
-
-bool getType(const char *in, love::Type &out)
+	const char *n;
+	if (!types.find(type, n))
+		types.add(name, type);
+}
+
+bool getTypeName(const char *in, love::Type &out)
 {
 	return types.find(in, out);
 }
 
-bool getType(love::Type in, const char *&out)
+bool getTypeName(love::Type in, const char *&out)
 {
 	return types.find(in, out);
 }

+ 11 - 4
src/common/types.h

@@ -1,5 +1,5 @@
 /**
- * Copyright (c) 2006-2015 LOVE Development Team
+ * Copyright (c) 2006-2016 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
@@ -34,6 +34,7 @@ enum Type
 	OBJECT_ID,
 	DATA_ID,
 	MODULE_ID,
+	STREAM_ID,
 
 	// Filesystem.
 	FILESYSTEM_FILE_ID,
@@ -56,10 +57,11 @@ enum Type
 	GRAPHICS_SHADER_ID,
 	GRAPHICS_MESH_ID,
 	GRAPHICS_TEXT_ID,
+	GRAPHICS_VIDEO_ID,
 
 	// Image
 	IMAGE_IMAGE_DATA_ID,
-	IMAGE_COMPRESSED_DATA_ID,
+	IMAGE_COMPRESSED_IMAGE_DATA_ID,
 
 	// Joystick
 	JOYSTICK_JOYSTICK_ID,
@@ -67,6 +69,7 @@ enum Type
 	// Math
 	MATH_RANDOM_GENERATOR_ID,
 	MATH_BEZIER_CURVE_ID,
+	MATH_COMPRESSED_DATA_ID,
 
 	// Audio
 	AUDIO_SOURCE_ID,
@@ -105,6 +108,9 @@ enum Type
 	THREAD_THREAD_ID,
 	THREAD_CHANNEL_ID,
 
+	// Video
+	VIDEO_VIDEO_STREAM_ID,
+
 	// The modules themselves. Only add abstracted modules here.
 	MODULE_FILESYSTEM_ID,
 	MODULE_GRAPHICS_ID,
@@ -122,8 +128,9 @@ typedef std::bitset<TYPE_MAX_ENUM> TypeBits;
  **/
 extern const TypeBits *typeFlags;
 
-bool getType(const char *in, Type &out);
-bool getType(Type in, const char *&out);
+void addTypeName(Type type, const char *name);
+bool getTypeName(const char *in, Type &out);
+bool getTypeName(Type in, const char *&out);
 
 } // love
 

+ 1 - 1
src/common/utf8.cpp

@@ -1,5 +1,5 @@
 /**
- * Copyright (c) 2006-2015 LOVE Development Team
+ * Copyright (c) 2006-2016 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

+ 1 - 1
src/common/utf8.h

@@ -1,5 +1,5 @@
 /**
- * Copyright (c) 2006-2015 LOVE Development Team
+ * Copyright (c) 2006-2016 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

+ 5 - 5
src/common/version.h

@@ -1,5 +1,5 @@
 /**
- * Copyright (c) 2006-2015 LOVE Development Team
+ * Copyright (c) 2006-2016 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
@@ -25,13 +25,13 @@ namespace love
 {
 
 // Version stuff.
-#define LOVE_VERSION_STRING "0.10.0"
+#define LOVE_VERSION_STRING "0.10.1"
 static const int VERSION_MAJOR = 0;
 static const int VERSION_MINOR = 10;
-static const int VERSION_REV = 0;
+static const int VERSION_REV = 1;
 static const char *VERSION = LOVE_VERSION_STRING;
-static const char *VERSION_COMPATIBILITY[] =  { VERSION, 0 };
-static const char *VERSION_CODENAME = "";
+static const char *VERSION_COMPATIBILITY[] =  { VERSION, "0.10.0", 0 };
+static const char *VERSION_CODENAME = "Super Toast";
 
 } // love
 

+ 2 - 2
src/common/wrap_Data.cpp

@@ -1,5 +1,5 @@
 /**
- * Copyright (c) 2006-2015 LOVE Development Team
+ * Copyright (c) 2006-2016 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
@@ -59,7 +59,7 @@ const luaL_Reg w_Data_functions[] =
 
 int w_Data_open(lua_State *L)
 {
-	luax_register_type(L, DATA_ID, w_Data_functions);
+	luax_register_type(L, DATA_ID, "Data", w_Data_functions, nullptr);
 	return 0;
 }
 

+ 2 - 4
src/common/wrap_Data.h

@@ -1,5 +1,5 @@
 /**
- * Copyright (c) 2006-2015 LOVE Development Team
+ * Copyright (c) 2006-2016 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
@@ -29,10 +29,8 @@ namespace love
 {
 
 Data *luax_checkdata(lua_State *L, int idx);
-int w_Data_getString(lua_State *L);
-int w_Data_getPointer(lua_State *L);
-int w_Data_getSize(lua_State *L);
 int w_Data_open(lua_State *L);
+extern const luaL_Reg w_Data_functions[];
 
 } // love
 

+ 6 - 3
src/libraries/Box2D/Collision/Shapes/b2ChainShape.cpp

@@ -22,6 +22,11 @@
 #include <string.h>
 
 b2ChainShape::~b2ChainShape()
+{
+	Clear();
+}
+
+void b2ChainShape::Clear()
 {
 	b2Free(m_vertices);
 	m_vertices = NULL;
@@ -56,10 +61,8 @@ void b2ChainShape::CreateChain(const b2Vec2* vertices, int32 count)
 	b2Assert(count >= 2);
 	for (int32 i = 1; i < count; ++i)
 	{
-		b2Vec2 v1 = vertices[i-1];
-		b2Vec2 v2 = vertices[i];
 		// If the code crashes here, it means your vertices are too close together.
-		b2Assert(b2DistanceSquared(v1, v2) > b2_linearSlop * b2_linearSlop);
+		b2Assert(b2DistanceSquared(vertices[i-1], vertices[i]) > b2_linearSlop * b2_linearSlop);
 	}
 
 	m_count = count;

+ 3 - 0
src/libraries/Box2D/Collision/Shapes/b2ChainShape.h

@@ -37,6 +37,9 @@ public:
 	/// The destructor frees the vertices using b2Free.
 	~b2ChainShape();
 
+	/// Clear all data.
+	void Clear();
+
 	/// Create a loop. This automatically adjusts connectivity.
 	/// @param vertices an array of vertices, these are copied
 	/// @param count the vertex count

+ 9 - 1
src/libraries/Box2D/Collision/Shapes/b2PolygonShape.cpp

@@ -138,7 +138,7 @@ void b2PolygonShape::Set(const b2Vec2* vertices, int32 count)
 		bool unique = true;
 		for (int32 j = 0; j < tempCount; ++j)
 		{
-			if (b2DistanceSquared(v, ps[j]) < 0.5f * b2_linearSlop)
+			if (b2DistanceSquared(v, ps[j]) < ((0.5f * b2_linearSlop) * (0.5f * b2_linearSlop)))
 			{
 				unique = false;
 				break;
@@ -217,6 +217,14 @@ void b2PolygonShape::Set(const b2Vec2* vertices, int32 count)
 		}
 	}
 	
+	if (m < 3)
+	{
+		// Polygon is degenerate.
+		b2Assert(false);
+		SetAsBox(1.0f, 1.0f);
+		return;
+	}
+
 	m_count = m;
 
 	// Copy vertices.

+ 1 - 0
src/libraries/Box2D/Common/b2BlockAllocator.cpp

@@ -20,6 +20,7 @@
 #include <limits.h>
 #include <string.h>
 #include <stddef.h>
+#include <cstring>
 
 int32 b2BlockAllocator::s_blockSizes[b2_blockSizes] = 
 {

+ 3 - 3
src/libraries/Box2D/Common/b2Draw.h

@@ -25,9 +25,9 @@
 struct b2Color
 {
 	b2Color() {}
-	b2Color(float32 r, float32 g, float32 b) : r(r), g(g), b(b) {}
-	void Set(float32 ri, float32 gi, float32 bi) { r = ri; g = gi; b = bi; }
-	float32 r, g, b;
+	b2Color(float32 r, float32 g, float32 b, float32 a = 1.0f) : r(r), g(g), b(b), a(a) {}
+	void Set(float32 ri, float32 gi, float32 bi, float32 ai = 1.0f) { r = ri; g = gi; b = bi; a = ai; }
+	float32 r, g, b, a;
 };
 
 /// Implement and register this class with a b2World to provide debug drawing of physics

+ 0 - 1
src/libraries/Box2D/Common/b2Math.h

@@ -21,7 +21,6 @@
 
 #include <Box2D/Common/b2Settings.h>
 #include <math.h>
-#include <float.h>
 
 /// This function is used to ensure that a floating point number is not a NaN or infinity.
 inline bool b2IsValid(float32 x)

+ 1 - 1
src/libraries/Box2D/Common/b2Settings.cpp

@@ -23,7 +23,7 @@
 
 #include "common/Exception.h"
 
-b2Version b2_version = {2, 3, 0};
+b2Version b2_version = {2, 3, 2};
 
 // Memory allocators. Modify these to use your own allocator.
 void* b2Alloc(int32 size)

+ 23 - 18
src/libraries/Box2D/Dynamics/Contacts/b2ContactSolver.cpp

@@ -26,6 +26,8 @@
 
 #define B2_DEBUG_SOLVER 0
 
+bool g_blockSolve = true;
+
 struct b2ContactPositionConstraint
 {
 	b2Vec2 localPoints[b2_maxManifoldPoints];
@@ -213,7 +215,7 @@ void b2ContactSolver::InitializeVelocityConstraints()
 		}
 
 		// If we have two points, then prepare the block solver.
-		if (vc->pointCount == 2)
+		if (vc->pointCount == 2 && g_blockSolve)
 		{
 			b2VelocityConstraintPoint* vcp1 = vc->points + 0;
 			b2VelocityConstraintPoint* vcp2 = vc->points + 1;
@@ -341,29 +343,32 @@ void b2ContactSolver::SolveVelocityConstraints()
 		}
 
 		// Solve normal constraints
-		if (vc->pointCount == 1)
+		if (pointCount == 1 || g_blockSolve == false)
 		{
-			b2VelocityConstraintPoint* vcp = vc->points + 0;
+			for (int32 i = 0; i < pointCount; ++i)
+			{
+				b2VelocityConstraintPoint* vcp = vc->points + i;
 
-			// Relative velocity at contact
-			b2Vec2 dv = vB + b2Cross(wB, vcp->rB) - vA - b2Cross(wA, vcp->rA);
+				// Relative velocity at contact
+				b2Vec2 dv = vB + b2Cross(wB, vcp->rB) - vA - b2Cross(wA, vcp->rA);
 
-			// Compute normal impulse
-			float32 vn = b2Dot(dv, normal);
-			float32 lambda = -vcp->normalMass * (vn - vcp->velocityBias);
+				// Compute normal impulse
+				float32 vn = b2Dot(dv, normal);
+				float32 lambda = -vcp->normalMass * (vn - vcp->velocityBias);
 
-			// b2Clamp the accumulated impulse
-			float32 newImpulse = b2Max(vcp->normalImpulse + lambda, 0.0f);
-			lambda = newImpulse - vcp->normalImpulse;
-			vcp->normalImpulse = newImpulse;
+				// b2Clamp the accumulated impulse
+				float32 newImpulse = b2Max(vcp->normalImpulse + lambda, 0.0f);
+				lambda = newImpulse - vcp->normalImpulse;
+				vcp->normalImpulse = newImpulse;
 
-			// Apply contact impulse
-			b2Vec2 P = lambda * normal;
-			vA -= mA * P;
-			wA -= iA * b2Cross(vcp->rA, P);
+				// Apply contact impulse
+				b2Vec2 P = lambda * normal;
+				vA -= mA * P;
+				wA -= iA * b2Cross(vcp->rA, P);
 
-			vB += mB * P;
-			wB += iB * b2Cross(vcp->rB, P);
+				vB += mB * P;
+				wB += iB * b2Cross(vcp->rB, P);
+			}
 		}
 		else
 		{

+ 3 - 0
src/libraries/Box2D/Dynamics/Joints/b2PrismaticJoint.cpp

@@ -174,6 +174,9 @@ void b2PrismaticJoint::InitVelocityConstraints(const b2SolverData& data)
 		m_s1 = b2Cross(d + rA, m_perp);
 		m_s2 = b2Cross(rB, m_perp);
 
+        float32 s1test;
+        s1test = b2Cross(rA, m_perp);
+
 		float32 k11 = mA + mB + iA * m_s1 * m_s1 + iB * m_s2 * m_s2;
 		float32 k12 = iA * m_s1 + iB * m_s2;
 		float32 k13 = iA * m_s1 * m_a1 + iB * m_s2 * m_a2;

+ 17 - 1
src/libraries/Box2D/Dynamics/Joints/b2WeldJoint.cpp

@@ -129,6 +129,12 @@ void b2WeldJoint::InitVelocityConstraints(const b2SolverData& data)
 		invM += m_gamma;
 		m_mass.ez.z = invM != 0.0f ? 1.0f / invM : 0.0f;
 	}
+	else if (K.ez.z == 0.0f)
+	{
+		K.GetInverse22(&m_mass);
+		m_gamma = 0.0f;
+		m_bias = 0.0f;
+	}
 	else
 	{
 		K.GetSymInverse33(&m_mass);
@@ -271,7 +277,17 @@ bool b2WeldJoint::SolvePositionConstraints(const b2SolverData& data)
 
 		b2Vec3 C(C1.x, C1.y, C2);
 	
-		b2Vec3 impulse = -K.Solve33(C);
+		b2Vec3 impulse;
+		if (K.ez.z > 0.0f)
+		{
+			impulse = -K.Solve33(C);
+		}
+		else
+		{
+			b2Vec2 impulse2 = -K.Solve22(C1);
+			impulse.Set(impulse2.x, impulse2.y, 0.0f);
+		}
+
 		b2Vec2 P(impulse.x, impulse.y);
 
 		cA -= mA * P;

+ 2 - 3
src/libraries/Box2D/Dynamics/Joints/b2WheelJoint.h

@@ -72,9 +72,8 @@ struct b2WheelJointDef : public b2JointDef
 };
 
 /// A wheel joint. This joint provides two degrees of freedom: translation
-/// along an axis fixed in bodyA and rotation in the plane. You can use a
-/// joint limit to restrict the range of motion and a joint motor to drive
-/// the rotation or to model rotational friction.
+/// along an axis fixed in bodyA and rotation in the plane. In other words, it is a point to
+/// line constraint with a rotational motor and a linear spring/damper.
 /// This joint is designed for vehicle suspensions.
 class b2WheelJoint : public b2Joint
 {

+ 19 - 19
src/libraries/Box2D/Dynamics/b2World.cpp

@@ -37,7 +37,7 @@
 b2World::b2World(const b2Vec2& gravity)
 {
 	m_destructionListener = NULL;
-	m_debugDraw = NULL;
+	g_debugDraw = NULL;
 
 	m_bodyList = NULL;
 	m_jointList = NULL;
@@ -101,7 +101,7 @@ void b2World::SetContactListener(b2ContactListener* listener)
 
 void b2World::SetDebugDraw(b2Draw* debugDraw)
 {
-	m_debugDraw = debugDraw;
+	g_debugDraw = debugDraw;
 }
 
 b2Body* b2World::CreateBody(const b2BodyDef* def)
@@ -1040,7 +1040,7 @@ void b2World::DrawShape(b2Fixture* fixture, const b2Transform& xf, const b2Color
 			float32 radius = circle->m_radius;
 			b2Vec2 axis = b2Mul(xf.q, b2Vec2(1.0f, 0.0f));
 
-			m_debugDraw->DrawSolidCircle(center, radius, axis, color);
+			g_debugDraw->DrawSolidCircle(center, radius, axis, color);
 		}
 		break;
 
@@ -1049,7 +1049,7 @@ void b2World::DrawShape(b2Fixture* fixture, const b2Transform& xf, const b2Color
 			b2EdgeShape* edge = (b2EdgeShape*)fixture->GetShape();
 			b2Vec2 v1 = b2Mul(xf, edge->m_vertex1);
 			b2Vec2 v2 = b2Mul(xf, edge->m_vertex2);
-			m_debugDraw->DrawSegment(v1, v2, color);
+			g_debugDraw->DrawSegment(v1, v2, color);
 		}
 		break;
 
@@ -1063,8 +1063,8 @@ void b2World::DrawShape(b2Fixture* fixture, const b2Transform& xf, const b2Color
 			for (int32 i = 1; i < count; ++i)
 			{
 				b2Vec2 v2 = b2Mul(xf, vertices[i]);
-				m_debugDraw->DrawSegment(v1, v2, color);
-				m_debugDraw->DrawCircle(v1, 0.05f, color);
+				g_debugDraw->DrawSegment(v1, v2, color);
+				g_debugDraw->DrawCircle(v1, 0.05f, color);
 				v1 = v2;
 			}
 		}
@@ -1082,7 +1082,7 @@ void b2World::DrawShape(b2Fixture* fixture, const b2Transform& xf, const b2Color
 				vertices[i] = b2Mul(xf, poly->m_vertices[i]);
 			}
 
-			m_debugDraw->DrawSolidPolygon(vertices, vertexCount, color);
+			g_debugDraw->DrawSolidPolygon(vertices, vertexCount, color);
 		}
 		break;
             
@@ -1107,7 +1107,7 @@ void b2World::DrawJoint(b2Joint* joint)
 	switch (joint->GetType())
 	{
 	case e_distanceJoint:
-		m_debugDraw->DrawSegment(p1, p2, color);
+		g_debugDraw->DrawSegment(p1, p2, color);
 		break;
 
 	case e_pulleyJoint:
@@ -1115,9 +1115,9 @@ void b2World::DrawJoint(b2Joint* joint)
 			b2PulleyJoint* pulley = (b2PulleyJoint*)joint;
 			b2Vec2 s1 = pulley->GetGroundAnchorA();
 			b2Vec2 s2 = pulley->GetGroundAnchorB();
-			m_debugDraw->DrawSegment(s1, p1, color);
-			m_debugDraw->DrawSegment(s2, p2, color);
-			m_debugDraw->DrawSegment(s1, s2, color);
+			g_debugDraw->DrawSegment(s1, p1, color);
+			g_debugDraw->DrawSegment(s2, p2, color);
+			g_debugDraw->DrawSegment(s1, s2, color);
 		}
 		break;
 
@@ -1126,20 +1126,20 @@ void b2World::DrawJoint(b2Joint* joint)
 		break;
 
 	default:
-		m_debugDraw->DrawSegment(x1, p1, color);
-		m_debugDraw->DrawSegment(p1, p2, color);
-		m_debugDraw->DrawSegment(x2, p2, color);
+		g_debugDraw->DrawSegment(x1, p1, color);
+		g_debugDraw->DrawSegment(p1, p2, color);
+		g_debugDraw->DrawSegment(x2, p2, color);
 	}
 }
 
 void b2World::DrawDebugData()
 {
-	if (m_debugDraw == NULL)
+	if (g_debugDraw == NULL)
 	{
 		return;
 	}
 
-	uint32 flags = m_debugDraw->GetFlags();
+	uint32 flags = g_debugDraw->GetFlags();
 
 	if (flags & b2Draw::e_shapeBit)
 	{
@@ -1191,7 +1191,7 @@ void b2World::DrawDebugData()
 			//b2Vec2 cA = fixtureA->GetAABB().GetCenter();
 			//b2Vec2 cB = fixtureB->GetAABB().GetCenter();
 
-			//m_debugDraw->DrawSegment(cA, cB, color);
+			//g_debugDraw->DrawSegment(cA, cB, color);
 		}
 	}
 
@@ -1219,7 +1219,7 @@ void b2World::DrawDebugData()
 					vs[2].Set(aabb.upperBound.x, aabb.upperBound.y);
 					vs[3].Set(aabb.lowerBound.x, aabb.upperBound.y);
 
-					m_debugDraw->DrawPolygon(vs, 4, color);
+					g_debugDraw->DrawPolygon(vs, 4, color);
 				}
 			}
 		}
@@ -1231,7 +1231,7 @@ void b2World::DrawDebugData()
 		{
 			b2Transform xf = b->GetTransform();
 			xf.p = b->GetWorldCenter();
-			m_debugDraw->DrawTransform(xf);
+			g_debugDraw->DrawTransform(xf);
 		}
 	}
 }

+ 1 - 1
src/libraries/Box2D/Dynamics/b2World.h

@@ -247,7 +247,7 @@ private:
 	bool m_allowSleep;
 
 	b2DestructionListener* m_destructionListener;
-	b2Draw* m_debugDraw;
+	b2Draw* g_debugDraw;
 
 	// This is used to compute the time step ratio to
 	// support a variable time step.

+ 32 - 28
src/libraries/enet/enet.cpp

@@ -190,7 +190,7 @@ static ENetPacket *read_packet(lua_State *l, int idx, enet_uint8 *channel_id) {
 	}
 
 	if (argc >= idx+1 && !lua_isnil(l, idx+1)) {
-		*channel_id = luaL_checkint(l, idx+1);
+		*channel_id = (int) luaL_checknumber(l, idx+1);
 	}
 
 	packet = enet_packet_create(data, size, flags);
@@ -226,13 +226,13 @@ static int host_create(lua_State *l) {
 
 	switch (lua_gettop(l)) {
 		case 5:
-			if (!lua_isnil(l, 5)) out_bandwidth = luaL_checkint(l, 5);
+			if (!lua_isnil(l, 5)) out_bandwidth = (int) luaL_checknumber(l, 5);
 		case 4:
-			if (!lua_isnil(l, 4)) in_bandwidth = luaL_checkint(l, 4);
+			if (!lua_isnil(l, 4)) in_bandwidth = (int) luaL_checknumber(l, 4);
 		case 3:
-			if (!lua_isnil(l, 3)) channel_count = luaL_checkint(l, 3);
+			if (!lua_isnil(l, 3)) channel_count = (int) luaL_checknumber(l, 3);
 		case 2:
-			if (!lua_isnil(l, 2)) peer_count = luaL_checkint(l, 2);
+			if (!lua_isnil(l, 2)) peer_count = (int) luaL_checknumber(l, 2);
 	}
 
 	// printf("host create, peers=%d, channels=%d, in=%d, out=%d\n",
@@ -279,7 +279,7 @@ static int host_service(lua_State *l) {
 	int timeout = 0, out;
 
 	if (lua_gettop(l) > 1)
-		timeout = luaL_checkint(l, 2);
+		timeout = (int) luaL_checknumber(l, 2);
 
 	out = enet_host_service(host, &event, timeout);
 	if (out == 0) return 0;
@@ -348,9 +348,9 @@ static int host_connect(lua_State *l) {
 
 	switch (lua_gettop(l)) {
 		case 4:
-			if (!lua_isnil(l, 4)) data = luaL_checkint(l, 4);
+			if (!lua_isnil(l, 4)) data = (int) luaL_checknumber(l, 4);
 		case 3:
-			if (!lua_isnil(l, 3)) channel_count = luaL_checkint(l, 3);
+			if (!lua_isnil(l, 3)) channel_count = (int) luaL_checknumber(l, 3);
 	}
 
 	// printf("host connect, channels=%d, data=%d\n", channel_count, data);
@@ -392,7 +392,7 @@ static int host_channel_limit(lua_State *l) {
 	if (!host) {
 		return luaL_error(l, "Tried to index a nil host!");
 	}
-	int limit = luaL_checkint(l, 2);
+	int limit = (int) luaL_checknumber(l, 2);
 	enet_host_channel_limit(host, limit);
 	return 0;
 }
@@ -402,8 +402,8 @@ static int host_bandwidth_limit(lua_State *l) {
 	if (!host) {
 		return luaL_error(l, "Tried to index a nil host!");
 	}
-	enet_uint32 in_bandwidth = luaL_checkint(l, 2);
-	enet_uint32 out_bandwidth = luaL_checkint(l, 2);
+	enet_uint32 in_bandwidth = (int) luaL_checknumber(l, 2);
+	enet_uint32 out_bandwidth = (int) luaL_checknumber(l, 2);
 	enet_host_bandwidth_limit(host, in_bandwidth, out_bandwidth);
 	return 0;
 }
@@ -473,7 +473,7 @@ static int host_get_peer(lua_State *l) {
 		return luaL_error(l, "Tried to index a nil host!");
 	}
 
-	int peer_index = luaL_checkint(l, 2) - 1;
+	int peer_index = (int) luaL_checknumber(l, 2) - 1;
 
 	if (peer_index < 0 || ((size_t) peer_index) >= host->peerCount) {
 		luaL_argerror (l, 2, "Invalid peer index");
@@ -517,9 +517,9 @@ static int peer_ping(lua_State *l) {
 static int peer_throttle_configure(lua_State *l) {
 	ENetPeer *peer = check_peer(l, 1);
 
-	enet_uint32 interval = luaL_checkint(l, 2);
-	enet_uint32 acceleration = luaL_checkint(l, 3);
-	enet_uint32 deceleration = luaL_checkint(l, 4);
+	enet_uint32 interval = (int) luaL_checknumber(l, 2);
+	enet_uint32 acceleration = (int) luaL_checknumber(l, 3);
+	enet_uint32 deceleration = (int) luaL_checknumber(l, 4);
 
 	enet_peer_throttle_configure(peer, interval, acceleration, deceleration);
 	return 0;
@@ -529,7 +529,7 @@ static int peer_round_trip_time(lua_State *l) {
 	ENetPeer *peer = check_peer(l, 1);
 
 	if (lua_gettop(l) > 1) {
-		enet_uint32 round_trip_time = luaL_checkint(l, 2);
+		enet_uint32 round_trip_time = (int) luaL_checknumber(l, 2);
 		peer->roundTripTime = round_trip_time;
 	}
 
@@ -542,7 +542,7 @@ static int peer_last_round_trip_time(lua_State *l) {
 	ENetPeer *peer = check_peer(l, 1);
 
 	if (lua_gettop(l) > 1) {
-		enet_uint32 round_trip_time = luaL_checkint(l, 2);
+		enet_uint32 round_trip_time = (int) luaL_checknumber(l, 2);
 		peer->lastRoundTripTime = round_trip_time;
 	}
 	lua_pushinteger (l, peer->lastRoundTripTime);
@@ -554,7 +554,7 @@ static int peer_ping_interval(lua_State *l) {
 	ENetPeer *peer = check_peer(l, 1);
 
 	if (lua_gettop(l) > 1) {
-		enet_uint32 interval = luaL_checkint(l, 2);
+		enet_uint32 interval = (int) luaL_checknumber(l, 2);
 		enet_peer_ping_interval (peer, interval);
 	}
 
@@ -572,11 +572,11 @@ static int peer_timeout(lua_State *l) {
 
 	switch (lua_gettop(l)) {
 		case 4:
-			if (!lua_isnil(l, 4)) timeout_maximum = luaL_checkint(l, 4);
+			if (!lua_isnil(l, 4)) timeout_maximum = (int) luaL_checknumber(l, 4);
 		case 3:
-			if (!lua_isnil(l, 3)) timeout_minimum = luaL_checkint(l, 3);
+			if (!lua_isnil(l, 3)) timeout_minimum = (int) luaL_checknumber(l, 3);
 		case 2:
-			if (!lua_isnil(l, 2)) timeout_limit = luaL_checkint(l, 2);
+			if (!lua_isnil(l, 2)) timeout_limit = (int) luaL_checknumber(l, 2);
 	}
 
 	enet_peer_timeout (peer, timeout_limit, timeout_minimum, timeout_maximum);
@@ -591,7 +591,7 @@ static int peer_timeout(lua_State *l) {
 static int peer_disconnect(lua_State *l) {
 	ENetPeer *peer = check_peer(l, 1);
 
-	enet_uint32 data = lua_gettop(l) > 1 ? luaL_checkint(l, 2) : 0;
+	enet_uint32 data = lua_gettop(l) > 1 ? (int) luaL_checknumber(l, 2) : 0;
 	enet_peer_disconnect(peer, data);
 	return 0;
 }
@@ -599,7 +599,7 @@ static int peer_disconnect(lua_State *l) {
 static int peer_disconnect_now(lua_State *l) {
 	ENetPeer *peer = check_peer(l, 1);
 
-	enet_uint32 data = lua_gettop(l) > 1 ? luaL_checkint(l, 2) : 0;
+	enet_uint32 data = lua_gettop(l) > 1 ? (int) luaL_checknumber(l, 2) : 0;
 	enet_peer_disconnect_now(peer, data);
 	return 0;
 }
@@ -607,7 +607,7 @@ static int peer_disconnect_now(lua_State *l) {
 static int peer_disconnect_later(lua_State *l) {
 	ENetPeer *peer = check_peer(l, 1);
 
-	enet_uint32 data = lua_gettop(l) > 1 ? luaL_checkint(l, 2) : 0;
+	enet_uint32 data = lua_gettop(l) > 1 ? (int) luaL_checknumber(l, 2) : 0;
 	enet_peer_disconnect_later(peer, data);
 	return 0;
 }
@@ -683,7 +683,7 @@ static int peer_receive(lua_State *l) {
 	enet_uint8 channel_id = 0;
 
 	if (lua_gettop(l) > 1) {
-		channel_id = luaL_checkint(l, 2);
+		channel_id = (int) luaL_checknumber(l, 2);
 	}
 
 	packet = enet_peer_receive(peer, &channel_id);
@@ -770,6 +770,10 @@ static const struct luaL_Reg enet_peer_funcs [] = {
 	{NULL, NULL}
 };
 
+extern "C" {
+	void luax_register(lua_State *L, const char *name, const luaL_Reg *l);
+}
+
 int luaopen_enet(lua_State *l) {
 	enet_initialize();
 	atexit(enet_deinitialize);
@@ -777,14 +781,14 @@ int luaopen_enet(lua_State *l) {
 	// create metatables
 	luaL_newmetatable(l, "enet_host");
 	lua_newtable(l); // index
-	luaL_register(l, NULL, enet_host_funcs);
+	luax_register(l, NULL, enet_host_funcs);
 	lua_setfield(l, -2, "__index");
 	lua_pushcfunction(l, host_gc);
 	lua_setfield(l, -2, "__gc");
 
 	luaL_newmetatable(l, "enet_peer");
 	lua_newtable(l);
-	luaL_register(l, NULL, enet_peer_funcs);
+	luax_register(l, NULL, enet_peer_funcs);
 	lua_setfield(l, -2, "__index");
 	lua_pushcfunction(l, peer_tostring);
 	lua_setfield(l, -2, "__tostring");
@@ -799,7 +803,7 @@ int luaopen_enet(lua_State *l) {
 
 	lua_setfield(l, LUA_REGISTRYINDEX, "enet_peers");
 
-	luaL_register(l, "enet", enet_funcs);
+	luax_register(l, "enet", enet_funcs);
 
 	// return the enet table created with luaL_register
 	return 1;

+ 1 - 1
src/libraries/enet/lua-enet.h

@@ -1,5 +1,5 @@
 /**
-* Copyright (c) 2006-2015 LOVE Development Team
+* Copyright (c) 2006-2016 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

File diff suppressed because it is too large
+ 496 - 8
src/libraries/glad/glad.cpp


File diff suppressed because it is too large
+ 594 - 29
src/libraries/glad/glad.hpp


+ 228 - 24
src/libraries/glad/gladfuncs.hpp

@@ -991,25 +991,25 @@ inline void glBindVertexBuffers(GLuint first, GLsizei count, const GLuint* buffe
 inline void glClipControl(GLenum origin, GLenum depth) { fp_glClipControl(origin, depth); }
 inline void glCreateTransformFeedbacks(GLsizei n, GLuint* ids) { fp_glCreateTransformFeedbacks(n, ids); }
 inline void glTransformFeedbackBufferBase(GLuint xfb, GLuint index, GLuint buffer) { fp_glTransformFeedbackBufferBase(xfb, index, buffer); }
-inline void glTransformFeedbackBufferRange(GLuint xfb, GLuint index, GLuint buffer, GLintptr offset, GLsizei size) { fp_glTransformFeedbackBufferRange(xfb, index, buffer, offset, size); }
+inline void glTransformFeedbackBufferRange(GLuint xfb, GLuint index, GLuint buffer, GLintptr offset, GLsizeiptr size) { fp_glTransformFeedbackBufferRange(xfb, index, buffer, offset, size); }
 inline void glGetTransformFeedbackiv(GLuint xfb, GLenum pname, GLint* param) { fp_glGetTransformFeedbackiv(xfb, pname, param); }
 inline void glGetTransformFeedbacki_v(GLuint xfb, GLenum pname, GLuint index, GLint* param) { fp_glGetTransformFeedbacki_v(xfb, pname, index, param); }
 inline void glGetTransformFeedbacki64_v(GLuint xfb, GLenum pname, GLuint index, GLint64* param) { fp_glGetTransformFeedbacki64_v(xfb, pname, index, param); }
 inline void glCreateBuffers(GLsizei n, GLuint* buffers) { fp_glCreateBuffers(n, buffers); }
-inline void glNamedBufferStorage(GLuint buffer, GLsizei size, const void* data, GLbitfield flags) { fp_glNamedBufferStorage(buffer, size, data, flags); }
-inline void glNamedBufferData(GLuint buffer, GLsizei size, const void* data, GLenum usage) { fp_glNamedBufferData(buffer, size, data, usage); }
-inline void glNamedBufferSubData(GLuint buffer, GLintptr offset, GLsizei size, const void* data) { fp_glNamedBufferSubData(buffer, offset, size, data); }
-inline void glCopyNamedBufferSubData(GLuint readBuffer, GLuint writeBuffer, GLintptr readOffset, GLintptr writeOffset, GLsizei size) { fp_glCopyNamedBufferSubData(readBuffer, writeBuffer, readOffset, writeOffset, size); }
+inline void glNamedBufferStorage(GLuint buffer, GLsizeiptr size, const void* data, GLbitfield flags) { fp_glNamedBufferStorage(buffer, size, data, flags); }
+inline void glNamedBufferData(GLuint buffer, GLsizeiptr size, const void* data, GLenum usage) { fp_glNamedBufferData(buffer, size, data, usage); }
+inline void glNamedBufferSubData(GLuint buffer, GLintptr offset, GLsizeiptr size, const void* data) { fp_glNamedBufferSubData(buffer, offset, size, data); }
+inline void glCopyNamedBufferSubData(GLuint readBuffer, GLuint writeBuffer, GLintptr readOffset, GLintptr writeOffset, GLsizeiptr size) { fp_glCopyNamedBufferSubData(readBuffer, writeBuffer, readOffset, writeOffset, size); }
 inline void glClearNamedBufferData(GLuint buffer, GLenum internalformat, GLenum format, GLenum type, const void* data) { fp_glClearNamedBufferData(buffer, internalformat, format, type, data); }
-inline void glClearNamedBufferSubData(GLuint buffer, GLenum internalformat, GLintptr offset, GLsizei size, GLenum format, GLenum type, const void* data) { fp_glClearNamedBufferSubData(buffer, internalformat, offset, size, format, type, data); }
+inline void glClearNamedBufferSubData(GLuint buffer, GLenum internalformat, GLintptr offset, GLsizeiptr size, GLenum format, GLenum type, const void* data) { fp_glClearNamedBufferSubData(buffer, internalformat, offset, size, format, type, data); }
 inline void* glMapNamedBuffer(GLuint buffer, GLenum access) { return fp_glMapNamedBuffer(buffer, access); }
-inline void* glMapNamedBufferRange(GLuint buffer, GLintptr offset, GLsizei length, GLbitfield access) { return fp_glMapNamedBufferRange(buffer, offset, length, access); }
+inline void* glMapNamedBufferRange(GLuint buffer, GLintptr offset, GLsizeiptr length, GLbitfield access) { return fp_glMapNamedBufferRange(buffer, offset, length, access); }
 inline GLboolean glUnmapNamedBuffer(GLuint buffer) { return fp_glUnmapNamedBuffer(buffer); }
-inline void glFlushMappedNamedBufferRange(GLuint buffer, GLintptr offset, GLsizei length) { fp_glFlushMappedNamedBufferRange(buffer, offset, length); }
+inline void glFlushMappedNamedBufferRange(GLuint buffer, GLintptr offset, GLsizeiptr length) { fp_glFlushMappedNamedBufferRange(buffer, offset, length); }
 inline void glGetNamedBufferParameteriv(GLuint buffer, GLenum pname, GLint* params) { fp_glGetNamedBufferParameteriv(buffer, pname, params); }
 inline void glGetNamedBufferParameteri64v(GLuint buffer, GLenum pname, GLint64* params) { fp_glGetNamedBufferParameteri64v(buffer, pname, params); }
 inline void glGetNamedBufferPointerv(GLuint buffer, GLenum pname, void** params) { fp_glGetNamedBufferPointerv(buffer, pname, params); }
-inline void glGetNamedBufferSubData(GLuint buffer, GLintptr offset, GLsizei size, void* data) { fp_glGetNamedBufferSubData(buffer, offset, size, data); }
+inline void glGetNamedBufferSubData(GLuint buffer, GLintptr offset, GLsizeiptr size, void* data) { fp_glGetNamedBufferSubData(buffer, offset, size, data); }
 inline void glCreateFramebuffers(GLsizei n, GLuint* framebuffers) { fp_glCreateFramebuffers(n, framebuffers); }
 inline void glNamedFramebufferRenderbuffer(GLuint framebuffer, GLenum attachment, GLenum renderbuffertarget, GLuint renderbuffer) { fp_glNamedFramebufferRenderbuffer(framebuffer, attachment, renderbuffertarget, renderbuffer); }
 inline void glNamedFramebufferParameteri(GLuint framebuffer, GLenum pname, GLint param) { fp_glNamedFramebufferParameteri(framebuffer, pname, param); }
@@ -1023,7 +1023,7 @@ inline void glInvalidateNamedFramebufferSubData(GLuint framebuffer, GLsizei numA
 inline void glClearNamedFramebufferiv(GLuint framebuffer, GLenum buffer, GLint drawbuffer, const GLint* value) { fp_glClearNamedFramebufferiv(framebuffer, buffer, drawbuffer, value); }
 inline void glClearNamedFramebufferuiv(GLuint framebuffer, GLenum buffer, GLint drawbuffer, const GLuint* value) { fp_glClearNamedFramebufferuiv(framebuffer, buffer, drawbuffer, value); }
 inline void glClearNamedFramebufferfv(GLuint framebuffer, GLenum buffer, GLint drawbuffer, const GLfloat* value) { fp_glClearNamedFramebufferfv(framebuffer, buffer, drawbuffer, value); }
-inline void glClearNamedFramebufferfi(GLuint framebuffer, GLenum buffer, const GLfloat depth, GLint stencil) { fp_glClearNamedFramebufferfi(framebuffer, buffer, depth, stencil); }
+inline void glClearNamedFramebufferfi(GLuint framebuffer, GLenum buffer, GLint drawbuffer, GLfloat depth, GLint stencil) { fp_glClearNamedFramebufferfi(framebuffer, buffer, drawbuffer, depth, stencil); }
 inline void glBlitNamedFramebuffer(GLuint readFramebuffer, GLuint drawFramebuffer, GLint srcX0, GLint srcY0, GLint srcX1, GLint srcY1, GLint dstX0, GLint dstY0, GLint dstX1, GLint dstY1, GLbitfield mask, GLenum filter) { fp_glBlitNamedFramebuffer(readFramebuffer, drawFramebuffer, srcX0, srcY0, srcX1, srcY1, dstX0, dstY0, dstX1, dstY1, mask, filter); }
 inline GLenum glCheckNamedFramebufferStatus(GLuint framebuffer, GLenum target) { return fp_glCheckNamedFramebufferStatus(framebuffer, target); }
 inline void glGetNamedFramebufferParameteriv(GLuint framebuffer, GLenum pname, GLint* param) { fp_glGetNamedFramebufferParameteriv(framebuffer, pname, param); }
@@ -1034,7 +1034,7 @@ inline void glNamedRenderbufferStorageMultisample(GLuint renderbuffer, GLsizei s
 inline void glGetNamedRenderbufferParameteriv(GLuint renderbuffer, GLenum pname, GLint* params) { fp_glGetNamedRenderbufferParameteriv(renderbuffer, pname, params); }
 inline void glCreateTextures(GLenum target, GLsizei n, GLuint* textures) { fp_glCreateTextures(target, n, textures); }
 inline void glTextureBuffer(GLuint texture, GLenum internalformat, GLuint buffer) { fp_glTextureBuffer(texture, internalformat, buffer); }
-inline void glTextureBufferRange(GLuint texture, GLenum internalformat, GLuint buffer, GLintptr offset, GLsizei size) { fp_glTextureBufferRange(texture, internalformat, buffer, offset, size); }
+inline void glTextureBufferRange(GLuint texture, GLenum internalformat, GLuint buffer, GLintptr offset, GLsizeiptr size) { fp_glTextureBufferRange(texture, internalformat, buffer, offset, size); }
 inline void glTextureStorage1D(GLuint texture, GLsizei levels, GLenum internalformat, GLsizei width) { fp_glTextureStorage1D(texture, levels, internalformat, width); }
 inline void glTextureStorage2D(GLuint texture, GLsizei levels, GLenum internalformat, GLsizei width, GLsizei height) { fp_glTextureStorage2D(texture, levels, internalformat, width, height); }
 inline void glTextureStorage3D(GLuint texture, GLsizei levels, GLenum internalformat, GLsizei width, GLsizei height, GLsizei depth) { fp_glTextureStorage3D(texture, levels, internalformat, width, height, depth); }
@@ -1082,6 +1082,10 @@ inline void glGetVertexArrayIndexed64iv(GLuint vaobj, GLuint index, GLenum pname
 inline void glCreateSamplers(GLsizei n, GLuint* samplers) { fp_glCreateSamplers(n, samplers); }
 inline void glCreateProgramPipelines(GLsizei n, GLuint* pipelines) { fp_glCreateProgramPipelines(n, pipelines); }
 inline void glCreateQueries(GLenum target, GLsizei n, GLuint* ids) { fp_glCreateQueries(target, n, ids); }
+inline void glGetQueryBufferObjecti64v(GLuint id, GLuint buffer, GLenum pname, GLintptr offset) { fp_glGetQueryBufferObjecti64v(id, buffer, pname, offset); }
+inline void glGetQueryBufferObjectiv(GLuint id, GLuint buffer, GLenum pname, GLintptr offset) { fp_glGetQueryBufferObjectiv(id, buffer, pname, offset); }
+inline void glGetQueryBufferObjectui64v(GLuint id, GLuint buffer, GLenum pname, GLintptr offset) { fp_glGetQueryBufferObjectui64v(id, buffer, pname, offset); }
+inline void glGetQueryBufferObjectuiv(GLuint id, GLuint buffer, GLenum pname, GLintptr offset) { fp_glGetQueryBufferObjectuiv(id, buffer, pname, offset); }
 inline void glMemoryBarrierByRegion(GLbitfield barriers) { fp_glMemoryBarrierByRegion(barriers); }
 inline void glGetTextureSubImage(GLuint texture, GLint level, GLint xoffset, GLint yoffset, GLint zoffset, GLsizei width, GLsizei height, GLsizei depth, GLenum format, GLenum type, GLsizei bufSize, void* pixels) { fp_glGetTextureSubImage(texture, level, xoffset, yoffset, zoffset, width, height, depth, format, type, bufSize, pixels); }
 inline void glGetCompressedTextureSubImage(GLuint texture, GLint level, GLint xoffset, GLint yoffset, GLint zoffset, GLsizei width, GLsizei height, GLsizei depth, GLsizei bufSize, void* pixels) { fp_glGetCompressedTextureSubImage(texture, level, xoffset, yoffset, zoffset, width, height, depth, bufSize, pixels); }
@@ -1107,6 +1111,10 @@ inline void glGetnHistogram(GLenum target, GLboolean reset, GLenum format, GLenu
 inline void glGetnMinmax(GLenum target, GLboolean reset, GLenum format, GLenum type, GLsizei bufSize, void* values) { fp_glGetnMinmax(target, reset, format, type, bufSize, values); }
 inline void glTextureBarrier() { fp_glTextureBarrier(); }
 
+/* GL_ES_VERSION_3_2 */
+inline void glBlendBarrier() { fp_glBlendBarrier(); }
+inline void glPrimitiveBoundingBox(GLfloat minX, GLfloat minY, GLfloat minZ, GLfloat minW, GLfloat maxX, GLfloat maxY, GLfloat maxZ, GLfloat maxW) { fp_glPrimitiveBoundingBox(minX, minY, minZ, minW, maxX, maxY, maxZ, maxW); }
+
 /* GL_KHR_blend_equation_advanced */
 inline void glBlendBarrierKHR() { fp_glBlendBarrierKHR(); }
 
@@ -1173,12 +1181,53 @@ inline void glBlendFuncSeparateiARB(GLuint buf, GLenum srcRGB, GLenum dstRGB, GL
 inline void glDrawArraysInstancedARB(GLenum mode, GLint first, GLsizei count, GLsizei primcount) { fp_glDrawArraysInstancedARB(mode, first, count, primcount); }
 inline void glDrawElementsInstancedARB(GLenum mode, GLsizei count, GLenum type, const void* indices, GLsizei primcount) { fp_glDrawElementsInstancedARB(mode, count, type, indices, primcount); }
 
+/* GL_ARB_ES3_2_compatibility */
+inline void glPrimitiveBoundingBoxARB(GLfloat minX, GLfloat minY, GLfloat minZ, GLfloat minW, GLfloat maxX, GLfloat maxY, GLfloat maxZ, GLfloat maxW) { fp_glPrimitiveBoundingBoxARB(minX, minY, minZ, minW, maxX, maxY, maxZ, maxW); }
+
 /* GL_ARB_geometry_shader4 */
 inline void glProgramParameteriARB(GLuint program, GLenum pname, GLint value) { fp_glProgramParameteriARB(program, pname, value); }
 inline void glFramebufferTextureARB(GLenum target, GLenum attachment, GLuint texture, GLint level) { fp_glFramebufferTextureARB(target, attachment, texture, level); }
 inline void glFramebufferTextureLayerARB(GLenum target, GLenum attachment, GLuint texture, GLint level, GLint layer) { fp_glFramebufferTextureLayerARB(target, attachment, texture, level, layer); }
 inline void glFramebufferTextureFaceARB(GLenum target, GLenum attachment, GLuint texture, GLint level, GLenum face) { fp_glFramebufferTextureFaceARB(target, attachment, texture, level, face); }
 
+/* GL_ARB_gpu_shader_int64 */
+inline void glUniform1i64ARB(GLint location, GLint64 x) { fp_glUniform1i64ARB(location, x); }
+inline void glUniform2i64ARB(GLint location, GLint64 x, GLint64 y) { fp_glUniform2i64ARB(location, x, y); }
+inline void glUniform3i64ARB(GLint location, GLint64 x, GLint64 y, GLint64 z) { fp_glUniform3i64ARB(location, x, y, z); }
+inline void glUniform4i64ARB(GLint location, GLint64 x, GLint64 y, GLint64 z, GLint64 w) { fp_glUniform4i64ARB(location, x, y, z, w); }
+inline void glUniform1i64vARB(GLint location, GLsizei count, const GLint64* value) { fp_glUniform1i64vARB(location, count, value); }
+inline void glUniform2i64vARB(GLint location, GLsizei count, const GLint64* value) { fp_glUniform2i64vARB(location, count, value); }
+inline void glUniform3i64vARB(GLint location, GLsizei count, const GLint64* value) { fp_glUniform3i64vARB(location, count, value); }
+inline void glUniform4i64vARB(GLint location, GLsizei count, const GLint64* value) { fp_glUniform4i64vARB(location, count, value); }
+inline void glUniform1ui64ARB(GLint location, GLuint64 x) { fp_glUniform1ui64ARB(location, x); }
+inline void glUniform2ui64ARB(GLint location, GLuint64 x, GLuint64 y) { fp_glUniform2ui64ARB(location, x, y); }
+inline void glUniform3ui64ARB(GLint location, GLuint64 x, GLuint64 y, GLuint64 z) { fp_glUniform3ui64ARB(location, x, y, z); }
+inline void glUniform4ui64ARB(GLint location, GLuint64 x, GLuint64 y, GLuint64 z, GLuint64 w) { fp_glUniform4ui64ARB(location, x, y, z, w); }
+inline void glUniform1ui64vARB(GLint location, GLsizei count, const GLuint64* value) { fp_glUniform1ui64vARB(location, count, value); }
+inline void glUniform2ui64vARB(GLint location, GLsizei count, const GLuint64* value) { fp_glUniform2ui64vARB(location, count, value); }
+inline void glUniform3ui64vARB(GLint location, GLsizei count, const GLuint64* value) { fp_glUniform3ui64vARB(location, count, value); }
+inline void glUniform4ui64vARB(GLint location, GLsizei count, const GLuint64* value) { fp_glUniform4ui64vARB(location, count, value); }
+inline void glGetUniformi64vARB(GLuint program, GLint location, GLint64* params) { fp_glGetUniformi64vARB(program, location, params); }
+inline void glGetUniformui64vARB(GLuint program, GLint location, GLuint64* params) { fp_glGetUniformui64vARB(program, location, params); }
+inline void glGetnUniformi64vARB(GLuint program, GLint location, GLsizei bufSize, GLint64* params) { fp_glGetnUniformi64vARB(program, location, bufSize, params); }
+inline void glGetnUniformui64vARB(GLuint program, GLint location, GLsizei bufSize, GLuint64* params) { fp_glGetnUniformui64vARB(program, location, bufSize, params); }
+inline void glProgramUniform1i64ARB(GLuint program, GLint location, GLint64 x) { fp_glProgramUniform1i64ARB(program, location, x); }
+inline void glProgramUniform2i64ARB(GLuint program, GLint location, GLint64 x, GLint64 y) { fp_glProgramUniform2i64ARB(program, location, x, y); }
+inline void glProgramUniform3i64ARB(GLuint program, GLint location, GLint64 x, GLint64 y, GLint64 z) { fp_glProgramUniform3i64ARB(program, location, x, y, z); }
+inline void glProgramUniform4i64ARB(GLuint program, GLint location, GLint64 x, GLint64 y, GLint64 z, GLint64 w) { fp_glProgramUniform4i64ARB(program, location, x, y, z, w); }
+inline void glProgramUniform1i64vARB(GLuint program, GLint location, GLsizei count, const GLint64* value) { fp_glProgramUniform1i64vARB(program, location, count, value); }
+inline void glProgramUniform2i64vARB(GLuint program, GLint location, GLsizei count, const GLint64* value) { fp_glProgramUniform2i64vARB(program, location, count, value); }
+inline void glProgramUniform3i64vARB(GLuint program, GLint location, GLsizei count, const GLint64* value) { fp_glProgramUniform3i64vARB(program, location, count, value); }
+inline void glProgramUniform4i64vARB(GLuint program, GLint location, GLsizei count, const GLint64* value) { fp_glProgramUniform4i64vARB(program, location, count, value); }
+inline void glProgramUniform1ui64ARB(GLuint program, GLint location, GLuint64 x) { fp_glProgramUniform1ui64ARB(program, location, x); }
+inline void glProgramUniform2ui64ARB(GLuint program, GLint location, GLuint64 x, GLuint64 y) { fp_glProgramUniform2ui64ARB(program, location, x, y); }
+inline void glProgramUniform3ui64ARB(GLuint program, GLint location, GLuint64 x, GLuint64 y, GLuint64 z) { fp_glProgramUniform3ui64ARB(program, location, x, y, z); }
+inline void glProgramUniform4ui64ARB(GLuint program, GLint location, GLuint64 x, GLuint64 y, GLuint64 z, GLuint64 w) { fp_glProgramUniform4ui64ARB(program, location, x, y, z, w); }
+inline void glProgramUniform1ui64vARB(GLuint program, GLint location, GLsizei count, const GLuint64* value) { fp_glProgramUniform1ui64vARB(program, location, count, value); }
+inline void glProgramUniform2ui64vARB(GLuint program, GLint location, GLsizei count, const GLuint64* value) { fp_glProgramUniform2ui64vARB(program, location, count, value); }
+inline void glProgramUniform3ui64vARB(GLuint program, GLint location, GLsizei count, const GLuint64* value) { fp_glProgramUniform3ui64vARB(program, location, count, value); }
+inline void glProgramUniform4ui64vARB(GLuint program, GLint location, GLsizei count, const GLuint64* value) { fp_glProgramUniform4ui64vARB(program, location, count, value); }
+
 /* GL_ARB_indirect_parameters */
 inline void glMultiDrawArraysIndirectCountARB(GLenum mode, GLintptr indirect, GLintptr drawcount, GLsizei maxdrawcount, GLsizei stride) { fp_glMultiDrawArraysIndirectCountARB(mode, indirect, drawcount, maxdrawcount, stride); }
 inline void glMultiDrawElementsIndirectCountARB(GLenum mode, GLenum type, GLintptr indirect, GLintptr drawcount, GLsizei maxdrawcount, GLsizei stride) { fp_glMultiDrawElementsIndirectCountARB(mode, type, indirect, drawcount, maxdrawcount, stride); }
@@ -1186,6 +1235,9 @@ inline void glMultiDrawElementsIndirectCountARB(GLenum mode, GLenum type, GLintp
 /* GL_ARB_instanced_arrays */
 inline void glVertexAttribDivisorARB(GLuint index, GLuint divisor) { fp_glVertexAttribDivisorARB(index, divisor); }
 
+/* GL_ARB_parallel_shader_compile */
+inline void glMaxShaderCompilerThreadsARB(GLuint count) { fp_glMaxShaderCompilerThreadsARB(count); }
+
 /* GL_ARB_robustness */
 inline GLenum glGetGraphicsResetStatusARB() { return fp_glGetGraphicsResetStatusARB(); }
 inline void glGetnTexImageARB(GLenum target, GLint level, GLenum format, GLenum type, GLsizei bufSize, void* img) { fp_glGetnTexImageARB(target, level, format, type, bufSize, img); }
@@ -1208,6 +1260,11 @@ inline void glGetnSeparableFilterARB(GLenum target, GLenum format, GLenum type,
 inline void glGetnHistogramARB(GLenum target, GLboolean reset, GLenum format, GLenum type, GLsizei bufSize, void* values) { fp_glGetnHistogramARB(target, reset, format, type, bufSize, values); }
 inline void glGetnMinmaxARB(GLenum target, GLboolean reset, GLenum format, GLenum type, GLsizei bufSize, void* values) { fp_glGetnMinmaxARB(target, reset, format, type, bufSize, values); }
 
+/* GL_ARB_sample_locations */
+inline void glFramebufferSampleLocationsfvARB(GLenum target, GLuint start, GLsizei count, const GLfloat* v) { fp_glFramebufferSampleLocationsfvARB(target, start, count, v); }
+inline void glNamedFramebufferSampleLocationsfvARB(GLuint framebuffer, GLuint start, GLsizei count, const GLfloat* v) { fp_glNamedFramebufferSampleLocationsfvARB(framebuffer, start, count, v); }
+inline void glEvaluateDepthValuesARB() { fp_glEvaluateDepthValuesARB(); }
+
 /* GL_ARB_sample_shading */
 inline void glMinSampleShadingARB(GLfloat value) { fp_glMinSampleShadingARB(value); }
 
@@ -1220,21 +1277,38 @@ inline void glGetNamedStringARB(GLint namelen, const GLchar* name, GLsizei bufSi
 inline void glGetNamedStringivARB(GLint namelen, const GLchar* name, GLenum pname, GLint* params) { fp_glGetNamedStringivARB(namelen, name, pname, params); }
 
 /* GL_ARB_sparse_buffer */
-inline void glBufferPageCommitmentARB(GLenum target, GLintptr offset, GLsizei size, GLboolean commit) { fp_glBufferPageCommitmentARB(target, offset, size, commit); }
-inline void glNamedBufferPageCommitmentEXT(GLuint buffer, GLintptr offset, GLsizei size, GLboolean commit) { fp_glNamedBufferPageCommitmentEXT(buffer, offset, size, commit); }
-inline void glNamedBufferPageCommitmentARB(GLuint buffer, GLintptr offset, GLsizei size, GLboolean commit) { fp_glNamedBufferPageCommitmentARB(buffer, offset, size, commit); }
+inline void glBufferPageCommitmentARB(GLenum target, GLintptr offset, GLsizeiptr size, GLboolean commit) { fp_glBufferPageCommitmentARB(target, offset, size, commit); }
+inline void glNamedBufferPageCommitmentEXT(GLuint buffer, GLintptr offset, GLsizeiptr size, GLboolean commit) { fp_glNamedBufferPageCommitmentEXT(buffer, offset, size, commit); }
+inline void glNamedBufferPageCommitmentARB(GLuint buffer, GLintptr offset, GLsizeiptr size, GLboolean commit) { fp_glNamedBufferPageCommitmentARB(buffer, offset, size, commit); }
 
 /* GL_ARB_sparse_texture */
-inline void glTexPageCommitmentARB(GLenum target, GLint level, GLint xoffset, GLint yoffset, GLint zoffset, GLsizei width, GLsizei height, GLsizei depth, GLboolean resident) { fp_glTexPageCommitmentARB(target, level, xoffset, yoffset, zoffset, width, height, depth, resident); }
+inline void glTexPageCommitmentARB(GLenum target, GLint level, GLint xoffset, GLint yoffset, GLint zoffset, GLsizei width, GLsizei height, GLsizei depth, GLboolean commit) { fp_glTexPageCommitmentARB(target, level, xoffset, yoffset, zoffset, width, height, depth, commit); }
 
 /* GL_ARB_texture_buffer_object */
 inline void glTexBufferARB(GLenum target, GLenum internalformat, GLuint buffer) { fp_glTexBufferARB(target, internalformat, buffer); }
 
+/* GL_EXT_base_instance */
+inline void glDrawArraysInstancedBaseInstanceEXT(GLenum mode, GLint first, GLsizei count, GLsizei instancecount, GLuint baseinstance) { fp_glDrawArraysInstancedBaseInstanceEXT(mode, first, count, instancecount, baseinstance); }
+inline void glDrawElementsInstancedBaseInstanceEXT(GLenum mode, GLsizei count, GLenum type, const void* indices, GLsizei instancecount, GLuint baseinstance) { fp_glDrawElementsInstancedBaseInstanceEXT(mode, count, type, indices, instancecount, baseinstance); }
+inline void glDrawElementsInstancedBaseVertexBaseInstanceEXT(GLenum mode, GLsizei count, GLenum type, const void* indices, GLsizei instancecount, GLint basevertex, GLuint baseinstance) { fp_glDrawElementsInstancedBaseVertexBaseInstanceEXT(mode, count, type, indices, instancecount, basevertex, baseinstance); }
+
 /* GL_EXT_bindable_uniform */
 inline void glUniformBufferEXT(GLuint program, GLint location, GLuint buffer) { fp_glUniformBufferEXT(program, location, buffer); }
 inline GLint glGetUniformBufferSizeEXT(GLuint program, GLint location) { return fp_glGetUniformBufferSizeEXT(program, location); }
 inline GLintptr glGetUniformOffsetEXT(GLuint program, GLint location) { return fp_glGetUniformOffsetEXT(program, location); }
 
+/* GL_EXT_blend_func_extended */
+inline void glBindFragDataLocationIndexedEXT(GLuint program, GLuint colorNumber, GLuint index, const GLchar* name) { fp_glBindFragDataLocationIndexedEXT(program, colorNumber, index, name); }
+inline void glBindFragDataLocationEXT(GLuint program, GLuint color, const GLchar* name) { fp_glBindFragDataLocationEXT(program, color, name); }
+inline GLint glGetProgramResourceLocationIndexEXT(GLuint program, GLenum programInterface, const GLchar* name) { return fp_glGetProgramResourceLocationIndexEXT(program, programInterface, name); }
+inline GLint glGetFragDataIndexEXT(GLuint program, const GLchar* name) { return fp_glGetFragDataIndexEXT(program, name); }
+
+/* GL_EXT_blend_minmax */
+inline void glBlendEquationEXT(GLenum mode) { fp_glBlendEquationEXT(mode); }
+
+/* GL_EXT_buffer_storage */
+inline void glBufferStorageEXT(GLenum target, GLsizeiptr size, const void* data, GLbitfield flags) { fp_glBufferStorageEXT(target, size, data, flags); }
+
 /* GL_EXT_copy_image */
 inline void glCopyImageSubDataEXT(GLuint srcName, GLenum srcTarget, GLint srcLevel, GLint srcX, GLint srcY, GLint srcZ, GLuint dstName, GLenum dstTarget, GLint dstLevel, GLint dstX, GLint dstY, GLint dstZ, GLsizei srcWidth, GLsizei srcHeight, GLsizei srcDepth) { fp_glCopyImageSubDataEXT(srcName, srcTarget, srcLevel, srcX, srcY, srcZ, dstName, dstTarget, dstLevel, dstX, dstY, dstZ, srcWidth, srcHeight, srcDepth); }
 
@@ -1501,7 +1575,7 @@ inline void glVertexArrayVertexAttribLFormatEXT(GLuint vaobj, GLuint attribindex
 inline void glVertexArrayVertexAttribBindingEXT(GLuint vaobj, GLuint attribindex, GLuint bindingindex) { fp_glVertexArrayVertexAttribBindingEXT(vaobj, attribindex, bindingindex); }
 inline void glVertexArrayVertexBindingDivisorEXT(GLuint vaobj, GLuint bindingindex, GLuint divisor) { fp_glVertexArrayVertexBindingDivisorEXT(vaobj, bindingindex, divisor); }
 inline void glVertexArrayVertexAttribLOffsetEXT(GLuint vaobj, GLuint buffer, GLuint index, GLint size, GLenum type, GLsizei stride, GLintptr offset) { fp_glVertexArrayVertexAttribLOffsetEXT(vaobj, buffer, index, size, type, stride, offset); }
-inline void glTexturePageCommitmentEXT(GLuint texture, GLint level, GLint xoffset, GLint yoffset, GLint zoffset, GLsizei width, GLsizei height, GLsizei depth, GLboolean resident) { fp_glTexturePageCommitmentEXT(texture, level, xoffset, yoffset, zoffset, width, height, depth, resident); }
+inline void glTexturePageCommitmentEXT(GLuint texture, GLint level, GLint xoffset, GLint yoffset, GLint zoffset, GLsizei width, GLsizei height, GLsizei depth, GLboolean commit) { fp_glTexturePageCommitmentEXT(texture, level, xoffset, yoffset, zoffset, width, height, depth, commit); }
 inline void glVertexArrayVertexAttribDivisorEXT(GLuint vaobj, GLuint index, GLuint divisor) { fp_glVertexArrayVertexAttribDivisorEXT(vaobj, index, divisor); }
 
 /* GL_EXT_discard_framebuffer */
@@ -1536,6 +1610,12 @@ inline void glBlendFuncSeparateiEXT(GLuint buf, GLenum srcRGB, GLenum dstRGB, GL
 inline void glColorMaskiEXT(GLuint index, GLboolean r, GLboolean g, GLboolean b, GLboolean a) { fp_glColorMaskiEXT(index, r, g, b, a); }
 inline GLboolean glIsEnablediEXT(GLenum target, GLuint index) { return fp_glIsEnablediEXT(target, index); }
 
+/* GL_EXT_draw_elements_base_vertex */
+inline void glDrawElementsBaseVertexEXT(GLenum mode, GLsizei count, GLenum type, const void* indices, GLint basevertex) { fp_glDrawElementsBaseVertexEXT(mode, count, type, indices, basevertex); }
+inline void glDrawRangeElementsBaseVertexEXT(GLenum mode, GLuint start, GLuint end, GLsizei count, GLenum type, const void* indices, GLint basevertex) { fp_glDrawRangeElementsBaseVertexEXT(mode, start, end, count, type, indices, basevertex); }
+inline void glDrawElementsInstancedBaseVertexEXT(GLenum mode, GLsizei count, GLenum type, const void* indices, GLsizei instancecount, GLint basevertex) { fp_glDrawElementsInstancedBaseVertexEXT(mode, count, type, indices, instancecount, basevertex); }
+inline void glMultiDrawElementsBaseVertexEXT(GLenum mode, const GLsizei* count, GLenum type, const void** indices, GLsizei primcount, const GLint* basevertex) { fp_glMultiDrawElementsBaseVertexEXT(mode, count, type, indices, primcount, basevertex); }
+
 /* GL_EXT_draw_instanced */
 inline void glDrawArraysInstancedEXT(GLenum mode, GLint start, GLsizei count, GLsizei primcount) { fp_glDrawArraysInstancedEXT(mode, start, count, primcount); }
 inline void glDrawElementsInstancedEXT(GLenum mode, GLsizei count, GLenum type, const void* indices, GLsizei primcount) { fp_glDrawElementsInstancedEXT(mode, count, type, indices, primcount); }
@@ -1577,7 +1657,6 @@ inline void glProgramLocalParameters4fvEXT(GLenum target, GLuint index, GLsizei
 
 /* GL_EXT_gpu_shader4 */
 inline void glGetUniformuivEXT(GLuint program, GLint location, GLuint* params) { fp_glGetUniformuivEXT(program, location, params); }
-inline void glBindFragDataLocationEXT(GLuint program, GLuint color, const GLchar* name) { fp_glBindFragDataLocationEXT(program, color, name); }
 inline GLint glGetFragDataLocationEXT(GLuint program, const GLchar* name) { return fp_glGetFragDataLocationEXT(program, name); }
 inline void glUniform1uiEXT(GLint location, GLuint v0) { fp_glUniform1uiEXT(location, v0); }
 inline void glUniform2uiEXT(GLint location, GLuint v0, GLuint v1) { fp_glUniform2uiEXT(location, v0, v1); }
@@ -1595,6 +1674,10 @@ inline void glVertexAttribDivisorEXT(GLuint index, GLuint divisor) { fp_glVertex
 inline void* glMapBufferRangeEXT(GLenum target, GLintptr offset, GLsizeiptr length, GLbitfield access) { return fp_glMapBufferRangeEXT(target, offset, length, access); }
 inline void glFlushMappedBufferRangeEXT(GLenum target, GLintptr offset, GLsizeiptr length) { fp_glFlushMappedBufferRangeEXT(target, offset, length); }
 
+/* GL_EXT_multi_draw_indirect */
+inline void glMultiDrawArraysIndirectEXT(GLenum mode, const void* indirect, GLsizei drawcount, GLsizei stride) { fp_glMultiDrawArraysIndirectEXT(mode, indirect, drawcount, stride); }
+inline void glMultiDrawElementsIndirectEXT(GLenum mode, GLenum type, const void* indirect, GLsizei drawcount, GLsizei stride) { fp_glMultiDrawElementsIndirectEXT(mode, type, indirect, drawcount, stride); }
+
 /* GL_EXT_multisampled_render_to_texture */
 inline void glFramebufferTexture2DMultisampleEXT(GLenum target, GLenum attachment, GLenum textarget, GLuint texture, GLint level, GLsizei samples) { fp_glFramebufferTexture2DMultisampleEXT(target, attachment, textarget, texture, level, samples); }
 
@@ -1603,12 +1686,18 @@ inline void glReadBufferIndexedEXT(GLenum src, GLint index) { fp_glReadBufferInd
 inline void glDrawBuffersIndexedEXT(GLint n, const GLenum* location, const GLint* indices) { fp_glDrawBuffersIndexedEXT(n, location, indices); }
 inline void glGetIntegeri_vEXT(GLenum target, GLuint index, GLint* data) { fp_glGetIntegeri_vEXT(target, index, data); }
 
+/* GL_EXT_polygon_offset_clamp */
+inline void glPolygonOffsetClampEXT(GLfloat factor, GLfloat units, GLfloat clamp) { fp_glPolygonOffsetClampEXT(factor, units, clamp); }
+
 /* GL_EXT_primitive_bounding_box */
 inline void glPrimitiveBoundingBoxEXT(GLfloat minX, GLfloat minY, GLfloat minZ, GLfloat minW, GLfloat maxX, GLfloat maxY, GLfloat maxZ, GLfloat maxW) { fp_glPrimitiveBoundingBoxEXT(minX, minY, minZ, minW, maxX, maxY, maxZ, maxW); }
 
 /* GL_EXT_provoking_vertex */
 inline void glProvokingVertexEXT(GLenum mode) { fp_glProvokingVertexEXT(mode); }
 
+/* GL_EXT_raster_multisample */
+inline void glRasterSamplesEXT(GLuint samples, GLboolean fixedsamplelocations) { fp_glRasterSamplesEXT(samples, fixedsamplelocations); }
+
 /* GL_EXT_robustness */
 inline GLenum glGetGraphicsResetStatusEXT() { return fp_glGetGraphicsResetStatusEXT(); }
 inline void glReadnPixelsEXT(GLint x, GLint y, GLsizei width, GLsizei height, GLenum format, GLenum type, GLsizei bufSize, void* data) { fp_glReadnPixelsEXT(x, y, width, height, format, type, bufSize, data); }
@@ -1634,6 +1723,9 @@ inline void glValidateProgramPipelineEXT(GLuint pipeline) { fp_glValidateProgram
 inline void glBindImageTextureEXT(GLuint index, GLuint texture, GLint level, GLboolean layered, GLint layer, GLenum access, GLint format) { fp_glBindImageTextureEXT(index, texture, level, layered, layer, access, format); }
 inline void glMemoryBarrierEXT(GLbitfield barriers) { fp_glMemoryBarrierEXT(barriers); }
 
+/* GL_EXT_sparse_texture */
+inline void glTexPageCommitmentEXT(GLenum target, GLint level, GLint xoffset, GLint yoffset, GLint zoffset, GLsizei width, GLsizei height, GLsizei depth, GLboolean commit) { fp_glTexPageCommitmentEXT(target, level, xoffset, yoffset, zoffset, width, height, depth, commit); }
+
 /* GL_EXT_stencil_clear_tag */
 inline void glStencilClearTagEXT(GLsizei stencilTagBits, GLuint stencilClearTag) { fp_glStencilClearTagEXT(stencilTagBits, stencilClearTag); }
 
@@ -1693,10 +1785,32 @@ inline void glGetVertexAttribLdvEXT(GLuint index, GLenum pname, GLdouble* params
 /* GL_EXT_x11_sync_object */
 inline GLsync glImportSyncEXT(GLenum external_sync_type, GLintptr external_sync, GLbitfield flags) { return fp_glImportSyncEXT(external_sync_type, external_sync, flags); }
 
+/* GL_OES_copy_image */
+inline void glCopyImageSubDataOES(GLuint srcName, GLenum srcTarget, GLint srcLevel, GLint srcX, GLint srcY, GLint srcZ, GLuint dstName, GLenum dstTarget, GLint dstLevel, GLint dstX, GLint dstY, GLint dstZ, GLsizei srcWidth, GLsizei srcHeight, GLsizei srcDepth) { fp_glCopyImageSubDataOES(srcName, srcTarget, srcLevel, srcX, srcY, srcZ, dstName, dstTarget, dstLevel, dstX, dstY, dstZ, srcWidth, srcHeight, srcDepth); }
+
+/* GL_OES_draw_buffers_indexed */
+inline void glEnableiOES(GLenum target, GLuint index) { fp_glEnableiOES(target, index); }
+inline void glDisableiOES(GLenum target, GLuint index) { fp_glDisableiOES(target, index); }
+inline void glBlendEquationiOES(GLuint buf, GLenum mode) { fp_glBlendEquationiOES(buf, mode); }
+inline void glBlendEquationSeparateiOES(GLuint buf, GLenum modeRGB, GLenum modeAlpha) { fp_glBlendEquationSeparateiOES(buf, modeRGB, modeAlpha); }
+inline void glBlendFunciOES(GLuint buf, GLenum src, GLenum dst) { fp_glBlendFunciOES(buf, src, dst); }
+inline void glBlendFuncSeparateiOES(GLuint buf, GLenum srcRGB, GLenum dstRGB, GLenum srcAlpha, GLenum dstAlpha) { fp_glBlendFuncSeparateiOES(buf, srcRGB, dstRGB, srcAlpha, dstAlpha); }
+inline void glColorMaskiOES(GLuint index, GLboolean r, GLboolean g, GLboolean b, GLboolean a) { fp_glColorMaskiOES(index, r, g, b, a); }
+inline GLboolean glIsEnablediOES(GLenum target, GLuint index) { return fp_glIsEnablediOES(target, index); }
+
+/* GL_OES_draw_elements_base_vertex */
+inline void glDrawElementsBaseVertexOES(GLenum mode, GLsizei count, GLenum type, const void* indices, GLint basevertex) { fp_glDrawElementsBaseVertexOES(mode, count, type, indices, basevertex); }
+inline void glDrawRangeElementsBaseVertexOES(GLenum mode, GLuint start, GLuint end, GLsizei count, GLenum type, const void* indices, GLint basevertex) { fp_glDrawRangeElementsBaseVertexOES(mode, start, end, count, type, indices, basevertex); }
+inline void glDrawElementsInstancedBaseVertexOES(GLenum mode, GLsizei count, GLenum type, const void* indices, GLsizei instancecount, GLint basevertex) { fp_glDrawElementsInstancedBaseVertexOES(mode, count, type, indices, instancecount, basevertex); }
+inline void glMultiDrawElementsBaseVertexOES(GLenum mode, const GLsizei* count, GLenum type, const void** indices, GLsizei primcount, const GLint* basevertex) { fp_glMultiDrawElementsBaseVertexOES(mode, count, type, indices, primcount, basevertex); }
+
 /* GL_OES_EGL_image */
 inline void glEGLImageTargetTexture2DOES(GLenum target, GLeglImageOES image) { fp_glEGLImageTargetTexture2DOES(target, image); }
 inline void glEGLImageTargetRenderbufferStorageOES(GLenum target, GLeglImageOES image) { fp_glEGLImageTargetRenderbufferStorageOES(target, image); }
 
+/* GL_OES_geometry_shader */
+inline void glFramebufferTextureOES(GLenum target, GLenum attachment, GLuint texture, GLint level) { fp_glFramebufferTextureOES(target, attachment, texture, level); }
+
 /* GL_OES_get_program_binary */
 inline void glGetProgramBinaryOES(GLuint program, GLsizei bufSize, GLsizei* length, GLenum* binaryFormat, void* binary) { fp_glGetProgramBinaryOES(program, bufSize, length, binaryFormat, binary); }
 inline void glProgramBinaryOES(GLuint program, GLenum binaryFormat, const void* binary, GLint length) { fp_glProgramBinaryOES(program, binaryFormat, binary, length); }
@@ -1706,9 +1820,15 @@ inline void* glMapBufferOES(GLenum target, GLenum access) { return fp_glMapBuffe
 inline GLboolean glUnmapBufferOES(GLenum target) { return fp_glUnmapBufferOES(target); }
 inline void glGetBufferPointervOES(GLenum target, GLenum pname, void** params) { fp_glGetBufferPointervOES(target, pname, params); }
 
+/* GL_OES_primitive_bounding_box */
+inline void glPrimitiveBoundingBoxOES(GLfloat minX, GLfloat minY, GLfloat minZ, GLfloat minW, GLfloat maxX, GLfloat maxY, GLfloat maxZ, GLfloat maxW) { fp_glPrimitiveBoundingBoxOES(minX, minY, minZ, minW, maxX, maxY, maxZ, maxW); }
+
 /* GL_OES_sample_shading */
 inline void glMinSampleShadingOES(GLfloat value) { fp_glMinSampleShadingOES(value); }
 
+/* GL_OES_tessellation_shader */
+inline void glPatchParameteriOES(GLenum pname, GLint value) { fp_glPatchParameteriOES(pname, value); }
+
 /* GL_OES_texture_3D */
 inline void glTexImage3DOES(GLenum target, GLint level, GLenum internalformat, GLsizei width, GLsizei height, GLsizei depth, GLint border, GLenum format, GLenum type, const void* pixels) { fp_glTexImage3DOES(target, level, internalformat, width, height, depth, border, format, type, pixels); }
 inline void glTexSubImage3DOES(GLenum target, GLint level, GLint xoffset, GLint yoffset, GLint zoffset, GLsizei width, GLsizei height, GLsizei depth, GLenum format, GLenum type, const void* pixels) { fp_glTexSubImage3DOES(target, level, xoffset, yoffset, zoffset, width, height, depth, format, type, pixels); }
@@ -1717,9 +1837,26 @@ inline void glCompressedTexImage3DOES(GLenum target, GLint level, GLenum interna
 inline void glCompressedTexSubImage3DOES(GLenum target, GLint level, GLint xoffset, GLint yoffset, GLint zoffset, GLsizei width, GLsizei height, GLsizei depth, GLenum format, GLsizei imageSize, const void* data) { fp_glCompressedTexSubImage3DOES(target, level, xoffset, yoffset, zoffset, width, height, depth, format, imageSize, data); }
 inline void glFramebufferTexture3DOES(GLenum target, GLenum attachment, GLenum textarget, GLuint texture, GLint level, GLint zoffset) { fp_glFramebufferTexture3DOES(target, attachment, textarget, texture, level, zoffset); }
 
+/* GL_OES_texture_border_clamp */
+inline void glTexParameterIivOES(GLenum target, GLenum pname, const GLint* params) { fp_glTexParameterIivOES(target, pname, params); }
+inline void glTexParameterIuivOES(GLenum target, GLenum pname, const GLuint* params) { fp_glTexParameterIuivOES(target, pname, params); }
+inline void glGetTexParameterIivOES(GLenum target, GLenum pname, GLint* params) { fp_glGetTexParameterIivOES(target, pname, params); }
+inline void glGetTexParameterIuivOES(GLenum target, GLenum pname, GLuint* params) { fp_glGetTexParameterIuivOES(target, pname, params); }
+inline void glSamplerParameterIivOES(GLuint sampler, GLenum pname, const GLint* param) { fp_glSamplerParameterIivOES(sampler, pname, param); }
+inline void glSamplerParameterIuivOES(GLuint sampler, GLenum pname, const GLuint* param) { fp_glSamplerParameterIuivOES(sampler, pname, param); }
+inline void glGetSamplerParameterIivOES(GLuint sampler, GLenum pname, GLint* params) { fp_glGetSamplerParameterIivOES(sampler, pname, params); }
+inline void glGetSamplerParameterIuivOES(GLuint sampler, GLenum pname, GLuint* params) { fp_glGetSamplerParameterIuivOES(sampler, pname, params); }
+
+/* GL_OES_texture_buffer */
+inline void glTexBufferOES(GLenum target, GLenum internalformat, GLuint buffer) { fp_glTexBufferOES(target, internalformat, buffer); }
+inline void glTexBufferRangeOES(GLenum target, GLenum internalformat, GLuint buffer, GLintptr offset, GLsizeiptr size) { fp_glTexBufferRangeOES(target, internalformat, buffer, offset, size); }
+
 /* GL_OES_texture_storage_multisample_2d_array */
 inline void glTexStorage3DMultisampleOES(GLenum target, GLsizei samples, GLenum internalformat, GLsizei width, GLsizei height, GLsizei depth, GLboolean fixedsamplelocations) { fp_glTexStorage3DMultisampleOES(target, samples, internalformat, width, height, depth, fixedsamplelocations); }
 
+/* GL_OES_texture_view */
+inline void glTextureViewOES(GLuint texture, GLenum target, GLuint origtexture, GLenum internalformat, GLuint minlevel, GLuint numlevels, GLuint minlayer, GLuint numlayers) { fp_glTextureViewOES(texture, target, origtexture, internalformat, minlevel, numlevels, minlayer, numlayers); }
+
 /* GL_OES_vertex_array_object */
 inline void glBindVertexArrayOES(GLuint array) { fp_glBindVertexArrayOES(array); }
 inline void glDeleteVertexArraysOES(GLsizei n, const GLuint* arrays) { fp_glDeleteVertexArraysOES(n, arrays); }
@@ -1909,6 +2046,9 @@ inline void glFramebufferTexture2DMultisampleIMG(GLenum target, GLenum attachmen
 /* GL_INGR_blend_func_separate */
 inline void glBlendFuncSeparateINGR(GLenum sfactorRGB, GLenum dfactorRGB, GLenum sfactorAlpha, GLenum dfactorAlpha) { fp_glBlendFuncSeparateINGR(sfactorRGB, dfactorRGB, sfactorAlpha, dfactorAlpha); }
 
+/* GL_INTEL_framebuffer_CMAA */
+inline void glApplyFramebufferAttachmentCMAAINTEL() { fp_glApplyFramebufferAttachmentCMAAINTEL(); }
+
 /* GL_INTEL_map_texture */
 inline void glSyncTextureINTEL(GLuint texture) { fp_glSyncTextureINTEL(texture); }
 inline void glUnmapTexture2DINTEL(GLuint texture, GLint level) { fp_glUnmapTexture2DINTEL(texture, level); }
@@ -1953,10 +2093,35 @@ inline GLboolean glIsImageHandleResidentNV(GLuint64 handle) { return fp_glIsImag
 inline void glBlendParameteriNV(GLenum pname, GLint value) { fp_glBlendParameteriNV(pname, value); }
 inline void glBlendBarrierNV() { fp_glBlendBarrierNV(); }
 
+/* GL_NV_command_list */
+inline void glCreateStatesNV(GLsizei n, GLuint* states) { fp_glCreateStatesNV(n, states); }
+inline void glDeleteStatesNV(GLsizei n, const GLuint* states) { fp_glDeleteStatesNV(n, states); }
+inline GLboolean glIsStateNV(GLuint state) { return fp_glIsStateNV(state); }
+inline void glStateCaptureNV(GLuint state, GLenum mode) { fp_glStateCaptureNV(state, mode); }
+inline GLuint glGetCommandHeaderNV(GLenum tokenID, GLuint size) { return fp_glGetCommandHeaderNV(tokenID, size); }
+inline GLushort glGetStageIndexNV(GLenum shadertype) { return fp_glGetStageIndexNV(shadertype); }
+inline void glDrawCommandsNV(GLenum primitiveMode, GLuint buffer, const GLintptr* indirects, const GLsizei* sizes, GLuint count) { fp_glDrawCommandsNV(primitiveMode, buffer, indirects, sizes, count); }
+inline void glDrawCommandsAddressNV(GLenum primitiveMode, const GLuint64* indirects, const GLsizei* sizes, GLuint count) { fp_glDrawCommandsAddressNV(primitiveMode, indirects, sizes, count); }
+inline void glDrawCommandsStatesNV(GLuint buffer, const GLintptr* indirects, const GLsizei* sizes, const GLuint* states, const GLuint* fbos, GLuint count) { fp_glDrawCommandsStatesNV(buffer, indirects, sizes, states, fbos, count); }
+inline void glDrawCommandsStatesAddressNV(const GLuint64* indirects, const GLsizei* sizes, const GLuint* states, const GLuint* fbos, GLuint count) { fp_glDrawCommandsStatesAddressNV(indirects, sizes, states, fbos, count); }
+inline void glCreateCommandListsNV(GLsizei n, GLuint* lists) { fp_glCreateCommandListsNV(n, lists); }
+inline void glDeleteCommandListsNV(GLsizei n, const GLuint* lists) { fp_glDeleteCommandListsNV(n, lists); }
+inline GLboolean glIsCommandListNV(GLuint list) { return fp_glIsCommandListNV(list); }
+inline void glListDrawCommandsStatesClientNV(GLuint list, GLuint segment, const void** indirects, const GLsizei* sizes, const GLuint* states, const GLuint* fbos, GLuint count) { fp_glListDrawCommandsStatesClientNV(list, segment, indirects, sizes, states, fbos, count); }
+inline void glCommandListSegmentsNV(GLuint list, GLuint segments) { fp_glCommandListSegmentsNV(list, segments); }
+inline void glCompileCommandListNV(GLuint list) { fp_glCompileCommandListNV(list); }
+inline void glCallCommandListNV(GLuint list) { fp_glCallCommandListNV(list); }
+
 /* GL_NV_conditional_render */
 inline void glBeginConditionalRenderNV(GLuint id, GLenum mode) { fp_glBeginConditionalRenderNV(id, mode); }
 inline void glEndConditionalRenderNV() { fp_glEndConditionalRenderNV(); }
 
+/* GL_NV_conservative_raster */
+inline void glSubpixelPrecisionBiasNV(GLuint xbits, GLuint ybits) { fp_glSubpixelPrecisionBiasNV(xbits, ybits); }
+
+/* GL_NV_conservative_raster_dilate */
+inline void glConservativeRasterParameterfNV(GLenum pname, GLfloat value) { fp_glConservativeRasterParameterfNV(pname, value); }
+
 /* GL_NV_copy_buffer */
 inline void glCopyBufferSubDataNV(GLenum readTarget, GLenum writeTarget, GLintptr readOffset, GLintptr writeOffset, GLsizeiptr size) { fp_glCopyBufferSubDataNV(readTarget, writeTarget, readOffset, writeOffset, size); }
 
@@ -1996,9 +2161,17 @@ inline void glGetFenceivNV(GLuint fence, GLenum pname, GLint* params) { fp_glGet
 inline void glFinishFenceNV(GLuint fence) { fp_glFinishFenceNV(fence); }
 inline void glSetFenceNV(GLuint fence, GLenum condition) { fp_glSetFenceNV(fence, condition); }
 
+/* GL_NV_fragment_coverage_to_color */
+inline void glFragmentCoverageColorNV(GLuint color) { fp_glFragmentCoverageColorNV(color); }
+
 /* GL_NV_framebuffer_blit */
 inline void glBlitFramebufferNV(GLint srcX0, GLint srcY0, GLint srcX1, GLint srcY1, GLint dstX0, GLint dstY0, GLint dstX1, GLint dstY1, GLbitfield mask, GLenum filter) { fp_glBlitFramebufferNV(srcX0, srcY0, srcX1, srcY1, dstX0, dstY0, dstX1, dstY1, mask, filter); }
 
+/* GL_NV_framebuffer_mixed_samples */
+inline void glCoverageModulationTableNV(GLsizei n, const GLfloat* v) { fp_glCoverageModulationTableNV(n, v); }
+inline void glGetCoverageModulationTableNV(GLsizei bufsize, GLfloat* v) { fp_glGetCoverageModulationTableNV(bufsize, v); }
+inline void glCoverageModulationNV(GLenum components) { fp_glCoverageModulationNV(components); }
+
 /* GL_NV_framebuffer_multisample */
 inline void glRenderbufferStorageMultisampleNV(GLenum target, GLsizei samples, GLenum internalformat, GLsizei width, GLsizei height) { fp_glRenderbufferStorageMultisampleNV(target, samples, internalformat, width, height); }
 
@@ -2082,6 +2255,9 @@ inline void glVertexAttribs4hvNV(GLuint index, GLsizei n, const GLhalfNV* v) { f
 /* GL_NV_instanced_arrays */
 inline void glVertexAttribDivisorNV(GLuint index, GLuint divisor) { fp_glVertexAttribDivisorNV(index, divisor); }
 
+/* GL_NV_internalformat_sample_query */
+inline void glGetInternalformatSampleivNV(GLenum target, GLenum internalformat, GLsizei samples, GLenum pname, GLsizei bufSize, GLint* params) { fp_glGetInternalformatSampleivNV(target, internalformat, samples, pname, bufSize, params); }
+
 /* GL_NV_non_square_matrices */
 inline void glUniformMatrix2x3fvNV(GLint location, GLsizei count, GLboolean transpose, const GLfloat* value) { fp_glUniformMatrix2x3fvNV(location, count, transpose, value); }
 inline void glUniformMatrix3x2fvNV(GLint location, GLsizei count, GLboolean transpose, const GLfloat* value) { fp_glUniformMatrix3x2fvNV(location, count, transpose, value); }
@@ -2131,9 +2307,6 @@ inline void glStencilStrokePathNV(GLuint path, GLint reference, GLuint mask) { f
 inline void glStencilFillPathInstancedNV(GLsizei numPaths, GLenum pathNameType, const void* paths, GLuint pathBase, GLenum fillMode, GLuint mask, GLenum transformType, const GLfloat* transformValues) { fp_glStencilFillPathInstancedNV(numPaths, pathNameType, paths, pathBase, fillMode, mask, transformType, transformValues); }
 inline void glStencilStrokePathInstancedNV(GLsizei numPaths, GLenum pathNameType, const void* paths, GLuint pathBase, GLint reference, GLuint mask, GLenum transformType, const GLfloat* transformValues) { fp_glStencilStrokePathInstancedNV(numPaths, pathNameType, paths, pathBase, reference, mask, transformType, transformValues); }
 inline void glPathCoverDepthFuncNV(GLenum func) { fp_glPathCoverDepthFuncNV(func); }
-inline void glPathColorGenNV(GLenum color, GLenum genMode, GLenum colorFormat, const GLfloat* coeffs) { fp_glPathColorGenNV(color, genMode, colorFormat, coeffs); }
-inline void glPathTexGenNV(GLenum texCoordSet, GLenum genMode, GLint components, const GLfloat* coeffs) { fp_glPathTexGenNV(texCoordSet, genMode, components, coeffs); }
-inline void glPathFogGenNV(GLenum genMode) { fp_glPathFogGenNV(genMode); }
 inline void glCoverFillPathNV(GLuint path, GLenum coverMode) { fp_glCoverFillPathNV(path, coverMode); }
 inline void glCoverStrokePathNV(GLuint path, GLenum coverMode) { fp_glCoverStrokePathNV(path, coverMode); }
 inline void glCoverFillPathInstancedNV(GLsizei numPaths, GLenum pathNameType, const void* paths, GLuint pathBase, GLenum coverMode, GLenum transformType, const GLfloat* transformValues) { fp_glCoverFillPathInstancedNV(numPaths, pathNameType, paths, pathBase, coverMode, transformType, transformValues); }
@@ -2146,10 +2319,6 @@ inline void glGetPathDashArrayNV(GLuint path, GLfloat* dashArray) { fp_glGetPath
 inline void glGetPathMetricsNV(GLbitfield metricQueryMask, GLsizei numPaths, GLenum pathNameType, const void* paths, GLuint pathBase, GLsizei stride, GLfloat* metrics) { fp_glGetPathMetricsNV(metricQueryMask, numPaths, pathNameType, paths, pathBase, stride, metrics); }
 inline void glGetPathMetricRangeNV(GLbitfield metricQueryMask, GLuint firstPathName, GLsizei numPaths, GLsizei stride, GLfloat* metrics) { fp_glGetPathMetricRangeNV(metricQueryMask, firstPathName, numPaths, stride, metrics); }
 inline void glGetPathSpacingNV(GLenum pathListMode, GLsizei numPaths, GLenum pathNameType, const void* paths, GLuint pathBase, GLfloat advanceScale, GLfloat kerningScale, GLenum transformType, GLfloat* returnedSpacing) { fp_glGetPathSpacingNV(pathListMode, numPaths, pathNameType, paths, pathBase, advanceScale, kerningScale, transformType, returnedSpacing); }
-inline void glGetPathColorGenivNV(GLenum color, GLenum pname, GLint* value) { fp_glGetPathColorGenivNV(color, pname, value); }
-inline void glGetPathColorGenfvNV(GLenum color, GLenum pname, GLfloat* value) { fp_glGetPathColorGenfvNV(color, pname, value); }
-inline void glGetPathTexGenivNV(GLenum texCoordSet, GLenum pname, GLint* value) { fp_glGetPathTexGenivNV(texCoordSet, pname, value); }
-inline void glGetPathTexGenfvNV(GLenum texCoordSet, GLenum pname, GLfloat* value) { fp_glGetPathTexGenfvNV(texCoordSet, pname, value); }
 inline GLboolean glIsPointInFillPathNV(GLuint path, GLuint mask, GLfloat x, GLfloat y) { return fp_glIsPointInFillPathNV(path, mask, x, y); }
 inline GLboolean glIsPointInStrokePathNV(GLuint path, GLfloat x, GLfloat y) { return fp_glIsPointInStrokePathNV(path, x, y); }
 inline GLfloat glGetPathLengthNV(GLuint path, GLsizei startSegment, GLsizei numSegments) { return fp_glGetPathLengthNV(path, startSegment, numSegments); }
@@ -2169,6 +2338,16 @@ inline GLenum glPathGlyphIndexArrayNV(GLuint firstPathName, GLenum fontTarget, c
 inline GLenum glPathMemoryGlyphIndexArrayNV(GLuint firstPathName, GLenum fontTarget, GLsizeiptr fontSize, const void* fontData, GLsizei faceIndex, GLuint firstGlyphIndex, GLsizei numGlyphs, GLuint pathParameterTemplate, GLfloat emScale) { return fp_glPathMemoryGlyphIndexArrayNV(firstPathName, fontTarget, fontSize, fontData, faceIndex, firstGlyphIndex, numGlyphs, pathParameterTemplate, emScale); }
 inline void glProgramPathFragmentInputGenNV(GLuint program, GLint location, GLenum genMode, GLint components, const GLfloat* coeffs) { fp_glProgramPathFragmentInputGenNV(program, location, genMode, components, coeffs); }
 inline void glGetProgramResourcefvNV(GLuint program, GLenum programInterface, GLuint index, GLsizei propCount, const GLenum* props, GLsizei bufSize, GLsizei* length, GLfloat* params) { fp_glGetProgramResourcefvNV(program, programInterface, index, propCount, props, bufSize, length, params); }
+inline void glPathColorGenNV(GLenum color, GLenum genMode, GLenum colorFormat, const GLfloat* coeffs) { fp_glPathColorGenNV(color, genMode, colorFormat, coeffs); }
+inline void glPathTexGenNV(GLenum texCoordSet, GLenum genMode, GLint components, const GLfloat* coeffs) { fp_glPathTexGenNV(texCoordSet, genMode, components, coeffs); }
+inline void glPathFogGenNV(GLenum genMode) { fp_glPathFogGenNV(genMode); }
+inline void glGetPathColorGenivNV(GLenum color, GLenum pname, GLint* value) { fp_glGetPathColorGenivNV(color, pname, value); }
+inline void glGetPathColorGenfvNV(GLenum color, GLenum pname, GLfloat* value) { fp_glGetPathColorGenfvNV(color, pname, value); }
+inline void glGetPathTexGenivNV(GLenum texCoordSet, GLenum pname, GLint* value) { fp_glGetPathTexGenivNV(texCoordSet, pname, value); }
+inline void glGetPathTexGenfvNV(GLenum texCoordSet, GLenum pname, GLfloat* value) { fp_glGetPathTexGenfvNV(texCoordSet, pname, value); }
+
+/* GL_NV_polygon_mode */
+inline void glPolygonModeNV(GLenum face, GLenum mode) { fp_glPolygonModeNV(face, mode); }
 
 /* GL_NV_present_video */
 inline void glPresentFrameKeyedNV(GLuint video_slot, GLuint64EXT minPresentTime, GLuint beginPresentTimeId, GLuint presentDurationId, GLenum type, GLenum target0, GLuint fill0, GLuint key0, GLenum target1, GLuint fill1, GLuint key1) { fp_glPresentFrameKeyedNV(video_slot, minPresentTime, beginPresentTimeId, presentDurationId, type, target0, fill0, key0, target1, fill1, key1); }
@@ -2185,6 +2364,11 @@ inline void glPrimitiveRestartIndexNV(GLuint index) { fp_glPrimitiveRestartIndex
 /* GL_NV_read_buffer */
 inline void glReadBufferNV(GLenum mode) { fp_glReadBufferNV(mode); }
 
+/* GL_NV_sample_locations */
+inline void glFramebufferSampleLocationsfvNV(GLenum target, GLuint start, GLsizei count, const GLfloat* v) { fp_glFramebufferSampleLocationsfvNV(target, start, count, v); }
+inline void glNamedFramebufferSampleLocationsfvNV(GLuint framebuffer, GLuint start, GLsizei count, const GLfloat* v) { fp_glNamedFramebufferSampleLocationsfvNV(framebuffer, start, count, v); }
+inline void glResolveDepthValuesNV() { fp_glResolveDepthValuesNV(); }
+
 /* GL_NV_shader_buffer_load */
 inline void glMakeBufferResidentNV(GLenum target, GLenum access) { fp_glMakeBufferResidentNV(target, access); }
 inline void glMakeBufferNonResidentNV(GLenum target) { fp_glMakeBufferNonResidentNV(target); }
@@ -2320,10 +2504,30 @@ inline void glVideoCaptureStreamParameterivNV(GLuint video_capture_slot, GLuint
 inline void glVideoCaptureStreamParameterfvNV(GLuint video_capture_slot, GLuint stream, GLenum pname, const GLfloat* params) { fp_glVideoCaptureStreamParameterfvNV(video_capture_slot, stream, pname, params); }
 inline void glVideoCaptureStreamParameterdvNV(GLuint video_capture_slot, GLuint stream, GLenum pname, const GLdouble* params) { fp_glVideoCaptureStreamParameterdvNV(video_capture_slot, stream, pname, params); }
 
+/* GL_NV_viewport_array */
+inline void glViewportArrayvNV(GLuint first, GLsizei count, const GLfloat* v) { fp_glViewportArrayvNV(first, count, v); }
+inline void glViewportIndexedfNV(GLuint index, GLfloat x, GLfloat y, GLfloat w, GLfloat h) { fp_glViewportIndexedfNV(index, x, y, w, h); }
+inline void glViewportIndexedfvNV(GLuint index, const GLfloat* v) { fp_glViewportIndexedfvNV(index, v); }
+inline void glScissorArrayvNV(GLuint first, GLsizei count, const GLint* v) { fp_glScissorArrayvNV(first, count, v); }
+inline void glScissorIndexedNV(GLuint index, GLint left, GLint bottom, GLsizei width, GLsizei height) { fp_glScissorIndexedNV(index, left, bottom, width, height); }
+inline void glScissorIndexedvNV(GLuint index, const GLint* v) { fp_glScissorIndexedvNV(index, v); }
+inline void glDepthRangeArrayfvNV(GLuint first, GLsizei count, const GLfloat* v) { fp_glDepthRangeArrayfvNV(first, count, v); }
+inline void glDepthRangeIndexedfNV(GLuint index, GLfloat n, GLfloat f) { fp_glDepthRangeIndexedfNV(index, n, f); }
+inline void glGetFloati_vNV(GLenum target, GLuint index, GLfloat* data) { fp_glGetFloati_vNV(target, index, data); }
+inline void glEnableiNV(GLenum target, GLuint index) { fp_glEnableiNV(target, index); }
+inline void glDisableiNV(GLenum target, GLuint index) { fp_glDisableiNV(target, index); }
+inline GLboolean glIsEnablediNV(GLenum target, GLuint index) { return fp_glIsEnablediNV(target, index); }
+
 /* GL_NVX_conditional_render */
 inline void glBeginConditionalRenderNVX(GLuint id) { fp_glBeginConditionalRenderNVX(id); }
 inline void glEndConditionalRenderNVX() { fp_glEndConditionalRenderNVX(); }
 
+/* GL_OVR_multiview */
+inline void glFramebufferTextureMultiviewOVR(GLenum target, GLenum attachment, GLuint texture, GLint level, GLint baseViewIndex, GLsizei numViews) { fp_glFramebufferTextureMultiviewOVR(target, attachment, texture, level, baseViewIndex, numViews); }
+
+/* GL_OVR_multiview_multisampled_render_to_texture */
+inline void glFramebufferTextureMultisampleMultiviewOVR(GLenum target, GLenum attachment, GLuint texture, GLint level, GLsizei samples, GLint baseViewIndex, GLsizei numViews) { fp_glFramebufferTextureMultisampleMultiviewOVR(target, attachment, texture, level, samples, baseViewIndex, numViews); }
+
 /* GL_QCOM_alpha_test */
 inline void glAlphaFuncQCOM(GLenum func, GLclampf ref) { fp_glAlphaFuncQCOM(func, ref); }
 

+ 3 - 1
src/libraries/luasocket/libluasocket/except.c

@@ -11,6 +11,8 @@
 
 #include "except.h"
 
+extern void luax_register(lua_State *L, const char *name, const luaL_Reg *l);
+
 /*=========================================================================*\
 * Internal function prototypes.
 \*=========================================================================*/
@@ -94,6 +96,6 @@ static int global_protect(lua_State *L) {
 * Init module
 \*-------------------------------------------------------------------------*/
 int except_open(lua_State *L) {
-    luaL_openlib(L, NULL, func, 0);
+    luax_register(L, NULL, func);
     return 0;
 }

+ 3 - 1
src/libraries/luasocket/libluasocket/inet.c

@@ -12,6 +12,8 @@
 
 #include "inet.h"
 
+extern void luax_register(lua_State *L, const char *name, const luaL_Reg *l);
+
 /*=========================================================================*\
 * Internal function prototypes.
 \*=========================================================================*/
@@ -38,7 +40,7 @@ int inet_open(lua_State *L)
 {
     lua_pushstring(L, "dns");
     lua_newtable(L);
-    luaL_openlib(L, NULL, func, 0);
+    luax_register(L, NULL, func);
     lua_settable(L, -3);
     return 0;
 }

Some files were not shown because too many files changed in this diff