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
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
93a782d445
Renamed World:setAllowSleeping and World:getAllowSleeping to World:setSleepingAllowed and World:isSleepingAllowed (see issue #691 , also consistent with the Body methods)
2013-08-31 21:15:09 -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
4f6e956f85
Fixed ChainShape:getChildEdge crashing
2013-08-11 17:50:57 -03:00