Commit Graph

2239 Commits

Author SHA1 Message Date
BobbyJones 9dc50fe423 switched c.useexternalstorage to c.externalstorage
--HG--
branch : new-conf-flag-for-android-2
2016-01-02 19:16:20 -05:00
BobbyJones e3da734ace clean up 2016-01-02 18:56:23 -05:00
BobbyJones 3aa51763e2 made a method for setting external save location on android 2016-01-02 18:52:25 -05:00
BobbyJones c283e36126 made a new boot.lua.h 2015-12-31 02:16:36 -05:00
BobbyJones 3c83fb8626 Added a flag that changes android storage from internal to external. 2015-12-31 01:28:00 -05:00
Alex Szpakowski a42341aa73 Added a new variant of love.graphics.arc: arc(drawmode, arcmode, x, y, radius, angle1, angle2 [, points]).
arcmode is "open", "closed", or "pie" (with pie being the mode used for the original variant of the function).
2015-12-31 00:13:01 -04:00
Alex Szpakowski 2cadb30ecf Updated the version to 0.10.1. 2015-12-29 22:52:16 -04:00
Alex Szpakowski ef94e43af1 Fixed Shader:sendColor incorrectly converting alpha from sRGB to linear RGB when gamma-correct rendering is enabled. 2015-12-29 01:30:45 -04:00
Alex Szpakowski 1ad5a768f6 Fixed love.graphics.newMesh(vertices) double-converting colors from sRGB to linear RGB, when gamma-correct rendering is enabled. 2015-12-29 01:11:05 -04:00
Alex Szpakowski 09e6a9a434 When multiple canvases are active at once (MRT), individual canvases can now be selectively cleared with love.graphics.clear(c1, c2, ...) by passing empty tables for the canvases that shouldn't be cleared, and color tables for the canvases that should. 2015-12-29 00:10:40 -04:00
Alex Szpakowski b56a0cfc3d Avoid hard crashes when calling love.filesystem functions if love.filesystem.init was never called.
This only applies when liblove is used directly, as love.filesystem.init is called automatically when the love executable starts up.
2015-12-24 22:53:48 -05:00
Alex Szpakowski 67fe29b30e More accurate comment. 2015-12-24 17:33:50 -05:00
Alex Szpakowski c751e4881a Possibly fixed everything showing up as black on some Android devices. 2015-12-24 17:09:30 -05:00
Alex Szpakowski 538f3869c5 Don't query the current texture bindings when initializing OpenGL. 2015-12-24 15:53:50 -05:00
Alex Szpakowski 5ef0195a88 Fixed an error in the nogame screen if the window's height is too small. 2015-12-22 15:47:50 -05:00
Martin Felis 007e113ec5 android: disabling JIT by default as it may cause performance problems. To enable it run jit.on(). 2015-12-22 10:04:44 +01:00
Alex Szpakowski 9e7c9186d4 Fixed the equals / keypad-equals scancodes. 2015-12-21 11:04:50 -05:00
Alex Szpakowski 2ad1712eaf Font:getWrap can now accept a colored text table in the same format as what's accepted by love.graphics.print. Resolves issue #1108.
The returned table of strings still has no color information.
2015-12-20 19:25:09 -05:00
Alex Szpakowski efa08b1e44 Fixed a compile failure on Android (thanks xenthral!) 2015-12-19 22:21:50 -04:00
Alex Szpakowski f6809f941d Cleaned up some love.window code. 2015-12-17 23:15:06 -04:00
Alex Szpakowski 4e75c7be9a Improved the window and OpenGL context creation code to try more options if the OpenGL version is too low (e.g. if the driver in Windows gave back a Microsoft GL 1.1 software context because of a high requested MSAA value.) 2015-12-17 19:03:13 -04:00
Alex Szpakowski 48345bd58c Changed the optional 'multiply alpha' boolean argument in love.graphics.setBlendMode to be an enum with constants 'alphamultiply' and 'premultiplied'.
The default value for the second argument of setBlendMode is 'alphamultiply'.
2015-12-16 14:53:16 -04:00
Alex Szpakowski dad93959f9 Fixed a memory leak. 2015-12-15 21:51:47 -04:00
Alex Szpakowski 5460a5b872 Hopefully work around an nvidia graphics driver bug in OS X.
Some nvidia GPUs in OS X fail to render geometry that uses an OpenGL index buffer and client-side vertex arrays. This affected ParticleSystems and love.graphics.print. The code for those has been changed to use a client-side index array instead of an OpenGL index buffer.
2015-12-15 21:50:38 -04:00
Alex Szpakowski cdc019b96b libmodplug is now used on iOS. 2015-12-15 14:03:44 -04:00
Alex Szpakowski 0a059814e7 Revamped love.graphics.stencil and love.graphics.setStencilTest:
- Each canvas (and the screen) has an invisible stencil value associated with each pixel. Stencil values are between [0, 255].

- love.graphics.stencil takes a function argument which draws things, and makes the geometry of what's drawn set the stencil values of pixels instead of coloring the pixels.

- Its second argument is a 'stencil action' which determines what happens to the stencil values of pixels. The possible stencil actions are 'replace' (the default), 'invert', 'increment', 'decrement', 'incrementwrap', and 'decrementwrap'. If the stencil action is 'replace', the third argument of love.graphics.stencil is a number between [0, 255] which determines what the stencil value of each pixel that touches drawn objects is replaced with.

The fourth argument is a boolean which determines whether the previous stencil values of all pixels on-screen should be kept (true), or cleared to 0 (false, the default.) love.graphics.clear also clears the stencil values.

