Alex Szpakowski
20b77bd28c
Changed World:update(dt) to default to Box2D's recommended 3 internal position iterations instead of 6. Added a new variant World:update(dt, velocityiterations, positioniterations) which lets you specify the number of velocity and position iterations Box2D performs when updating the world. The defaults are 8 and 3 respectively, higher numbers increase precision and reduce performance.
...
Resolves issue #1135 .
--HG--
branch : minor
2016-02-14 20:06:16 -04:00
Alex Szpakowski
ab4cfb4a35
Added an optional 'collideconnected' boolean argument to love.physics.newMotorJoint (resolves issue #1130 ).
2016-02-02 08:38:07 -04:00
Alex Szpakowski
46a2e7b85c
Happy new year! 🎉
2016-01-01 00:05:06 -04:00
Alex Szpakowski
2c4e713114
Imported some of the dynamiccore branch from love-experiments:
...
- Type names for love's Lua objects are specified as an argument to luax_register_type, rather than being statically defined in an array.
- luax_register_type takes a variable number of method array arguments, for registering superclass methods without copying them into the subclass' method array.
Also removed most of the header declarations for wrapper functions.
2015-11-29 20:38:12 -04:00
Alex Szpakowski
aca369e5d4
Fixed memory leaks in love.physics. When a World is garbage-collected it now implicitly calls World:destroy, which also destroys all Bodies, Fixtures, and Joints that belong to it.
2015-11-17 01:27:48 -04:00
Alex Szpakowski
2cce18946d
Fixed objects which store Lua callback functions to avoid attempting to use dead coroutines when deleting the reference to the callback function. Should fix crashes when coroutines are mixed with those objects.
...
Also improved the performance of World:rayCast and World:queryBoundingBox.
2015-07-18 03:26:07 -03:00
Alex Szpakowski
64b9d40f00
Fixed World:getCallbacks and World:getContactFilter to use the active coroutine's lua state.
2015-07-17 19:00:42 -03:00
Bart van Strien
3cb777e2b7
Add basic lua 5.3 support
2015-06-16 10:25:41 +02:00
Alex Szpakowski
0f986b10aa
Cleaned up some code, the 'ry' parameter of love.graphics.rectangle now defaults to the value of 'rx' rather than defaulting to 0.
2015-05-27 17:36:27 -03:00
Alex Szpakowski
34bf847913
Removed redundant definition of ChainShape:getChildCount.
2015-04-27 19:08:02 -03:00
Alex Szpakowski
6e92bd8302
Improved the argument type checking for World:setCallbacks, World:setContactFilter, World:queryBoundingBox, and World:rayCast.
2015-04-27 18:48:13 -03:00
Alex Szpakowski
cf0968fc6d
Avoid some VC++ compiler warnings
2015-04-02 00:28:09 -03:00
Alex Szpakowski
2f419c1c83
Replaced most cases of type bits and type name strings in love's Lua wrapper code with type id's.
...
--HG--
branch : minor
2015-03-01 18:32:41 -04:00
Alex Szpakowski
ebc68023a7
Fix many warnings about implicit integer conversions when compiling for 64 bits.
...
--HG--
branch : minor
2015-02-20 01:20:08 -04:00
Alex Szpakowski
cf60cf89fc
De-namespaced a class, to make it less verbose.
2015-01-24 04:09:56 -04:00
Alex Szpakowski
91062a1496
Added Body/Contact/Fixture/Joint/World:isDestroyed (resolves issue #964.)
2015-01-05 00:14:41 -04:00
Alex Szpakowski
c7b45b3505
Updated copyright for the new year
2014-12-31 19:32:43 -04:00
Alex Szpakowski
5fac441a51
Added Body:getJointList.
2014-11-15 01:17:20 -04:00
Alex Szpakowski
68936e6d2f
Added GearJoint:getJoints (resolves issue #922.)
2014-11-14 22:06:37 -04:00
Alex Szpakowski
78d5db6981
Fixed MotorJoint:getType.
2014-11-14 21:43:22 -04:00
Alex Szpakowski
775f816304
Added Joint:getBodies (see issue #922.)
2014-11-12 17:18:50 -04:00
Alex Szpakowski
7948b11082
Updated love.physics.newPolygonShape and love.physics.newChainShape to accept a table of vertices, fixed a small memory leak if newChainShape errors, fixed the vertex order of newChainShape.
2014-09-21 03:31:36 -03:00
Alex Szpakowski
da7cd267ea
Changed luax_pushtype to retain the pushed object itself, but only if the object isn't in the Lua state already.
...
Previously, calling e.g. love.graphics.getFont() 10,000 times would retain the object 10,000 times (and release it 10,000 times when the Font object was garbage-collected in the Lua state.) Now it will only retain it once and release it once.
2014-08-09 16:04:59 -03:00
Alex Szpakowski
d59c76a55f
Reduced the number of explicit retain/release method calls on love objects. Less chance of bugs!
2014-08-07 14:53:17 -03:00
Alex Szpakowski
c6c32dee17
Removed a piece of code I forgot to delete
2014-07-28 16:58:51 -03:00
Alex Szpakowski
d52bab4221
Updated the new module changes to use more compile/link-time checking rather than runtime checking.
2014-07-21 15:12:01 -03:00
Alex Szpakowski
014b9a46e5
Updated the Lua wrapper code for modules to account for cases where the module's instance is removed from memory completely and recreated during the program's lifetime.
2014-07-21 14:52:01 -03:00
Alex Szpakowski
9ab9a393d5
Added Contact:getFixtures and Body:getContactList (see issue #905 ).
...
The list of Contacts associated with bodies changes during World:update (potentially multiple times), so you might miss collisions if you don't use the World callbacks at all.
2014-07-07 15:24:24 -03:00
Alex Szpakowski
2ae4e9cd5a
Fixed a potential memory leak in the love.physics World callbacks.
2014-06-18 16:24:38 -03:00
Alex Szpakowski
431b6a56ce
Added Body:getWorld (resolves issue #895 )
2014-06-09 19:00:05 -03:00
Alex Szpakowski
5dd23dffd1
Added Joint:setUserData and Joint:getUserData (resolves issue #894.)
2014-06-05 20:56:43 -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
Bart van Strien
e667485f68
Check argument count of newChainShape
2014-04-26 14:35:39 +02:00
Alex Szpakowski
4faddcd9aa
Fixed some trivial compiler warnings
2014-03-12 17:55:19 -03:00
Alex Szpakowski
55514720a6
Fixed some minor compiler warnings
2014-03-01 21:16:01 -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
c17cada9e0
Fixed World:getBodyList, World:getJointList, and World:getContactList causing hard crashes instead of Lua errors
2014-02-10 14:01:59 -04:00
Alex Szpakowski
0e13975c11
Improved some error message text
2014-01-17 22:28:06 -04:00
Alex Szpakowski
3120a0e650
Goodbye 2013, hello 2014!
2014-01-03 17:28:58 -04:00
Alex Szpakowski
1d3f6e967d
Added CircleShape:get/setPoint.
2014-01-03 14:06:23 -04:00
Alex Szpakowski
760f8220fa
Fixed a small memory leak if love.physics.newChainShape errors
2013-12-10 03:54:56 -04:00
Alex Szpakowski
a1a116e7a2
Fixed an uncaught exception in World:translateOrigin
...
--HG--
branch : box2d-2.3
2013-11-09 16:37:19 -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
f03efd2dca
Fixed Contact:getChildren to be 1-based
2013-10-30 18:07:41 -03:00
Alex Szpakowski
74ac2820cd
Joint:enableMotor -> Joint:setMotorEnabled, Joint:enableLimit -> Joint:setLimitsEnabled, Joint:isLimitEnabled -> Joint:hasLimitsEnabled. Resolves issue #691 .
2013-10-24 17:30:41 -03:00
Alex Szpakowski
951f5740bb
Renamed ChainShape:setPrevVertex to ChainShape:setPreviousVertex (see issue #691 )
2013-10-07 23:49:49 -03:00
Alex Szpakowski
95eedcd1be
Using auto for some iterators for less dense-looking code
2013-09-30 02:35:10 -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
8d5ddb9e34
Fixed some internal documentation (thanks to clang's -Wdocumentation)
2013-09-23 21:52:28 -03:00