Commit Graph

47 Commits

Author SHA1 Message Date
Alex Szpakowski c7b45b3505 Updated copyright for the new year 2014-12-31 19:32:43 -04:00
Alex Szpakowski d5ccdc040a Cleaned up some Proxy-related code. 2014-08-09 16:18:22 -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 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 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 259bb8ffdb Fixed errors caused by love exceptions to give a line number (see issue #772) 2013-10-23 15:20:31 -03:00
Alex Szpakowski 8d5ddb9e34 Fixed some internal documentation (thanks to clang's -Wdocumentation) 2013-09-23 21:52:28 -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 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 12c5bbfb9a Improved error messages when a function which expects a love type gets something else 2013-07-10 11:59:12 -03:00
Bart van Strien f5603b0291 Make love compile against lua5.2 2013-07-10 16:02:52 +02:00
Alex Szpakowski 4dc2072fc6 Fixed error messages in functions where love.filesystem.newFile(Data) is called internally 2013-05-23 17:59:15 -03:00
Alex Szpakowski ff77eb4b29 Added love.window (issue #6.) All window-related functions have been moved from love.graphics to love.window.
love.graphics.setCaption has been renamed to love.window.setTitle.
2013-05-10 22:32:15 -03:00
Alex Szpakowski 1edfbb766f Misc. fixes 2013-05-01 16:17:42 -07: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
Bart van Strien 3d0c5761ce Merge in default, update changelog
--HG--
branch : minor
2013-03-03 19:51:04 +01:00
Alex Szpakowski 96161c66f6 Updated copyright text for the new year 2013-02-05 05:32:49 -04:00
rude c03e35b6cc Merge default branch.
--HG--
branch : minor
2013-01-12 11:52:04 +01:00
Bart van Strien 68a895e7c6 Catch errors in love.font.newRasterizer, add luax_pconvobj which pcalls, allowing love.graphics.newFont to clean up before re-erroring 2012-12-15 14:26:46 +01:00
Bart van Strien 399a6a6614 Merge in channels from love-experiments
Rewritten love.thread and changed communication
method from weird system before, to channels.

--HG--
branch : minor
2012-07-04 17:15:16 +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 be55579a22 Happy New Year, have an enormous diff 2012-01-09 02:41:11 -06:00
Bart van Strien 0aae9684b3 Automated formatting fix 2011-11-16 11:32:41 +01:00
Bart van Strien 2fafab9a0e Add luax_checkstring/pushstring functions that handle inline \0 characters 2011-11-15 21:37:11 +01:00
Bart van Strien 09367dc3bd Make love loaders the first 2, preventing lua loaders from loading the wrong files (issue #283) 2011-08-22 18:04:19 +02:00
rude e1d1ebb2f1 Fix warnings in MSVC 2010. 2011-07-24 18:32:11 +02:00
Bill Meltsner fde708160e bringing in the new year by changing every 2010 to 2011 2011-01-15 14:40:27 -06:00
bart@bartbes.ath.cx 200d4bc653 It looks like a dirty hack, it probably is, but this fixes the GC 2010-05-20 21:53:50 +02:00
bart@bartbes.ath.cx 3d726b0dd9 Added mutexes to the GC and made tip buildable again on linux 2010-05-20 17:31:07 +02:00
Bill Meltsner 17d7770eec added varargs version of luax_convobj (for making Rasterizers) 2010-04-15 10:18:09 -04:00
Bill Meltsner 7c33786100 fixed a ridiculous number of gcc warnings, nearly all of which were complaints about unused parameters - the remaining 199 warnings I get are from code that isn't ours (box2d is responsible for all but 8 of them) 2010-02-26 03:55:21 -05:00
rude aa01c984b9 Updated all dates to 2010. 2010-01-31 16:54:47 +01:00
rude 5b30c7fcfe Major developments to love.audio/love.sound. Music and Sound are gone. There are only Sources now, which is much cleaner.
The audio module was not really stable in 0.6.0, it takes very little messing around to cause OpenAL to do horrible things. It should now be much more stable,
and you *should* be able to play/stop/pause/resume/rewind/loop like a madman without disasters. Seek and tell, however, are still not tested and verified for
all decoders, but that's less important. Also, all objects now have object:type() and object:typeOf(), which returns the type name of the object,
and checks whether an object is of a certain type, respectively.
2010-01-31 11:52:54 +01:00
bill@localhost 6853f8374e made building from source on OS X a hell of a lot easier - no more .dylibs, and all the header files are contained in the frameworks (as they should be!) 2009-11-01 22:09:23 -06:00
rude 87e3c4131c Finally abstracted constants properly. Changed how the event module works; wasn't really abstract before. Removed libs we're not going to use: native, signal. 2009-10-10 11:11:04 +02:00
rude 623e701549 Modules now reside in Lua and are treated (almost) like normal objects.
Also added a way of getting a pointer to abstract module instances internally.
2009-09-02 21:18:13 +02:00
rude d4a97d49f3 Added all callbacks to World. 2009-08-15 14:29:47 +02:00
rude ba1a75e547 Added many comments, and changed function names for wrapper functions. 2009-08-09 21:08:55 +02:00
rude 8e681b4204 It's now possible to build each module individually (as a DLL). 2009-08-04 19:57:14 +02:00
rude 0c241a14fb Added resources, and changed slightly how wrappers expose functions. 2009-07-30 00:37:43 +02:00
rude e0115a384e Moved most constants into relevant classes. 2009-07-26 23:05:26 +02:00
rude dcb3dfd83d Initial Mercurial commit. 2009-07-26 15:46:49 +02:00