- love.graphics.setStencilTest allows for anything drawn to be affected by a comparison between the arguments to setStencilTest and the existing stencil value of the pixels that are touched by what's drawn. Its first argument is a compare mode which can be 'equal', 'notequal', 'less', 'lequal', 'gequal', or 'greater', and the second argument is an integer value (between 0 and 255) used in the comparison with the value in the stencil buffer.

For example, love.graphics.setStencilTest("greater", 0) will cause any geometry drawn afterwards to only appear on pixels whose stencil value is greater than 0.
2015-12-14 20:43:39 -04:00
Alex Szpakowski cabf6dcae2 Made type checking for love objects slightly more robust.
LÖVE should now cause an error instead of a crash when a Lua io file is passed into an argument expecting a love object.
2015-12-14 18:30:43 -04:00
Alex Szpakowski ed0ec611b9 Pressing escape now exits the nogame screen. 2015-12-14 11:54:09 -04:00
Alex Szpakowski c73fb2ef98 Fixed stenciling inside a Canvas in OpenGL ES 2. 2015-12-13 23:50:23 -04:00
Alex Szpakowski 493d5d6911 Removed more dead video remote code. 2015-12-13 21:54:55 -04:00
Alex Szpakowski 9573b415a3 Whoops... 2015-12-13 21:45:59 -04:00
Alex Szpakowski 834bd149d5 Fixed Video:setSource(nil). 2015-12-13 21:45:25 -04:00
Alex Szpakowski 2d7a99a3ae Set the internal wrap mode for videos to clamp. Fixes video playback on some OpenGL ES devices. 2015-12-13 21:22:36 -04:00
Alex Szpakowski 7b8af113da Fixed the minimum window size to re-set itself when love.window.setFullscreen(false) is called. 2015-12-13 20:50:35 -04:00
Alex Szpakowski 925eebdaf0 Removed love.event.addListener/removeListener/clearListeners.
They take away too much control from the main game code, which makes it harder to implement things like gamestates without modifying library code.
2015-12-12 17:54:54 -04:00
Alex Szpakowski 9893f7ad51 Fixed an error message. 2015-12-12 14:23:47 -04:00
Alex Szpakowski e5c0c49751 Added love.event.clearListeners. 2015-12-12 14:19:37 -04:00
Alex Szpakowski 44d4ce2c99 Show the error screen instead of just exiting after printing the error, if there's a syntax error in conf.lua (thanks Shoozza!) 2015-12-12 14:13:04 -04:00
Alex Szpakowski de0b63a48d Re-added love.filesystem.exists.
If PhysFS 2.1-alpha is used and a directory is symlinked, isDirectory will return false (whereas it will return true when PhysFS 2.0 is used.) exists will return true in all cases.
2015-12-11 23:17:49 -04:00
Alex Szpakowski 532943649b Slightly tweaked the no-game screen. 2015-12-11 22:33:51 -04:00
Alex Szpakowski 3eb363059b Added love.event.addListener and removeListener.
addListener takes a function, and names of events that will trigger the function when they're processed inside love.event.poll or love.event.wait. When the given listener function is called, the name of the event as well as all of the event's arguments are passed to the function.

If addListener is called multiple times with the same function and events, it will not add the function more than once.

removeListener takes a function and removes it from all events it was previously added to.
2015-12-11 20:14:52 -04:00
Alex Szpakowski 77b832057d Fixed the Windows build... 2015-12-11 00:21:33 -04:00
Alex Szpakowski 7769090c1f Mesh:setVertices can now accept a Data object. 2015-12-11 00:07:42 -04:00
Alex Szpakowski 20fb7f44df Cleaned up the code for love.math.random and related functions. 2015-12-10 13:09:54 -04:00
Alex Szpakowski 52b1bd78f2 Implemented LuaJIT FFI versions of love.math.random and RandomGenerator:random. 2015-12-10 12:45:53 -04:00
Alex Szpakowski 7ee02e8d37 Fixed most PhysFS deprecated call warnings on iOS/Android. 2015-12-09 17:22:46 -04:00
Bart van Strien 22f2175bec Add initial video playback support for Ogg Theora videos (resolves issue #66.)
The basic APIs are:

video = love.graphics.newVideo("myvideo.ogv")

love.graphics.draw(video, ...) -- Video objects are Drawables.

video:play(), video:pause()

video:getDuration(), video:tell(), video:rewind(), video:seek(seconds)

video:getSource()

video:getWidth(), video:getHeight(), video:setFilter(min, mag)

More advanced APIs include video:setSource(source), video:getStream(), and videostream:setSync.

To use a custom pixel shader when drawing a Video, call the new TexelVideo(texcoords) function instead of Texel(texture, texcoords) in order to get the pixel colors of a video frame.
2015-12-08 22:41:19 -04:00
Alex Szpakowski a1dab12117 Fixed a bug in love.math.gammaToLinear/linearToGamma when a table with an alpha channel is passed in as an argument. 2015-12-08 21:43:32 -04:00
Alex Szpakowski 374d1ae0e1 Implemented LuaJIT FFI versions of love.math.noise, love.math.gammaToLinear, and love.math.linearToGamma.
The new versions of the functions are only used if LuaJIT's JIT compiler is enabled.

Those functions are often combined with ImageData:mapPixel or ImageData:setPixel, which also have LuaJIT FFI versions in 0.10.0 - so without JIT-able implementations of the math functions, the FFI code in the ImageData methods would not be JIT-compiled and would end up taking up to 10 times as long to execute compared to the non-FFI versions in 0.9.2.
2015-12-08 21:24:16 -04:00
Alex Szpakowski 004ffb8819 Fixed the build. 2015-12-07 23:14:27 -04:00