Commit Graph

2403 Commits

Author SHA1 Message Date
Alex Szpakowski a29b349014 Added love.math.compress(data, format [, level]) and love.math.decompress(compresseddata) / love.math.decompress(compressedstring, format).
Renamed the love.image CompressedData type to CompressedImageData.

love.math.compress returns a love.math CompressedData object which holds the newly compressed data. Currently supported formats are "lz4" and "zlib". Note that the formats are not file formats and don't compress filesystem hierarchies.
2015-03-23 11:28:14 -03:00
Alex Szpakowski 4d92d00aff Fixed compilation on OSX/Windows/iOS 2015-03-23 00:24:06 -03:00
Bart van Strien 37f04a7f3d Set LOVE_LINUX when compiling under BSD (see issue #867)
Not technically correct, but it seems to be working, sample size 1.
2015-03-22 19:57:00 +01:00
vrld f32d770cf6 Add BezierCurve:getSegment(t1, t2)
Returns a BezierCurve that corresponds to the curve-segment between t1 and t2
on the original curve.
2015-03-22 19:22:18 +01:00
vrld f7cb16be87 Merged in muddmaker/love-render-curve-segment (pull request #39)
Add BezierCurve:renderSegment
2015-03-22 19:16:24 +01:00
muddmaker 8ee2db3420 Fix typos 2015-03-22 10:16:12 -07:00
Bart van Strien cb02452c08 Verify both platform and endianness have been determined in configuration 2015-03-22 14:26:25 +01:00
muddmaker 3a54d4599a fix conflicts 2015-03-21 18:15:41 -07:00
Alex Szpakowski e237ed2432 love.graphics.discard now accepts a table of booleans indicating which of the active canvases to discard (matches love.graphics.clear.) 2015-03-21 02:36:13 -03:00
Alex Szpakowski 163d059305 Moved most of the love.timer code out of the sdl implementation folder. 2015-03-20 00:55:14 -03:00
Alex Szpakowski d31168c0e0 Cleaned up some graphics code. 2015-03-20 00:16:36 -03:00
Alex Szpakowski 7741adc7b4 Switched back to zlib decompression for PNG images and fixed a memory leak issue when decompressing. 2015-03-19 17:08:44 -03:00
Alex Szpakowski 5138acaee5 Temporarily disabled zlib decompression for PNG images, in favour of LodePNG's built-in decompression code. 2015-03-19 14:41:15 -03:00
Alex Szpakowski a36dbc3d49 Only update the shader point size in OpenGL ES 2 when it's been modified, rather than before every draw. 2015-03-17 17:24:45 -03:00
Alex Szpakowski 4a8e5bd4db Avoid non-ASCII UTF-8 in message box text - SDL's X11 backend for message boxes doesn't properly support it yet (https://bugzilla.libsdl.org/show_bug.cgi?id=1658). 2015-03-17 11:54:52 -03:00
Alex Szpakowski d982f02634 Renamed File:eof to File:isEOF (closes issue #683.) 2015-03-17 01:13:29 -03:00
Alex Szpakowski 06ef263537 Added OpenGL debug groups for most graphics operations when love is built in debug mode for iOS. The Xcode frame capture tool uses them to create nice visual groups for OpenGL function calls. 2015-03-16 22:55:58 -03:00
Alex Szpakowski 14cbc91e7f Fixed a memory leak in love.graphics.newText. 2015-03-16 03:13:10 -03:00
Alex Szpakowski d00773b974 Updated GLAD for the latest GL and GLES extensions. 2015-03-15 23:45:08 -03:00
Alex Szpakowski 468127eed4 Added a variant of love.graphics.clear which accepts a color table argument for each active canvas, allowing it to clear active canvases to different colors without having to call love.graphics.setCanvas. 2015-03-15 15:15:21 -03:00
Alex Szpakowski 5bc5a2b780 Show the compatibility warning message box before creating the window and loading main.lua, so it will still display even if there are errors in main.lua.
Also snprintf is only supported in VS2015...
2015-03-15 12:34:40 -03:00
Bart van Strien 715cab4f6f Fix love.joystick.setGamepadMapping suffix overwriting bug
Previously, if "leftx" was mapped before "x", the latter mapping would overwrite
the former, or in general if any mapping was a suffix of another, it needed to
be mapped first.
2015-03-15 15:53:48 +01:00
Alex Szpakowski 44b9efb43e Added love.isVersionCompatible. Returns true if the running version of love is compatible with the specified version. 2015-03-13 19:26:09 -03:00
Alex Szpakowski a119e6a862 Added an optional spacing argument to love.graphics.newImageFont, allowing additional spacing (positive or negative) to be applied to all glyphs rendered using that font. 2015-03-11 18:28:22 -03:00
Alex Szpakowski b1f4beac56 Fixed the internal color mask state not being updated when love.graphics.setColorMask is called. 2015-03-10 01:13:39 -03:00
Alex Szpakowski 2e8f19930c Fixed love.graphics.stencil 2015-03-09 23:08:42 -03:00
Alex Szpakowski 52b2701cf0 Removed love.graphics.clearStencil. love.graphics.stencil now clears the stencil buffer unless true is passed as an optional second argument ('keep the existing contents'.) 2015-03-09 23:05:29 -03:00
Alex Szpakowski b76b7bac8b Added support for a few more mouse buttons (via "x3", "x4", and "x5" button constants.) 2015-03-07 23:28:58 -04:00
Alex Szpakowski 4ef0d257e9 Added an optional font hinting argument to love.graphics.newFont / love.font.newRasterizer when loading TrueType fonts. Resolves issue #963.
Accepted values are "normal", "light", "mono", and "none".
2015-03-07 22:05:37 -04:00
Alex Szpakowski afcad4defc Added new flag t.accelerometerjoystick to love.conf (true by default.) When set to false on mobile, the device's accelerometer will not show up as a joystick even if the joystick module is loaded.
This can reduce CPU usage if you don't use the accelerometer but you don't want to disable the joystick module entirely.
2015-03-07 15:36:53 -04:00
Alex Szpakowski 7e99ea6839 Added a boolean argument to love.mousemoved indicating whether the event came from a touch press (love.mousepressed and love.mousereleased already have it.) 2015-03-07 00:41:18 -04:00
Alex Szpakowski 4dc73959a6 Hopefully fixed a major bug related to using Shader:send with textures. 2015-03-06 02:08:33 -04:00
Alex Szpakowski b39036eaa5 Added Image:getFlags. 2015-03-04 23:07:05 -04:00
Alex Szpakowski c561308c96 Font:getWrap's second return value is now a table containing the text split into lines. Resolves issue #1002. 2015-03-04 20:35:41 -04:00
Alex Szpakowski 4fa5ab4a07 Fixed the winding order of triangles in SpriteBatches and ParticleSystems. 2015-03-04 16:03:01 -04:00
Alex Szpakowski 4263de89ab The default offset for particles in a ParticleSystem is now updated when ParticleSystem:setQuads or ParticleSystem:setTexture is used (resolves issue #998.) 2015-03-04 03:57:41 -04:00
Alex Szpakowski e2652fddc1 Updated the readme. 2015-03-04 03:21:26 -04:00
Alex Szpakowski 06fa7bd7a4 Don't enable SDL_GL_FRAMEBUFFER_SRGB_CAPABLE in Linux when creating the window, to work around a potential bug. sRGB windows are still possible even without that. 2015-03-03 17:48:19 -04:00
Alex Szpakowski 8277eb9abd Renamed the internal OpenGL buffer class from VertexBuffer to GLBuffer. 2015-03-03 02:21:28 -04:00
Alex Szpakowski d7667ea8fc Updated changelog. 2015-03-03 00:49:46 -04:00
Alex Szpakowski 275a9a300f Multi-canvas rendering (love.graphics.setCanvas with multiple canvases) now allows canvases with different formats, if the system supports it. Added 'multicanvasformats' to the table returned by love.graphics.getSupported.
--HG--
branch : minor
2015-03-02 23:43:09 -04:00
Alex Szpakowski 3ced9ca38f Added one- and two-channel Canvas formats: r8, rg8, r16f, rg16f, r32f, and rg32f.
--HG--
branch : minor
2015-03-02 18:06:14 -04:00
Alex Szpakowski 3fea174008 Cleaned up some shader code.
--HG--
branch : minor
2015-03-02 15:18:12 -04:00
Alex Szpakowski 3536f2665f love.graphics.clear can accept an array of color components.
--HG--
branch : minor
2015-03-02 02:32:53 -04:00
Alex Szpakowski 9869999fda Added a missing key constant.
--HG--
branch : minor
2015-03-02 00:52:07 -04:00
Alex Szpakowski bf5f0b4175 bmp isn't a supported format for ImageData:encode.
--HG--
branch : minor
2015-03-01 23:38:34 -04:00
Alex Szpakowski dcbe7c4871 Added a static assert to make sure type IDs always have a corresponding type name.
--HG--
branch : minor
2015-03-01 18:42:02 -04: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 3830a0969c Moved the Texture and Quad Lua wrapper files out of the opengl graphics implementation folder.
--HG--
branch : minor
2015-03-01 03:51:44 -04:00
Alex Szpakowski c572b1af19 Moved the Lua wrapper code for love.event out of the sdl implementation folder.
--HG--
branch : minor
2015-03-01 02:55:50 -04:00