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
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
3120a0e650
Goodbye 2013, hello 2014!
2014-01-03 17:28:58 -04:00
Alex Szpakowski
4e321697d3
Renamed Font:hasGlyph to Font:hasGlyphs, and expanded it to accept multiple arguments and full strings. Resolves issue #762 .
2013-10-25 21:56:32 -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
76618f0328
Cleaned up font code to always use uint32 instead of the slightly more ambiguous "unsigned int" for codepoints
2013-06-16 19:48:53 -03:00
Alex Szpakowski
d48d1fd441
Exposed the internal Rasterizer and GlyphData object methods to Lua. Also added Font:hasGlyph.
2013-06-16 07:36:18 -03:00
Alex Szpakowski
96161c66f6
Updated copyright text for the new year
2013-02-05 05:32:49 -04: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
be55579a22
Happy New Year, have an enormous diff
2012-01-09 02:41:11 -06:00
Bart van Strien
c707a4ca45
Properly export all lua-facing functions and use those for initialization (love.cpp no longer explicitly mentions implementations)
2011-12-24 01:10:40 +01:00
Bart van Strien
0aae9684b3
Automated formatting fix
2011-11-16 11:32:41 +01:00
Bill Meltsner
fde708160e
bringing in the new year by changing every 2010 to 2011
2011-01-15 14:40:27 -06:00
Bill Meltsner
e3a5aacd5a
Overhauled ImageRasterizer, fixed a bunch of other crap, getting ready to poke around in love.graphics
2010-04-14 21:51:35 -04:00
rude
aa01c984b9
Updated all dates to 2010.
2010-01-31 16:54:47 +01:00
rude
dd420d68a3
Ok, project generation didn't really work out. Reverted.
2009-08-10 21:33:07 +02:00
rude
ba1a75e547
Added many comments, and changed function names for wrapper functions.
2009-08-09 21:08:55 +02:00
rude
477d5a05b8
Updated love.font, and added Glyph object in love.graphics.
2009-07-30 21:43:00 +02:00