diff --git a/CMakeLists.txt b/CMakeLists.txt index 3364876d2..917ecb4e9 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -1,5 +1,5 @@ # -# Copyright (c) 2006-2014 LOVE Development Team +# 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 diff --git a/changes.txt b/changes.txt index 41704b360..a280526be 100644 --- a/changes.txt +++ b/changes.txt @@ -11,11 +11,15 @@ LOVE 0.9.2 [Baby Inspector] * Added ParticleSystem:setLinearDamping. * Added SpriteBatch:flush. * Added love.graphics.getStats. + * Added "mirroredrepeat" wrap mode. * Added optional duration argument to Joystick:setVibration. * Added love.joystick.loadGamepadMappings and love.joystick.saveGamepadMappings. * Added Joint:setUserData and Joint:getUserData. + * Added Joint:getBodies. + * Added GearJoint:getJoints. * Added Contact:getFixtures and Body:getContactList. * Added Body:getWorld. + * Added Body:getJointList. * Added love.window.getDisplayName. * Added love.window.minimize. * Added love.window.showMessageBox. @@ -33,19 +37,22 @@ LOVE 0.9.2 [Baby Inspector] * Fixed the default love.filesystem identity when in Fused mode in Windows. * Fixed love.system.openURL sometimes blocking indefinitely on Linux. * Fixed love.joystick.setGamepadMapping. + * Fixed the order of vertices in ChainShapes. * Fixed shader:getWarnings returning unnecessary information. * Fixed some cases of noncompliant shader code not properly erroring on some nvidia drivers. * Fixed a potential crash when Shader objects are garbage collected. + * Fixed a potential small memory leak triggered when love.graphics.newShader errors. * Fixed love.graphics.newMesh(vertexcount, ...) causing the Mesh to do instanced rendering. * Fixed Mesh:getVertexMap. * Fixed Image:refresh generating mipmaps multiple times if mipmap filtering is enabled. + * Fixed Image:setMipmapFilter to not keep bad state around if it errors. * Fixed Mesh:setDrawRange when the Mesh has a vertex map set. * Fixed internal detection of the 'position' and 'effect' shader functions. * Fixed Texture memory leak when Meshes are garbage collected. * Fixed the default line join mode to be 'miter' instead of an undefined value. * Fixed the default error handler text size when highdpi mode is enabled on a Retina monitor. * Fixed the default error handler background color when sRGB mode is enabled for the window. - * Fixed love.window.setMode to fall back to the largest available mode if a width or height greater than the largest supported is specified and fullscreen=true. + * Fixed love.window.setMode to fall back to the largest available mode if a width or height greater than the largest supported is specified and fullscreen is used. * Fixed the state of wireframe mode when love.window.setMode is called. * Fixed Canvas:getPixel to error if the coordinates are not within the Canvas' size. * Fixed detection of compressed textures to work regardless of the file's extension. @@ -58,13 +65,17 @@ LOVE 0.9.2 [Baby Inspector] * Updated the paths returned by love.filesystem.getSaveDirectory and friends to strip double-slashes from the string. * Updated the error message when love.filesystem.write or File:open fails because the directory doesn't exist. * Updated the error message when love.math.setRandomseed(0) is attempted. + * Updated the error message when invalid UTF-8 strings are used in love functions that expect UTF-8. + * Updated love.physics.newPolygonShape and love.physics.newChainShape to accept a table of vertices. * Updated love.physics.newChainShape to error if the number of arguments is invalid. + * Updated love.thread.newThread to accept a literal string of code directly. * Updated love-created threads to use names visible in external debuggers. * Updated SpriteBatch:unbind to use less VRAM if the SpriteBatch has the static usage hint. * Updated love.graphics.newImage, love.image.newImageData, etc. to leave less Lua-owned memory around. * Updated love.graphics.push to accept different stack types to push. Current types are "transform" and "all". * Updated love shaders to accept GLSL ES precision qualifiers on variables, although they do nothing. * Updated the error message for love.graphics.newShader to be less cryptic if an invalid filename is given. + * Updated compressed texture loading code to allow BC6 and BC7 compressed textures (if the graphics driver supports them.) LOVE 0.9.1 [Baby Inspector] --------------------------- diff --git a/extra/windows/love.rc b/extra/windows/love.rc index 8493de94e..16030396f 100644 Binary files a/extra/windows/love.rc and b/extra/windows/love.rc differ diff --git a/license.txt b/license.txt index a17c91349..be749f598 100644 --- a/license.txt +++ b/license.txt @@ -1,6 +1,6 @@ This software uses LÖVE: -LÖVE is Copyright (c) 2006-2014 LOVE Development Team +LÖVE is 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 diff --git a/platform/macosx/OSX.h b/platform/macosx/OSX.h index 6a6d8b804..3972cdfc0 100644 --- a/platform/macosx/OSX.h +++ b/platform/macosx/OSX.h @@ -1,5 +1,5 @@ /** - * Copyright (c) 2006-2014 LOVE Development Team + * 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 diff --git a/platform/macosx/OSX.mm b/platform/macosx/OSX.mm index bce0d6a43..a2a1a7cf3 100644 --- a/platform/macosx/OSX.mm +++ b/platform/macosx/OSX.mm @@ -1,5 +1,5 @@ /** - * Copyright (c) 2006-2014 LOVE Development Team + * 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 diff --git a/platform/macosx/love-Info.plist b/platform/macosx/love-Info.plist index 3be04e47f..215e9069c 100644 --- a/platform/macosx/love-Info.plist +++ b/platform/macosx/love-Info.plist @@ -64,7 +64,7 @@ LSApplicationCategoryType public.app-category.games NSHumanReadableCopyright - © 2006-2014 LÖVE Development Team + © 2006-2015 LÖVE Development Team NSPrincipalClass NSApplication UTExportedTypeDeclarations diff --git a/platform/macosx/love-framework.xcodeproj/project.pbxproj b/platform/macosx/love-framework.xcodeproj/project.pbxproj index 0e8bb919f..4277ec650 100644 --- a/platform/macosx/love-framework.xcodeproj/project.pbxproj +++ b/platform/macosx/love-framework.xcodeproj/project.pbxproj @@ -2476,6 +2476,7 @@ LIBRARY_SEARCH_PATHS = ""; MACOSX_DEPLOYMENT_TARGET = 10.7; ONLY_ACTIVE_ARCH = NO; + SDKROOT = macosx; USE_HEADERMAP = NO; WARNING_CFLAGS = "-Wall"; }; @@ -2518,6 +2519,7 @@ LIBRARY_SEARCH_PATHS = ""; MACOSX_DEPLOYMENT_TARGET = 10.7; ONLY_ACTIVE_ARCH = YES; + SDKROOT = macosx; USE_HEADERMAP = NO; WARNING_CFLAGS = "-Wall"; }; @@ -2561,6 +2563,7 @@ LLVM_LTO = YES; MACOSX_DEPLOYMENT_TARGET = 10.7; ONLY_ACTIVE_ARCH = NO; + SDKROOT = macosx; USE_HEADERMAP = NO; WARNING_CFLAGS = "-Wall"; }; diff --git a/platform/unix/debian/copyright b/platform/unix/debian/copyright index 96a64fe66..65dd94b4a 100644 --- a/platform/unix/debian/copyright +++ b/platform/unix/debian/copyright @@ -1,4 +1,4 @@ -Copyright (c) 2006-2013 LOVE Development Team +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 diff --git a/src/common/Data.h b/src/common/Data.h index aa2031077..268073bc3 100644 --- a/src/common/Data.h +++ b/src/common/Data.h @@ -1,5 +1,5 @@ /** - * Copyright (c) 2006-2014 LOVE Development Team + * 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 diff --git a/src/common/EnumMap.h b/src/common/EnumMap.h index af6660845..ca6c72527 100644 --- a/src/common/EnumMap.h +++ b/src/common/EnumMap.h @@ -1,5 +1,5 @@ /** - * Copyright (c) 2006-2014 LOVE Development Team + * 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 diff --git a/src/common/Exception.cpp b/src/common/Exception.cpp index 9f8a58b32..69a9639ab 100644 --- a/src/common/Exception.cpp +++ b/src/common/Exception.cpp @@ -1,5 +1,5 @@ /** - * Copyright (c) 2006-2014 LOVE Development Team + * 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 diff --git a/src/common/Exception.h b/src/common/Exception.h index 49d9961d3..84685b9a7 100644 --- a/src/common/Exception.h +++ b/src/common/Exception.h @@ -1,5 +1,5 @@ /** - * Copyright (c) 2006-2014 LOVE Development Team + * 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 diff --git a/src/common/Matrix.cpp b/src/common/Matrix.cpp index 8a603a3f6..d2307ee74 100644 --- a/src/common/Matrix.cpp +++ b/src/common/Matrix.cpp @@ -1,5 +1,5 @@ /** - * Copyright (c) 2006-2014 LOVE Development Team + * 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 diff --git a/src/common/Matrix.h b/src/common/Matrix.h index cac6c747a..9815d28f5 100644 --- a/src/common/Matrix.h +++ b/src/common/Matrix.h @@ -1,5 +1,5 @@ /** - * Copyright (c) 2006-2014 LOVE Development Team + * 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 diff --git a/src/common/Memoizer.cpp b/src/common/Memoizer.cpp index 8d6ec7d4f..2f3eac510 100644 --- a/src/common/Memoizer.cpp +++ b/src/common/Memoizer.cpp @@ -1,5 +1,5 @@ /** - * Copyright (c) 2006-2014 LOVE Development Team + * 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 diff --git a/src/common/Memoizer.h b/src/common/Memoizer.h index a110b7af2..a99521ba2 100644 --- a/src/common/Memoizer.h +++ b/src/common/Memoizer.h @@ -1,5 +1,5 @@ /** - * Copyright (c) 2006-2014 LOVE Development Team + * 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 diff --git a/src/common/Module.cpp b/src/common/Module.cpp index 049da4052..e5fcd72aa 100644 --- a/src/common/Module.cpp +++ b/src/common/Module.cpp @@ -1,5 +1,5 @@ /** - * Copyright (c) 2006-2014 LOVE Development Team + * 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 diff --git a/src/common/Module.h b/src/common/Module.h index 9ab6eb67c..3665cf482 100644 --- a/src/common/Module.h +++ b/src/common/Module.h @@ -1,5 +1,5 @@ /** - * Copyright (c) 2006-2014 LOVE Development Team + * 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 diff --git a/src/common/Object.cpp b/src/common/Object.cpp index 5235e995c..c381a8dc6 100644 --- a/src/common/Object.cpp +++ b/src/common/Object.cpp @@ -1,5 +1,5 @@ /** - * Copyright (c) 2006-2014 LOVE Development Team + * 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 diff --git a/src/common/Object.h b/src/common/Object.h index 740f1b368..bba45e23d 100644 --- a/src/common/Object.h +++ b/src/common/Object.h @@ -1,5 +1,5 @@ /** - * Copyright (c) 2006-2014 LOVE Development Team + * 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 diff --git a/src/common/Reference.cpp b/src/common/Reference.cpp index d2ea05774..e077c3d67 100644 --- a/src/common/Reference.cpp +++ b/src/common/Reference.cpp @@ -1,5 +1,5 @@ /** - * Copyright (c) 2006-2014 LOVE Development Team + * 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 diff --git a/src/common/Reference.h b/src/common/Reference.h index eb8e8b288..295069536 100644 --- a/src/common/Reference.h +++ b/src/common/Reference.h @@ -1,5 +1,5 @@ /** - * Copyright (c) 2006-2014 LOVE Development Team + * 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 diff --git a/src/common/StringMap.h b/src/common/StringMap.h index 456a46058..dfc7f4146 100644 --- a/src/common/StringMap.h +++ b/src/common/StringMap.h @@ -1,5 +1,5 @@ /** - * Copyright (c) 2006-2014 LOVE Development Team + * 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 diff --git a/src/common/Variant.cpp b/src/common/Variant.cpp index 654d284fa..8a55274ff 100644 --- a/src/common/Variant.cpp +++ b/src/common/Variant.cpp @@ -1,5 +1,5 @@ /** - * Copyright (c) 2006-2014 LOVE Development Team + * 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 diff --git a/src/common/Variant.h b/src/common/Variant.h index dd8b68fac..d52e510f4 100644 --- a/src/common/Variant.h +++ b/src/common/Variant.h @@ -1,5 +1,5 @@ /** - * Copyright (c) 2006-2014 LOVE Development Team + * 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 diff --git a/src/common/Vector.cpp b/src/common/Vector.cpp index c2d37869d..5707dcd95 100644 --- a/src/common/Vector.cpp +++ b/src/common/Vector.cpp @@ -1,5 +1,5 @@ /** - * Copyright (c) 2006-2014 LOVE Development Team + * 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 diff --git a/src/common/Vector.h b/src/common/Vector.h index 8342af987..3aeb9fdba 100644 --- a/src/common/Vector.h +++ b/src/common/Vector.h @@ -1,5 +1,5 @@ /** - * Copyright (c) 2006-2014 LOVE Development Team + * 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 diff --git a/src/common/b64.cpp b/src/common/b64.cpp index c40091879..a404d8f00 100644 --- a/src/common/b64.cpp +++ b/src/common/b64.cpp @@ -1,5 +1,5 @@ /** - * Copyright (c) 2006-2014 LOVE Development Team + * 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 diff --git a/src/common/b64.h b/src/common/b64.h index 55fe47dea..0d1b5557b 100644 --- a/src/common/b64.h +++ b/src/common/b64.h @@ -1,5 +1,5 @@ /** - * Copyright (c) 2006-2014 LOVE Development Team + * 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 diff --git a/src/common/config.h b/src/common/config.h index 063b9611c..b0133c96f 100644 --- a/src/common/config.h +++ b/src/common/config.h @@ -1,5 +1,5 @@ /** - * Copyright (c) 2006-2014 LOVE Development Team + * 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 diff --git a/src/common/delay.cpp b/src/common/delay.cpp index 932231e6f..1ee8d07da 100644 --- a/src/common/delay.cpp +++ b/src/common/delay.cpp @@ -1,5 +1,5 @@ /** - * Copyright (c) 2006-2014 LOVE Development Team + * 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 diff --git a/src/common/delay.h b/src/common/delay.h index aa574ca30..3e5284c1f 100644 --- a/src/common/delay.h +++ b/src/common/delay.h @@ -1,5 +1,5 @@ /** - * Copyright (c) 2006-2014 LOVE Development Team + * 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 diff --git a/src/common/int.h b/src/common/int.h index 9cffea606..bf442c478 100644 --- a/src/common/int.h +++ b/src/common/int.h @@ -1,5 +1,5 @@ /** - * Copyright (c) 2006-2014 LOVE Development Team + * 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 diff --git a/src/common/math.h b/src/common/math.h index 7fe57a217..22681db48 100644 --- a/src/common/math.h +++ b/src/common/math.h @@ -1,5 +1,5 @@ /** - * Copyright (c) 2006-2014 LOVE Development Team + * 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 diff --git a/src/common/runtime.cpp b/src/common/runtime.cpp index e26c4d1e2..1922bf087 100644 --- a/src/common/runtime.cpp +++ b/src/common/runtime.cpp @@ -1,5 +1,5 @@ /** - * Copyright (c) 2006-2014 LOVE Development Team + * 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 diff --git a/src/common/runtime.h b/src/common/runtime.h index 2bb907fa3..b4da0b677 100644 --- a/src/common/runtime.h +++ b/src/common/runtime.h @@ -1,5 +1,5 @@ /** - * Copyright (c) 2006-2014 LOVE Development Team + * 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 @@ -23,7 +23,6 @@ // LOVE #include "types.h" -#include "Object.h" // Lua extern "C" { @@ -40,6 +39,7 @@ namespace love { // Forward declarations. +class Object; class Module; class Reference; diff --git a/src/common/types.h b/src/common/types.h index 016cfa41f..4b96fd62e 100644 --- a/src/common/types.h +++ b/src/common/types.h @@ -1,5 +1,5 @@ /** - * Copyright (c) 2006-2014 LOVE Development Team + * 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 diff --git a/src/common/utf8.cpp b/src/common/utf8.cpp index 2d593c752..6ec419df0 100755 --- a/src/common/utf8.cpp +++ b/src/common/utf8.cpp @@ -1,5 +1,5 @@ /** - * Copyright (c) 2006-2014 LOVE Development Team + * 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 diff --git a/src/common/utf8.h b/src/common/utf8.h index cd7867ecc..bbd02600b 100755 --- a/src/common/utf8.h +++ b/src/common/utf8.h @@ -1,5 +1,5 @@ /** - * Copyright (c) 2006-2014 LOVE Development Team + * 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 diff --git a/src/common/version.h b/src/common/version.h index 68b5f6b9d..ba4b15259 100644 --- a/src/common/version.h +++ b/src/common/version.h @@ -1,5 +1,5 @@ /** - * Copyright (c) 2006-2014 LOVE Development Team + * 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 diff --git a/src/common/wrap_Data.cpp b/src/common/wrap_Data.cpp index 76a8b6871..1485326be 100644 --- a/src/common/wrap_Data.cpp +++ b/src/common/wrap_Data.cpp @@ -1,5 +1,5 @@ /** - * Copyright (c) 2006-2014 LOVE Development Team + * 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 diff --git a/src/common/wrap_Data.h b/src/common/wrap_Data.h index 94cc31cde..50c944fe4 100644 --- a/src/common/wrap_Data.h +++ b/src/common/wrap_Data.h @@ -1,5 +1,5 @@ /** - * Copyright (c) 2006-2014 LOVE Development Team + * 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 diff --git a/src/libraries/Box2D/Collision/Shapes/b2ChainShape.cpp b/src/libraries/Box2D/Collision/Shapes/b2ChainShape.cpp index 069b4cae8..f1ed2cca3 100755 --- a/src/libraries/Box2D/Collision/Shapes/b2ChainShape.cpp +++ b/src/libraries/Box2D/Collision/Shapes/b2ChainShape.cpp @@ -19,7 +19,7 @@ #include #include #include -#include +#include b2ChainShape::~b2ChainShape() { diff --git a/src/libraries/Box2D/Collision/b2BroadPhase.cpp b/src/libraries/Box2D/Collision/b2BroadPhase.cpp index 5cd6f0e8a..f46e4d090 100755 --- a/src/libraries/Box2D/Collision/b2BroadPhase.cpp +++ b/src/libraries/Box2D/Collision/b2BroadPhase.cpp @@ -17,7 +17,7 @@ */ #include -#include +#include b2BroadPhase::b2BroadPhase() { diff --git a/src/libraries/Box2D/Collision/b2DynamicTree.cpp b/src/libraries/Box2D/Collision/b2DynamicTree.cpp index 7035ab8b8..ef57b4220 100755 --- a/src/libraries/Box2D/Collision/b2DynamicTree.cpp +++ b/src/libraries/Box2D/Collision/b2DynamicTree.cpp @@ -17,7 +17,7 @@ */ #include -#include +#include b2DynamicTree::b2DynamicTree() { diff --git a/src/libraries/Box2D/Common/b2BlockAllocator.cpp b/src/libraries/Box2D/Common/b2BlockAllocator.cpp index f7a4688ea..59674e81b 100755 --- a/src/libraries/Box2D/Common/b2BlockAllocator.cpp +++ b/src/libraries/Box2D/Common/b2BlockAllocator.cpp @@ -18,7 +18,7 @@ #include #include -#include +#include #include int32 b2BlockAllocator::s_blockSizes[b2_blockSizes] = diff --git a/src/libraries/Box2D/Common/b2GrowableStack.h b/src/libraries/Box2D/Common/b2GrowableStack.h index 4094644a2..989247710 100755 --- a/src/libraries/Box2D/Common/b2GrowableStack.h +++ b/src/libraries/Box2D/Common/b2GrowableStack.h @@ -19,7 +19,7 @@ #ifndef B2_GROWABLE_STACK_H #define B2_GROWABLE_STACK_H #include -#include +#include /// This is a growable LIFO stack with an initial capacity of N. /// If the stack size exceeds the initial capacity, the heap is used diff --git a/src/libraries/enet/lua-enet.h b/src/libraries/enet/lua-enet.h index e42fcf0fe..75cc985e3 100644 --- a/src/libraries/enet/lua-enet.h +++ b/src/libraries/enet/lua-enet.h @@ -1,5 +1,5 @@ /** -* Copyright (c) 2006-2014 LOVE Development Team +* 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 diff --git a/src/libraries/luasocket/luasocket.cpp b/src/libraries/luasocket/luasocket.cpp index b7a5cb211..57a1544c3 100644 --- a/src/libraries/luasocket/luasocket.cpp +++ b/src/libraries/luasocket/luasocket.cpp @@ -1,5 +1,5 @@ /** - * Copyright (c) 2006-2014 LOVE Development Team + * 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 diff --git a/src/libraries/luasocket/luasocket.h b/src/libraries/luasocket/luasocket.h index 804061e62..93a623e44 100644 --- a/src/libraries/luasocket/luasocket.h +++ b/src/libraries/luasocket/luasocket.h @@ -1,5 +1,5 @@ /** - * Copyright (c) 2006-2014 LOVE Development Team + * 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 diff --git a/src/love.cpp b/src/love.cpp index 0d7b5bc57..1ce585252 100644 --- a/src/love.cpp +++ b/src/love.cpp @@ -1,5 +1,5 @@ /** - * Copyright (c) 2006-2014 LOVE Development Team + * 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 @@ -18,6 +18,7 @@ * 3. This notice may not be removed or altered from any source distribution. **/ +#include "common/version.h" #include "modules/love/love.h" #include @@ -150,6 +151,13 @@ int main(int argc, char **argv) argv = hack_argv; #endif // LOVE_LEGENDARY_APP_ARGV_HACK + if (strcmp(love::VERSION, love_version()) != 0) + { + printf("Version mismatch detected!\nLOVE binary is version %s\n" + "LOVE library is version %s\n", love::VERSION, love_version()); + return 1; + } + // Oh, you just want the version? Okay! if (argc > 1 && strcmp(argv[1], "--version") == 0) { @@ -191,7 +199,7 @@ int main(int argc, char **argv) lua_pushstring(L, "love"); lua_call(L, 1, 1); // leave the returned table on the stack. - // Add love.__exe = true. + // Add love._exe = true. // This indicates that we're running the standalone version of love, and not // the library version. { diff --git a/src/modules/audio/Audio.cpp b/src/modules/audio/Audio.cpp index cf7a3feed..070aa9d34 100644 --- a/src/modules/audio/Audio.cpp +++ b/src/modules/audio/Audio.cpp @@ -1,5 +1,5 @@ /** - * Copyright (c) 2006-2014 LOVE Development Team + * 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 diff --git a/src/modules/audio/Audio.h b/src/modules/audio/Audio.h index e02cb9700..9405bde38 100644 --- a/src/modules/audio/Audio.h +++ b/src/modules/audio/Audio.h @@ -1,5 +1,5 @@ /** - * Copyright (c) 2006-2014 LOVE Development Team + * 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 diff --git a/src/modules/audio/Source.cpp b/src/modules/audio/Source.cpp index 67d9f42b3..a0ac55650 100644 --- a/src/modules/audio/Source.cpp +++ b/src/modules/audio/Source.cpp @@ -1,5 +1,5 @@ /** - * Copyright (c) 2006-2014 LOVE Development Team + * 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 diff --git a/src/modules/audio/Source.h b/src/modules/audio/Source.h index 0c9c625f2..4c0fef64e 100644 --- a/src/modules/audio/Source.h +++ b/src/modules/audio/Source.h @@ -1,5 +1,5 @@ /** - * Copyright (c) 2006-2014 LOVE Development Team + * 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 diff --git a/src/modules/audio/null/Audio.cpp b/src/modules/audio/null/Audio.cpp index 6b6fd3f93..6e950d23d 100644 --- a/src/modules/audio/null/Audio.cpp +++ b/src/modules/audio/null/Audio.cpp @@ -1,5 +1,5 @@ /** - * Copyright (c) 2006-2014 LOVE Development Team + * 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 diff --git a/src/modules/audio/null/Audio.h b/src/modules/audio/null/Audio.h index 372f756c5..852aebda0 100644 --- a/src/modules/audio/null/Audio.h +++ b/src/modules/audio/null/Audio.h @@ -1,5 +1,5 @@ /** - * Copyright (c) 2006-2014 LOVE Development Team + * 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 diff --git a/src/modules/audio/null/Source.cpp b/src/modules/audio/null/Source.cpp index caa212374..aa682a627 100644 --- a/src/modules/audio/null/Source.cpp +++ b/src/modules/audio/null/Source.cpp @@ -1,5 +1,5 @@ /** - * Copyright (c) 2006-2014 LOVE Development Team + * 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 diff --git a/src/modules/audio/null/Source.h b/src/modules/audio/null/Source.h index 0a5c5253d..bbab20a40 100644 --- a/src/modules/audio/null/Source.h +++ b/src/modules/audio/null/Source.h @@ -1,5 +1,5 @@ /** - * Copyright (c) 2006-2014 LOVE Development Team + * 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 diff --git a/src/modules/audio/openal/Audio.cpp b/src/modules/audio/openal/Audio.cpp index c424524d5..72338418b 100644 --- a/src/modules/audio/openal/Audio.cpp +++ b/src/modules/audio/openal/Audio.cpp @@ -1,5 +1,5 @@ /** - * Copyright (c) 2006-2014 LOVE Development Team + * 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 diff --git a/src/modules/audio/openal/Audio.h b/src/modules/audio/openal/Audio.h index 35fe8afbb..c7beb6bb1 100644 --- a/src/modules/audio/openal/Audio.h +++ b/src/modules/audio/openal/Audio.h @@ -1,5 +1,5 @@ /** - * Copyright (c) 2006-2014 LOVE Development Team + * 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 diff --git a/src/modules/audio/openal/Pool.cpp b/src/modules/audio/openal/Pool.cpp index 3472c249c..7491c189b 100644 --- a/src/modules/audio/openal/Pool.cpp +++ b/src/modules/audio/openal/Pool.cpp @@ -1,5 +1,5 @@ /** - * Copyright (c) 2006-2014 LOVE Development Team + * 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 diff --git a/src/modules/audio/openal/Pool.h b/src/modules/audio/openal/Pool.h index 8ce7e0483..dc596012b 100644 --- a/src/modules/audio/openal/Pool.h +++ b/src/modules/audio/openal/Pool.h @@ -1,5 +1,5 @@ /** - * Copyright (c) 2006-2014 LOVE Development Team + * 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 diff --git a/src/modules/audio/openal/Source.cpp b/src/modules/audio/openal/Source.cpp index 7d383c132..41629895a 100644 --- a/src/modules/audio/openal/Source.cpp +++ b/src/modules/audio/openal/Source.cpp @@ -1,5 +1,5 @@ /** - * Copyright (c) 2006-2014 LOVE Development Team + * 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 @@ -37,6 +37,17 @@ namespace openal static const char* NO_SPATIAL_SUPPORT_FOR_STEREO_ERROR_MESSAGE = "This spatial audio functionality is only available on monaural sources. \ Ensure your source is not stereo before calling this function."; +class InvalidFormatException : public love::Exception +{ +public: + + InvalidFormatException(int channels, int bitdepth) + : Exception("%d-channel Sources with %d bits per sample are not supported.", channels, bitdepth) + { + } + +}; + StaticDataBuffer::StaticDataBuffer(ALenum format, const ALvoid *data, ALsizei size, ALsizei freq) { alGenBuffers(1, &buffer); @@ -72,6 +83,9 @@ Source::Source(Pool *pool, love::sound::SoundData *soundData) , toLoop(0) { ALenum fmt = getFormat(soundData->getChannels(), soundData->getBitDepth()); + if (fmt == 0) + throw InvalidFormatException(soundData->getChannels(), soundData->getBitDepth()); + staticBuffer.set(new StaticDataBuffer(fmt, soundData->getData(), soundData->getSize(), soundData->getSampleRate())); // The buffer has a +2 retain count right now, but we want it to have +1. @@ -107,6 +121,9 @@ Source::Source(Pool *pool, love::sound::Decoder *decoder) , decoder(decoder) , toLoop(0) { + if (getFormat(decoder->getChannels(), decoder->getBitDepth()) == 0) + throw InvalidFormatException(decoder->getChannels(), decoder->getBitDepth()); + alGenBuffers(MAX_BUFFERS, streamBuffers); float z[3] = {0, 0, 0}; @@ -685,8 +702,22 @@ ALenum Source::getFormat(int channels, int bitDepth) const return AL_FORMAT_STEREO8; else if (channels == 2 && bitDepth == 16) return AL_FORMAT_STEREO16; - else - return 0; + +#ifdef AL_EXT_MCFORMATS + if (alIsExtensionPresent("AL_EXT_MCFORMATS")) + { + if (channels == 6 && bitDepth == 8) + return AL_FORMAT_51CHN8; + else if (channels == 6 && bitDepth == 16) + return AL_FORMAT_51CHN16; + else if (channels == 8 && bitDepth == 8) + return AL_FORMAT_71CHN8; + else if (channels == 8 && bitDepth == 16) + return AL_FORMAT_71CHN16; + } +#endif + + return 0; } int Source::streamAtomic(ALuint buffer, love::sound::Decoder *d) diff --git a/src/modules/audio/openal/Source.h b/src/modules/audio/openal/Source.h index a723b9b8b..88119cb1a 100644 --- a/src/modules/audio/openal/Source.h +++ b/src/modules/audio/openal/Source.h @@ -1,5 +1,5 @@ /** - * Copyright (c) 2006-2014 LOVE Development Team + * 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 diff --git a/src/modules/audio/wrap_Audio.cpp b/src/modules/audio/wrap_Audio.cpp index 5d33373ec..c0f08340f 100644 --- a/src/modules/audio/wrap_Audio.cpp +++ b/src/modules/audio/wrap_Audio.cpp @@ -1,5 +1,5 @@ /** - * Copyright (c) 2006-2014 LOVE Development Team + * 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 @@ -58,10 +58,12 @@ int w_newSource(lua_State *L) Source *t = 0; - if (luax_istype(L, 1, SOUND_SOUND_DATA_T)) - t = instance()->newSource(luax_totype(L, 1, "SoundData", SOUND_SOUND_DATA_T)); - else if (luax_istype(L, 1, SOUND_DECODER_T)) - t = instance()->newSource(luax_totype(L, 1, "Decoder", SOUND_DECODER_T)); + luax_catchexcept(L, [&]() { + if (luax_istype(L, 1, SOUND_SOUND_DATA_T)) + t = instance()->newSource(luax_totype(L, 1, "SoundData", SOUND_SOUND_DATA_T)); + else if (luax_istype(L, 1, SOUND_DECODER_T)) + t = instance()->newSource(luax_totype(L, 1, "Decoder", SOUND_DECODER_T)); + }); if (t) { diff --git a/src/modules/audio/wrap_Audio.h b/src/modules/audio/wrap_Audio.h index 1960e0d1e..31d9af132 100644 --- a/src/modules/audio/wrap_Audio.h +++ b/src/modules/audio/wrap_Audio.h @@ -1,5 +1,5 @@ /** - * Copyright (c) 2006-2014 LOVE Development Team + * 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 diff --git a/src/modules/audio/wrap_Source.cpp b/src/modules/audio/wrap_Source.cpp index f725f25e8..568b3588a 100644 --- a/src/modules/audio/wrap_Source.cpp +++ b/src/modules/audio/wrap_Source.cpp @@ -1,5 +1,5 @@ /** - * Copyright (c) 2006-2014 LOVE Development Team + * 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 diff --git a/src/modules/audio/wrap_Source.h b/src/modules/audio/wrap_Source.h index 7ce6adf49..93dc52e2c 100644 --- a/src/modules/audio/wrap_Source.h +++ b/src/modules/audio/wrap_Source.h @@ -1,5 +1,5 @@ /** - * Copyright (c) 2006-2014 LOVE Development Team + * 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 diff --git a/src/modules/event/Event.cpp b/src/modules/event/Event.cpp index 1c7999ec3..a24c92405 100644 --- a/src/modules/event/Event.cpp +++ b/src/modules/event/Event.cpp @@ -1,5 +1,5 @@ /** - * Copyright (c) 2006-2014 LOVE Development Team + * 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 diff --git a/src/modules/event/Event.h b/src/modules/event/Event.h index 0ef2abaef..a42a0e490 100644 --- a/src/modules/event/Event.h +++ b/src/modules/event/Event.h @@ -1,5 +1,5 @@ /** - * Copyright (c) 2006-2014 LOVE Development Team + * 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 diff --git a/src/modules/event/sdl/Event.cpp b/src/modules/event/sdl/Event.cpp index 5d98924f4..6419981d7 100644 --- a/src/modules/event/sdl/Event.cpp +++ b/src/modules/event/sdl/Event.cpp @@ -1,5 +1,5 @@ /** - * Copyright (c) 2006-2014 LOVE Development Team + * 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 @@ -42,14 +42,14 @@ namespace sdl // SDL reports mouse coordinates in the window coordinate system in OS X, but // we want them in pixel coordinates (may be different with high-DPI enabled.) -static void windowToPixelCoords(int *x, int *y) +static void windowToPixelCoords(double *x, double *y) { window::Window *window = Module::getInstance(Module::M_WINDOW); if (window && x) - *x = (int) window->toPixels(*x); + *x = window->toPixels(*x); if (window && y) - *y = (int) window->toPixels(*y); + *y = window->toPixels(*y); } @@ -115,7 +115,7 @@ Message *Event::convert(const SDL_Event &e) const love::keyboard::Keyboard::Key key; love::mouse::Mouse::Button button; - Variant *arg1, *arg2, *arg3; + Variant *arg1, *arg2, *arg3, *arg4; const char *txt; std::map::const_iterator keyit; @@ -172,15 +172,34 @@ Message *Event::convert(const SDL_Event &e) const arg2->release(); arg3->release(); break; + case SDL_MOUSEMOTION: + { + double x = (double) e.motion.x; + double y = (double) e.motion.y; + double xrel = (double) e.motion.xrel; + double yrel = (double) e.motion.yrel; + windowToPixelCoords(&x, &y); + windowToPixelCoords(&xrel, &yrel); + arg1 = new Variant(x); + arg2 = new Variant(y); + arg3 = new Variant(xrel); + arg4 = new Variant(yrel); + msg = new Message("mousemoved", arg1, arg2, arg3, arg4); + arg1->release(); + arg2->release(); + arg3->release(); + arg4->release(); + } + break; case SDL_MOUSEBUTTONDOWN: case SDL_MOUSEBUTTONUP: if (buttons.find(e.button.button, button) && mouse::Mouse::getConstant(button, txt)) { - int x = e.button.x; - int y = e.button.y; + double x = (double) e.button.x; + double y = (double) e.button.y; windowToPixelCoords(&x, &y); - arg1 = new Variant((double) x); - arg2 = new Variant((double) y); + arg1 = new Variant(x); + arg2 = new Variant(y); arg3 = new Variant(txt, strlen(txt)); msg = new Message((e.type == SDL_MOUSEBUTTONDOWN) ? "mousepressed" : "mousereleased", diff --git a/src/modules/event/sdl/Event.h b/src/modules/event/sdl/Event.h index e6274a9cc..5e1a9b4ca 100644 --- a/src/modules/event/sdl/Event.h +++ b/src/modules/event/sdl/Event.h @@ -1,5 +1,5 @@ /** - * Copyright (c) 2006-2014 LOVE Development Team + * 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 diff --git a/src/modules/event/sdl/wrap_Event.cpp b/src/modules/event/sdl/wrap_Event.cpp index 6190a585d..435cf98d5 100644 --- a/src/modules/event/sdl/wrap_Event.cpp +++ b/src/modules/event/sdl/wrap_Event.cpp @@ -1,5 +1,5 @@ /** - * Copyright (c) 2006-2014 LOVE Development Team + * 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 diff --git a/src/modules/event/sdl/wrap_Event.h b/src/modules/event/sdl/wrap_Event.h index b689335a3..b99b433ec 100644 --- a/src/modules/event/sdl/wrap_Event.h +++ b/src/modules/event/sdl/wrap_Event.h @@ -1,5 +1,5 @@ /** - * Copyright (c) 2006-2014 LOVE Development Team + * 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 diff --git a/src/modules/filesystem/DroppedFile.cpp b/src/modules/filesystem/DroppedFile.cpp index f83df867d..b51cd510b 100644 --- a/src/modules/filesystem/DroppedFile.cpp +++ b/src/modules/filesystem/DroppedFile.cpp @@ -1,5 +1,5 @@ /** - * Copyright (c) 2006-2014 LOVE Development Team + * 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 diff --git a/src/modules/filesystem/DroppedFile.h b/src/modules/filesystem/DroppedFile.h index 50cacda83..d5256fcc4 100644 --- a/src/modules/filesystem/DroppedFile.h +++ b/src/modules/filesystem/DroppedFile.h @@ -1,5 +1,5 @@ /** - * Copyright (c) 2006-2014 LOVE Development Team + * 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 diff --git a/src/modules/filesystem/File.cpp b/src/modules/filesystem/File.cpp index 105e52f95..578bacf33 100644 --- a/src/modules/filesystem/File.cpp +++ b/src/modules/filesystem/File.cpp @@ -1,5 +1,5 @@ /** - * Copyright (c) 2006-2014 LOVE Development Team + * 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 diff --git a/src/modules/filesystem/File.h b/src/modules/filesystem/File.h index d46e13727..4b83fb2cb 100644 --- a/src/modules/filesystem/File.h +++ b/src/modules/filesystem/File.h @@ -1,5 +1,5 @@ /** - * Copyright (c) 2006-2014 LOVE Development Team + * 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 diff --git a/src/modules/filesystem/FileData.cpp b/src/modules/filesystem/FileData.cpp index 4da8ea431..d8c055d42 100644 --- a/src/modules/filesystem/FileData.cpp +++ b/src/modules/filesystem/FileData.cpp @@ -1,5 +1,5 @@ /** - * Copyright (c) 2006-2014 LOVE Development Team + * 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 diff --git a/src/modules/filesystem/FileData.h b/src/modules/filesystem/FileData.h index 55a0eee06..b35b13cd0 100644 --- a/src/modules/filesystem/FileData.h +++ b/src/modules/filesystem/FileData.h @@ -1,5 +1,5 @@ /** - * Copyright (c) 2006-2014 LOVE Development Team + * 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 diff --git a/src/modules/filesystem/Filesystem.cpp b/src/modules/filesystem/Filesystem.cpp index 4e5a538c1..b2dc8d147 100644 --- a/src/modules/filesystem/Filesystem.cpp +++ b/src/modules/filesystem/Filesystem.cpp @@ -1,5 +1,5 @@ /** - * Copyright (c) 2006-2014 LOVE Development Team + * 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 diff --git a/src/modules/filesystem/Filesystem.h b/src/modules/filesystem/Filesystem.h index bba774472..d661cd410 100644 --- a/src/modules/filesystem/Filesystem.h +++ b/src/modules/filesystem/Filesystem.h @@ -1,5 +1,5 @@ /** - * Copyright (c) 2006-2014 LOVE Development Team + * 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 diff --git a/src/modules/filesystem/physfs/File.cpp b/src/modules/filesystem/physfs/File.cpp index dbec8c6eb..50c3ec768 100644 --- a/src/modules/filesystem/physfs/File.cpp +++ b/src/modules/filesystem/physfs/File.cpp @@ -1,5 +1,5 @@ /** - * Copyright (c) 2006-2014 LOVE Development Team + * 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 diff --git a/src/modules/filesystem/physfs/File.h b/src/modules/filesystem/physfs/File.h index 13cd26925..e6d8428ab 100644 --- a/src/modules/filesystem/physfs/File.h +++ b/src/modules/filesystem/physfs/File.h @@ -1,5 +1,5 @@ /** - * Copyright (c) 2006-2014 LOVE Development Team + * 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 diff --git a/src/modules/filesystem/physfs/Filesystem.cpp b/src/modules/filesystem/physfs/Filesystem.cpp index a3abb96b8..9a764e95c 100644 --- a/src/modules/filesystem/physfs/Filesystem.cpp +++ b/src/modules/filesystem/physfs/Filesystem.cpp @@ -1,5 +1,5 @@ /** - * Copyright (c) 2006-2014 LOVE Development Team + * 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 diff --git a/src/modules/filesystem/physfs/Filesystem.h b/src/modules/filesystem/physfs/Filesystem.h index 82ff6b4f4..2ea2032ee 100644 --- a/src/modules/filesystem/physfs/Filesystem.h +++ b/src/modules/filesystem/physfs/Filesystem.h @@ -1,5 +1,5 @@ /** - * Copyright (c) 2006-2014 LOVE Development Team + * 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 diff --git a/src/modules/filesystem/wrap_DroppedFile.cpp b/src/modules/filesystem/wrap_DroppedFile.cpp index 9be0312e2..7d2fa1061 100644 --- a/src/modules/filesystem/wrap_DroppedFile.cpp +++ b/src/modules/filesystem/wrap_DroppedFile.cpp @@ -1,5 +1,5 @@ /** - * Copyright (c) 2006-2014 LOVE Development Team + * 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 diff --git a/src/modules/filesystem/wrap_DroppedFile.h b/src/modules/filesystem/wrap_DroppedFile.h index 8a6516fb1..a380a3e96 100644 --- a/src/modules/filesystem/wrap_DroppedFile.h +++ b/src/modules/filesystem/wrap_DroppedFile.h @@ -1,5 +1,5 @@ /** - * Copyright (c) 2006-2014 LOVE Development Team + * 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 diff --git a/src/modules/filesystem/wrap_File.cpp b/src/modules/filesystem/wrap_File.cpp index a467625f5..b18cd9169 100644 --- a/src/modules/filesystem/wrap_File.cpp +++ b/src/modules/filesystem/wrap_File.cpp @@ -1,5 +1,5 @@ /** - * Copyright (c) 2006-2014 LOVE Development Team + * 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 diff --git a/src/modules/filesystem/wrap_File.h b/src/modules/filesystem/wrap_File.h index 1248083e4..e0ae68152 100644 --- a/src/modules/filesystem/wrap_File.h +++ b/src/modules/filesystem/wrap_File.h @@ -1,5 +1,5 @@ /** - * Copyright (c) 2006-2014 LOVE Development Team + * 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 diff --git a/src/modules/filesystem/wrap_FileData.cpp b/src/modules/filesystem/wrap_FileData.cpp index 3b78c47a5..fdf768f6b 100644 --- a/src/modules/filesystem/wrap_FileData.cpp +++ b/src/modules/filesystem/wrap_FileData.cpp @@ -1,5 +1,5 @@ /** - * Copyright (c) 2006-2014 LOVE Development Team + * 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 diff --git a/src/modules/filesystem/wrap_FileData.h b/src/modules/filesystem/wrap_FileData.h index 326387024..703e4ce49 100644 --- a/src/modules/filesystem/wrap_FileData.h +++ b/src/modules/filesystem/wrap_FileData.h @@ -1,5 +1,5 @@ /** - * Copyright (c) 2006-2014 LOVE Development Team + * 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 diff --git a/src/modules/filesystem/wrap_Filesystem.cpp b/src/modules/filesystem/wrap_Filesystem.cpp index eab876f34..94b0f68ea 100644 --- a/src/modules/filesystem/wrap_Filesystem.cpp +++ b/src/modules/filesystem/wrap_Filesystem.cpp @@ -1,5 +1,5 @@ /** - * Copyright (c) 2006-2014 LOVE Development Team + * 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 diff --git a/src/modules/filesystem/wrap_Filesystem.h b/src/modules/filesystem/wrap_Filesystem.h index 395d9cb4a..d4e91c277 100644 --- a/src/modules/filesystem/wrap_Filesystem.h +++ b/src/modules/filesystem/wrap_Filesystem.h @@ -1,5 +1,5 @@ /** - * Copyright (c) 2006-2014 LOVE Development Team + * 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 diff --git a/src/modules/font/BMFontRasterizer.cpp b/src/modules/font/BMFontRasterizer.cpp index a8966dbb1..992ffc826 100644 --- a/src/modules/font/BMFontRasterizer.cpp +++ b/src/modules/font/BMFontRasterizer.cpp @@ -1,5 +1,5 @@ /** - * Copyright (c) 2006-2014 LOVE Development Team + * 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 diff --git a/src/modules/font/BMFontRasterizer.h b/src/modules/font/BMFontRasterizer.h index 101a61f0d..1901108be 100644 --- a/src/modules/font/BMFontRasterizer.h +++ b/src/modules/font/BMFontRasterizer.h @@ -1,5 +1,5 @@ /** - * Copyright (c) 2006-2014 LOVE Development Team + * 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 diff --git a/src/modules/font/Font.h b/src/modules/font/Font.h index ee4a2a10a..df29b5565 100644 --- a/src/modules/font/Font.h +++ b/src/modules/font/Font.h @@ -1,5 +1,5 @@ /** - * Copyright (c) 2006-2014 LOVE Development Team + * 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 diff --git a/src/modules/font/GlyphData.cpp b/src/modules/font/GlyphData.cpp index 0493a8da5..809d0aee9 100644 --- a/src/modules/font/GlyphData.cpp +++ b/src/modules/font/GlyphData.cpp @@ -1,5 +1,5 @@ /** - * Copyright (c) 2006-2014 LOVE Development Team + * 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 diff --git a/src/modules/font/GlyphData.h b/src/modules/font/GlyphData.h index a77755944..a065dce85 100644 --- a/src/modules/font/GlyphData.h +++ b/src/modules/font/GlyphData.h @@ -1,5 +1,5 @@ /** - * Copyright (c) 2006-2014 LOVE Development Team + * 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 diff --git a/src/modules/font/ImageRasterizer.cpp b/src/modules/font/ImageRasterizer.cpp index 4447e9a6e..99e43dcf7 100644 --- a/src/modules/font/ImageRasterizer.cpp +++ b/src/modules/font/ImageRasterizer.cpp @@ -1,5 +1,5 @@ /** - * Copyright (c) 2006-2014 LOVE Development Team + * 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 diff --git a/src/modules/font/ImageRasterizer.h b/src/modules/font/ImageRasterizer.h index 19a836222..fbeceecfe 100644 --- a/src/modules/font/ImageRasterizer.h +++ b/src/modules/font/ImageRasterizer.h @@ -1,5 +1,5 @@ /** - * Copyright (c) 2006-2014 LOVE Development Team + * 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 diff --git a/src/modules/font/Rasterizer.cpp b/src/modules/font/Rasterizer.cpp index de8e05328..eecb58925 100644 --- a/src/modules/font/Rasterizer.cpp +++ b/src/modules/font/Rasterizer.cpp @@ -1,5 +1,5 @@ /** - * Copyright (c) 2006-2014 LOVE Development Team + * 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 diff --git a/src/modules/font/Rasterizer.h b/src/modules/font/Rasterizer.h index ff1cd22e5..977522235 100644 --- a/src/modules/font/Rasterizer.h +++ b/src/modules/font/Rasterizer.h @@ -1,5 +1,5 @@ /** - * Copyright (c) 2006-2014 LOVE Development Team + * 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 diff --git a/src/modules/font/freetype/Font.cpp b/src/modules/font/freetype/Font.cpp index 277cd48f3..f2fd91b1e 100644 --- a/src/modules/font/freetype/Font.cpp +++ b/src/modules/font/freetype/Font.cpp @@ -1,5 +1,5 @@ /** - * Copyright (c) 2006-2014 LOVE Development Team + * 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 diff --git a/src/modules/font/freetype/Font.h b/src/modules/font/freetype/Font.h index 6b0a37377..7b6a70361 100644 --- a/src/modules/font/freetype/Font.h +++ b/src/modules/font/freetype/Font.h @@ -1,5 +1,5 @@ /** - * Copyright (c) 2006-2014 LOVE Development Team + * 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 diff --git a/src/modules/font/freetype/TrueTypeRasterizer.cpp b/src/modules/font/freetype/TrueTypeRasterizer.cpp index 4241f150d..7c6f5d573 100644 --- a/src/modules/font/freetype/TrueTypeRasterizer.cpp +++ b/src/modules/font/freetype/TrueTypeRasterizer.cpp @@ -1,5 +1,5 @@ /** - * Copyright (c) 2006-2014 LOVE Development Team + * 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 diff --git a/src/modules/font/freetype/TrueTypeRasterizer.h b/src/modules/font/freetype/TrueTypeRasterizer.h index 5d980fd49..f4a088ed7 100644 --- a/src/modules/font/freetype/TrueTypeRasterizer.h +++ b/src/modules/font/freetype/TrueTypeRasterizer.h @@ -1,5 +1,5 @@ /** - * Copyright (c) 2006-2014 LOVE Development Team + * 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 diff --git a/src/modules/font/freetype/wrap_Font.cpp b/src/modules/font/freetype/wrap_Font.cpp new file mode 100644 index 000000000..574e3f589 --- /dev/null +++ b/src/modules/font/freetype/wrap_Font.cpp @@ -0,0 +1,128 @@ +/** + * 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. + **/ + +#include "wrap_Font.h" + +#include "Font.h" + +#include "font/wrap_GlyphData.h" +#include "font/wrap_Rasterizer.h" + +#include "filesystem/wrap_Filesystem.h" + +#include "TrueTypeRasterizer.h" + +namespace love +{ +namespace font +{ +namespace freetype +{ + +#define instance() (Module::getInstance(Module::M_FONT)) + +int w_newRasterizer(lua_State *L) +{ + Rasterizer *t = nullptr; + + if (luax_istype(L, 1, IMAGE_IMAGE_DATA_T)) + { + love::image::ImageData *d = luax_checktype(L, 1, "ImageData", IMAGE_IMAGE_DATA_T); + const char *g = luaL_checkstring(L, 2); + std::string glyphs(g); + luax_catchexcept(L, [&](){ t = instance()->newRasterizer(d, glyphs); }); + } + else if (lua_isstring(L, 1) || luax_istype(L, 1, FILESYSTEM_FILE_T) || luax_istype(L, 1, FILESYSTEM_FILE_DATA_T)) + { + love::filesystem::FileData *d = love::filesystem::luax_getfiledata(L, 1); + int size = luaL_checkint(L, 2); + luax_catchexcept(L, + [&]() { t = instance()->newRasterizer(d, size); }, + [&]() { d->release(); } + ); + } + else + return luaL_argerror(L, 1, "expected ImageData, filename, or FileData"); + + luax_pushtype(L, "Rasterizer", FONT_RASTERIZER_T, t); + t->release(); + return 1; +} + +int w_newGlyphData(lua_State *L) +{ + Rasterizer *r = luax_checkrasterizer(L, 1); + GlyphData *t = nullptr; + + // newGlyphData accepts a unicode character or a codepoint number. + if (lua_type(L, 2) == LUA_TSTRING) + { + std::string glyph = luax_checkstring(L, 2); + luax_catchexcept(L, [&](){ t = instance()->newGlyphData(r, glyph); }); + } + else + { + uint32 g = (uint32) luaL_checknumber(L, 2); + t = instance()->newGlyphData(r, g); + } + + luax_pushtype(L, "GlyphData", FONT_GLYPH_DATA_T, t); + t->release(); + return 1; +} + +// List of functions to wrap. +static const luaL_Reg functions[] = +{ + { "newRasterizer", w_newRasterizer }, + { "newGlyphData", w_newGlyphData }, + { 0, 0 } +}; + +static const lua_CFunction types[] = +{ + luaopen_glyphdata, + luaopen_rasterizer, + 0 +}; + +extern "C" int luaopen_love_font(lua_State *L) +{ + Font *instance = instance(); + if (instance == nullptr) + { + luax_catchexcept(L, [&](){ instance = new Font(); }); + } + else + instance->retain(); + + WrappedModule w; + w.module = instance; + w.name = "font"; + w.flags = MODULE_T; + w.functions = functions; + w.types = types; + + return luax_register_module(L, w); +} + +} // freetype +} // font +} // love diff --git a/src/modules/font/freetype/wrap_Font.h b/src/modules/font/freetype/wrap_Font.h new file mode 100644 index 000000000..d5af7efb8 --- /dev/null +++ b/src/modules/font/freetype/wrap_Font.h @@ -0,0 +1,43 @@ +/** + * 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_FONT_FREETYPE_WRAP_FONT_H +#define LOVE_FONT_FREETYPE_WRAP_FONT_H + +// LOVE +#include "common/config.h" +#include "common/runtime.h" + +namespace love +{ +namespace font +{ +namespace freetype +{ + +int w_newRasterizer(lua_State *L); +int w_newGlyphData(lua_State *L); +extern "C" LOVE_EXPORT int luaopen_love_font(lua_State *L); + +} // freetype +} // font +} // love + +#endif // LOVE_FONT_FREETYPE_WRAP_FONT_H diff --git a/src/modules/font/wrap_Font.cpp b/src/modules/font/wrap_Font.cpp index da9125f39..bbf30c866 100644 --- a/src/modules/font/wrap_Font.cpp +++ b/src/modules/font/wrap_Font.cpp @@ -1,5 +1,5 @@ /** - * Copyright (c) 2006-2014 LOVE Development Team + * 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 diff --git a/src/modules/font/wrap_Font.h b/src/modules/font/wrap_Font.h index 2f8665fec..34b64e5fd 100644 --- a/src/modules/font/wrap_Font.h +++ b/src/modules/font/wrap_Font.h @@ -1,5 +1,5 @@ /** - * Copyright (c) 2006-2014 LOVE Development Team + * 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 diff --git a/src/modules/font/wrap_GlyphData.cpp b/src/modules/font/wrap_GlyphData.cpp index 9a8bcfb60..d38e5d967 100644 --- a/src/modules/font/wrap_GlyphData.cpp +++ b/src/modules/font/wrap_GlyphData.cpp @@ -1,5 +1,5 @@ /** - * Copyright (c) 2006-2014 LOVE Development Team + * 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 diff --git a/src/modules/font/wrap_GlyphData.h b/src/modules/font/wrap_GlyphData.h index 72ed79bb0..3d485dc33 100644 --- a/src/modules/font/wrap_GlyphData.h +++ b/src/modules/font/wrap_GlyphData.h @@ -1,5 +1,5 @@ /** - * Copyright (c) 2006-2014 LOVE Development Team + * 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 diff --git a/src/modules/font/wrap_Rasterizer.cpp b/src/modules/font/wrap_Rasterizer.cpp index 99844ba86..0ba4285a7 100644 --- a/src/modules/font/wrap_Rasterizer.cpp +++ b/src/modules/font/wrap_Rasterizer.cpp @@ -1,5 +1,5 @@ /** - * Copyright (c) 2006-2014 LOVE Development Team + * 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 diff --git a/src/modules/font/wrap_Rasterizer.h b/src/modules/font/wrap_Rasterizer.h index e2b895eed..b8d6eae1f 100644 --- a/src/modules/font/wrap_Rasterizer.h +++ b/src/modules/font/wrap_Rasterizer.h @@ -1,5 +1,5 @@ /** - * Copyright (c) 2006-2014 LOVE Development Team + * 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 diff --git a/src/modules/graphics/Drawable.h b/src/modules/graphics/Drawable.h index a4cd7e2ff..8cbd80229 100644 --- a/src/modules/graphics/Drawable.h +++ b/src/modules/graphics/Drawable.h @@ -1,5 +1,5 @@ /** - * Copyright (c) 2006-2014 LOVE Development Team + * 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 diff --git a/src/modules/graphics/Graphics.cpp b/src/modules/graphics/Graphics.cpp index 1216be632..185cab66e 100644 --- a/src/modules/graphics/Graphics.cpp +++ b/src/modules/graphics/Graphics.cpp @@ -1,5 +1,5 @@ /** - * Copyright (c) 2006-2014 LOVE Development Team + * 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 diff --git a/src/modules/graphics/Graphics.h b/src/modules/graphics/Graphics.h index bf9d7a20a..1aff86a4d 100644 --- a/src/modules/graphics/Graphics.h +++ b/src/modules/graphics/Graphics.h @@ -1,5 +1,5 @@ /** - * Copyright (c) 2006-2014 LOVE Development Team + * 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 diff --git a/src/modules/graphics/Quad.cpp b/src/modules/graphics/Quad.cpp index 4f0ba472c..0eb60d1cc 100644 --- a/src/modules/graphics/Quad.cpp +++ b/src/modules/graphics/Quad.cpp @@ -1,5 +1,5 @@ /** - * Copyright (c) 2006-2014 LOVE Development Team + * 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 diff --git a/src/modules/graphics/Quad.h b/src/modules/graphics/Quad.h index d8c5ca884..99047513b 100644 --- a/src/modules/graphics/Quad.h +++ b/src/modules/graphics/Quad.h @@ -1,5 +1,5 @@ /** - * Copyright (c) 2006-2014 LOVE Development Team + * 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 diff --git a/src/modules/graphics/Texture.cpp b/src/modules/graphics/Texture.cpp index 8c00ff4f0..d1e268dd7 100644 --- a/src/modules/graphics/Texture.cpp +++ b/src/modules/graphics/Texture.cpp @@ -1,5 +1,5 @@ /** - * Copyright (c) 2006-2014 LOVE Development Team + * 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 @@ -125,6 +125,7 @@ StringMap::Entry Texture::wrapModeEnt { { "clamp", Texture::WRAP_CLAMP }, { "repeat", Texture::WRAP_REPEAT }, + { "mirroredrepeat", Texture::WRAP_MIRRORED_REPEAT }, }; StringMap Texture::wrapModes(Texture::wrapModeEntries, sizeof(Texture::wrapModeEntries)); diff --git a/src/modules/graphics/Texture.h b/src/modules/graphics/Texture.h index f9e0600a0..ce43c0127 100644 --- a/src/modules/graphics/Texture.h +++ b/src/modules/graphics/Texture.h @@ -1,5 +1,5 @@ /** - * Copyright (c) 2006-2014 LOVE Development Team + * 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 @@ -44,6 +44,7 @@ public: { WRAP_CLAMP, WRAP_REPEAT, + WRAP_MIRRORED_REPEAT, WRAP_MAX_ENUM }; diff --git a/src/modules/graphics/Volatile.cpp b/src/modules/graphics/Volatile.cpp index d97b1623a..7f53957f9 100644 --- a/src/modules/graphics/Volatile.cpp +++ b/src/modules/graphics/Volatile.cpp @@ -1,5 +1,5 @@ /** - * Copyright (c) 2006-2014 LOVE Development Team + * 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 diff --git a/src/modules/graphics/Volatile.h b/src/modules/graphics/Volatile.h index 8fa1e412e..1d7f801e5 100644 --- a/src/modules/graphics/Volatile.h +++ b/src/modules/graphics/Volatile.h @@ -1,5 +1,5 @@ /** - * Copyright (c) 2006-2014 LOVE Development Team + * 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 diff --git a/src/modules/graphics/opengl/Canvas.cpp b/src/modules/graphics/opengl/Canvas.cpp index c61dae7f2..328807322 100644 --- a/src/modules/graphics/opengl/Canvas.cpp +++ b/src/modules/graphics/opengl/Canvas.cpp @@ -1,5 +1,5 @@ /** - * Copyright (c) 2006-2014 LOVE Development Team + * 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 diff --git a/src/modules/graphics/opengl/Canvas.h b/src/modules/graphics/opengl/Canvas.h index ac2000560..a3875990f 100644 --- a/src/modules/graphics/opengl/Canvas.h +++ b/src/modules/graphics/opengl/Canvas.h @@ -1,5 +1,5 @@ /** - * Copyright (c) 2006-2014 LOVE Development Team + * 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 diff --git a/src/modules/graphics/opengl/Font.cpp b/src/modules/graphics/opengl/Font.cpp index c27bb0a16..0eed66759 100644 --- a/src/modules/graphics/opengl/Font.cpp +++ b/src/modules/graphics/opengl/Font.cpp @@ -1,5 +1,5 @@ /** - * Copyright (c) 2006-2014 LOVE Development Team + * 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 diff --git a/src/modules/graphics/opengl/Font.h b/src/modules/graphics/opengl/Font.h index cbdd8d418..0529072a2 100644 --- a/src/modules/graphics/opengl/Font.h +++ b/src/modules/graphics/opengl/Font.h @@ -1,5 +1,5 @@ /** - * Copyright (c) 2006-2014 LOVE Development Team + * 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 diff --git a/src/modules/graphics/opengl/Graphics.cpp b/src/modules/graphics/opengl/Graphics.cpp index 4e470db41..8c3e9e229 100644 --- a/src/modules/graphics/opengl/Graphics.cpp +++ b/src/modules/graphics/opengl/Graphics.cpp @@ -1,5 +1,5 @@ /** - * Copyright (c) 2006-2014 LOVE Development Team + * 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 diff --git a/src/modules/graphics/opengl/Graphics.h b/src/modules/graphics/opengl/Graphics.h index b2b4a623d..dfe494824 100644 --- a/src/modules/graphics/opengl/Graphics.h +++ b/src/modules/graphics/opengl/Graphics.h @@ -1,5 +1,5 @@ /** - * Copyright (c) 2006-2014 LOVE Development Team + * 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 diff --git a/src/modules/graphics/opengl/Image.cpp b/src/modules/graphics/opengl/Image.cpp index f24071dc1..375d41b70 100644 --- a/src/modules/graphics/opengl/Image.cpp +++ b/src/modules/graphics/opengl/Image.cpp @@ -1,5 +1,5 @@ /** - * Copyright (c) 2006-2014 LOVE Development Team + * 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 diff --git a/src/modules/graphics/opengl/Image.h b/src/modules/graphics/opengl/Image.h index 4ae382685..9a61a1ba8 100644 --- a/src/modules/graphics/opengl/Image.h +++ b/src/modules/graphics/opengl/Image.h @@ -1,5 +1,5 @@ /** - * Copyright (c) 2006-2014 LOVE Development Team + * 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 diff --git a/src/modules/graphics/opengl/Mesh.cpp b/src/modules/graphics/opengl/Mesh.cpp index af84d5c91..e7260f7bf 100644 --- a/src/modules/graphics/opengl/Mesh.cpp +++ b/src/modules/graphics/opengl/Mesh.cpp @@ -1,5 +1,5 @@ /** - * Copyright (c) 2006-2014 LOVE Development Team + * 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 diff --git a/src/modules/graphics/opengl/Mesh.h b/src/modules/graphics/opengl/Mesh.h index 5836893de..fab7daca4 100644 --- a/src/modules/graphics/opengl/Mesh.h +++ b/src/modules/graphics/opengl/Mesh.h @@ -1,5 +1,5 @@ /** - * Copyright (c) 2006-2014 LOVE Development Team + * 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 diff --git a/src/modules/graphics/opengl/OpenGL.cpp b/src/modules/graphics/opengl/OpenGL.cpp index 36d9c3e5a..6fdfc7a3e 100644 --- a/src/modules/graphics/opengl/OpenGL.cpp +++ b/src/modules/graphics/opengl/OpenGL.cpp @@ -1,5 +1,5 @@ /** - * Copyright (c) 2006-2014 LOVE Development Team + * 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 @@ -536,10 +536,12 @@ void OpenGL::setTextureWrap(const graphics::Texture::Wrap &w) switch (wmode) { case Texture::WRAP_CLAMP: + default: return GL_CLAMP_TO_EDGE; case Texture::WRAP_REPEAT: - default: return GL_REPEAT; + case Texture::WRAP_MIRRORED_REPEAT: + return GL_MIRRORED_REPEAT; } }; diff --git a/src/modules/graphics/opengl/OpenGL.h b/src/modules/graphics/opengl/OpenGL.h index f502574ef..58211c0dc 100644 --- a/src/modules/graphics/opengl/OpenGL.h +++ b/src/modules/graphics/opengl/OpenGL.h @@ -1,5 +1,5 @@ /** - * Copyright (c) 2006-2014 LOVE Development Team + * 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 diff --git a/src/modules/graphics/opengl/ParticleSystem.cpp b/src/modules/graphics/opengl/ParticleSystem.cpp index 5989ad3f6..d2a4721a3 100644 --- a/src/modules/graphics/opengl/ParticleSystem.cpp +++ b/src/modules/graphics/opengl/ParticleSystem.cpp @@ -1,5 +1,5 @@ /** - * Copyright (c) 2006-2014 LOVE Development Team + * 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 diff --git a/src/modules/graphics/opengl/ParticleSystem.h b/src/modules/graphics/opengl/ParticleSystem.h index 4dfe7003d..67a945a7e 100644 --- a/src/modules/graphics/opengl/ParticleSystem.h +++ b/src/modules/graphics/opengl/ParticleSystem.h @@ -1,5 +1,5 @@ /** - * Copyright (c) 2006-2014 LOVE Development Team + * 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 diff --git a/src/modules/graphics/opengl/Polyline.cpp b/src/modules/graphics/opengl/Polyline.cpp index 94f489f64..71249a8fd 100644 --- a/src/modules/graphics/opengl/Polyline.cpp +++ b/src/modules/graphics/opengl/Polyline.cpp @@ -1,5 +1,5 @@ /** - * Copyright (c) 2006-2014 LOVE Development Team + * 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 diff --git a/src/modules/graphics/opengl/Polyline.h b/src/modules/graphics/opengl/Polyline.h index 746bd4821..3f139cc9c 100644 --- a/src/modules/graphics/opengl/Polyline.h +++ b/src/modules/graphics/opengl/Polyline.h @@ -1,5 +1,5 @@ /** - * Copyright (c) 2006-2014 LOVE Development Team + * 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 diff --git a/src/modules/graphics/opengl/Shader.cpp b/src/modules/graphics/opengl/Shader.cpp index 71d5bff43..a5e7ae053 100644 --- a/src/modules/graphics/opengl/Shader.cpp +++ b/src/modules/graphics/opengl/Shader.cpp @@ -1,5 +1,5 @@ /** - * Copyright (c) 2006-2014 LOVE Development Team + * 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 diff --git a/src/modules/graphics/opengl/Shader.h b/src/modules/graphics/opengl/Shader.h index f09478f49..60363b2e3 100644 --- a/src/modules/graphics/opengl/Shader.h +++ b/src/modules/graphics/opengl/Shader.h @@ -1,5 +1,5 @@ /** - * Copyright (c) 2006-2014 LOVE Development Team + * 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 diff --git a/src/modules/graphics/opengl/SpriteBatch.cpp b/src/modules/graphics/opengl/SpriteBatch.cpp index 7a6dedd83..4e0c4d14c 100644 --- a/src/modules/graphics/opengl/SpriteBatch.cpp +++ b/src/modules/graphics/opengl/SpriteBatch.cpp @@ -1,5 +1,5 @@ /** - * Copyright (c) 2006-2014 LOVE Development Team + * 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 diff --git a/src/modules/graphics/opengl/SpriteBatch.h b/src/modules/graphics/opengl/SpriteBatch.h index dd9e5bfe7..89e7f75c3 100644 --- a/src/modules/graphics/opengl/SpriteBatch.h +++ b/src/modules/graphics/opengl/SpriteBatch.h @@ -1,5 +1,5 @@ /** - * Copyright (c) 2006-2014 LOVE Development Team + * 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 diff --git a/src/modules/graphics/opengl/Texture.h b/src/modules/graphics/opengl/Texture.h index 3a02decbd..e30de6960 100644 --- a/src/modules/graphics/opengl/Texture.h +++ b/src/modules/graphics/opengl/Texture.h @@ -1,5 +1,5 @@ /** - * Copyright (c) 2006-2014 LOVE Development Team + * 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 diff --git a/src/modules/graphics/opengl/VertexBuffer.cpp b/src/modules/graphics/opengl/VertexBuffer.cpp index 296acd0e4..628cce8dc 100644 --- a/src/modules/graphics/opengl/VertexBuffer.cpp +++ b/src/modules/graphics/opengl/VertexBuffer.cpp @@ -1,5 +1,5 @@ /** - * Copyright (c) 2006-2014 LOVE Development Team + * 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 diff --git a/src/modules/graphics/opengl/VertexBuffer.h b/src/modules/graphics/opengl/VertexBuffer.h index b871cc903..e3a914d8c 100644 --- a/src/modules/graphics/opengl/VertexBuffer.h +++ b/src/modules/graphics/opengl/VertexBuffer.h @@ -1,5 +1,5 @@ /** - * Copyright (c) 2006-2014 LOVE Development Team + * 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 diff --git a/src/modules/graphics/opengl/wrap_Canvas.cpp b/src/modules/graphics/opengl/wrap_Canvas.cpp index 15099f5e9..0e1a97651 100644 --- a/src/modules/graphics/opengl/wrap_Canvas.cpp +++ b/src/modules/graphics/opengl/wrap_Canvas.cpp @@ -1,5 +1,5 @@ /** - * Copyright (c) 2006-2014 LOVE Development Team + * 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 diff --git a/src/modules/graphics/opengl/wrap_Canvas.h b/src/modules/graphics/opengl/wrap_Canvas.h index 2b775f93b..1093f980f 100644 --- a/src/modules/graphics/opengl/wrap_Canvas.h +++ b/src/modules/graphics/opengl/wrap_Canvas.h @@ -1,5 +1,5 @@ /** - * Copyright (c) 2006-2014 LOVE Development Team + * 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 diff --git a/src/modules/graphics/opengl/wrap_Font.cpp b/src/modules/graphics/opengl/wrap_Font.cpp index 379a5245f..34203f070 100644 --- a/src/modules/graphics/opengl/wrap_Font.cpp +++ b/src/modules/graphics/opengl/wrap_Font.cpp @@ -1,5 +1,5 @@ /** - * Copyright (c) 2006-2014 LOVE Development Team + * 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 diff --git a/src/modules/graphics/opengl/wrap_Font.h b/src/modules/graphics/opengl/wrap_Font.h index 067e222f5..c38d2c223 100644 --- a/src/modules/graphics/opengl/wrap_Font.h +++ b/src/modules/graphics/opengl/wrap_Font.h @@ -1,5 +1,5 @@ /** - * Copyright (c) 2006-2014 LOVE Development Team + * 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 diff --git a/src/modules/graphics/opengl/wrap_Graphics.cpp b/src/modules/graphics/opengl/wrap_Graphics.cpp index 436b561cf..8ffe22496 100644 --- a/src/modules/graphics/opengl/wrap_Graphics.cpp +++ b/src/modules/graphics/opengl/wrap_Graphics.cpp @@ -1,5 +1,5 @@ /** - * Copyright (c) 2006-2014 LOVE Development Team + * 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 diff --git a/src/modules/graphics/opengl/wrap_Graphics.h b/src/modules/graphics/opengl/wrap_Graphics.h index 26a3f3e36..4ac1bf7c4 100644 --- a/src/modules/graphics/opengl/wrap_Graphics.h +++ b/src/modules/graphics/opengl/wrap_Graphics.h @@ -1,5 +1,5 @@ /** - * Copyright (c) 2006-2014 LOVE Development Team + * 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 diff --git a/src/modules/graphics/opengl/wrap_Image.cpp b/src/modules/graphics/opengl/wrap_Image.cpp index afc722b16..a18144d73 100644 --- a/src/modules/graphics/opengl/wrap_Image.cpp +++ b/src/modules/graphics/opengl/wrap_Image.cpp @@ -1,5 +1,5 @@ /** - * Copyright (c) 2006-2014 LOVE Development Team + * 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 diff --git a/src/modules/graphics/opengl/wrap_Image.h b/src/modules/graphics/opengl/wrap_Image.h index 13764d8cb..d91d81b2b 100644 --- a/src/modules/graphics/opengl/wrap_Image.h +++ b/src/modules/graphics/opengl/wrap_Image.h @@ -1,5 +1,5 @@ /** - * Copyright (c) 2006-2014 LOVE Development Team + * 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 diff --git a/src/modules/graphics/opengl/wrap_Mesh.cpp b/src/modules/graphics/opengl/wrap_Mesh.cpp index 107503b75..f3aa207ef 100644 --- a/src/modules/graphics/opengl/wrap_Mesh.cpp +++ b/src/modules/graphics/opengl/wrap_Mesh.cpp @@ -1,5 +1,5 @@ /** - * Copyright (c) 2006-2014 LOVE Development Team + * 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 diff --git a/src/modules/graphics/opengl/wrap_Mesh.h b/src/modules/graphics/opengl/wrap_Mesh.h index 60b07b853..477927d3c 100644 --- a/src/modules/graphics/opengl/wrap_Mesh.h +++ b/src/modules/graphics/opengl/wrap_Mesh.h @@ -1,5 +1,5 @@ /** - * Copyright (c) 2006-2014 LOVE Development Team + * 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 diff --git a/src/modules/graphics/opengl/wrap_ParticleSystem.cpp b/src/modules/graphics/opengl/wrap_ParticleSystem.cpp index 212dde062..5dabd336b 100644 --- a/src/modules/graphics/opengl/wrap_ParticleSystem.cpp +++ b/src/modules/graphics/opengl/wrap_ParticleSystem.cpp @@ -1,5 +1,5 @@ /** - * Copyright (c) 2006-2014 LOVE Development Team + * 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 diff --git a/src/modules/graphics/opengl/wrap_ParticleSystem.h b/src/modules/graphics/opengl/wrap_ParticleSystem.h index 3fdc62c1d..ff7b9091d 100644 --- a/src/modules/graphics/opengl/wrap_ParticleSystem.h +++ b/src/modules/graphics/opengl/wrap_ParticleSystem.h @@ -1,5 +1,5 @@ /** - * Copyright (c) 2006-2014 LOVE Development Team + * 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 diff --git a/src/modules/graphics/opengl/wrap_Quad.cpp b/src/modules/graphics/opengl/wrap_Quad.cpp index 1713ff3d1..77a2dbeb9 100644 --- a/src/modules/graphics/opengl/wrap_Quad.cpp +++ b/src/modules/graphics/opengl/wrap_Quad.cpp @@ -1,5 +1,5 @@ /** - * Copyright (c) 2006-2014 LOVE Development Team + * 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 diff --git a/src/modules/graphics/opengl/wrap_Quad.h b/src/modules/graphics/opengl/wrap_Quad.h index 3c27cf7d2..a766ecb81 100644 --- a/src/modules/graphics/opengl/wrap_Quad.h +++ b/src/modules/graphics/opengl/wrap_Quad.h @@ -1,5 +1,5 @@ /** - * Copyright (c) 2006-2014 LOVE Development Team + * 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 diff --git a/src/modules/graphics/opengl/wrap_Shader.cpp b/src/modules/graphics/opengl/wrap_Shader.cpp index 5911a253f..66f968373 100644 --- a/src/modules/graphics/opengl/wrap_Shader.cpp +++ b/src/modules/graphics/opengl/wrap_Shader.cpp @@ -1,5 +1,5 @@ /** - * Copyright (c) 2006-2014 LOVE Development Team + * 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 diff --git a/src/modules/graphics/opengl/wrap_Shader.h b/src/modules/graphics/opengl/wrap_Shader.h index f89295399..7b31c3d0f 100644 --- a/src/modules/graphics/opengl/wrap_Shader.h +++ b/src/modules/graphics/opengl/wrap_Shader.h @@ -1,5 +1,5 @@ /** - * Copyright (c) 2006-2014 LOVE Development Team + * 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 diff --git a/src/modules/graphics/opengl/wrap_SpriteBatch.cpp b/src/modules/graphics/opengl/wrap_SpriteBatch.cpp index 2b44478e7..5240c04dd 100644 --- a/src/modules/graphics/opengl/wrap_SpriteBatch.cpp +++ b/src/modules/graphics/opengl/wrap_SpriteBatch.cpp @@ -1,5 +1,5 @@ /** - * Copyright (c) 2006-2014 LOVE Development Team + * 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 diff --git a/src/modules/graphics/opengl/wrap_SpriteBatch.h b/src/modules/graphics/opengl/wrap_SpriteBatch.h index 89e1f9047..0365b62fb 100644 --- a/src/modules/graphics/opengl/wrap_SpriteBatch.h +++ b/src/modules/graphics/opengl/wrap_SpriteBatch.h @@ -1,5 +1,5 @@ /** - * Copyright (c) 2006-2014 LOVE Development Team + * 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 diff --git a/src/modules/graphics/opengl/wrap_Texture.cpp b/src/modules/graphics/opengl/wrap_Texture.cpp index 830c72659..7d6a92dad 100644 --- a/src/modules/graphics/opengl/wrap_Texture.cpp +++ b/src/modules/graphics/opengl/wrap_Texture.cpp @@ -1,5 +1,5 @@ /** - * Copyright (c) 2006-2014 LOVE Development Team + * 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 diff --git a/src/modules/graphics/opengl/wrap_Texture.h b/src/modules/graphics/opengl/wrap_Texture.h index 0ba502a62..bb9c54a05 100644 --- a/src/modules/graphics/opengl/wrap_Texture.h +++ b/src/modules/graphics/opengl/wrap_Texture.h @@ -1,5 +1,5 @@ /** - * Copyright (c) 2006-2014 LOVE Development Team + * 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 diff --git a/src/modules/image/CompressedData.cpp b/src/modules/image/CompressedData.cpp index 4c423f102..71e1647e8 100644 --- a/src/modules/image/CompressedData.cpp +++ b/src/modules/image/CompressedData.cpp @@ -1,5 +1,5 @@ /** - * Copyright (c) 2006-2014 LOVE Development Team + * 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 diff --git a/src/modules/image/CompressedData.h b/src/modules/image/CompressedData.h index 9cf9c34dd..9ddb4e211 100644 --- a/src/modules/image/CompressedData.h +++ b/src/modules/image/CompressedData.h @@ -1,5 +1,5 @@ /** - * Copyright (c) 2006-2014 LOVE Development Team + * 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 diff --git a/src/modules/image/Image.h b/src/modules/image/Image.h index bc2f85646..3558f6d65 100644 --- a/src/modules/image/Image.h +++ b/src/modules/image/Image.h @@ -1,5 +1,5 @@ /** - * Copyright (c) 2006-2014 LOVE Development Team + * 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 diff --git a/src/modules/image/ImageData.cpp b/src/modules/image/ImageData.cpp index 4264555da..212432fa3 100644 --- a/src/modules/image/ImageData.cpp +++ b/src/modules/image/ImageData.cpp @@ -1,5 +1,5 @@ /** - * Copyright (c) 2006-2014 LOVE Development Team + * 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 diff --git a/src/modules/image/ImageData.h b/src/modules/image/ImageData.h index 8a0230c20..bbf63417c 100644 --- a/src/modules/image/ImageData.h +++ b/src/modules/image/ImageData.h @@ -1,5 +1,5 @@ /** - * Copyright (c) 2006-2014 LOVE Development Team + * 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 diff --git a/src/modules/image/magpie/CompressedData.cpp b/src/modules/image/magpie/CompressedData.cpp index 2a4e46c1d..07af19ef9 100644 --- a/src/modules/image/magpie/CompressedData.cpp +++ b/src/modules/image/magpie/CompressedData.cpp @@ -1,5 +1,5 @@ /** - * Copyright (c) 2006-2014 LOVE Development Team + * 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 diff --git a/src/modules/image/magpie/CompressedData.h b/src/modules/image/magpie/CompressedData.h index bd1bc98cf..da66ee9dc 100644 --- a/src/modules/image/magpie/CompressedData.h +++ b/src/modules/image/magpie/CompressedData.h @@ -1,5 +1,5 @@ /** - * Copyright (c) 2006-2014 LOVE Development Team + * 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 diff --git a/src/modules/image/magpie/DevilHandler.cpp b/src/modules/image/magpie/DevilHandler.cpp new file mode 100644 index 000000000..12bc98d56 --- /dev/null +++ b/src/modules/image/magpie/DevilHandler.cpp @@ -0,0 +1,228 @@ +/** + * 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. + **/ + +#include "DevilHandler.h" + +// LOVE +#include "common/Exception.h" +#include "common/math.h" + +// DevIL +#include + +namespace love +{ +namespace image +{ +namespace magpie +{ + +static inline void ilxClearErrors() +{ + while (ilGetError() != IL_NO_ERROR); +} + +DevilHandler::DevilHandler() + : mutex(nullptr) +{ + // There should only ever be one DevilHandler object (owned by the Image + // module), so we can use the global initialization function here. + ilInit(); + ilEnable(IL_ORIGIN_SET); + ilOriginFunc(IL_ORIGIN_UPPER_LEFT); +} + +DevilHandler::~DevilHandler() +{ + ilShutDown(); + + if (mutex) + delete mutex; +} + +bool DevilHandler::canDecode(love::filesystem::FileData * /*data*/) +{ + // DevIL can decode a lot of formats... + return true; +} + +bool DevilHandler::canEncode(ImageData::Format format) +{ + switch (format) + { + case ImageData::FORMAT_BMP: + case ImageData::FORMAT_TGA: + case ImageData::FORMAT_JPG: + case ImageData::FORMAT_PNG: + return true; + default: + return false; + } + + return false; +} + +DevilHandler::DecodedImage DevilHandler::decode(love::filesystem::FileData *data) +{ + if (!mutex) + mutex = love::thread::newMutex(); + + love::thread::Lock lock(mutex); + + ILuint image = ilGenImage(); + ilBindImage(image); + + DecodedImage img; + + try + { + bool success = ilLoadL(IL_TYPE_UNKNOWN, (void *)data->getData(), (ILuint) data->getSize()) == IL_TRUE; + + if (!success) + throw love::Exception("Could not decode image!"); + + img.width = ilGetInteger(IL_IMAGE_WIDTH); + img.height = ilGetInteger(IL_IMAGE_HEIGHT); + + // Make sure the image is in RGBA format. + ilConvertImage(IL_RGBA, IL_UNSIGNED_BYTE); + + // This should always be four. + int bpp = ilGetInteger(IL_IMAGE_BPP); + if (bpp != sizeof(pixel)) + throw love::Exception("Could not convert image!"); + + img.size = (size_t) ilGetInteger(IL_IMAGE_SIZE_OF_DATA); + + try + { + img.data = new ILubyte[img.size]; + } + catch (std::bad_alloc &) + { + throw love::Exception("Out of memory."); + } + + memcpy(img.data, ilGetData(), img.size); + } + catch (std::exception &e) + { + // catches love and std exceptions + ilDeleteImage(image); + throw love::Exception("%s", e.what()); + } + + ilDeleteImage(image); + + return img; +} + +DevilHandler::EncodedImage DevilHandler::encode(const DecodedImage &img, ImageData::Format format) +{ + if (!mutex) + mutex = love::thread::newMutex(); + + love::thread::Lock lock(mutex); + + ILuint tempimage = ilGenImage(); + ilBindImage(tempimage); + ilxClearErrors(); + + EncodedImage encodedimage; + + try + { + bool success = ilTexImage(img.width, img.height, 1, sizeof(pixel), IL_RGBA, IL_UNSIGNED_BYTE, img.data) == IL_TRUE; + + ILenum err = ilGetError(); + ilxClearErrors(); + + if (!success) + { + if (err != IL_NO_ERROR) + { + switch (err) + { + case IL_ILLEGAL_OPERATION: + throw love::Exception("Illegal operation"); + case IL_INVALID_PARAM: + throw love::Exception("Invalid parameters"); + case IL_OUT_OF_MEMORY: + throw love::Exception("Out of memory"); + default: + throw love::Exception("Unknown error (%d)", (int) err); + } + } + + throw love::Exception("Could not create image for the encoding!"); + } + + ilRegisterOrigin(IL_ORIGIN_UPPER_LEFT); + + ILuint ilFormat; + switch (format) + { + case ImageData::FORMAT_BMP: + ilFormat = IL_BMP; + break; + case ImageData::FORMAT_TGA: + ilFormat = IL_TGA; + break; + case ImageData::FORMAT_JPG: + ilFormat = IL_JPG; + break; + case ImageData::FORMAT_PNG: + default: // PNG is the default format + ilFormat = IL_PNG; + break; + } + + encodedimage.size = ilSaveL(ilFormat, NULL, 0); + if (!encodedimage.size) + throw love::Exception("Could not encode image!"); + + try + { + encodedimage.data = new ILubyte[encodedimage.size]; + } + catch(std::bad_alloc &) + { + throw love::Exception("Out of memory"); + } + + ilSaveL(ilFormat, encodedimage.data, encodedimage.size); + } + catch (std::exception &e) + { + // Catches love and std exceptions. + ilDeleteImage(tempimage); + delete[] encodedimage.data; + encodedimage.data = 0; + throw love::Exception("%s", e.what()); + } + + ilDeleteImage(tempimage); + + return encodedimage; +} + +} // magpie +} // image +} // love diff --git a/src/modules/image/magpie/DevilHandler.h b/src/modules/image/magpie/DevilHandler.h new file mode 100644 index 000000000..ed56ab665 --- /dev/null +++ b/src/modules/image/magpie/DevilHandler.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_IMAGE_MAGPIE_DEVIL_HANDLER_H +#define LOVE_IMAGE_MAGPIE_DEVIL_HANDLER_H + +// LOVE +#include "filesystem/FileData.h" +#include "FormatHandler.h" +#include "thread/threads.h" + +namespace love +{ +namespace image +{ +namespace magpie +{ + +/** + * Interface between ImageData and DevIL. + **/ +class DevilHandler : public FormatHandler +{ +public: + + // Implements FormatHandler. + + DevilHandler(); + virtual ~DevilHandler(); + + virtual bool canDecode(love::filesystem::FileData *data); + virtual bool canEncode(ImageData::Format format); + + virtual DecodedImage decode(love::filesystem::FileData *data); + virtual EncodedImage encode(const DecodedImage &img, ImageData::Format format); + +private: + + Mutex *mutex; + +}; // DevilHandler + +} // magpie +} // image +} // love + +#endif // LOVE_IMAGE_MAGPIE_DEVIL_HANDLER_H diff --git a/src/modules/image/magpie/FormatHandler.cpp b/src/modules/image/magpie/FormatHandler.cpp index 0a9dfc61e..55781fec4 100644 --- a/src/modules/image/magpie/FormatHandler.cpp +++ b/src/modules/image/magpie/FormatHandler.cpp @@ -1,5 +1,5 @@ /** - * Copyright (c) 2006-2014 LOVE Development Team + * 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 diff --git a/src/modules/image/magpie/FormatHandler.h b/src/modules/image/magpie/FormatHandler.h index bde3d1bef..e3b1d45ad 100644 --- a/src/modules/image/magpie/FormatHandler.h +++ b/src/modules/image/magpie/FormatHandler.h @@ -1,5 +1,5 @@ /** - * Copyright (c) 2006-2014 LOVE Development Team + * 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 diff --git a/src/modules/image/magpie/Image.cpp b/src/modules/image/magpie/Image.cpp index 2537495b0..c85a71f62 100644 --- a/src/modules/image/magpie/Image.cpp +++ b/src/modules/image/magpie/Image.cpp @@ -1,5 +1,5 @@ /** - * Copyright (c) 2006-2014 LOVE Development Team + * 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 diff --git a/src/modules/image/magpie/Image.h b/src/modules/image/magpie/Image.h index 75adfc479..50809bdc3 100644 --- a/src/modules/image/magpie/Image.h +++ b/src/modules/image/magpie/Image.h @@ -1,5 +1,5 @@ /** - * Copyright (c) 2006-2014 LOVE Development Team + * 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 diff --git a/src/modules/image/magpie/ImageData.cpp b/src/modules/image/magpie/ImageData.cpp index 06cafb38a..b40a3ee24 100644 --- a/src/modules/image/magpie/ImageData.cpp +++ b/src/modules/image/magpie/ImageData.cpp @@ -1,5 +1,5 @@ /** - * Copyright (c) 2006-2014 LOVE Development Team + * 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 diff --git a/src/modules/image/magpie/ImageData.h b/src/modules/image/magpie/ImageData.h index c2bfe0061..c8dbc9459 100644 --- a/src/modules/image/magpie/ImageData.h +++ b/src/modules/image/magpie/ImageData.h @@ -1,5 +1,5 @@ /** - * Copyright (c) 2006-2014 LOVE Development Team + * 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 diff --git a/src/modules/image/magpie/JPEGHandler.cpp b/src/modules/image/magpie/JPEGHandler.cpp index bde83965b..bf134b6fe 100644 --- a/src/modules/image/magpie/JPEGHandler.cpp +++ b/src/modules/image/magpie/JPEGHandler.cpp @@ -1,5 +1,5 @@ /** - * Copyright (c) 2006-2014 LOVE Development Team + * 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 diff --git a/src/modules/image/magpie/JPEGHandler.h b/src/modules/image/magpie/JPEGHandler.h index 14e4383f1..1f314685a 100644 --- a/src/modules/image/magpie/JPEGHandler.h +++ b/src/modules/image/magpie/JPEGHandler.h @@ -1,5 +1,5 @@ /** - * Copyright (c) 2006-2014 LOVE Development Team + * 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 diff --git a/src/modules/image/magpie/PNGHandler.cpp b/src/modules/image/magpie/PNGHandler.cpp index 5f57c34e3..ae72c020c 100644 --- a/src/modules/image/magpie/PNGHandler.cpp +++ b/src/modules/image/magpie/PNGHandler.cpp @@ -1,5 +1,5 @@ /** - * Copyright (c) 2006-2014 LOVE Development Team + * 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 diff --git a/src/modules/image/magpie/PNGHandler.h b/src/modules/image/magpie/PNGHandler.h index 74f7f4753..0b6d1a771 100644 --- a/src/modules/image/magpie/PNGHandler.h +++ b/src/modules/image/magpie/PNGHandler.h @@ -1,5 +1,5 @@ /** - * Copyright (c) 2006-2014 LOVE Development Team + * 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 diff --git a/src/modules/image/magpie/STBHandler.cpp b/src/modules/image/magpie/STBHandler.cpp index 3b0ba64e1..4f1a349d3 100644 --- a/src/modules/image/magpie/STBHandler.cpp +++ b/src/modules/image/magpie/STBHandler.cpp @@ -1,5 +1,5 @@ /** - * Copyright (c) 2006-2014 LOVE Development Team + * 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 diff --git a/src/modules/image/magpie/STBHandler.h b/src/modules/image/magpie/STBHandler.h index 0c51e4d4c..2636fd65a 100644 --- a/src/modules/image/magpie/STBHandler.h +++ b/src/modules/image/magpie/STBHandler.h @@ -1,5 +1,5 @@ /** - * Copyright (c) 2006-2014 LOVE Development Team + * 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 diff --git a/src/modules/image/magpie/ddsHandler.cpp b/src/modules/image/magpie/ddsHandler.cpp index 580f6fe8e..6b02867a8 100644 --- a/src/modules/image/magpie/ddsHandler.cpp +++ b/src/modules/image/magpie/ddsHandler.cpp @@ -1,5 +1,5 @@ /** - * Copyright (c) 2006-2014 LOVE Development Team + * 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 diff --git a/src/modules/image/magpie/ddsHandler.h b/src/modules/image/magpie/ddsHandler.h index 414a3b923..91d3f399d 100644 --- a/src/modules/image/magpie/ddsHandler.h +++ b/src/modules/image/magpie/ddsHandler.h @@ -1,5 +1,5 @@ /** - * Copyright (c) 2006-2014 LOVE Development Team + * 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 diff --git a/src/modules/image/wrap_CompressedData.cpp b/src/modules/image/wrap_CompressedData.cpp index 3b0fd65ce..884d042a3 100644 --- a/src/modules/image/wrap_CompressedData.cpp +++ b/src/modules/image/wrap_CompressedData.cpp @@ -1,5 +1,5 @@ /** - * Copyright (c) 2006-2014 LOVE Development Team + * 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 diff --git a/src/modules/image/wrap_CompressedData.h b/src/modules/image/wrap_CompressedData.h index d55ec6da0..fe9d4e386 100644 --- a/src/modules/image/wrap_CompressedData.h +++ b/src/modules/image/wrap_CompressedData.h @@ -1,5 +1,5 @@ /** - * Copyright (c) 2006-2014 LOVE Development Team + * 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 diff --git a/src/modules/image/wrap_Image.cpp b/src/modules/image/wrap_Image.cpp index ffbccd105..9af041276 100644 --- a/src/modules/image/wrap_Image.cpp +++ b/src/modules/image/wrap_Image.cpp @@ -1,5 +1,5 @@ /** - * Copyright (c) 2006-2014 LOVE Development Team + * 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 diff --git a/src/modules/image/wrap_Image.h b/src/modules/image/wrap_Image.h index d1d201995..0b529ce5b 100644 --- a/src/modules/image/wrap_Image.h +++ b/src/modules/image/wrap_Image.h @@ -1,5 +1,5 @@ /** - * Copyright (c) 2006-2014 LOVE Development Team + * 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 diff --git a/src/modules/image/wrap_ImageData.cpp b/src/modules/image/wrap_ImageData.cpp index cb3c941a1..b4918fe46 100644 --- a/src/modules/image/wrap_ImageData.cpp +++ b/src/modules/image/wrap_ImageData.cpp @@ -1,5 +1,5 @@ /** - * Copyright (c) 2006-2014 LOVE Development Team + * 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 diff --git a/src/modules/image/wrap_ImageData.h b/src/modules/image/wrap_ImageData.h index a8bbd51bd..a3865b668 100644 --- a/src/modules/image/wrap_ImageData.h +++ b/src/modules/image/wrap_ImageData.h @@ -1,5 +1,5 @@ /** - * Copyright (c) 2006-2014 LOVE Development Team + * 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 diff --git a/src/modules/joystick/Joystick.cpp b/src/modules/joystick/Joystick.cpp index fb0b72428..e0f8017ec 100644 --- a/src/modules/joystick/Joystick.cpp +++ b/src/modules/joystick/Joystick.cpp @@ -1,5 +1,5 @@ /** - * Copyright (c) 2006-2014 LOVE Development Team + * 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 diff --git a/src/modules/joystick/Joystick.h b/src/modules/joystick/Joystick.h index 7f76c3a9c..b2716ab3a 100644 --- a/src/modules/joystick/Joystick.h +++ b/src/modules/joystick/Joystick.h @@ -1,5 +1,5 @@ /** - * Copyright (c) 2006-2014 LOVE Development Team + * 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 diff --git a/src/modules/joystick/JoystickModule.h b/src/modules/joystick/JoystickModule.h index 8c4ca63ba..cc3fc1409 100644 --- a/src/modules/joystick/JoystickModule.h +++ b/src/modules/joystick/JoystickModule.h @@ -1,5 +1,5 @@ /** - * Copyright (c) 2006-2014 LOVE Development Team + * 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 diff --git a/src/modules/joystick/sdl/Joystick.cpp b/src/modules/joystick/sdl/Joystick.cpp index 3ae2a03dd..2cef123bd 100644 --- a/src/modules/joystick/sdl/Joystick.cpp +++ b/src/modules/joystick/sdl/Joystick.cpp @@ -1,5 +1,5 @@ /** - * Copyright (c) 2006-2014 LOVE Development Team + * 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 diff --git a/src/modules/joystick/sdl/Joystick.h b/src/modules/joystick/sdl/Joystick.h index 6d9cdaba8..e4521a8fd 100644 --- a/src/modules/joystick/sdl/Joystick.h +++ b/src/modules/joystick/sdl/Joystick.h @@ -1,5 +1,5 @@ /** - * Copyright (c) 2006-2014 LOVE Development Team + * 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 diff --git a/src/modules/joystick/sdl/JoystickModule.cpp b/src/modules/joystick/sdl/JoystickModule.cpp index 1aefec5c2..de8fbe352 100644 --- a/src/modules/joystick/sdl/JoystickModule.cpp +++ b/src/modules/joystick/sdl/JoystickModule.cpp @@ -1,5 +1,5 @@ /** - * Copyright (c) 2006-2014 LOVE Development Team + * 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 diff --git a/src/modules/joystick/sdl/JoystickModule.h b/src/modules/joystick/sdl/JoystickModule.h index 047fedf60..af61cb797 100644 --- a/src/modules/joystick/sdl/JoystickModule.h +++ b/src/modules/joystick/sdl/JoystickModule.h @@ -1,5 +1,5 @@ /** - * Copyright (c) 2006-2014 LOVE Development Team + * 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 diff --git a/src/modules/joystick/wrap_Joystick.cpp b/src/modules/joystick/wrap_Joystick.cpp index 02e6484f5..40a67edca 100644 --- a/src/modules/joystick/wrap_Joystick.cpp +++ b/src/modules/joystick/wrap_Joystick.cpp @@ -1,5 +1,5 @@ /** - * Copyright (c) 2006-2014 LOVE Development Team + * 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 diff --git a/src/modules/joystick/wrap_Joystick.h b/src/modules/joystick/wrap_Joystick.h index 2b9205959..824de6d57 100644 --- a/src/modules/joystick/wrap_Joystick.h +++ b/src/modules/joystick/wrap_Joystick.h @@ -1,5 +1,5 @@ /** - * Copyright (c) 2006-2014 LOVE Development Team + * 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 diff --git a/src/modules/joystick/wrap_JoystickModule.cpp b/src/modules/joystick/wrap_JoystickModule.cpp index 803b5bae7..8fd3ec9b2 100644 --- a/src/modules/joystick/wrap_JoystickModule.cpp +++ b/src/modules/joystick/wrap_JoystickModule.cpp @@ -1,5 +1,5 @@ /** - * Copyright (c) 2006-2014 LOVE Development Team + * 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 diff --git a/src/modules/joystick/wrap_JoystickModule.h b/src/modules/joystick/wrap_JoystickModule.h index 5d9223e79..3bbd97fd4 100644 --- a/src/modules/joystick/wrap_JoystickModule.h +++ b/src/modules/joystick/wrap_JoystickModule.h @@ -1,5 +1,5 @@ /** - * Copyright (c) 2006-2014 LOVE Development Team + * 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 diff --git a/src/modules/keyboard/Keyboard.cpp b/src/modules/keyboard/Keyboard.cpp index 16e93005f..004691d74 100644 --- a/src/modules/keyboard/Keyboard.cpp +++ b/src/modules/keyboard/Keyboard.cpp @@ -1,5 +1,5 @@ /** - * Copyright (c) 2006-2014 LOVE Development Team + * 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 diff --git a/src/modules/keyboard/Keyboard.h b/src/modules/keyboard/Keyboard.h index 98a2177b3..e6a7e1b45 100644 --- a/src/modules/keyboard/Keyboard.h +++ b/src/modules/keyboard/Keyboard.h @@ -1,5 +1,5 @@ /** - * Copyright (c) 2006-2014 LOVE Development Team + * 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 diff --git a/src/modules/keyboard/sdl/Keyboard.cpp b/src/modules/keyboard/sdl/Keyboard.cpp index e50d176fe..b6a8a2a42 100644 --- a/src/modules/keyboard/sdl/Keyboard.cpp +++ b/src/modules/keyboard/sdl/Keyboard.cpp @@ -1,5 +1,5 @@ /** - * Copyright (c) 2006-2014 LOVE Development Team + * 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 diff --git a/src/modules/keyboard/sdl/Keyboard.h b/src/modules/keyboard/sdl/Keyboard.h index 5f5bea05b..96db50e60 100644 --- a/src/modules/keyboard/sdl/Keyboard.h +++ b/src/modules/keyboard/sdl/Keyboard.h @@ -1,5 +1,5 @@ /** - * Copyright (c) 2006-2014 LOVE Development Team + * 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 diff --git a/src/modules/keyboard/wrap_Keyboard.cpp b/src/modules/keyboard/wrap_Keyboard.cpp index 7996a2c02..e07fae101 100644 --- a/src/modules/keyboard/wrap_Keyboard.cpp +++ b/src/modules/keyboard/wrap_Keyboard.cpp @@ -1,5 +1,5 @@ /** - * Copyright (c) 2006-2014 LOVE Development Team + * 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 diff --git a/src/modules/keyboard/wrap_Keyboard.h b/src/modules/keyboard/wrap_Keyboard.h index 717f241c3..af81b9183 100644 --- a/src/modules/keyboard/wrap_Keyboard.h +++ b/src/modules/keyboard/wrap_Keyboard.h @@ -1,5 +1,5 @@ /** - * Copyright (c) 2006-2014 LOVE Development Team + * 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 diff --git a/src/modules/love/love.cpp b/src/modules/love/love.cpp index 7bb700b76..d30adc60e 100644 --- a/src/modules/love/love.cpp +++ b/src/modules/love/love.cpp @@ -1,5 +1,5 @@ /** - * Copyright (c) 2006-2014 LOVE Development Team + * 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 diff --git a/src/modules/love/love.h b/src/modules/love/love.h index c6ab3975c..a3d5f3895 100644 --- a/src/modules/love/love.h +++ b/src/modules/love/love.h @@ -1,5 +1,5 @@ /** - * Copyright (c) 2006-2014 LOVE Development Team + * 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 diff --git a/src/modules/math/BezierCurve.cpp b/src/modules/math/BezierCurve.cpp index 33c96c56f..3c1f7685a 100644 --- a/src/modules/math/BezierCurve.cpp +++ b/src/modules/math/BezierCurve.cpp @@ -1,5 +1,5 @@ /** - * Copyright (c) 2006-2014 LOVE Development Team + * 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 diff --git a/src/modules/math/BezierCurve.h b/src/modules/math/BezierCurve.h index 9370dc52f..7c06bf6ed 100644 --- a/src/modules/math/BezierCurve.h +++ b/src/modules/math/BezierCurve.h @@ -1,5 +1,5 @@ /** - * Copyright (c) 2006-2014 LOVE Development Team + * 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 diff --git a/src/modules/math/MathModule.cpp b/src/modules/math/MathModule.cpp index 2f92bf075..c9d78eb77 100644 --- a/src/modules/math/MathModule.cpp +++ b/src/modules/math/MathModule.cpp @@ -1,5 +1,5 @@ /** - * Copyright (c) 2006-2014 LOVE Development Team + * 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 diff --git a/src/modules/math/MathModule.h b/src/modules/math/MathModule.h index 69c80492f..d3e1e8cbd 100644 --- a/src/modules/math/MathModule.h +++ b/src/modules/math/MathModule.h @@ -1,5 +1,5 @@ /** - * Copyright (c) 2006-2014 LOVE Development Team + * 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 diff --git a/src/modules/math/RandomGenerator.cpp b/src/modules/math/RandomGenerator.cpp index 6b14390f9..7628c3462 100644 --- a/src/modules/math/RandomGenerator.cpp +++ b/src/modules/math/RandomGenerator.cpp @@ -1,5 +1,5 @@ /** - * Copyright (c) 2006-2014 LOVE Development Team + * 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 diff --git a/src/modules/math/RandomGenerator.h b/src/modules/math/RandomGenerator.h index aab0f9277..080df0c57 100644 --- a/src/modules/math/RandomGenerator.h +++ b/src/modules/math/RandomGenerator.h @@ -1,5 +1,5 @@ /** - * Copyright (c) 2006-2014 LOVE Development Team + * 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 diff --git a/src/modules/math/wrap_BezierCurve.cpp b/src/modules/math/wrap_BezierCurve.cpp index 659c0bd7f..0104d8311 100644 --- a/src/modules/math/wrap_BezierCurve.cpp +++ b/src/modules/math/wrap_BezierCurve.cpp @@ -1,5 +1,5 @@ /** - * Copyright (c) 2006-2014 LOVE Development Team + * 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 diff --git a/src/modules/math/wrap_BezierCurve.h b/src/modules/math/wrap_BezierCurve.h index ad0558e96..9fd0fbd12 100644 --- a/src/modules/math/wrap_BezierCurve.h +++ b/src/modules/math/wrap_BezierCurve.h @@ -1,5 +1,5 @@ /** - * Copyright (c) 2006-2014 LOVE Development Team + * 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 diff --git a/src/modules/math/wrap_Math.cpp b/src/modules/math/wrap_Math.cpp index 6e7c0195e..047699865 100644 --- a/src/modules/math/wrap_Math.cpp +++ b/src/modules/math/wrap_Math.cpp @@ -1,5 +1,5 @@ /** - * Copyright (c) 2006-2014 LOVE Development Team + * 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 @@ -247,7 +247,7 @@ int w_isConvex(lua_State *L) } } - lua_pushboolean(L, Math::instance.isConvex(vertices)); + luax_pushboolean(L, Math::instance.isConvex(vertices)); return 1; } diff --git a/src/modules/math/wrap_Math.h b/src/modules/math/wrap_Math.h index d75afe4ae..275e24974 100644 --- a/src/modules/math/wrap_Math.h +++ b/src/modules/math/wrap_Math.h @@ -1,5 +1,5 @@ /** - * Copyright (c) 2006-2014 LOVE Development Team + * 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 diff --git a/src/modules/math/wrap_RandomGenerator.cpp b/src/modules/math/wrap_RandomGenerator.cpp index 6935d8591..4b1ef5867 100644 --- a/src/modules/math/wrap_RandomGenerator.cpp +++ b/src/modules/math/wrap_RandomGenerator.cpp @@ -1,5 +1,5 @@ /** - * Copyright (c) 2006-2014 LOVE Development Team + * 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 diff --git a/src/modules/math/wrap_RandomGenerator.h b/src/modules/math/wrap_RandomGenerator.h index ad5201d17..3f84825a8 100644 --- a/src/modules/math/wrap_RandomGenerator.h +++ b/src/modules/math/wrap_RandomGenerator.h @@ -1,5 +1,5 @@ /** - * Copyright (c) 2006-2014 LOVE Development Team + * 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 diff --git a/src/modules/mouse/Cursor.cpp b/src/modules/mouse/Cursor.cpp index e1a0d717b..15e61dd5f 100644 --- a/src/modules/mouse/Cursor.cpp +++ b/src/modules/mouse/Cursor.cpp @@ -1,5 +1,5 @@ /** - * Copyright (c) 2006-2014 LOVE Development Team + * 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 diff --git a/src/modules/mouse/Cursor.h b/src/modules/mouse/Cursor.h index 08f2f17f6..44f932da5 100644 --- a/src/modules/mouse/Cursor.h +++ b/src/modules/mouse/Cursor.h @@ -1,5 +1,5 @@ /** - * Copyright (c) 2006-2014 LOVE Development Team + * 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 diff --git a/src/modules/mouse/Mouse.cpp b/src/modules/mouse/Mouse.cpp index c8eceacc9..be455058a 100644 --- a/src/modules/mouse/Mouse.cpp +++ b/src/modules/mouse/Mouse.cpp @@ -1,5 +1,5 @@ /** - * Copyright (c) 2006-2014 LOVE Development Team + * 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 diff --git a/src/modules/mouse/Mouse.h b/src/modules/mouse/Mouse.h index 663244a48..6808cb682 100644 --- a/src/modules/mouse/Mouse.h +++ b/src/modules/mouse/Mouse.h @@ -1,5 +1,5 @@ /** - * Copyright (c) 2006-2014 LOVE Development Team + * 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 @@ -71,6 +71,8 @@ public: virtual bool isVisible() const = 0; virtual void setGrabbed(bool grab) = 0; virtual bool isGrabbed() const = 0; + virtual bool setRelative(bool relative) = 0; + virtual bool isRelative() const = 0; static bool getConstant(const char *in, Button &out); static bool getConstant(Button in, const char *&out); diff --git a/src/modules/mouse/sdl/Cursor.cpp b/src/modules/mouse/sdl/Cursor.cpp index 809cd6a45..8c4511eac 100644 --- a/src/modules/mouse/sdl/Cursor.cpp +++ b/src/modules/mouse/sdl/Cursor.cpp @@ -1,5 +1,5 @@ /** - * Copyright (c) 2006-2014 LOVE Development Team + * 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 diff --git a/src/modules/mouse/sdl/Cursor.h b/src/modules/mouse/sdl/Cursor.h index de2d89da9..91c04111d 100644 --- a/src/modules/mouse/sdl/Cursor.h +++ b/src/modules/mouse/sdl/Cursor.h @@ -1,5 +1,5 @@ /** - * Copyright (c) 2006-2014 LOVE Development Team + * 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 diff --git a/src/modules/mouse/sdl/Mouse.cpp b/src/modules/mouse/sdl/Mouse.cpp index ed97d4438..277f2bb4e 100644 --- a/src/modules/mouse/sdl/Mouse.cpp +++ b/src/modules/mouse/sdl/Mouse.cpp @@ -1,5 +1,5 @@ /** - * Copyright (c) 2006-2014 LOVE Development Team + * 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 @@ -112,10 +112,18 @@ love::mouse::Cursor *Mouse::getCursor() const return curCursor.get(); } +static Uint32 GetSDLMouseState(int *x, int *y) +{ + // SDL's Linux and Windows video backends don't update the internal mouse + // state until the next PumpEvents, if SDL_WarpMouse was called previously. + SDL_PumpEvents(); + return SDL_GetMouseState(x, y); +} + int Mouse::getX() const { int x; - SDL_GetMouseState(&x, nullptr); + GetSDLMouseState(&x, nullptr); windowToPixelCoords(&x, nullptr); return x; @@ -124,7 +132,7 @@ int Mouse::getX() const int Mouse::getY() const { int y; - SDL_GetMouseState(nullptr, &y); + GetSDLMouseState(nullptr, &y); windowToPixelCoords(nullptr, &y); return y; @@ -133,7 +141,7 @@ int Mouse::getY() const void Mouse::getPosition(int &x, int &y) const { int mx, my; - SDL_GetMouseState(&mx, &my); + GetSDLMouseState(&mx, &my); windowToPixelCoords(&mx, &my); x = mx; @@ -203,6 +211,16 @@ bool Mouse::isGrabbed() const return false; } +bool Mouse::setRelative(bool relative) +{ + return SDL_SetRelativeMouseMode(relative ? SDL_TRUE : SDL_FALSE) == 0; +} + +bool Mouse::isRelative() const +{ + return SDL_GetRelativeMouseMode() != SDL_FALSE; +} + } // sdl } // mouse } // love diff --git a/src/modules/mouse/sdl/Mouse.h b/src/modules/mouse/sdl/Mouse.h index d4ec75c7a..3ec2cfab0 100644 --- a/src/modules/mouse/sdl/Mouse.h +++ b/src/modules/mouse/sdl/Mouse.h @@ -1,5 +1,5 @@ /** - * Copyright (c) 2006-2014 LOVE Development Team + * 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 @@ -64,6 +64,8 @@ public: bool isVisible() const; void setGrabbed(bool grab); bool isGrabbed() const; + bool setRelative(bool relative); + bool isRelative() const; private: diff --git a/src/modules/mouse/wrap_Cursor.cpp b/src/modules/mouse/wrap_Cursor.cpp index 240aedb5f..2bb93cfcd 100644 --- a/src/modules/mouse/wrap_Cursor.cpp +++ b/src/modules/mouse/wrap_Cursor.cpp @@ -1,5 +1,5 @@ /** - * Copyright (c) 2006-2014 LOVE Development Team + * 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 diff --git a/src/modules/mouse/wrap_Cursor.h b/src/modules/mouse/wrap_Cursor.h index a1cfaa0fa..f189dce79 100644 --- a/src/modules/mouse/wrap_Cursor.h +++ b/src/modules/mouse/wrap_Cursor.h @@ -1,5 +1,5 @@ /** - * Copyright (c) 2006-2014 LOVE Development Team + * 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 diff --git a/src/modules/mouse/wrap_Mouse.cpp b/src/modules/mouse/wrap_Mouse.cpp index 7659cf7e6..92fcbe7de 100644 --- a/src/modules/mouse/wrap_Mouse.cpp +++ b/src/modules/mouse/wrap_Mouse.cpp @@ -1,5 +1,5 @@ /** - * Copyright (c) 2006-2014 LOVE Development Team + * 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 @@ -179,6 +179,19 @@ int w_isGrabbed(lua_State *L) return 1; } +int w_setRelative(lua_State *L) +{ + bool relative = luax_toboolean(L, 1); + luax_pushboolean(L, instance()->setRelative(relative)); + return 1; +} + +int w_isRelative(lua_State *L) +{ + luax_pushboolean(L, instance()->isRelative()); + return 1; +} + // List of functions to wrap. static const luaL_Reg functions[] = { @@ -197,6 +210,8 @@ static const luaL_Reg functions[] = { "getPosition", w_getPosition }, { "setGrabbed", w_setGrabbed }, { "isGrabbed", w_isGrabbed }, + { "setRelative", w_setRelative }, + { "isRelative", w_isRelative }, { 0, 0 } }; diff --git a/src/modules/mouse/wrap_Mouse.h b/src/modules/mouse/wrap_Mouse.h index 0d1242f00..4392c741d 100644 --- a/src/modules/mouse/wrap_Mouse.h +++ b/src/modules/mouse/wrap_Mouse.h @@ -1,5 +1,5 @@ /** - * Copyright (c) 2006-2014 LOVE Development Team + * 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 @@ -45,6 +45,8 @@ int w_setVisible(lua_State *L); int w_isVisible(lua_State *L); int w_setGrabbed(lua_State *L); int w_isGrabbed(lua_State *L); +int w_setRelative(lua_State *L); +int w_isRelative(lua_State *L); extern "C" LOVE_EXPORT int luaopen_love_mouse(lua_State *L); } // mouse diff --git a/src/modules/physics/Body.cpp b/src/modules/physics/Body.cpp index 22bbb5d2c..2bfde52fc 100644 --- a/src/modules/physics/Body.cpp +++ b/src/modules/physics/Body.cpp @@ -1,5 +1,5 @@ /** - * Copyright (c) 2006-2014 LOVE Development Team + * 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 diff --git a/src/modules/physics/Body.h b/src/modules/physics/Body.h index 1f5a4c7d4..df0f2e7a1 100644 --- a/src/modules/physics/Body.h +++ b/src/modules/physics/Body.h @@ -1,5 +1,5 @@ /** - * Copyright (c) 2006-2014 LOVE Development Team + * 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 diff --git a/src/modules/physics/Joint.cpp b/src/modules/physics/Joint.cpp index e04eff112..d9cf18042 100644 --- a/src/modules/physics/Joint.cpp +++ b/src/modules/physics/Joint.cpp @@ -1,5 +1,5 @@ /** - * Copyright (c) 2006-2014 LOVE Development Team + * 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 diff --git a/src/modules/physics/Joint.h b/src/modules/physics/Joint.h index 9ab80c215..2e552b18f 100644 --- a/src/modules/physics/Joint.h +++ b/src/modules/physics/Joint.h @@ -1,5 +1,5 @@ /** - * Copyright (c) 2006-2014 LOVE Development Team + * 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 diff --git a/src/modules/physics/Shape.cpp b/src/modules/physics/Shape.cpp index bbb81b372..5368bad25 100644 --- a/src/modules/physics/Shape.cpp +++ b/src/modules/physics/Shape.cpp @@ -1,5 +1,5 @@ /** - * Copyright (c) 2006-2014 LOVE Development Team + * 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 diff --git a/src/modules/physics/Shape.h b/src/modules/physics/Shape.h index 5eb3e42e4..988592ec1 100644 --- a/src/modules/physics/Shape.h +++ b/src/modules/physics/Shape.h @@ -1,5 +1,5 @@ /** - * Copyright (c) 2006-2014 LOVE Development Team + * 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 diff --git a/src/modules/physics/box2d/Body.cpp b/src/modules/physics/box2d/Body.cpp index d5c9dd770..e6232ef92 100644 --- a/src/modules/physics/box2d/Body.cpp +++ b/src/modules/physics/box2d/Body.cpp @@ -1,5 +1,5 @@ /** - * Copyright (c) 2006-2014 LOVE Development Team + * 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 diff --git a/src/modules/physics/box2d/Body.h b/src/modules/physics/box2d/Body.h index 1a3a6d379..a27c1e9f7 100644 --- a/src/modules/physics/box2d/Body.h +++ b/src/modules/physics/box2d/Body.h @@ -1,5 +1,5 @@ /** - * Copyright (c) 2006-2014 LOVE Development Team + * 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 diff --git a/src/modules/physics/box2d/ChainShape.cpp b/src/modules/physics/box2d/ChainShape.cpp index 0ea60d033..4c778a3db 100644 --- a/src/modules/physics/box2d/ChainShape.cpp +++ b/src/modules/physics/box2d/ChainShape.cpp @@ -1,5 +1,5 @@ /** - * Copyright (c) 2006-2014 LOVE Development Team + * 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 diff --git a/src/modules/physics/box2d/ChainShape.h b/src/modules/physics/box2d/ChainShape.h index 52bb6673d..f2defdf05 100644 --- a/src/modules/physics/box2d/ChainShape.h +++ b/src/modules/physics/box2d/ChainShape.h @@ -1,5 +1,5 @@ /** - * Copyright (c) 2006-2014 LOVE Development Team + * 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 diff --git a/src/modules/physics/box2d/CircleShape.cpp b/src/modules/physics/box2d/CircleShape.cpp index 97d4c5e56..1b1e6a436 100644 --- a/src/modules/physics/box2d/CircleShape.cpp +++ b/src/modules/physics/box2d/CircleShape.cpp @@ -1,5 +1,5 @@ /** - * Copyright (c) 2006-2014 LOVE Development Team + * 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 diff --git a/src/modules/physics/box2d/CircleShape.h b/src/modules/physics/box2d/CircleShape.h index 68bf70d83..015e60a22 100644 --- a/src/modules/physics/box2d/CircleShape.h +++ b/src/modules/physics/box2d/CircleShape.h @@ -1,5 +1,5 @@ /** - * Copyright (c) 2006-2014 LOVE Development Team + * 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 diff --git a/src/modules/physics/box2d/Contact.cpp b/src/modules/physics/box2d/Contact.cpp index b3a480029..dc4638b50 100644 --- a/src/modules/physics/box2d/Contact.cpp +++ b/src/modules/physics/box2d/Contact.cpp @@ -1,5 +1,5 @@ /** - * Copyright (c) 2006-2014 LOVE Development Team + * 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 diff --git a/src/modules/physics/box2d/Contact.h b/src/modules/physics/box2d/Contact.h index 6068d3e6b..3a0dac0ae 100644 --- a/src/modules/physics/box2d/Contact.h +++ b/src/modules/physics/box2d/Contact.h @@ -1,5 +1,5 @@ /** - * Copyright (c) 2006-2014 LOVE Development Team + * 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 diff --git a/src/modules/physics/box2d/DistanceJoint.cpp b/src/modules/physics/box2d/DistanceJoint.cpp index 0f6d6262a..66882c971 100644 --- a/src/modules/physics/box2d/DistanceJoint.cpp +++ b/src/modules/physics/box2d/DistanceJoint.cpp @@ -1,5 +1,5 @@ /** - * Copyright (c) 2006-2014 LOVE Development Team + * 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 diff --git a/src/modules/physics/box2d/DistanceJoint.h b/src/modules/physics/box2d/DistanceJoint.h index c87ef982b..a36bf9959 100644 --- a/src/modules/physics/box2d/DistanceJoint.h +++ b/src/modules/physics/box2d/DistanceJoint.h @@ -1,5 +1,5 @@ /** - * Copyright (c) 2006-2014 LOVE Development Team + * 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 diff --git a/src/modules/physics/box2d/EdgeShape.cpp b/src/modules/physics/box2d/EdgeShape.cpp index 9272042aa..61439292b 100644 --- a/src/modules/physics/box2d/EdgeShape.cpp +++ b/src/modules/physics/box2d/EdgeShape.cpp @@ -1,5 +1,5 @@ /** - * Copyright (c) 2006-2014 LOVE Development Team + * 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 diff --git a/src/modules/physics/box2d/EdgeShape.h b/src/modules/physics/box2d/EdgeShape.h index a006a4e47..6980e43df 100644 --- a/src/modules/physics/box2d/EdgeShape.h +++ b/src/modules/physics/box2d/EdgeShape.h @@ -1,5 +1,5 @@ /** - * Copyright (c) 2006-2014 LOVE Development Team + * 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 diff --git a/src/modules/physics/box2d/Fixture.cpp b/src/modules/physics/box2d/Fixture.cpp index 9d5b8f6f1..92dda4918 100644 --- a/src/modules/physics/box2d/Fixture.cpp +++ b/src/modules/physics/box2d/Fixture.cpp @@ -1,5 +1,5 @@ /** - * Copyright (c) 2006-2014 LOVE Development Team + * 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 diff --git a/src/modules/physics/box2d/Fixture.h b/src/modules/physics/box2d/Fixture.h index 5564406d4..f942592cd 100644 --- a/src/modules/physics/box2d/Fixture.h +++ b/src/modules/physics/box2d/Fixture.h @@ -1,5 +1,5 @@ /** - * Copyright (c) 2006-2014 LOVE Development Team + * 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 diff --git a/src/modules/physics/box2d/FrictionJoint.cpp b/src/modules/physics/box2d/FrictionJoint.cpp index 7edc04320..2e29c6419 100644 --- a/src/modules/physics/box2d/FrictionJoint.cpp +++ b/src/modules/physics/box2d/FrictionJoint.cpp @@ -1,5 +1,5 @@ /** - * Copyright (c) 2006-2014 LOVE Development Team + * 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 diff --git a/src/modules/physics/box2d/FrictionJoint.h b/src/modules/physics/box2d/FrictionJoint.h index b2cde0de2..fd85bb7e0 100644 --- a/src/modules/physics/box2d/FrictionJoint.h +++ b/src/modules/physics/box2d/FrictionJoint.h @@ -1,5 +1,5 @@ /** - * Copyright (c) 2006-2014 LOVE Development Team + * 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 diff --git a/src/modules/physics/box2d/GearJoint.cpp b/src/modules/physics/box2d/GearJoint.cpp index 3f1e2faf6..4c2e89428 100644 --- a/src/modules/physics/box2d/GearJoint.cpp +++ b/src/modules/physics/box2d/GearJoint.cpp @@ -1,5 +1,5 @@ /** - * Copyright (c) 2006-2014 LOVE Development Team + * 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 diff --git a/src/modules/physics/box2d/GearJoint.h b/src/modules/physics/box2d/GearJoint.h index b19c4606a..39f00c091 100644 --- a/src/modules/physics/box2d/GearJoint.h +++ b/src/modules/physics/box2d/GearJoint.h @@ -1,5 +1,5 @@ /** - * Copyright (c) 2006-2014 LOVE Development Team + * 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 diff --git a/src/modules/physics/box2d/Joint.cpp b/src/modules/physics/box2d/Joint.cpp index 784750107..61aca42c8 100644 --- a/src/modules/physics/box2d/Joint.cpp +++ b/src/modules/physics/box2d/Joint.cpp @@ -1,5 +1,5 @@ /** - * Copyright (c) 2006-2014 LOVE Development Team + * 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 diff --git a/src/modules/physics/box2d/Joint.h b/src/modules/physics/box2d/Joint.h index fef54ce18..d20bb3856 100644 --- a/src/modules/physics/box2d/Joint.h +++ b/src/modules/physics/box2d/Joint.h @@ -1,5 +1,5 @@ /** - * Copyright (c) 2006-2014 LOVE Development Team + * 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 diff --git a/src/modules/physics/box2d/MotorJoint.cpp b/src/modules/physics/box2d/MotorJoint.cpp index 74d4006e4..5e8f2a744 100644 --- a/src/modules/physics/box2d/MotorJoint.cpp +++ b/src/modules/physics/box2d/MotorJoint.cpp @@ -1,5 +1,5 @@ /** - * Copyright (c) 2006-2014 LOVE Development Team + * 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 diff --git a/src/modules/physics/box2d/MotorJoint.h b/src/modules/physics/box2d/MotorJoint.h index b40626dd6..e677ca64c 100644 --- a/src/modules/physics/box2d/MotorJoint.h +++ b/src/modules/physics/box2d/MotorJoint.h @@ -1,5 +1,5 @@ /** - * Copyright (c) 2006-2014 LOVE Development Team + * 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 diff --git a/src/modules/physics/box2d/MouseJoint.cpp b/src/modules/physics/box2d/MouseJoint.cpp index bd8c1ad5e..19a15a811 100644 --- a/src/modules/physics/box2d/MouseJoint.cpp +++ b/src/modules/physics/box2d/MouseJoint.cpp @@ -1,5 +1,5 @@ /** - * Copyright (c) 2006-2014 LOVE Development Team + * 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 diff --git a/src/modules/physics/box2d/MouseJoint.h b/src/modules/physics/box2d/MouseJoint.h index f8cdef67b..d7ef72386 100644 --- a/src/modules/physics/box2d/MouseJoint.h +++ b/src/modules/physics/box2d/MouseJoint.h @@ -1,5 +1,5 @@ /** - * Copyright (c) 2006-2014 LOVE Development Team + * 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 diff --git a/src/modules/physics/box2d/Physics.cpp b/src/modules/physics/box2d/Physics.cpp index 393c93c7f..7e404496d 100644 --- a/src/modules/physics/box2d/Physics.cpp +++ b/src/modules/physics/box2d/Physics.cpp @@ -1,5 +1,5 @@ /** - * Copyright (c) 2006-2014 LOVE Development Team + * 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 diff --git a/src/modules/physics/box2d/Physics.h b/src/modules/physics/box2d/Physics.h index 2b82f7c5d..725029aed 100644 --- a/src/modules/physics/box2d/Physics.h +++ b/src/modules/physics/box2d/Physics.h @@ -1,5 +1,5 @@ /** - * Copyright (c) 2006-2014 LOVE Development Team + * 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 diff --git a/src/modules/physics/box2d/PolygonShape.cpp b/src/modules/physics/box2d/PolygonShape.cpp index 5d4c2af65..a7dd761b7 100644 --- a/src/modules/physics/box2d/PolygonShape.cpp +++ b/src/modules/physics/box2d/PolygonShape.cpp @@ -1,5 +1,5 @@ /** - * Copyright (c) 2006-2014 LOVE Development Team + * 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 diff --git a/src/modules/physics/box2d/PolygonShape.h b/src/modules/physics/box2d/PolygonShape.h index 873420301..3ee164f0c 100644 --- a/src/modules/physics/box2d/PolygonShape.h +++ b/src/modules/physics/box2d/PolygonShape.h @@ -1,5 +1,5 @@ /** - * Copyright (c) 2006-2014 LOVE Development Team + * 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 diff --git a/src/modules/physics/box2d/PrismaticJoint.cpp b/src/modules/physics/box2d/PrismaticJoint.cpp index 6621b512d..693e55f42 100644 --- a/src/modules/physics/box2d/PrismaticJoint.cpp +++ b/src/modules/physics/box2d/PrismaticJoint.cpp @@ -1,5 +1,5 @@ /** - * Copyright (c) 2006-2014 LOVE Development Team + * 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 diff --git a/src/modules/physics/box2d/PrismaticJoint.h b/src/modules/physics/box2d/PrismaticJoint.h index 609678793..5d943673c 100644 --- a/src/modules/physics/box2d/PrismaticJoint.h +++ b/src/modules/physics/box2d/PrismaticJoint.h @@ -1,5 +1,5 @@ /** - * Copyright (c) 2006-2014 LOVE Development Team + * 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 diff --git a/src/modules/physics/box2d/PulleyJoint.cpp b/src/modules/physics/box2d/PulleyJoint.cpp index b093e6616..89a1cdabc 100644 --- a/src/modules/physics/box2d/PulleyJoint.cpp +++ b/src/modules/physics/box2d/PulleyJoint.cpp @@ -1,5 +1,5 @@ /** - * Copyright (c) 2006-2014 LOVE Development Team + * 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 diff --git a/src/modules/physics/box2d/PulleyJoint.h b/src/modules/physics/box2d/PulleyJoint.h index 6d2e2beae..2a0feeb2a 100644 --- a/src/modules/physics/box2d/PulleyJoint.h +++ b/src/modules/physics/box2d/PulleyJoint.h @@ -1,5 +1,5 @@ /** - * Copyright (c) 2006-2014 LOVE Development Team + * 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 diff --git a/src/modules/physics/box2d/RevoluteJoint.cpp b/src/modules/physics/box2d/RevoluteJoint.cpp index 0acecc2ff..f90756d7b 100644 --- a/src/modules/physics/box2d/RevoluteJoint.cpp +++ b/src/modules/physics/box2d/RevoluteJoint.cpp @@ -1,5 +1,5 @@ /** - * Copyright (c) 2006-2014 LOVE Development Team + * 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 diff --git a/src/modules/physics/box2d/RevoluteJoint.h b/src/modules/physics/box2d/RevoluteJoint.h index 1a128ab1f..9723c9994 100644 --- a/src/modules/physics/box2d/RevoluteJoint.h +++ b/src/modules/physics/box2d/RevoluteJoint.h @@ -1,5 +1,5 @@ /** - * Copyright (c) 2006-2014 LOVE Development Team + * 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 diff --git a/src/modules/physics/box2d/RopeJoint.cpp b/src/modules/physics/box2d/RopeJoint.cpp index 3c83d9cd3..faf25ff70 100644 --- a/src/modules/physics/box2d/RopeJoint.cpp +++ b/src/modules/physics/box2d/RopeJoint.cpp @@ -1,5 +1,5 @@ /** - * Copyright (c) 2006-2014 LOVE Development Team + * 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 diff --git a/src/modules/physics/box2d/RopeJoint.h b/src/modules/physics/box2d/RopeJoint.h index 39f9b6460..a201e30a8 100644 --- a/src/modules/physics/box2d/RopeJoint.h +++ b/src/modules/physics/box2d/RopeJoint.h @@ -1,5 +1,5 @@ /** - * Copyright (c) 2006-2014 LOVE Development Team + * 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 diff --git a/src/modules/physics/box2d/Shape.cpp b/src/modules/physics/box2d/Shape.cpp index 690fe6f7a..e82ba15ab 100644 --- a/src/modules/physics/box2d/Shape.cpp +++ b/src/modules/physics/box2d/Shape.cpp @@ -1,5 +1,5 @@ /** - * Copyright (c) 2006-2014 LOVE Development Team + * 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 diff --git a/src/modules/physics/box2d/Shape.h b/src/modules/physics/box2d/Shape.h index db0b4d015..60ead28f9 100644 --- a/src/modules/physics/box2d/Shape.h +++ b/src/modules/physics/box2d/Shape.h @@ -1,5 +1,5 @@ /** - * Copyright (c) 2006-2014 LOVE Development Team + * 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 diff --git a/src/modules/physics/box2d/WeldJoint.cpp b/src/modules/physics/box2d/WeldJoint.cpp index 62c58eff9..e7c5e4d44 100644 --- a/src/modules/physics/box2d/WeldJoint.cpp +++ b/src/modules/physics/box2d/WeldJoint.cpp @@ -1,5 +1,5 @@ /** - * Copyright (c) 2006-2014 LOVE Development Team + * 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 diff --git a/src/modules/physics/box2d/WeldJoint.h b/src/modules/physics/box2d/WeldJoint.h index a8f91a281..414a3bdc6 100644 --- a/src/modules/physics/box2d/WeldJoint.h +++ b/src/modules/physics/box2d/WeldJoint.h @@ -1,5 +1,5 @@ /** - * Copyright (c) 2006-2014 LOVE Development Team + * 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 diff --git a/src/modules/physics/box2d/WheelJoint.cpp b/src/modules/physics/box2d/WheelJoint.cpp index 294c24e60..a1e12147e 100644 --- a/src/modules/physics/box2d/WheelJoint.cpp +++ b/src/modules/physics/box2d/WheelJoint.cpp @@ -1,5 +1,5 @@ /** - * Copyright (c) 2006-2014 LOVE Development Team + * 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 diff --git a/src/modules/physics/box2d/WheelJoint.h b/src/modules/physics/box2d/WheelJoint.h index 4a0732f36..edb9c8746 100644 --- a/src/modules/physics/box2d/WheelJoint.h +++ b/src/modules/physics/box2d/WheelJoint.h @@ -1,5 +1,5 @@ /** - * Copyright (c) 2006-2014 LOVE Development Team + * 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 diff --git a/src/modules/physics/box2d/World.cpp b/src/modules/physics/box2d/World.cpp index 2de82e550..1bafc838d 100644 --- a/src/modules/physics/box2d/World.cpp +++ b/src/modules/physics/box2d/World.cpp @@ -1,5 +1,5 @@ /** - * Copyright (c) 2006-2014 LOVE Development Team + * 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 diff --git a/src/modules/physics/box2d/World.h b/src/modules/physics/box2d/World.h index aa9445810..6e4e7da7e 100644 --- a/src/modules/physics/box2d/World.h +++ b/src/modules/physics/box2d/World.h @@ -1,5 +1,5 @@ /** - * Copyright (c) 2006-2014 LOVE Development Team + * 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 diff --git a/src/modules/physics/box2d/wrap_Body.cpp b/src/modules/physics/box2d/wrap_Body.cpp index ead95be98..786fe9cb9 100644 --- a/src/modules/physics/box2d/wrap_Body.cpp +++ b/src/modules/physics/box2d/wrap_Body.cpp @@ -1,5 +1,5 @@ /** - * Copyright (c) 2006-2014 LOVE Development Team + * 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 @@ -564,6 +564,13 @@ int w_Body_destroy(lua_State *L) return 0; } +int w_Body_isDestroyed(lua_State *L) +{ + Body *b = luax_checktype(L, 1, "Body", PHYSICS_BODY_T); + luax_pushboolean(L, b->body == nullptr); + return 1; +} + int w_Body_setUserData(lua_State *L) { Body *t = luax_checkbody(L, 1); @@ -635,6 +642,7 @@ static const luaL_Reg functions[] = { "getJointList", w_Body_getJointList }, { "getContactList", w_Body_getContactList }, { "destroy", w_Body_destroy }, + { "isDestroyed", w_Body_isDestroyed }, { "setUserData", w_Body_setUserData }, { "getUserData", w_Body_getUserData }, { 0, 0 } diff --git a/src/modules/physics/box2d/wrap_Body.h b/src/modules/physics/box2d/wrap_Body.h index d046b526d..fb28a3dc9 100644 --- a/src/modules/physics/box2d/wrap_Body.h +++ b/src/modules/physics/box2d/wrap_Body.h @@ -1,5 +1,5 @@ /** - * Copyright (c) 2006-2014 LOVE Development Team + * 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 @@ -88,6 +88,7 @@ int w_Body_getFixtureList(lua_State *L); int w_Body_getJointList(lua_State *L); int w_Body_getContactList(lua_State *L); int w_Body_destroy(lua_State *L); +int w_Body_isDestroyed(lua_State *L); int w_Body_setUserData(lua_State *L); int w_Body_getUserData(lua_State *L); extern "C" int luaopen_body(lua_State *L); diff --git a/src/modules/physics/box2d/wrap_ChainShape.cpp b/src/modules/physics/box2d/wrap_ChainShape.cpp index 5e20279c2..0f7b7b5a7 100644 --- a/src/modules/physics/box2d/wrap_ChainShape.cpp +++ b/src/modules/physics/box2d/wrap_ChainShape.cpp @@ -1,5 +1,5 @@ /** - * Copyright (c) 2006-2014 LOVE Development Team + * 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 diff --git a/src/modules/physics/box2d/wrap_ChainShape.h b/src/modules/physics/box2d/wrap_ChainShape.h index 81a6877d7..2a2f878ff 100644 --- a/src/modules/physics/box2d/wrap_ChainShape.h +++ b/src/modules/physics/box2d/wrap_ChainShape.h @@ -1,5 +1,5 @@ /** - * Copyright (c) 2006-2014 LOVE Development Team + * 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 diff --git a/src/modules/physics/box2d/wrap_CircleShape.cpp b/src/modules/physics/box2d/wrap_CircleShape.cpp index fad234c92..85610b86f 100644 --- a/src/modules/physics/box2d/wrap_CircleShape.cpp +++ b/src/modules/physics/box2d/wrap_CircleShape.cpp @@ -1,5 +1,5 @@ /** - * Copyright (c) 2006-2014 LOVE Development Team + * 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 diff --git a/src/modules/physics/box2d/wrap_CircleShape.h b/src/modules/physics/box2d/wrap_CircleShape.h index 0a37fe9de..61817332d 100644 --- a/src/modules/physics/box2d/wrap_CircleShape.h +++ b/src/modules/physics/box2d/wrap_CircleShape.h @@ -1,5 +1,5 @@ /** - * Copyright (c) 2006-2014 LOVE Development Team + * 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 diff --git a/src/modules/physics/box2d/wrap_Contact.cpp b/src/modules/physics/box2d/wrap_Contact.cpp index e51786eb9..bb02f60ca 100644 --- a/src/modules/physics/box2d/wrap_Contact.cpp +++ b/src/modules/physics/box2d/wrap_Contact.cpp @@ -1,5 +1,5 @@ /** - * Copyright (c) 2006-2014 LOVE Development Team + * 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 @@ -151,6 +151,13 @@ int w_Contact_getFixtures(lua_State *L) return 2; } +int w_Contact_isDestroyed(lua_State *L) +{ + Contact *c = luax_checktype(L, 1, "Contact", PHYSICS_CONTACT_T); + luax_pushboolean(L, !c->isValid()); + return 1; +} + extern "C" int luaopen_contact(lua_State *L) { static const luaL_Reg functions[] = @@ -170,6 +177,7 @@ extern "C" int luaopen_contact(lua_State *L) { "getTangentSpeed", w_Contact_getTangentSpeed }, { "getChildren", w_Contact_getChildren }, { "getFixtures", w_Contact_getFixtures }, + { "isDestroyed", w_Contact_isDestroyed }, { 0, 0 } }; diff --git a/src/modules/physics/box2d/wrap_Contact.h b/src/modules/physics/box2d/wrap_Contact.h index fd325c382..602d57bcc 100644 --- a/src/modules/physics/box2d/wrap_Contact.h +++ b/src/modules/physics/box2d/wrap_Contact.h @@ -1,5 +1,5 @@ /** - * Copyright (c) 2006-2014 LOVE Development Team + * 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 @@ -48,6 +48,7 @@ int w_Contact_setTangentSpeed(lua_State *L); int w_Contact_getTangentSpeed(lua_State *L); int w_Contact_getChildren(lua_State *L); int w_Contact_getFixtures(lua_State *L); +int w_Contact_isDestroyed(lua_State *L); extern "C" int luaopen_contact(lua_State *L); } // box2d diff --git a/src/modules/physics/box2d/wrap_DistanceJoint.cpp b/src/modules/physics/box2d/wrap_DistanceJoint.cpp index c98e74055..1d16d967c 100644 --- a/src/modules/physics/box2d/wrap_DistanceJoint.cpp +++ b/src/modules/physics/box2d/wrap_DistanceJoint.cpp @@ -1,5 +1,5 @@ /** - * Copyright (c) 2006-2014 LOVE Development Team + * 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 @@ -98,6 +98,7 @@ static const luaL_Reg functions[] = { "setUserData", w_Joint_setUserData }, { "getUserData", w_Joint_getUserData }, { "destroy", w_Joint_destroy }, + { "isDestroyed", w_Joint_isDestroyed }, { 0, 0 } }; diff --git a/src/modules/physics/box2d/wrap_DistanceJoint.h b/src/modules/physics/box2d/wrap_DistanceJoint.h index ae2a880d1..5b107faab 100644 --- a/src/modules/physics/box2d/wrap_DistanceJoint.h +++ b/src/modules/physics/box2d/wrap_DistanceJoint.h @@ -1,5 +1,5 @@ /** - * Copyright (c) 2006-2014 LOVE Development Team + * 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 diff --git a/src/modules/physics/box2d/wrap_EdgeShape.cpp b/src/modules/physics/box2d/wrap_EdgeShape.cpp index 8784ccdef..fb106486c 100644 --- a/src/modules/physics/box2d/wrap_EdgeShape.cpp +++ b/src/modules/physics/box2d/wrap_EdgeShape.cpp @@ -1,5 +1,5 @@ /** - * Copyright (c) 2006-2014 LOVE Development Team + * 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 diff --git a/src/modules/physics/box2d/wrap_EdgeShape.h b/src/modules/physics/box2d/wrap_EdgeShape.h index 3a1ad4b66..b77dd9bda 100644 --- a/src/modules/physics/box2d/wrap_EdgeShape.h +++ b/src/modules/physics/box2d/wrap_EdgeShape.h @@ -1,5 +1,5 @@ /** - * Copyright (c) 2006-2014 LOVE Development Team + * 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 diff --git a/src/modules/physics/box2d/wrap_Fixture.cpp b/src/modules/physics/box2d/wrap_Fixture.cpp index 23678bc9f..907cf14be 100644 --- a/src/modules/physics/box2d/wrap_Fixture.cpp +++ b/src/modules/physics/box2d/wrap_Fixture.cpp @@ -1,5 +1,5 @@ /** - * Copyright (c) 2006-2014 LOVE Development Team + * 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 @@ -262,6 +262,13 @@ int w_Fixture_destroy(lua_State *L) return 0; } +int w_Fixture_isDestroyed(lua_State *L) +{ + Fixture *f = luax_checktype(L, 1, "Fixture", PHYSICS_FIXTURE_T); + luax_pushboolean(L, !f->isValid()); + return 1; +} + static const luaL_Reg functions[] = { { "getType", w_Fixture_getType }, @@ -290,6 +297,7 @@ static const luaL_Reg functions[] = { "getGroupIndex", w_Fixture_getGroupIndex }, { "setGroupIndex", w_Fixture_setGroupIndex }, { "destroy", w_Fixture_destroy }, + { "isDestroyed", w_Fixture_isDestroyed }, { 0, 0 } }; diff --git a/src/modules/physics/box2d/wrap_Fixture.h b/src/modules/physics/box2d/wrap_Fixture.h index 4bce8e907..7c6f9a0fe 100644 --- a/src/modules/physics/box2d/wrap_Fixture.h +++ b/src/modules/physics/box2d/wrap_Fixture.h @@ -1,5 +1,5 @@ /** - * Copyright (c) 2006-2014 LOVE Development Team + * 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 @@ -60,6 +60,7 @@ int w_Fixture_getMassData(lua_State *L); int w_Fixture_getGroupIndex(lua_State *L); int w_Fixture_setGroupIndex(lua_State *L); int w_Fixture_destroy(lua_State *L); +int w_Fixture_isDestroyed(lua_State *L); extern "C" int luaopen_fixture(lua_State *L); } // box2d diff --git a/src/modules/physics/box2d/wrap_FrictionJoint.cpp b/src/modules/physics/box2d/wrap_FrictionJoint.cpp index 40e68c6bd..94de9bb1c 100644 --- a/src/modules/physics/box2d/wrap_FrictionJoint.cpp +++ b/src/modules/physics/box2d/wrap_FrictionJoint.cpp @@ -1,5 +1,5 @@ /** - * Copyright (c) 2006-2014 LOVE Development Team + * 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 @@ -82,6 +82,7 @@ static const luaL_Reg functions[] = { "setUserData", w_Joint_setUserData }, { "getUserData", w_Joint_getUserData }, { "destroy", w_Joint_destroy }, + { "isDestroyed", w_Joint_isDestroyed }, { 0, 0 } }; diff --git a/src/modules/physics/box2d/wrap_FrictionJoint.h b/src/modules/physics/box2d/wrap_FrictionJoint.h index 9b16193df..3d8184f1f 100644 --- a/src/modules/physics/box2d/wrap_FrictionJoint.h +++ b/src/modules/physics/box2d/wrap_FrictionJoint.h @@ -1,5 +1,5 @@ /** - * Copyright (c) 2006-2014 LOVE Development Team + * 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 diff --git a/src/modules/physics/box2d/wrap_GearJoint.cpp b/src/modules/physics/box2d/wrap_GearJoint.cpp index a340110d2..117331982 100644 --- a/src/modules/physics/box2d/wrap_GearJoint.cpp +++ b/src/modules/physics/box2d/wrap_GearJoint.cpp @@ -1,5 +1,5 @@ /** - * Copyright (c) 2006-2014 LOVE Development Team + * 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 @@ -82,6 +82,7 @@ static const luaL_Reg functions[] = { "setUserData", w_Joint_setUserData }, { "getUserData", w_Joint_getUserData }, { "destroy", w_Joint_destroy }, + { "isDestroyed", w_Joint_isDestroyed }, { 0, 0 } }; diff --git a/src/modules/physics/box2d/wrap_GearJoint.h b/src/modules/physics/box2d/wrap_GearJoint.h index 228c5832a..cf7ea97a3 100644 --- a/src/modules/physics/box2d/wrap_GearJoint.h +++ b/src/modules/physics/box2d/wrap_GearJoint.h @@ -1,5 +1,5 @@ /** - * Copyright (c) 2006-2014 LOVE Development Team + * 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 diff --git a/src/modules/physics/box2d/wrap_Joint.cpp b/src/modules/physics/box2d/wrap_Joint.cpp index a8ce0b314..2f7026bde 100644 --- a/src/modules/physics/box2d/wrap_Joint.cpp +++ b/src/modules/physics/box2d/wrap_Joint.cpp @@ -1,5 +1,5 @@ /** - * Copyright (c) 2006-2014 LOVE Development Team + * 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 @@ -147,6 +147,13 @@ int w_Joint_destroy(lua_State *L) return 0; } +int w_Joint_isDestroyed(lua_State *L) +{ + Joint *t = luax_checktype(L, 1, "Joint", PHYSICS_JOINT_T); + luax_pushboolean(L, !t->isValid()); + return 1; +} + static const luaL_Reg functions[] = { { "getType", w_Joint_getType }, @@ -158,6 +165,7 @@ static const luaL_Reg functions[] = { "setUserData", w_Joint_setUserData }, { "getUserData", w_Joint_getUserData }, { "destroy", w_Joint_destroy }, + { "isDestroyed", w_Joint_isDestroyed }, { 0, 0 } }; diff --git a/src/modules/physics/box2d/wrap_Joint.h b/src/modules/physics/box2d/wrap_Joint.h index 9d3ae4eb5..4bdb44441 100644 --- a/src/modules/physics/box2d/wrap_Joint.h +++ b/src/modules/physics/box2d/wrap_Joint.h @@ -1,5 +1,5 @@ /** - * Copyright (c) 2006-2014 LOVE Development Team + * 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 @@ -43,6 +43,7 @@ int w_Joint_getCollideConnected(lua_State *L); int w_Joint_setUserData(lua_State *L); int w_Joint_getUserData(lua_State *L); int w_Joint_destroy(lua_State *L); +int w_Joint_isDestroyed(lua_State *L); extern "C" int luaopen_joint(lua_State *L); } // box2d diff --git a/src/modules/physics/box2d/wrap_MotorJoint.cpp b/src/modules/physics/box2d/wrap_MotorJoint.cpp index 8baa9809b..e9ad2bc0a 100644 --- a/src/modules/physics/box2d/wrap_MotorJoint.cpp +++ b/src/modules/physics/box2d/wrap_MotorJoint.cpp @@ -1,5 +1,5 @@ /** - * Copyright (c) 2006-2014 LOVE Development Team + * 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 @@ -132,6 +132,7 @@ static const luaL_Reg functions[] = { "setUserData", w_Joint_setUserData }, { "getUserData", w_Joint_getUserData }, { "destroy", w_Joint_destroy }, + { "isDestroyed", w_Joint_isDestroyed }, { 0, 0 } }; diff --git a/src/modules/physics/box2d/wrap_MotorJoint.h b/src/modules/physics/box2d/wrap_MotorJoint.h index 59cd31fe3..c99df5572 100644 --- a/src/modules/physics/box2d/wrap_MotorJoint.h +++ b/src/modules/physics/box2d/wrap_MotorJoint.h @@ -1,5 +1,5 @@ /** - * Copyright (c) 2006-2014 LOVE Development Team + * 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 diff --git a/src/modules/physics/box2d/wrap_MouseJoint.cpp b/src/modules/physics/box2d/wrap_MouseJoint.cpp index 29b574328..5caa42db9 100644 --- a/src/modules/physics/box2d/wrap_MouseJoint.cpp +++ b/src/modules/physics/box2d/wrap_MouseJoint.cpp @@ -1,5 +1,5 @@ /** - * Copyright (c) 2006-2014 LOVE Development Team + * 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 @@ -116,6 +116,7 @@ static const luaL_Reg functions[] = { "setUserData", w_Joint_setUserData }, { "getUserData", w_Joint_getUserData }, { "destroy", w_Joint_destroy }, + { "isDestroyed", w_Joint_isDestroyed }, { 0, 0 } }; diff --git a/src/modules/physics/box2d/wrap_MouseJoint.h b/src/modules/physics/box2d/wrap_MouseJoint.h index f00049805..ca010df0f 100644 --- a/src/modules/physics/box2d/wrap_MouseJoint.h +++ b/src/modules/physics/box2d/wrap_MouseJoint.h @@ -1,5 +1,5 @@ /** - * Copyright (c) 2006-2014 LOVE Development Team + * 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 diff --git a/src/modules/physics/box2d/wrap_Physics.cpp b/src/modules/physics/box2d/wrap_Physics.cpp index e14ea8070..31edec834 100644 --- a/src/modules/physics/box2d/wrap_Physics.cpp +++ b/src/modules/physics/box2d/wrap_Physics.cpp @@ -1,5 +1,5 @@ /** - * Copyright (c) 2006-2014 LOVE Development Team + * 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 diff --git a/src/modules/physics/box2d/wrap_Physics.h b/src/modules/physics/box2d/wrap_Physics.h index 52a6bb97e..8718131ee 100644 --- a/src/modules/physics/box2d/wrap_Physics.h +++ b/src/modules/physics/box2d/wrap_Physics.h @@ -1,5 +1,5 @@ /** - * Copyright (c) 2006-2014 LOVE Development Team + * 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 diff --git a/src/modules/physics/box2d/wrap_PolygonShape.cpp b/src/modules/physics/box2d/wrap_PolygonShape.cpp index 2d371016e..336703f3c 100644 --- a/src/modules/physics/box2d/wrap_PolygonShape.cpp +++ b/src/modules/physics/box2d/wrap_PolygonShape.cpp @@ -1,5 +1,5 @@ /** - * Copyright (c) 2006-2014 LOVE Development Team + * 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 diff --git a/src/modules/physics/box2d/wrap_PolygonShape.h b/src/modules/physics/box2d/wrap_PolygonShape.h index 45a0ef018..b3f1739f6 100644 --- a/src/modules/physics/box2d/wrap_PolygonShape.h +++ b/src/modules/physics/box2d/wrap_PolygonShape.h @@ -1,5 +1,5 @@ /** - * Copyright (c) 2006-2014 LOVE Development Team + * 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 diff --git a/src/modules/physics/box2d/wrap_PrismaticJoint.cpp b/src/modules/physics/box2d/wrap_PrismaticJoint.cpp index 7c5e9ec41..04f3c6e43 100644 --- a/src/modules/physics/box2d/wrap_PrismaticJoint.cpp +++ b/src/modules/physics/box2d/wrap_PrismaticJoint.cpp @@ -1,5 +1,5 @@ /** - * Copyright (c) 2006-2014 LOVE Development Team + * 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 @@ -193,6 +193,7 @@ static const luaL_Reg functions[] = { "setUserData", w_Joint_setUserData }, { "getUserData", w_Joint_getUserData }, { "destroy", w_Joint_destroy }, + { "isDestroyed", w_Joint_isDestroyed }, { 0, 0 } }; diff --git a/src/modules/physics/box2d/wrap_PrismaticJoint.h b/src/modules/physics/box2d/wrap_PrismaticJoint.h index 8d9c90fda..2a24969ce 100644 --- a/src/modules/physics/box2d/wrap_PrismaticJoint.h +++ b/src/modules/physics/box2d/wrap_PrismaticJoint.h @@ -1,5 +1,5 @@ /** - * Copyright (c) 2006-2014 LOVE Development Team + * 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 diff --git a/src/modules/physics/box2d/wrap_PulleyJoint.cpp b/src/modules/physics/box2d/wrap_PulleyJoint.cpp index d3ffaefaf..18a7bb883 100644 --- a/src/modules/physics/box2d/wrap_PulleyJoint.cpp +++ b/src/modules/physics/box2d/wrap_PulleyJoint.cpp @@ -1,5 +1,5 @@ /** - * Copyright (c) 2006-2014 LOVE Development Team + * 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 @@ -79,6 +79,7 @@ static const luaL_Reg functions[] = { "setUserData", w_Joint_setUserData }, { "getUserData", w_Joint_getUserData }, { "destroy", w_Joint_destroy }, + { "isDestroyed", w_Joint_isDestroyed }, { 0, 0 } }; diff --git a/src/modules/physics/box2d/wrap_PulleyJoint.h b/src/modules/physics/box2d/wrap_PulleyJoint.h index 47dbe4d18..cc997d7a4 100644 --- a/src/modules/physics/box2d/wrap_PulleyJoint.h +++ b/src/modules/physics/box2d/wrap_PulleyJoint.h @@ -1,5 +1,5 @@ /** - * Copyright (c) 2006-2014 LOVE Development Team + * 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 diff --git a/src/modules/physics/box2d/wrap_RevoluteJoint.cpp b/src/modules/physics/box2d/wrap_RevoluteJoint.cpp index 3f72c41c6..f61a991fa 100644 --- a/src/modules/physics/box2d/wrap_RevoluteJoint.cpp +++ b/src/modules/physics/box2d/wrap_RevoluteJoint.cpp @@ -1,5 +1,5 @@ /** - * Copyright (c) 2006-2014 LOVE Development Team + * 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 @@ -193,6 +193,7 @@ static const luaL_Reg functions[] = { "setUserData", w_Joint_setUserData }, { "getUserData", w_Joint_getUserData }, { "destroy", w_Joint_destroy }, + { "isDestroyed", w_Joint_isDestroyed }, { 0, 0 } }; diff --git a/src/modules/physics/box2d/wrap_RevoluteJoint.h b/src/modules/physics/box2d/wrap_RevoluteJoint.h index a6b975712..efbd26fe7 100644 --- a/src/modules/physics/box2d/wrap_RevoluteJoint.h +++ b/src/modules/physics/box2d/wrap_RevoluteJoint.h @@ -1,5 +1,5 @@ /** - * Copyright (c) 2006-2014 LOVE Development Team + * 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 diff --git a/src/modules/physics/box2d/wrap_RopeJoint.cpp b/src/modules/physics/box2d/wrap_RopeJoint.cpp index 5b57bfe0d..76635873c 100644 --- a/src/modules/physics/box2d/wrap_RopeJoint.cpp +++ b/src/modules/physics/box2d/wrap_RopeJoint.cpp @@ -1,5 +1,5 @@ /** - * Copyright (c) 2006-2014 LOVE Development Team + * 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 @@ -55,6 +55,7 @@ static const luaL_Reg functions[] = { "setUserData", w_Joint_setUserData }, { "getUserData", w_Joint_getUserData }, { "destroy", w_Joint_destroy }, + { "isDestroyed", w_Joint_isDestroyed }, { 0, 0 } }; diff --git a/src/modules/physics/box2d/wrap_RopeJoint.h b/src/modules/physics/box2d/wrap_RopeJoint.h index bf6c093cc..f77b6c4f8 100644 --- a/src/modules/physics/box2d/wrap_RopeJoint.h +++ b/src/modules/physics/box2d/wrap_RopeJoint.h @@ -1,5 +1,5 @@ /** - * Copyright (c) 2006-2014 LOVE Development Team + * 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 diff --git a/src/modules/physics/box2d/wrap_Shape.cpp b/src/modules/physics/box2d/wrap_Shape.cpp index c4d7679ba..da58bd138 100644 --- a/src/modules/physics/box2d/wrap_Shape.cpp +++ b/src/modules/physics/box2d/wrap_Shape.cpp @@ -1,5 +1,5 @@ /** - * Copyright (c) 2006-2014 LOVE Development Team + * 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 diff --git a/src/modules/physics/box2d/wrap_Shape.h b/src/modules/physics/box2d/wrap_Shape.h index bc992f469..62cbc078d 100644 --- a/src/modules/physics/box2d/wrap_Shape.h +++ b/src/modules/physics/box2d/wrap_Shape.h @@ -1,5 +1,5 @@ /** - * Copyright (c) 2006-2014 LOVE Development Team + * 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 diff --git a/src/modules/physics/box2d/wrap_WeldJoint.cpp b/src/modules/physics/box2d/wrap_WeldJoint.cpp index 7c597dcca..5c4a2a6d4 100644 --- a/src/modules/physics/box2d/wrap_WeldJoint.cpp +++ b/src/modules/physics/box2d/wrap_WeldJoint.cpp @@ -1,5 +1,5 @@ /** - * Copyright (c) 2006-2014 LOVE Development Team + * 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 @@ -81,6 +81,7 @@ static const luaL_Reg functions[] = { "setUserData", w_Joint_setUserData }, { "getUserData", w_Joint_getUserData }, { "destroy", w_Joint_destroy }, + { "isDestroyed", w_Joint_isDestroyed }, { 0, 0 } }; diff --git a/src/modules/physics/box2d/wrap_WeldJoint.h b/src/modules/physics/box2d/wrap_WeldJoint.h index 52fedab92..855888123 100644 --- a/src/modules/physics/box2d/wrap_WeldJoint.h +++ b/src/modules/physics/box2d/wrap_WeldJoint.h @@ -1,5 +1,5 @@ /** - * Copyright (c) 2006-2014 LOVE Development Team + * 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 diff --git a/src/modules/physics/box2d/wrap_WheelJoint.cpp b/src/modules/physics/box2d/wrap_WheelJoint.cpp index ad30fea2b..8ccea3a1a 100644 --- a/src/modules/physics/box2d/wrap_WheelJoint.cpp +++ b/src/modules/physics/box2d/wrap_WheelJoint.cpp @@ -1,5 +1,5 @@ /** - * Copyright (c) 2006-2014 LOVE Development Team + * 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 @@ -157,6 +157,7 @@ static const luaL_Reg functions[] = { "setUserData", w_Joint_setUserData }, { "getUserData", w_Joint_getUserData }, { "destroy", w_Joint_destroy }, + { "isDestroyed", w_Joint_isDestroyed }, { 0, 0 } }; diff --git a/src/modules/physics/box2d/wrap_WheelJoint.h b/src/modules/physics/box2d/wrap_WheelJoint.h index 0cd8c68f1..4a3fe60ce 100644 --- a/src/modules/physics/box2d/wrap_WheelJoint.h +++ b/src/modules/physics/box2d/wrap_WheelJoint.h @@ -1,5 +1,5 @@ /** - * Copyright (c) 2006-2014 LOVE Development Team + * 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 diff --git a/src/modules/physics/box2d/wrap_World.cpp b/src/modules/physics/box2d/wrap_World.cpp index 775f6ecf5..7b433425b 100644 --- a/src/modules/physics/box2d/wrap_World.cpp +++ b/src/modules/physics/box2d/wrap_World.cpp @@ -1,5 +1,5 @@ /** - * Copyright (c) 2006-2014 LOVE Development Team + * 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 @@ -189,6 +189,13 @@ int w_World_destroy(lua_State *L) return 0; } +int w_World_isDestroyed(lua_State *L) +{ + World *w = luax_checktype(L, 1, "World", PHYSICS_WORLD_T); + luax_pushboolean(L, !w->isValid()); + return 1; +} + static const luaL_Reg functions[] = { @@ -212,6 +219,7 @@ static const luaL_Reg functions[] = { "queryBoundingBox", w_World_queryBoundingBox }, { "rayCast", w_World_rayCast }, { "destroy", w_World_destroy }, + { "isDestroyed", w_World_isDestroyed }, { 0, 0 } }; diff --git a/src/modules/physics/box2d/wrap_World.h b/src/modules/physics/box2d/wrap_World.h index 1a5d15c2c..c09dff7a1 100644 --- a/src/modules/physics/box2d/wrap_World.h +++ b/src/modules/physics/box2d/wrap_World.h @@ -1,5 +1,5 @@ /** - * Copyright (c) 2006-2014 LOVE Development Team + * 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 @@ -55,6 +55,7 @@ int w_World_getContactList(lua_State *L); int w_World_queryBoundingBox(lua_State *L); int w_World_rayCast(lua_State *L); int w_World_destroy(lua_State *L); +int w_World_isDestroyed(lua_State *L); extern "C" int luaopen_world(lua_State *L); } // box2d diff --git a/src/modules/sound/Decoder.h b/src/modules/sound/Decoder.h index eede6efcc..0c5de3155 100644 --- a/src/modules/sound/Decoder.h +++ b/src/modules/sound/Decoder.h @@ -1,5 +1,5 @@ /** - * Copyright (c) 2006-2014 LOVE Development Team + * 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 diff --git a/src/modules/sound/Sound.cpp b/src/modules/sound/Sound.cpp index afe4199d5..3e61dd901 100644 --- a/src/modules/sound/Sound.cpp +++ b/src/modules/sound/Sound.cpp @@ -1,5 +1,5 @@ /** - * Copyright (c) 2006-2014 LOVE Development Team + * 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 diff --git a/src/modules/sound/Sound.h b/src/modules/sound/Sound.h index b6b093f18..baa85a766 100644 --- a/src/modules/sound/Sound.h +++ b/src/modules/sound/Sound.h @@ -1,5 +1,5 @@ /** - * Copyright (c) 2006-2014 LOVE Development Team + * 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 diff --git a/src/modules/sound/SoundData.cpp b/src/modules/sound/SoundData.cpp index 81b5f5f5c..91aedb791 100644 --- a/src/modules/sound/SoundData.cpp +++ b/src/modules/sound/SoundData.cpp @@ -1,5 +1,5 @@ /** - * Copyright (c) 2006-2014 LOVE Development Team + * 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 diff --git a/src/modules/sound/SoundData.h b/src/modules/sound/SoundData.h index 1a06e6964..21c770aa8 100644 --- a/src/modules/sound/SoundData.h +++ b/src/modules/sound/SoundData.h @@ -1,5 +1,5 @@ /** - * Copyright (c) 2006-2014 LOVE Development Team + * 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 diff --git a/src/modules/sound/lullaby/Decoder.cpp b/src/modules/sound/lullaby/Decoder.cpp index 62fc45780..fcbe4de5a 100644 --- a/src/modules/sound/lullaby/Decoder.cpp +++ b/src/modules/sound/lullaby/Decoder.cpp @@ -1,5 +1,5 @@ /** - * Copyright (c) 2006-2014 LOVE Development Team + * 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 diff --git a/src/modules/sound/lullaby/Decoder.h b/src/modules/sound/lullaby/Decoder.h index ae9571505..70a34303f 100644 --- a/src/modules/sound/lullaby/Decoder.h +++ b/src/modules/sound/lullaby/Decoder.h @@ -1,5 +1,5 @@ /** - * Copyright (c) 2006-2014 LOVE Development Team + * 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 diff --git a/src/modules/sound/lullaby/FLACDecoder.cpp b/src/modules/sound/lullaby/FLACDecoder.cpp index aa6bcd8bf..6504c9b45 100644 --- a/src/modules/sound/lullaby/FLACDecoder.cpp +++ b/src/modules/sound/lullaby/FLACDecoder.cpp @@ -1,5 +1,5 @@ /** - * Copyright (c) 2006-2014 LOVE Development Team + * 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 diff --git a/src/modules/sound/lullaby/FLACDecoder.h b/src/modules/sound/lullaby/FLACDecoder.h index 61ed54051..eaf61b605 100644 --- a/src/modules/sound/lullaby/FLACDecoder.h +++ b/src/modules/sound/lullaby/FLACDecoder.h @@ -1,5 +1,5 @@ /** - * Copyright (c) 2006-2014 LOVE Development Team + * 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 diff --git a/src/modules/sound/lullaby/GmeDecoder.cpp b/src/modules/sound/lullaby/GmeDecoder.cpp index a3131570d..d7bd8b2de 100644 --- a/src/modules/sound/lullaby/GmeDecoder.cpp +++ b/src/modules/sound/lullaby/GmeDecoder.cpp @@ -1,5 +1,5 @@ /** - * Copyright (c) 2006-2014 LOVE Development Team + * 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 diff --git a/src/modules/sound/lullaby/GmeDecoder.h b/src/modules/sound/lullaby/GmeDecoder.h index d5c94941e..422d0f316 100644 --- a/src/modules/sound/lullaby/GmeDecoder.h +++ b/src/modules/sound/lullaby/GmeDecoder.h @@ -1,5 +1,5 @@ /** - * Copyright (c) 2006-2014 LOVE Development Team + * 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 diff --git a/src/modules/sound/lullaby/ModPlugDecoder.cpp b/src/modules/sound/lullaby/ModPlugDecoder.cpp index ce62b4acd..1ccf74c7a 100644 --- a/src/modules/sound/lullaby/ModPlugDecoder.cpp +++ b/src/modules/sound/lullaby/ModPlugDecoder.cpp @@ -1,5 +1,5 @@ /** - * Copyright (c) 2006-2014 LOVE Development Team + * 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 diff --git a/src/modules/sound/lullaby/ModPlugDecoder.h b/src/modules/sound/lullaby/ModPlugDecoder.h index d102fa429..cee3340fb 100644 --- a/src/modules/sound/lullaby/ModPlugDecoder.h +++ b/src/modules/sound/lullaby/ModPlugDecoder.h @@ -1,5 +1,5 @@ /** - * Copyright (c) 2006-2014 LOVE Development Team + * 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 diff --git a/src/modules/sound/lullaby/Mpg123Decoder.cpp b/src/modules/sound/lullaby/Mpg123Decoder.cpp index 1f4a58f08..a0913efcf 100644 --- a/src/modules/sound/lullaby/Mpg123Decoder.cpp +++ b/src/modules/sound/lullaby/Mpg123Decoder.cpp @@ -1,5 +1,5 @@ /** - * Copyright (c) 2006-2014 LOVE Development Team + * 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 diff --git a/src/modules/sound/lullaby/Mpg123Decoder.h b/src/modules/sound/lullaby/Mpg123Decoder.h index 049380fd4..d5d0f77dd 100644 --- a/src/modules/sound/lullaby/Mpg123Decoder.h +++ b/src/modules/sound/lullaby/Mpg123Decoder.h @@ -1,5 +1,5 @@ /** - * Copyright (c) 2006-2014 LOVE Development Team + * 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 diff --git a/src/modules/sound/lullaby/Sound.cpp b/src/modules/sound/lullaby/Sound.cpp index 993602006..54a0a61f6 100644 --- a/src/modules/sound/lullaby/Sound.cpp +++ b/src/modules/sound/lullaby/Sound.cpp @@ -1,5 +1,5 @@ /** - * Copyright (c) 2006-2014 LOVE Development Team + * 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 diff --git a/src/modules/sound/lullaby/Sound.h b/src/modules/sound/lullaby/Sound.h index 15e38a45d..329a586ff 100644 --- a/src/modules/sound/lullaby/Sound.h +++ b/src/modules/sound/lullaby/Sound.h @@ -1,5 +1,5 @@ /** - * Copyright (c) 2006-2014 LOVE Development Team + * 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 diff --git a/src/modules/sound/lullaby/VorbisDecoder.cpp b/src/modules/sound/lullaby/VorbisDecoder.cpp index 052519204..20f32c3c6 100644 --- a/src/modules/sound/lullaby/VorbisDecoder.cpp +++ b/src/modules/sound/lullaby/VorbisDecoder.cpp @@ -1,5 +1,5 @@ /** - * Copyright (c) 2006-2014 LOVE Development Team + * 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 diff --git a/src/modules/sound/lullaby/VorbisDecoder.h b/src/modules/sound/lullaby/VorbisDecoder.h index d5297992d..ea6f26970 100644 --- a/src/modules/sound/lullaby/VorbisDecoder.h +++ b/src/modules/sound/lullaby/VorbisDecoder.h @@ -1,5 +1,5 @@ /** - * Copyright (c) 2006-2014 LOVE Development Team + * 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 diff --git a/src/modules/sound/lullaby/WaveDecoder.cpp b/src/modules/sound/lullaby/WaveDecoder.cpp index 5dce78e9d..b04ec12b3 100644 --- a/src/modules/sound/lullaby/WaveDecoder.cpp +++ b/src/modules/sound/lullaby/WaveDecoder.cpp @@ -1,5 +1,5 @@ /** - * Copyright (c) 2006-2014 LOVE Development Team + * 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 diff --git a/src/modules/sound/lullaby/WaveDecoder.h b/src/modules/sound/lullaby/WaveDecoder.h index d94157f30..1f0d9d56f 100644 --- a/src/modules/sound/lullaby/WaveDecoder.h +++ b/src/modules/sound/lullaby/WaveDecoder.h @@ -1,5 +1,5 @@ /** - * Copyright (c) 2006-2014 LOVE Development Team + * 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 diff --git a/src/modules/sound/wrap_Decoder.cpp b/src/modules/sound/wrap_Decoder.cpp index 63f61d6ed..616afb0f2 100644 --- a/src/modules/sound/wrap_Decoder.cpp +++ b/src/modules/sound/wrap_Decoder.cpp @@ -1,5 +1,5 @@ /** - * Copyright (c) 2006-2014 LOVE Development Team + * 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 diff --git a/src/modules/sound/wrap_Decoder.h b/src/modules/sound/wrap_Decoder.h index 1c1cd4c73..7ae77e2b7 100644 --- a/src/modules/sound/wrap_Decoder.h +++ b/src/modules/sound/wrap_Decoder.h @@ -1,5 +1,5 @@ /** - * Copyright (c) 2006-2014 LOVE Development Team + * 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 diff --git a/src/modules/sound/wrap_Sound.cpp b/src/modules/sound/wrap_Sound.cpp index d1efeb1ea..08d8549ec 100644 --- a/src/modules/sound/wrap_Sound.cpp +++ b/src/modules/sound/wrap_Sound.cpp @@ -1,5 +1,5 @@ /** - * Copyright (c) 2006-2014 LOVE Development Team + * 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 diff --git a/src/modules/sound/wrap_Sound.h b/src/modules/sound/wrap_Sound.h index 2c4edb357..39efb5006 100644 --- a/src/modules/sound/wrap_Sound.h +++ b/src/modules/sound/wrap_Sound.h @@ -1,5 +1,5 @@ /** - * Copyright (c) 2006-2014 LOVE Development Team + * 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 diff --git a/src/modules/sound/wrap_SoundData.cpp b/src/modules/sound/wrap_SoundData.cpp index dee6db00e..951ab58c6 100644 --- a/src/modules/sound/wrap_SoundData.cpp +++ b/src/modules/sound/wrap_SoundData.cpp @@ -1,5 +1,5 @@ /** - * Copyright (c) 2006-2014 LOVE Development Team + * 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 diff --git a/src/modules/sound/wrap_SoundData.h b/src/modules/sound/wrap_SoundData.h index 8fdf30e06..c22ac0b32 100644 --- a/src/modules/sound/wrap_SoundData.h +++ b/src/modules/sound/wrap_SoundData.h @@ -1,5 +1,5 @@ /** - * Copyright (c) 2006-2014 LOVE Development Team + * 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 diff --git a/src/modules/system/System.cpp b/src/modules/system/System.cpp index 8b1367f8b..d1266367d 100755 --- a/src/modules/system/System.cpp +++ b/src/modules/system/System.cpp @@ -1,5 +1,5 @@ /** - * Copyright (c) 2006-2014 LOVE Development Team + * 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 diff --git a/src/modules/system/System.h b/src/modules/system/System.h index fb12b22fc..6d7887b68 100644 --- a/src/modules/system/System.h +++ b/src/modules/system/System.h @@ -1,5 +1,5 @@ /** - * Copyright (c) 2006-2014 LOVE Development Team + * 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 diff --git a/src/modules/system/sdl/System.cpp b/src/modules/system/sdl/System.cpp index 639d78217..9b0562e84 100644 --- a/src/modules/system/sdl/System.cpp +++ b/src/modules/system/sdl/System.cpp @@ -1,5 +1,5 @@ /** - * Copyright (c) 2006-2014 LOVE Development Team + * 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 diff --git a/src/modules/system/sdl/System.h b/src/modules/system/sdl/System.h index 78e87a364..cd35cea5d 100644 --- a/src/modules/system/sdl/System.h +++ b/src/modules/system/sdl/System.h @@ -1,5 +1,5 @@ /** - * Copyright (c) 2006-2014 LOVE Development Team + * 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 diff --git a/src/modules/system/wrap_System.cpp b/src/modules/system/wrap_System.cpp index 1b344ab5d..547356808 100644 --- a/src/modules/system/wrap_System.cpp +++ b/src/modules/system/wrap_System.cpp @@ -1,5 +1,5 @@ /** - * Copyright (c) 2006-2014 LOVE Development Team + * 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 diff --git a/src/modules/system/wrap_System.h b/src/modules/system/wrap_System.h index 9d89240a8..090879709 100644 --- a/src/modules/system/wrap_System.h +++ b/src/modules/system/wrap_System.h @@ -1,5 +1,5 @@ /** - * Copyright (c) 2006-2014 LOVE Development Team + * 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 diff --git a/src/modules/thread/Channel.cpp b/src/modules/thread/Channel.cpp index 1e8532b34..18fd5f190 100644 --- a/src/modules/thread/Channel.cpp +++ b/src/modules/thread/Channel.cpp @@ -1,5 +1,5 @@ /** - * Copyright (c) 2006-2014 LOVE Development Team + * 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 diff --git a/src/modules/thread/Channel.h b/src/modules/thread/Channel.h index 3e9781d12..f1174e017 100644 --- a/src/modules/thread/Channel.h +++ b/src/modules/thread/Channel.h @@ -1,5 +1,5 @@ /** - * Copyright (c) 2006-2014 LOVE Development Team + * 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 diff --git a/src/modules/thread/LuaThread.cpp b/src/modules/thread/LuaThread.cpp index 5bb6515ea..af5510c42 100644 --- a/src/modules/thread/LuaThread.cpp +++ b/src/modules/thread/LuaThread.cpp @@ -1,5 +1,5 @@ /** - * Copyright (c) 2006-2014 LOVE Development Team + * 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 diff --git a/src/modules/thread/LuaThread.h b/src/modules/thread/LuaThread.h index 122c2cc11..375f9c5c3 100644 --- a/src/modules/thread/LuaThread.h +++ b/src/modules/thread/LuaThread.h @@ -1,5 +1,5 @@ /** - * Copyright (c) 2006-2014 LOVE Development Team + * 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 diff --git a/src/modules/thread/Thread.h b/src/modules/thread/Thread.h index 7adaeda9d..37cf3790b 100644 --- a/src/modules/thread/Thread.h +++ b/src/modules/thread/Thread.h @@ -1,5 +1,5 @@ /** - * Copyright (c) 2006-2014 LOVE Development Team + * 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 diff --git a/src/modules/thread/ThreadModule.cpp b/src/modules/thread/ThreadModule.cpp index 6e433bcbf..aec250da4 100644 --- a/src/modules/thread/ThreadModule.cpp +++ b/src/modules/thread/ThreadModule.cpp @@ -1,5 +1,5 @@ /** - * Copyright (c) 2006-2014 LOVE Development Team + * 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 diff --git a/src/modules/thread/ThreadModule.h b/src/modules/thread/ThreadModule.h index 9fe0bcaa8..91f56dd87 100644 --- a/src/modules/thread/ThreadModule.h +++ b/src/modules/thread/ThreadModule.h @@ -1,5 +1,5 @@ /** - * Copyright (c) 2006-2014 LOVE Development Team + * 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 diff --git a/src/modules/thread/sdl/Thread.cpp b/src/modules/thread/sdl/Thread.cpp index c6a6dc619..e7fdf8b71 100644 --- a/src/modules/thread/sdl/Thread.cpp +++ b/src/modules/thread/sdl/Thread.cpp @@ -1,5 +1,5 @@ /** - * Copyright (c) 2006-2014 LOVE Development Team + * 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 diff --git a/src/modules/thread/sdl/Thread.h b/src/modules/thread/sdl/Thread.h index ea1f48dee..caf09d839 100644 --- a/src/modules/thread/sdl/Thread.h +++ b/src/modules/thread/sdl/Thread.h @@ -1,5 +1,5 @@ /** - * Copyright (c) 2006-2014 LOVE Development Team + * 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 diff --git a/src/modules/thread/sdl/threads.cpp b/src/modules/thread/sdl/threads.cpp index f40cc265d..64ffd3cdd 100644 --- a/src/modules/thread/sdl/threads.cpp +++ b/src/modules/thread/sdl/threads.cpp @@ -1,5 +1,5 @@ /** - * Copyright (c) 2006-2014 LOVE Development Team + * 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 diff --git a/src/modules/thread/sdl/threads.h b/src/modules/thread/sdl/threads.h index 9916784db..d2459f973 100644 --- a/src/modules/thread/sdl/threads.h +++ b/src/modules/thread/sdl/threads.h @@ -1,5 +1,5 @@ /** - * Copyright (c) 2006-2014 LOVE Development Team + * 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 diff --git a/src/modules/thread/threads.cpp b/src/modules/thread/threads.cpp index 9abeb5899..86bd1fcf4 100644 --- a/src/modules/thread/threads.cpp +++ b/src/modules/thread/threads.cpp @@ -1,5 +1,5 @@ /** - * Copyright (c) 2006-2014 LOVE Development Team + * 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 diff --git a/src/modules/thread/threads.h b/src/modules/thread/threads.h index 516abae98..87f434d51 100644 --- a/src/modules/thread/threads.h +++ b/src/modules/thread/threads.h @@ -1,5 +1,5 @@ /** - * Copyright (c) 2006-2014 LOVE Development Team + * 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 diff --git a/src/modules/thread/wrap_Channel.h b/src/modules/thread/wrap_Channel.h index 14473ea63..9df123518 100644 --- a/src/modules/thread/wrap_Channel.h +++ b/src/modules/thread/wrap_Channel.h @@ -1,5 +1,5 @@ /** - * Copyright (c) 2006-2014 LOVE Development Team + * 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 diff --git a/src/modules/thread/wrap_LuaThread.h b/src/modules/thread/wrap_LuaThread.h index 6be1be722..09474c542 100644 --- a/src/modules/thread/wrap_LuaThread.h +++ b/src/modules/thread/wrap_LuaThread.h @@ -1,5 +1,5 @@ /** - * Copyright (c) 2006-2014 LOVE Development Team + * 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 diff --git a/src/modules/thread/wrap_ThreadModule.cpp b/src/modules/thread/wrap_ThreadModule.cpp index 769867b42..d0123d65d 100644 --- a/src/modules/thread/wrap_ThreadModule.cpp +++ b/src/modules/thread/wrap_ThreadModule.cpp @@ -27,6 +27,9 @@ #include "filesystem/File.h" #include "filesystem/FileData.h" +// C +#include + namespace love { namespace thread @@ -37,9 +40,28 @@ namespace thread int w_newThread(lua_State *L) { std::string name = "Thread code"; - love::Data *data = 0; + love::Data *data = nullptr; - if (lua_isstring(L, 1) || luax_istype(L, 1, FILESYSTEM_FILE_T)) + if (lua_isstring(L, 1)) + { + size_t slen = 0; + const char *str = lua_tolstring(L, 1, &slen); + + // Treat the string as Lua code if it's long or has a newline. + if (slen >= 1024 || memchr(str, '\n', slen)) + { + // Construct a FileData from the string. + lua_pushvalue(L, 1); + lua_pushstring(L, "string"); + int idxs[] = {lua_gettop(L) - 1, lua_gettop(L)}; + luax_convobj(L, idxs, 2, "filesystem", "newFileData"); + lua_pop(L, 1); + lua_replace(L, 1); + } + else + luax_convobj(L, 1, "filesystem", "newFileData"); + } + else if (luax_istype(L, 1, FILESYSTEM_FILE_T)) luax_convobj(L, 1, "filesystem", "newFileData"); if (luax_istype(L, 1, FILESYSTEM_FILE_DATA_T)) diff --git a/src/modules/thread/wrap_ThreadModule.h b/src/modules/thread/wrap_ThreadModule.h index 750b9fca9..f2298ba8b 100644 --- a/src/modules/thread/wrap_ThreadModule.h +++ b/src/modules/thread/wrap_ThreadModule.h @@ -1,5 +1,5 @@ /** - * Copyright (c) 2006-2014 LOVE Development Team + * 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 diff --git a/src/modules/timer/Timer.h b/src/modules/timer/Timer.h index 9290f7ba0..853220606 100644 --- a/src/modules/timer/Timer.h +++ b/src/modules/timer/Timer.h @@ -1,5 +1,5 @@ /** - * Copyright (c) 2006-2014 LOVE Development Team + * 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 diff --git a/src/modules/timer/sdl/Timer.cpp b/src/modules/timer/sdl/Timer.cpp index 1a25983ef..d710cb169 100644 --- a/src/modules/timer/sdl/Timer.cpp +++ b/src/modules/timer/sdl/Timer.cpp @@ -1,5 +1,5 @@ /** - * Copyright (c) 2006-2014 LOVE Development Team + * 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 diff --git a/src/modules/timer/sdl/Timer.h b/src/modules/timer/sdl/Timer.h index 3805899a8..e4b13feff 100644 --- a/src/modules/timer/sdl/Timer.h +++ b/src/modules/timer/sdl/Timer.h @@ -1,5 +1,5 @@ /** - * Copyright (c) 2006-2014 LOVE Development Team + * 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 diff --git a/src/modules/timer/wrap_Timer.cpp b/src/modules/timer/wrap_Timer.cpp index c34c82d52..4fdb06f05 100644 --- a/src/modules/timer/wrap_Timer.cpp +++ b/src/modules/timer/wrap_Timer.cpp @@ -1,5 +1,5 @@ /** - * Copyright (c) 2006-2014 LOVE Development Team + * 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 diff --git a/src/modules/timer/wrap_Timer.h b/src/modules/timer/wrap_Timer.h index 698d3864f..a3ef01640 100644 --- a/src/modules/timer/wrap_Timer.h +++ b/src/modules/timer/wrap_Timer.h @@ -1,5 +1,5 @@ /** - * Copyright (c) 2006-2014 LOVE Development Team + * 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 diff --git a/src/modules/window/Window.cpp b/src/modules/window/Window.cpp index 89edccca0..8ab4d85d4 100644 --- a/src/modules/window/Window.cpp +++ b/src/modules/window/Window.cpp @@ -1,5 +1,5 @@ /** - * Copyright (c) 2006-2014 LOVE Development Team + * 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 diff --git a/src/modules/window/Window.h b/src/modules/window/Window.h index b904d3f30..c1d9b9d71 100644 --- a/src/modules/window/Window.h +++ b/src/modules/window/Window.h @@ -1,5 +1,5 @@ /** - * Copyright (c) 2006-2014 LOVE Development Team + * 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 @@ -137,6 +137,7 @@ public: virtual love::image::ImageData *getIcon() = 0; virtual void minimize() = 0; + virtual void maximize() = 0; // default no-op implementation virtual void swapBuffers(); diff --git a/src/modules/window/sdl/Window.cpp b/src/modules/window/sdl/Window.cpp index 1e03d8049..e8f3fe96a 100644 --- a/src/modules/window/sdl/Window.cpp +++ b/src/modules/window/sdl/Window.cpp @@ -1,5 +1,5 @@ /** - * Copyright (c) 2006-2014 LOVE Development Team + * 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 @@ -646,6 +646,12 @@ void Window::minimize() SDL_MinimizeWindow(window); } +void Window::maximize() +{ + if (window != nullptr) + SDL_MaximizeWindow(window); +} + void Window::swapBuffers() { SDL_GL_SwapWindow(window); diff --git a/src/modules/window/sdl/Window.h b/src/modules/window/sdl/Window.h index 43f007c2d..39f2b44d4 100644 --- a/src/modules/window/sdl/Window.h +++ b/src/modules/window/sdl/Window.h @@ -1,5 +1,5 @@ /** - * Copyright (c) 2006-2014 LOVE Development Team + * 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 @@ -69,6 +69,7 @@ public: love::image::ImageData *getIcon(); void minimize(); + void maximize(); void swapBuffers(); diff --git a/src/modules/window/wrap_Window.cpp b/src/modules/window/wrap_Window.cpp index fe408dc59..dce51d9a9 100644 --- a/src/modules/window/wrap_Window.cpp +++ b/src/modules/window/wrap_Window.cpp @@ -1,5 +1,5 @@ /** - * Copyright (c) 2006-2014 LOVE Development Team + * 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 @@ -392,6 +392,12 @@ int w_minimize(lua_State* /*L*/) return 0; } +int w_maximize(lua_State *) +{ + instance()->maximize(); + return 0; +} + int w_showMessageBox(lua_State *L) { Window::MessageBoxData data = {}; diff --git a/src/modules/window/wrap_Window.h b/src/modules/window/wrap_Window.h index 14d6c042f..513c463b2 100644 --- a/src/modules/window/wrap_Window.h +++ b/src/modules/window/wrap_Window.h @@ -1,5 +1,5 @@ /** - * Copyright (c) 2006-2014 LOVE Development Team + * 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 @@ -51,6 +51,7 @@ int w_getPixelScale(lua_State *L); int w_toPixels(lua_State *L); int w_fromPixels(lua_State *L); int w_minimize(lua_State *L); +int w_maximize(lua_State *L); int w_showMessageBox(lua_State *L); extern "C" LOVE_EXPORT int luaopen_love_window(lua_State *L); diff --git a/src/scripts/auto.lua b/src/scripts/auto.lua index dbd8c6bd6..6d096c47e 100644 --- a/src/scripts/auto.lua +++ b/src/scripts/auto.lua @@ -7,7 +7,7 @@ local max_width = 18 local pattern = [[ /** - * Copyright (c) 2006-2014 LOVE Development Team + * 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 diff --git a/src/scripts/boot.lua b/src/scripts/boot.lua index ad140378e..b2769ac21 100644 --- a/src/scripts/boot.lua +++ b/src/scripts/boot.lua @@ -1,5 +1,5 @@ --[[ -Copyright (c) 2006-2014 LOVE Development Team +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 @@ -166,6 +166,9 @@ function love.createhandlers() textedit = function (t,s,l) if love.textedit then return love.textedit(t,s,l) end end, + mousemoved = function (x,y,xrel,yrel) + if love.mousemoved then return love.mousemoved(x,y,xrel,yrel) end + end, mousepressed = function (x,y,b) if love.mousepressed then return love.mousepressed(x,y,b) end end, @@ -346,6 +349,13 @@ function love.init() appendidentity = false, } + -- Console hack, part 1. + local openedconsole = false + if love.arg.options.console.set and love._openConsole then + love._openConsole() + openedconsole = true + end + -- If config file exists, load it and allow it to update config table. if not love.conf and love.filesystem and love.filesystem.isFile("conf.lua") then require("conf") @@ -360,12 +370,8 @@ function love.init() -- the error message can be displayed in the window. end - if love.arg.options.console.set then - c.console = true - end - - -- Console hack - if c.console and love._openConsole then + -- Console hack, part 2. + if c.console and love._openConsole and not openedconsole then love._openConsole() end @@ -487,10 +493,6 @@ function love.run() love.math.setRandomSeed(os.time()) end - if love.event then - love.event.pump() - end - if love.load then love.load(arg) end -- We don't want the first frame's dt to include time taken by love.load. @@ -506,9 +508,6 @@ function love.run() for e,a,b,c,d in love.event.poll() do if e == "quit" then if not love.quit or not love.quit() then - if love.audio then - love.audio.stop() - end return end end diff --git a/src/scripts/boot.lua.h b/src/scripts/boot.lua.h index 630bcc242..f040bf0d9 100644 --- a/src/scripts/boot.lua.h +++ b/src/scripts/boot.lua.h @@ -1,5 +1,5 @@ /** - * Copyright (c) 2006-2014 LOVE Development Team + * 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 @@ -27,7 +27,7 @@ const unsigned char boot_lua[] = 0x2d, 0x2d, 0x5b, 0x5b, 0x0a, 0x43, 0x6f, 0x70, 0x79, 0x72, 0x69, 0x67, 0x68, 0x74, 0x20, 0x28, 0x63, 0x29, 0x20, 0x32, 0x30, 0x30, 0x36, - 0x2d, 0x32, 0x30, 0x31, 0x34, 0x20, 0x4c, 0x4f, 0x56, 0x45, 0x20, 0x44, 0x65, 0x76, 0x65, 0x6c, 0x6f, 0x70, + 0x2d, 0x32, 0x30, 0x31, 0x35, 0x20, 0x4c, 0x4f, 0x56, 0x45, 0x20, 0x44, 0x65, 0x76, 0x65, 0x6c, 0x6f, 0x70, 0x6d, 0x65, 0x6e, 0x74, 0x20, 0x54, 0x65, 0x61, 0x6d, 0x0a, 0x54, 0x68, 0x69, 0x73, 0x20, 0x73, 0x6f, 0x66, 0x74, 0x77, 0x61, 0x72, 0x65, 0x20, 0x69, 0x73, 0x20, 0x70, 0x72, 0x6f, 0x76, 0x69, 0x64, 0x65, 0x64, 0x20, 0x27, 0x61, 0x73, 0x2d, 0x69, 0x73, 0x27, 0x2c, 0x20, 0x77, @@ -285,6 +285,14 @@ const unsigned char boot_lua[] = 0x2e, 0x74, 0x65, 0x78, 0x74, 0x65, 0x64, 0x69, 0x74, 0x28, 0x74, 0x2c, 0x73, 0x2c, 0x6c, 0x29, 0x20, 0x65, 0x6e, 0x64, 0x0a, 0x09, 0x09, 0x65, 0x6e, 0x64, 0x2c, 0x0a, + 0x09, 0x09, 0x6d, 0x6f, 0x75, 0x73, 0x65, 0x6d, 0x6f, 0x76, 0x65, 0x64, 0x20, 0x3d, 0x20, 0x66, 0x75, 0x6e, + 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x20, 0x28, 0x78, 0x2c, 0x79, 0x2c, 0x78, 0x72, 0x65, 0x6c, 0x2c, 0x79, 0x72, + 0x65, 0x6c, 0x29, 0x0a, + 0x09, 0x09, 0x09, 0x69, 0x66, 0x20, 0x6c, 0x6f, 0x76, 0x65, 0x2e, 0x6d, 0x6f, 0x75, 0x73, 0x65, 0x6d, 0x6f, + 0x76, 0x65, 0x64, 0x20, 0x74, 0x68, 0x65, 0x6e, 0x20, 0x72, 0x65, 0x74, 0x75, 0x72, 0x6e, 0x20, 0x6c, 0x6f, + 0x76, 0x65, 0x2e, 0x6d, 0x6f, 0x75, 0x73, 0x65, 0x6d, 0x6f, 0x76, 0x65, 0x64, 0x28, 0x78, 0x2c, 0x79, 0x2c, + 0x78, 0x72, 0x65, 0x6c, 0x2c, 0x79, 0x72, 0x65, 0x6c, 0x29, 0x20, 0x65, 0x6e, 0x64, 0x0a, + 0x09, 0x09, 0x65, 0x6e, 0x64, 0x2c, 0x0a, 0x09, 0x09, 0x6d, 0x6f, 0x75, 0x73, 0x65, 0x70, 0x72, 0x65, 0x73, 0x73, 0x65, 0x64, 0x20, 0x3d, 0x20, 0x66, 0x75, 0x6e, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x20, 0x28, 0x78, 0x2c, 0x79, 0x2c, 0x62, 0x29, 0x0a, 0x09, 0x09, 0x09, 0x69, 0x66, 0x20, 0x6c, 0x6f, 0x76, 0x65, 0x2e, 0x6d, 0x6f, 0x75, 0x73, 0x65, 0x70, 0x72, @@ -616,6 +624,19 @@ const unsigned char boot_lua[] = 0x09, 0x09, 0x61, 0x70, 0x70, 0x65, 0x6e, 0x64, 0x69, 0x64, 0x65, 0x6e, 0x74, 0x69, 0x74, 0x79, 0x20, 0x3d, 0x20, 0x66, 0x61, 0x6c, 0x73, 0x65, 0x2c, 0x0a, 0x09, 0x7d, 0x0a, + 0x09, 0x2d, 0x2d, 0x20, 0x43, 0x6f, 0x6e, 0x73, 0x6f, 0x6c, 0x65, 0x20, 0x68, 0x61, 0x63, 0x6b, 0x2c, 0x20, + 0x70, 0x61, 0x72, 0x74, 0x20, 0x31, 0x2e, 0x0a, + 0x09, 0x6c, 0x6f, 0x63, 0x61, 0x6c, 0x20, 0x6f, 0x70, 0x65, 0x6e, 0x65, 0x64, 0x63, 0x6f, 0x6e, 0x73, 0x6f, + 0x6c, 0x65, 0x20, 0x3d, 0x20, 0x66, 0x61, 0x6c, 0x73, 0x65, 0x0a, + 0x09, 0x69, 0x66, 0x20, 0x6c, 0x6f, 0x76, 0x65, 0x2e, 0x61, 0x72, 0x67, 0x2e, 0x6f, 0x70, 0x74, 0x69, 0x6f, + 0x6e, 0x73, 0x2e, 0x63, 0x6f, 0x6e, 0x73, 0x6f, 0x6c, 0x65, 0x2e, 0x73, 0x65, 0x74, 0x20, 0x61, 0x6e, 0x64, + 0x20, 0x6c, 0x6f, 0x76, 0x65, 0x2e, 0x5f, 0x6f, 0x70, 0x65, 0x6e, 0x43, 0x6f, 0x6e, 0x73, 0x6f, 0x6c, 0x65, + 0x20, 0x74, 0x68, 0x65, 0x6e, 0x0a, + 0x09, 0x09, 0x6c, 0x6f, 0x76, 0x65, 0x2e, 0x5f, 0x6f, 0x70, 0x65, 0x6e, 0x43, 0x6f, 0x6e, 0x73, 0x6f, 0x6c, + 0x65, 0x28, 0x29, 0x0a, + 0x09, 0x09, 0x6f, 0x70, 0x65, 0x6e, 0x65, 0x64, 0x63, 0x6f, 0x6e, 0x73, 0x6f, 0x6c, 0x65, 0x20, 0x3d, 0x20, + 0x74, 0x72, 0x75, 0x65, 0x0a, + 0x09, 0x65, 0x6e, 0x64, 0x0a, 0x09, 0x2d, 0x2d, 0x20, 0x49, 0x66, 0x20, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x20, 0x66, 0x69, 0x6c, 0x65, 0x20, 0x65, 0x78, 0x69, 0x73, 0x74, 0x73, 0x2c, 0x20, 0x6c, 0x6f, 0x61, 0x64, 0x20, 0x69, 0x74, 0x20, 0x61, 0x6e, 0x64, 0x20, 0x61, 0x6c, 0x6c, 0x6f, 0x77, 0x20, 0x69, 0x74, 0x20, 0x74, 0x6f, 0x20, 0x75, 0x70, 0x64, @@ -650,15 +671,12 @@ const unsigned char boot_lua[] = 0x73, 0x61, 0x67, 0x65, 0x20, 0x63, 0x61, 0x6e, 0x20, 0x62, 0x65, 0x20, 0x64, 0x69, 0x73, 0x70, 0x6c, 0x61, 0x79, 0x65, 0x64, 0x20, 0x69, 0x6e, 0x20, 0x74, 0x68, 0x65, 0x20, 0x77, 0x69, 0x6e, 0x64, 0x6f, 0x77, 0x2e, 0x0a, 0x09, 0x65, 0x6e, 0x64, 0x0a, - 0x09, 0x69, 0x66, 0x20, 0x6c, 0x6f, 0x76, 0x65, 0x2e, 0x61, 0x72, 0x67, 0x2e, 0x6f, 0x70, 0x74, 0x69, 0x6f, - 0x6e, 0x73, 0x2e, 0x63, 0x6f, 0x6e, 0x73, 0x6f, 0x6c, 0x65, 0x2e, 0x73, 0x65, 0x74, 0x20, 0x74, 0x68, 0x65, - 0x6e, 0x0a, - 0x09, 0x09, 0x63, 0x2e, 0x63, 0x6f, 0x6e, 0x73, 0x6f, 0x6c, 0x65, 0x20, 0x3d, 0x20, 0x74, 0x72, 0x75, 0x65, 0x0a, - 0x09, 0x65, 0x6e, 0x64, 0x0a, - 0x09, 0x2d, 0x2d, 0x20, 0x43, 0x6f, 0x6e, 0x73, 0x6f, 0x6c, 0x65, 0x20, 0x68, 0x61, 0x63, 0x6b, 0x0a, + 0x09, 0x2d, 0x2d, 0x20, 0x43, 0x6f, 0x6e, 0x73, 0x6f, 0x6c, 0x65, 0x20, 0x68, 0x61, 0x63, 0x6b, 0x2c, 0x20, + 0x70, 0x61, 0x72, 0x74, 0x20, 0x32, 0x2e, 0x0a, 0x09, 0x69, 0x66, 0x20, 0x63, 0x2e, 0x63, 0x6f, 0x6e, 0x73, 0x6f, 0x6c, 0x65, 0x20, 0x61, 0x6e, 0x64, 0x20, 0x6c, 0x6f, 0x76, 0x65, 0x2e, 0x5f, 0x6f, 0x70, 0x65, 0x6e, 0x43, 0x6f, 0x6e, 0x73, 0x6f, 0x6c, 0x65, 0x20, - 0x74, 0x68, 0x65, 0x6e, 0x0a, + 0x61, 0x6e, 0x64, 0x20, 0x6e, 0x6f, 0x74, 0x20, 0x6f, 0x70, 0x65, 0x6e, 0x65, 0x64, 0x63, 0x6f, 0x6e, 0x73, + 0x6f, 0x6c, 0x65, 0x20, 0x74, 0x68, 0x65, 0x6e, 0x0a, 0x09, 0x09, 0x6c, 0x6f, 0x76, 0x65, 0x2e, 0x5f, 0x6f, 0x70, 0x65, 0x6e, 0x43, 0x6f, 0x6e, 0x73, 0x6f, 0x6c, 0x65, 0x28, 0x29, 0x0a, 0x09, 0x65, 0x6e, 0x64, 0x0a, @@ -873,11 +891,6 @@ const unsigned char boot_lua[] = 0x09, 0x09, 0x6c, 0x6f, 0x76, 0x65, 0x2e, 0x6d, 0x61, 0x74, 0x68, 0x2e, 0x73, 0x65, 0x74, 0x52, 0x61, 0x6e, 0x64, 0x6f, 0x6d, 0x53, 0x65, 0x65, 0x64, 0x28, 0x6f, 0x73, 0x2e, 0x74, 0x69, 0x6d, 0x65, 0x28, 0x29, 0x29, 0x0a, 0x09, 0x65, 0x6e, 0x64, 0x0a, - 0x09, 0x69, 0x66, 0x20, 0x6c, 0x6f, 0x76, 0x65, 0x2e, 0x65, 0x76, 0x65, 0x6e, 0x74, 0x20, 0x74, 0x68, 0x65, - 0x6e, 0x0a, - 0x09, 0x09, 0x6c, 0x6f, 0x76, 0x65, 0x2e, 0x65, 0x76, 0x65, 0x6e, 0x74, 0x2e, 0x70, 0x75, 0x6d, 0x70, 0x28, - 0x29, 0x0a, - 0x09, 0x65, 0x6e, 0x64, 0x0a, 0x09, 0x69, 0x66, 0x20, 0x6c, 0x6f, 0x76, 0x65, 0x2e, 0x6c, 0x6f, 0x61, 0x64, 0x20, 0x74, 0x68, 0x65, 0x6e, 0x20, 0x6c, 0x6f, 0x76, 0x65, 0x2e, 0x6c, 0x6f, 0x61, 0x64, 0x28, 0x61, 0x72, 0x67, 0x29, 0x20, 0x65, 0x6e, 0x64, 0x0a, @@ -907,11 +920,6 @@ const unsigned char boot_lua[] = 0x09, 0x09, 0x09, 0x09, 0x09, 0x69, 0x66, 0x20, 0x6e, 0x6f, 0x74, 0x20, 0x6c, 0x6f, 0x76, 0x65, 0x2e, 0x71, 0x75, 0x69, 0x74, 0x20, 0x6f, 0x72, 0x20, 0x6e, 0x6f, 0x74, 0x20, 0x6c, 0x6f, 0x76, 0x65, 0x2e, 0x71, 0x75, 0x69, 0x74, 0x28, 0x29, 0x20, 0x74, 0x68, 0x65, 0x6e, 0x0a, - 0x09, 0x09, 0x09, 0x09, 0x09, 0x09, 0x69, 0x66, 0x20, 0x6c, 0x6f, 0x76, 0x65, 0x2e, 0x61, 0x75, 0x64, 0x69, - 0x6f, 0x20, 0x74, 0x68, 0x65, 0x6e, 0x0a, - 0x09, 0x09, 0x09, 0x09, 0x09, 0x09, 0x09, 0x6c, 0x6f, 0x76, 0x65, 0x2e, 0x61, 0x75, 0x64, 0x69, 0x6f, 0x2e, - 0x73, 0x74, 0x6f, 0x70, 0x28, 0x29, 0x0a, - 0x09, 0x09, 0x09, 0x09, 0x09, 0x09, 0x65, 0x6e, 0x64, 0x0a, 0x09, 0x09, 0x09, 0x09, 0x09, 0x09, 0x72, 0x65, 0x74, 0x75, 0x72, 0x6e, 0x0a, 0x09, 0x09, 0x09, 0x09, 0x09, 0x65, 0x6e, 0x64, 0x0a, 0x09, 0x09, 0x09, 0x09, 0x65, 0x6e, 0x64, 0x0a, diff --git a/src/scripts/graphics.lua b/src/scripts/graphics.lua index 197fbe255..f33d8e383 100644 --- a/src/scripts/graphics.lua +++ b/src/scripts/graphics.lua @@ -1,5 +1,5 @@ --[[ -Copyright (c) 2006-2014 LOVE Development Team +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 diff --git a/src/scripts/graphics.lua.h b/src/scripts/graphics.lua.h index 755a51106..a28606802 100644 --- a/src/scripts/graphics.lua.h +++ b/src/scripts/graphics.lua.h @@ -1,5 +1,5 @@ /** - * Copyright (c) 2006-2014 LOVE Development Team + * 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