Commit Graph

180 Commits

Author SHA1 Message Date
Alex Szpakowski 738cc01468 Increased version to 0.9.2. 2014-06-18 19:05:43 -03:00
Alex Szpakowski 79b453653a Added love.joystick.loadGamepadMappings (resolves issue #842), and Joystick:saveGamepadMapping.
The latter returns a mapping string, and the former loads a newline-separated list of mapping strings.
2014-06-04 15:50:06 -03:00
Alex Szpakowski dfa319e01a Replaced the EXCEPT_GUARD macro for converting love exceptions into Lua errors with the new luax_catchexcept function, which takes lambda function arguments. 2014-06-03 19:27:00 -03:00
Alex Szpakowski 724bdbd296 love.graphics.newImage, love.image.newImageData, etc. no longer leave Lua-owned FileData objects floating around waiting to be GC'd when called with filename arguments, resulting in less memory use on startup (resolves issue #890.)
Moved love.filesystem Lua wrapper code from src/modules/filesystem/physfs/ to src/modules/filesystem/.
2014-06-02 00:22:41 -03:00
Alex Szpakowski fd5b5aad65 Minor code cleanup 2014-05-21 21:14:08 -03:00
Alex Szpakowski e4dc533bb2 Minor code cleanup 2014-05-01 14:12:21 -03:00
Bart van Strien 5484921597 Make the stored data and type of Variant public, to allow for non-lua unpacking.
NOTE: Not that useful in the love source, but might be nice if libraries try
to interface with it.
2014-04-25 17:44:46 +02:00
Alex Szpakowski f05551a01f Fixed a potential null pointer dereference and a case of undefined behaviour 2014-04-11 03:48:12 -03:00
Alex Szpakowski 38497d23da Added love.system.openURL (resolves issue #863) 2014-03-31 16:13:05 -03:00
Alex Szpakowski 50916825d0 Data::getSize now uses size_t instead of int 2014-03-18 03:50:00 -03:00
Alex Szpakowski 55514720a6 Fixed some minor compiler warnings 2014-03-01 21:16:01 -04:00
Alex Szpakowski ecf37320a9 Changed love.graphics.newMesh, Mesh:setVertex, and Mesh:setVertices to default the u,v arguments to 0,0 instead of requiring them 2014-02-27 05:38:46 -04:00
Alex Szpakowski fe5e7c17e7 Added Body:setUserData and Body:getUserData (resolves issue #853_ 2014-02-26 20:47:05 -04:00
Alex Szpakowski 2a19a4444e Allow Fixture:setUserData and Fixture:getUserData to be called in coroutines (resolves issue #850.)
Bad things will still happen if you call them from a love Thread which didn't create the World and the Fixture object. Don't do it!
2014-02-15 20:59:57 -04:00
Alex Szpakowski 3a24e73891 0.9.1’s API is designed to be backwards-compatible with 0.9.0 games (resolves issue #839) 2014-01-27 02:28:38 -04:00
Alex Szpakowski 10f1e23931 Increased version to 0.9.1 2014-01-22 18:26:10 -04:00
Alex Szpakowski 0e13975c11 Improved some error message text 2014-01-17 22:28:06 -04:00
Alex Szpakowski fda005c5ff love.graphics.getScissor now has a proper C++ module method 2014-01-09 22:49:00 -04:00
Alex Szpakowski 3120a0e650 Goodbye 2013, hello 2014! 2014-01-03 17:28:58 -04:00
Alex Szpakowski aa69a695d3 Canvases can now be used in SpriteBatches, ParticleSystems, and Meshes (resolves issue #782).
Canvases and Images are now subclasses of the new Texture class.
Added setTexture and getTexture methods for Meshes, ParticleSystems, and SpriteBatches (the old set/getImage methods are deprecated but not removed.)
Canvas texture coordinates are no longer flipped.
2014-01-03 17:07:12 -04:00
Bart van Strien 3d82eecc08 Apply the love-experiment moduleselect branch
You can now:
	- Enable and disable love's modules, implementations and libraries using configure switches
	- Use pkg-config for a couple of love's requirements
	- Build on OSX
	- Use newer versions of FreeType2
	- Get a slightly better error message using automagic
2013-12-08 19:32:32 +01:00
Alex Szpakowski 2ee869b0e8 Fixed some compiler warnings 2013-12-07 05:07:54 -04:00
Alex Szpakowski 6e82ca88ed Mac: dropped OS 10.5 support.
The legacy code in SDL2 for windowing in 10.5 is buggy, resulting in major bugs with love.window.setFullscreen and other functions. Also, some of 10.5’s own drivers are buggy. Stop using an OS that’s 4 major versions out of date - most other applications have dropped 10.5 support months or years ago.
2013-11-28 21:46:36 -04:00
Alex Szpakowski 5e3a0fbc6e Updated box2d from 2.2.1 to 2.3.0
--HG--
branch : box2d-2.3
2013-11-09 04:30:36 -04:00
Alex Szpakowski 70996a417f Mac: only do LOVE_LEGENDARY_LIBSTDCXX_HACK when the minimum required version is OS 10.5 (resolves issue #789) 2013-11-08 01:50:26 -04:00
Alex Szpakowski 259bb8ffdb Fixed errors caused by love exceptions to give a line number (see issue #772) 2013-10-23 15:20:31 -03:00
rude 27de844472 Include <algorithm> when std::min/max is used.
It won't build in Visual Studio 2013 unless we do this.
2013-10-23 00:09:12 +02:00
Alex Szpakowski c63e2ec624 Merged default into Mesh
--HG--
branch : Mesh
2013-09-29 04:58:26 -03:00
rude fc5d5e3f26 Fixed shutdown crash in ~Math.
The 'registry' global in Module.cpp appears to be destroyed before the last
module is destroyed, specifically the math module. This is bad, because ~Module
tries to look for itself in 'registry' after it's gone. This causes a nasty
debug assert in VS2012, and a shutdown crash in release builds.

Fixed by dynamically allocating/releasing the registry.
2013-09-29 00:49:50 +02:00
Alex Szpakowski 1e696c4505 Added Mesh objects and love.graphics.newMesh. Mesh objects are similar to Geometry but they're drawables (the relationship between meshes and images is the opposite of geometry and images.)
Removed Geometry objects and re-added Quads.

example:
local vertices = {{0, 0, 0, 0}, {100, 0, 1, 0}, {100, 100, 1, 1}, {0, 100, 0, 1}}
mesh = love.graphics.newMesh(vertices, image, "fan")
..
love.graphics.draw(mesh, 0, 0)

--HG--
branch : Mesh
2013-09-28 18:26:47 -03:00
Alex Szpakowski 1be8ac5be4 Removed some unused functions and fixed up some wrap_ headers 2013-09-26 00:48:48 -03:00
Alex Szpakowski bcee9a222b Made some float/int/unsigned char conversions explicit, fixed ParticleSystem:getColors, fixed love.mouse.isDown with x1 and x2 buttons 2013-09-26 00:36:50 -03:00
Alex Szpakowski 5de43a7207 The Vertex struct is now recognized as POD by C++, also fixed the name to be consistent with other love structs 2013-09-24 11:09:18 -03:00
Alex Szpakowski 8d5ddb9e34 Fixed some internal documentation (thanks to clang's -Wdocumentation) 2013-09-23 21:52:28 -03:00
Alex Szpakowski ffe0485173 Removed love.window.checkMode (resolves issue #653, invalidates issue #592).
Also fixed love.window.setMode to fail instead of bug out when trying to set a fullscreen mode which is too large for the monitor.
2013-09-19 18:13:52 -03:00
Alex Szpakowski 06f80d5c08 Fixed undefined behaviour when love exceptions are converted into Lua errors (resolves issue #729) 2013-09-05 23:17:29 -03:00
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 c15fc4453b Re-added Data:getPointer (can be used with LuaJIT's FFI) 2013-08-29 17:16: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 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
vrld be205544b3 Issue #659: Add line joins.
Added:

love.graphics.setLineJoin(linejoin)
linejoin = love.graphics.getLineJoin()

where linjoin is one of:

- none
- miter
- bevel

Bevel and miter drawing is slightly faster than the 0.8 default (miter), while
the `none` join mode will be slower when overdraw is enabled.
2013-08-07 21:48:21 +02:00
Alex Szpakowski 0c053e09d4 Improved error messages when using the wrong love type in a function 2013-08-03 18:52:00 -03:00
Alex Szpakowski 3e57cfd174 Slightly reduced internal reliance on specific module backends 2013-08-03 16:30:37 -03:00
Alex Szpakowski 335cc378fc Added some internal verification for registering love type names 2013-07-18 00:45:49 -03:00
Alex Szpakowski 5a3055dd3b Replaced internal calls to luaL_register (deprecated in Lua 5.2) with an alternative 2013-07-16 23:23:58 -03:00
Alex Szpakowski 719e9253da Fixed a compiler warning 2013-07-15 13:22:47 -03:00
Bart van Strien 98d92d3e1f Add support for "flat" tables to Variant.
This means you can now use Variants (used by Channels and love.event, for instance) to send tables as long as they only contain keys and values supported by Variant, AND they are not tables themselves.
2013-07-15 11:53:24 +02:00
Alex Szpakowski bcc85f884e ImageData:mapPixel can now take optional x,y,w,h parameters to constrain it to a rectangle in the ImageData 2013-07-11 01:10:19 -03:00
Alex Szpakowski 91e4feeca0 Fixed justify AlignMode 2013-07-10 20:36:20 -03:00
Alex Szpakowski 35b4f03411 Fixed thread:start crashing with nil arguments 2013-07-10 17:41:54 -03:00