Commit Graph

1679 Commits

Author SHA1 Message Date
Alex Szpakowski a3571b97bd Modules now properly remove themselves from the global registry when they're deleted 2013-08-30 23:40:46 -03:00
Alex Szpakowski d3826aba9d Improved thread safety of love.event.wait and love.event.push 2013-08-30 17:34:58 -03:00
Alex Szpakowski 4584cf6780 Always use regular vsync instead of preferring adaptive vsync if supported 2013-08-30 00:33:20 -03:00
Alex Szpakowski 75340f6c7b Renamed love.window.getModes to love.window.getFullscreenModes (resolves issue #679) 2013-08-29 21:42:05 -03:00
Alex Szpakowski 5b28b34a0b Fixed Thread:start(func) crashing instead of erroring 2013-08-29 20:59:25 -03:00
Alex Szpakowski c15fc4453b Re-added Data:getPointer (can be used with LuaJIT's FFI) 2013-08-29 17:16:21 -03:00
Alex Szpakowski 4c4a385ce6 Updated CompressedData to store its data in a single block of memory, like other Data objects 2013-08-29 16:24:13 -03:00
vrld 6b51c5aadc Fix issue #724: Bezier curve rendering/eval crashes with empty curves. 2013-08-29 08:31:58 +02:00
Alex Szpakowski eb052d99e8 Added love.keyboard.setKeyRepeat and love.keyboard.hasKeyRepeat (resolves issue #717) 2013-08-29 03:20:27 -03:00
Alex Szpakowski deba2926ce Prefer the Joystick name rather than the GameController name for Joystick:getName 2013-08-29 01:39:21 -03:00
Alex Szpakowski ec9dec6b80 Replaced luax_newtype with luax_pushtype (and added luax_rawnewtype for the old functionality of luax_newtype.)
luax_pushtype keeps the object in a weak table and checks the table before creating a new userdata, so it re-uses the object's existing wrapper userdata if it can, whenever the object is pushed to Lua.

This fixes some subtle issues with love objects, where using them as keys in tables would not always work as expected (https://love2d.org/forums/viewtopic.php?f=4&t=39398&p=112388#p112415). It also decreases the amount of new Lua objects created, saving the garbage collector some work.
2013-08-29 00:40:06 -03:00
Alex Szpakowski 526ccb12ad Renamed love.window.isFullscreen to love.window.getFullscreen (resolves issue #721) 2013-08-28 19:15:00 -03:00
Alex Szpakowski 040defbbfe Renamed love.mouse.setGrab to love.mouse.setGrabbed (resolves issue #720) 2013-08-28 19:13:17 -03:00
Alex Szpakowski 1375aaccb5 Renamed BezierCurve:move to BezierCurve:translate (resolves issue #723) 2013-08-28 19:10:18 -03:00
Bart van Strien d598549980 Make the configure script look for SDL2 2013-08-28 13:34:35 +02:00
Alex Szpakowski 3f6b280d54 Joystick:getID now returns the Joystick's instance id as a second argument, if the Joystick is connected.
The Joystick gets a new unique instance id every time it's connected.
2013-08-28 05:23:02 -03:00
Alex Szpakowski 4fcf47a427 Renamed Joystick:getGUID to Joystick:getProductGUID for greater clarity 2013-08-28 04:21:08 -03:00
Alex Szpakowski 51d3fe22fc Always recreate the GL context in love.window.setMode - SDL_GL_MakeCurrent can return success sometimes in Windows even when the context is trashed 2013-08-28 01:07:00 -03:00
Alex Szpakowski 4a609aca03 Updated Visual Studio project for new files and library dependencies (thanks Boolsheet) 2013-08-27 23:02:05 -03:00
Alex Szpakowski 390a47099e Removed some dead/useless joystick code 2013-08-26 18:18:07 -03:00
Alex Szpakowski 6ade6225df Replaced love.joystick.getJoystick with love.joystick.getJoysticks (returns a table of all connected joysticks), and renamed Joystick:getIndex to Joystick:getConnectedIndex 2013-08-26 17:37:59 -03:00
Alex Szpakowski 75eb34379c Changed Joystick:getID to be 1-based instead of 0-based 2013-08-26 17:35:10 -03:00
Alex Szpakowski db1e8e762a Joystick:getIndex now returns nil instead of -1 if the joystick isn't connected 2013-08-26 13:27:19 -03:00
Alex Szpakowski 63815d3b52 Changed Cursor:getType to only return one value 2013-08-26 02:47:06 -03:00
Alex Szpakowski 3f1221a7f9 Reverted commit bcb6336 2013-08-26 00:53:14 -03:00
Alex Szpakowski af1cf14b7f Changed love.system.getPowerInfo to return -1 for battery percent and seconds remaining instead of nil, if the value can't be determined 2013-08-26 00:47:27 -03:00
Alex Szpakowski 552585cd82 Updated changelog 2013-08-25 19:26:47 -03:00
Alex Szpakowski 113ed1cfe7 Merged SDL2 changes from bartbes/love-experiments/SDL2 into default.
- Added love.system module, including clipboard functions.

- Added custom hardware cursors (love.mouse.newCursor, love.mouse.setCursor.)

- Revamped love.joystick:
-- added Joystick objects and moved love.joystick functions which operated on individual joysticks to methods on the Joystick objects.
-- Added love.joystick.getJoystick and love.joystick.getJoystickCount.
-- Added events for when joysticks are connected and disconnected.
-- Added 'Gamepad' methods to Joystick objects: Joystick:isGamepad, Joystick:getGamepadAxis, and Joystick:isGamepadDown. They're a common abstraction for xbox controller-like joystick across operating systems.

- Added monitor choosing support and "fullscreen desktop" mode to love.window.

- Moved unicode text input events to their own callback function (love.textinput), removed the key repeat functions from love.keyboard and made the second argument of love.keypressed a boolean saying whether the keypress was a repeat.

- liblove now works with love.window and love.graphics in OS X
2013-08-25 16:51:42 -03:00
Alex Szpakowski 035130533b Updated love.window.checkMode to work when a windowflag table is used as the third parameter 2013-08-22 20:28:50 -03:00
Alex Szpakowski 713e050b56 Removed some ParticleSystem methods which existed but did nothing since version 0.5.0 or earlier 2013-08-22 00:30:58 -03:00
Alex Szpakowski 1b5912a461 Really fixed setScissor erroring when scissoring is disabled and x,y,w,h from getScissor is used (see issue #709) 2013-08-21 19:37:26 -03:00
Alex Szpakowski 394888bd13 Fixed love.graphics.setScissor and love.graphics.setColorMask to not error if a single nil argument is given (resolves issue #709) 2013-08-21 18:52:07 -03:00
vrld 983496238f [BezierCurve] Add getDerivative(), move(), rotate() and scale(). 2013-08-21 21:44:31 +02:00
Alex Szpakowski aa53712278 Cleaned up and fixed Visual Studio project files (thanks Boolsheet) 2013-08-19 21:19:41 -03:00
Alex Szpakowski 5c0066332f love.math.noise now returns values in the range of [0, 1] instead of [-1, 1] 2013-08-19 19:57:55 -03:00
Alex Szpakowski f7ca9ef557 Fixed race condition in Source:play (thanks Boolsheet) 2013-08-19 16:05:43 -03:00
Alex Szpakowski acfce1bf47 love.graphics.printf errors if the wrap limit parameter is negative (resolves issue #706) 2013-08-18 13:17:53 -03:00
Alex Szpakowski 96a668ecf3 Renamed CompressedData:getType to CompressedData:getFormat 2013-08-17 14:30:23 -03:00
Alex Szpakowski ce4d895918 The error handler now makes sure the mouse is visible and ungrabbed 2013-08-17 03:44:44 -03:00
Alex Szpakowski 72068ba519 love.graphics.isSupported now errors if an invalid string is given (see issue #690) 2013-08-17 00:12:46 -03:00
Alex Szpakowski 3fc0d0171a Fall back to an alternative visual in the nogame screen if subtractive blending isn't supported, instead of erroring 2013-08-17 00:08:22 -03:00
Alex Szpakowski c230098642 Fixed Geometry:getVertexMap to return 1-based vertex indices and made it return the default vertex map instead of nil if no map is set. 2013-08-16 19:25:41 -03:00
Alex Szpakowski d815374a9b Renamed the 'ModelViewMatrix' and 'ModelViewProjectionMatrix' built-in shader variables to 'TransformMatrix' and 'TransformProjectionMatrix', respectively. 2013-08-16 03:17:55 -03:00
Alex Szpakowski 14ae39eec9 Images which are too large for the system they're loaded on use a checkerboard pattern instead of erroring 2013-08-15 23:40:32 -03:00
Alex Szpakowski ecd5330c57 Made the no-game screen resizable (thanks Robin) 2013-08-14 19:56:04 -03:00
Alex Szpakowski 57637b26ec Updated changelog 2013-08-14 19:47:35 -03:00
Alex Szpakowski 76565a3e11 Renamed love.window.setCaption to love.window.setTitle (resolves issue #703) 2013-08-14 11:16:41 -03:00
Alex Szpakowski 59712c344f Removed a potentially slow codepath in SpriteBatch:add 2013-08-14 11:07:56 -03:00
Alex Szpakowski 9834897372 Fixed Canvas:clear on GL3+ systems 2013-08-13 16:05:20 -03:00
Alex Szpakowski 4f6e956f85 Fixed ChainShape:getChildEdge crashing 2013-08-11 17:50:57 -03:00