Commit Graph

66 Commits

Author SHA1 Message Date
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 a7e4148869 Merged default into minor
--HG--
branch : minor
2015-01-16 15:47:26 -04:00
Alex Szpakowski c7b45b3505 Updated copyright for the new year 2014-12-31 19:32:43 -04:00
Alex Szpakowski aba33bf2e7 Merged default into minor
--HG--
branch : minor
2014-09-20 00:34:34 -03:00
Alex Szpakowski 7f490c4c30 Added ParticleSystem:setLinearDamping and ParticleSystem:getLinearDamping (resolves issue #803.) 2014-09-19 21:00:04 -03:00
Alex Szpakowski 9b1f7d7a6e Merged default into minor
--HG--
branch : minor
2014-08-09 19:55:29 -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 2bfa8dbfb5 Merged default into minor
--HG--
branch : minor
2014-06-16 03:09:04 -03:00
Alex Szpakowski b9cd93e071 Re-added ParticleSystem:setQuads(q1, q2, ...). Active particles use the quads based on the particle's lifetime in a similar style to ParticleSystem:setColors and ParticleSystem:setSizes. 2014-06-15 18:20:05 -03:00
Alex Szpakowski bfa3ec9369 Merged default into minor
--HG--
branch : minor
2014-06-05 03:02:50 -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 a94637ef2b Removed functions that were deprecated in 0.9.1
--HG--
branch : minor
2014-03-12 02:24:21 -03:00
Alex Szpakowski 615492540d Added ParticleSystem:setRelativeRotation. If enabled, particle rotations and angles will be relative to their current velocities. 2014-02-06 05:46:47 -04:00
Alex Szpakowski a7ed581204 Reverted ParticleSystem:setPosition’s functionality to 0.9.0’s beheaviour, added ParticleSystem:moveTo which has the new behaviour (new particles spawn in a line between the old position and where the emitter was moved to.) 2014-01-28 03:20:08 -04:00
Alex Szpakowski 6b538b5827 The emission rate for ParticleSystems is no longer restricted to integer numbers. 2014-01-27 23:42:26 -04:00
Alex Szpakowski 510ed6f11e Abstracted lua bindings for general Texture methods into wrap_Texture.cpp 2014-01-04 21:19:03 -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
Alex Szpakowski bccac13432 Added ParticleSystem:clone() 2013-12-25 05:30:07 -04: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 2e2ede6334 Calling ParticleSystem:setLinearAcceleration with no arguments now errors instead of defaulting to 0 (resolves issue #755) 2013-09-23 17:12:20 -03:00
Alex Szpakowski 21d1e7737c Fixed ParticleSystem:setAreaSpread("none") to not require x/y arguments (resolves issue #738) 2013-09-17 00:54:55 -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 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 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 dc755ed375 Removed ParticleSystem:getX/getY (resolves issue #633) 2013-08-04 18:27:36 -03:00
Alex Szpakowski 8408c276cb ParticleSystem:setColors(r, g, b) now defaults to 255 alpha instead of erroring (resolves issue #686) 2013-07-21 21:41:23 -03:00
Alex Szpakowski d5ef29e015 Removed the optional variation parameter from ParticleSystem:setSpin (issue #634). ParticleSystem:setSpinVariation still exists. 2013-07-09 07:48:42 -03:00
Alex Szpakowski da7bc06976 ParticleSystem:setSizes no longer resets size variation to 0 (issue #640) 2013-07-09 07:38:44 -03:00
Alex Szpakowski de745aa37c Fixed ParticleSystem drawing order (issue #604) & added ParticleSystem:s/getInsertMode. Thanks @Boolsheet! 2013-07-09 04:17:34 -03:00
Alex Szpakowski 0545138f1e Added ParticleSystem:isStopped (issue #623) 2013-05-24 02:21:47 -03:00
Alex Szpakowski 0c58d5d46a Added ParticleSystem:isPaused (issue #623) and removed ParticleSystem:isEmpty/isFull (issue #621) 2013-05-23 13:42:29 -03:00
Bart van Strien 16e27d95b1 Rename ParticleSystem:setLifetime/setParticleLife and getters to setEmitterLifetime/setParticleLifetime (issue #601) 2013-05-10 16:50:20 +02:00
Alex Szpakowski 4c616e409b Renamed ParticleSystem:count, Channel:count, and all getNum* functions to get*Count (issue #602) 2013-05-03 04:04:44 -03:00
vrld 71317c4359 Add Geometries (replaces Quads).
A Geometry is a collection of vertices describing a non self-intersecting
(simple) polygon. In addition to screen coordinates, the vertices have
attributes for texture coordinates (s,t) and color (r,g,b,a).

It can be used as a quad, to display distorted images, or anything in between.

Added:
^^^^^^

-- geometry from table, where table has the format:
-- info = {
-- {x,y, s,t, [r = 255, g = 255, b = 255, a = 255]}
-- {x,y, s,t, [r = 255, g = 255, b = 255, a = 255]}
-- ...
-- }
geom = love.graphics.newGeometry(info)

-- convenience wrapper for quads (same as before)
geom = love.graphics.newQuad(x,y, w,h, sw,sh)

-- retrieve vertex i (1-indexed)
x,y,s,t,r,g,b,a = geom:getVertex(i)

-- set vertex i (1-indexed)
geom:setVertex(i, x,y, s,t, [r,g,b,a])

-- flip geometry
geom:flip(x, y)


Renamed:
^^^^^^^^

love.graphics.drawq() -> love.graphics.drawg()


Removed:
^^^^^^^^

quad:setViewport()
quad:getViewport()
2013-04-21 18:53:13 +02:00
Alex Szpakowski 426ca03315 Added ParticleSystem:setLinearAcceleration(xmin, ymin, xmax, ymax) and removed ParticleSystem:setGravity (issue #599) 2013-04-19 15:33:30 -03:00
Alex Szpakowski b6247f9ae1 Added many getters of questionable utility to ParticleSystems.
Storing your own values is blasphemy, clearly.
2013-04-18 04:54:53 -03:00
Alex Szpakowski eef4eed636 Cleaned up some Lua binding code 2013-03-31 04:55:03 -03:00
Alex Szpakowski 7b8884965e Added ParticleSystem:emit(num) (issue #577) 2013-03-27 01:09:53 -03:00
Alex Szpakowski d383434edf ParticleSystem:setColors now accepts multiple color arrays (issue #440) 2013-03-13 14:38:58 -03:00
Alex Szpakowski 4704c4e19e Cleaned up some ParticleSystem and Quad code 2013-03-11 17:56:55 -03:00
Alex Szpakowski 318f335c7c ParticleSystem:setQuads can now accept a table argument, cleaned up the ParticleSystem quad code
--HG--
branch : particlesystem-quads
2013-03-11 01:44:43 -03:00
Alex Szpakowski d30809ebff Added ParticleSystem:setQuads(q1, q2, ...), quads are chosen based on current particle lifetime in a similar style to ParticleSystem:setColors
--HG--
branch : particlesystem-quads
2013-03-10 03:40:25 -03:00
Alex Szpakowski 96161c66f6 Updated copyright text for the new year 2013-02-05 05:32:49 -04:00
Bart van Strien 4221d55468 Enfore limits on ParticleSystem:setSizeVariation (issue #545) 2013-01-18 21:03:07 +01:00
vrld 4ec7609d37 Fix issue #437: Area-based particle spawn.
New particles are spawned around the particle emitter position according to a
configurabe distribution.

New functionality:

particlesystem:setAreaSpread(distributon, x, y)
distribution, x, y = particlesystem:getAreaSpread()

Where `distribution' is one of "none", "uniform", "normal".
`x' and `y' take different meaning based on the distribution:

  * none:    no area spread - particles spawned at emitter position.
  * uniform: particle spawned at px,py in the rectangle around emitter
             position ex,ey, i.e.:
             ex - x < px < ex + x, ey - y < py < ey + y,
  * normal:  particle position drawn from a normal/gaussian distribution
             with mean ex,ey and standard deviation x,y, i.e.:
             px \in N(ex, x²), py \in N(ey, y²).
2012-09-10 19:58:44 +02:00
Bart van Strien 7793e7f02f CRLF to LF 2012-07-04 14:40:24 +02:00
rude 81c38e22d0 Applied the new style guidelines.
Well, sort of. Lot's more to be done, but this is a start.
2012-06-28 23:52:33 +02:00
Bill Meltsner 86abc9323b Add ParticleSystem:getPosition (issue #368) 2012-02-04 11:31:07 -05:00
vrld 94bd960cc7 Fix number of arguments check in w_ParticleSystem_setSizes. 2012-01-20 14:07:22 +01:00