Commit Graph

53 Commits

Author SHA1 Message Date
Alex Szpakowski 23c9edcc52 Hopefully fix the build
--HG--
branch : minor
2017-08-27 18:17:30 -03:00
Alex Szpakowski 9d0e984c3d Add love.filesystem.getInfo. Deprecate love.filesystem.exists/isDirectory/isFile/isSymlink/getLastModified/getSize. Resolves issue #641.
--HG--
branch : minor
2017-08-27 18:14:54 -03:00
Alex Szpakowski fee157b6b9 Functions that take a boolean argument now properly type-check for it.
--HG--
branch : minor
2017-08-14 22:56:20 -03:00
Alex Szpakowski 2dd6408d00 Images/[Compressed]ImageData can be created using any Data, instead of just files or FileData.
--HG--
branch : minor
2017-08-05 23:55:20 -03:00
Alex Szpakowski 17cf7bba83 Cleaned up love.graphics.newShader's wrapper code a bit.
--HG--
branch : minor
2017-07-29 23:09:45 -03:00
Alex Szpakowski 5ef6730497 Added a variant of love.graphics.captureScreenshot which takes a single filename parameter. Resolves issue #1293.
--HG--
branch : minor
2017-07-29 12:54:53 -03:00
Alex Szpakowski 94ce558126 require now looks for both .dylib and .so extensions for C dynamic libraries in macOS, instead of just .so.
It also now replaces all occurrences of '??' and '?' in the path with the module filename and module name respectively, rather than just the first occurrence.

--HG--
branch : minor
2017-07-27 19:54:56 -03:00
Alex Szpakowski 28ed5e5a4b Actually merge the latest default into minor…
--HG--
branch : minor
2017-01-12 22:55:19 -04:00
evan yeung 8d269226c0 Let the love.filesystem loader support the template path for multiple interrogation mark. 2017-01-04 02:26:22 +00:00
evan yeung 9b77dbe262 Let the love.filesystem loader support the template path for multiple interrogation mark. 2017-01-04 01:56:27 +00:00
Alex Szpakowski abb72cb813 Happy new year! 🥂
--HG--
branch : minor
2017-01-02 01:28:29 -04:00
Bart van Strien 5d43c9601a Automatically deduce the type in luax_pushtype, if possible
--HG--
branch : dynamiccore2
2016-11-13 17:38:42 +01:00
Bart van Strien 7dd960619d Automatically deduce the type in luax_checktype, luax_getmodule, luax_optmodule and luax_totype
--HG--
branch : dynamiccore2
2016-11-13 17:13:40 +01:00
Bart van Strien c761202486 Build type information on first use (load-time), instead of using a hardcoded list
--HG--
branch : dynamiccore2
2016-11-13 16:38:57 +01:00
Alex Szpakowski ef61573cd3 Merge default into minor
--HG--
branch : minor
2016-08-29 22:41:24 -03:00
Alex Szpakowski acde58d311 Improved the error message when nil is passed as the first argument to love.image.newImageData (resolves issue #1205). 2016-08-21 11:22:21 -03:00
Bart van Strien db8e7a7670 Merge default into minor
--HG--
branch : minor
2016-04-02 17:19:20 +02:00
Alex Szpakowski 1b1572ad85 love.filesystem.mount accepts DroppedFiles in the first parameter. You could previously pass in DroppedFile:getFilename() and it would work too, this just makes it a bit nicer. 2016-03-31 17:58:27 -03:00
Alex Szpakowski 734789eb93 Added love.math.encode(format, data | string [, linelength]) and love.math.decode(format, data | string). Current formats are "base64" and "hex". The optional line length only applies to base64 and specifies the maximum number of characters per line in the encoded string.
Removed the variant of love.filesystem.newFileData which decoded a base64-encoded string since it's redundant.

--HG--
branch : minor
2016-03-28 19:28:40 -03:00
Alex Szpakowski 2e5f385be3 Merge default into minor
--HG--
branch : minor
2016-03-03 21:28:30 -04:00
Alex Szpakowski f51bbb8462 Cleaned up some StrongRef-related code. 2016-03-01 18:57:17 -04:00
Bart van Strien 33341de7bc Rewrite the c module loader, adding a search path (fixes #1050)
Note: also removes the restriction that only fused games can load libraries from
their save folders.

--HG--
branch : minor
2016-02-26 15:24:01 +01:00
Alex Szpakowski 8566729229 Merged in Bobbyjones/love/new-conf-flag-for-android-2 (pull request #53)
New conf flag for android 2
2016-01-10 20:11:34 -04:00
BobbyJones 2c550fbf6d now I removed it from the wrap :)
--HG--
branch : new-conf-flag-for-android-2
2016-01-09 19:47:45 -05:00
BobbyJones e855f2ae01 removed the isAndroidSaveExternal from the wrap
--HG--
branch : new-conf-flag-for-android-2
2016-01-09 19:45:47 -05:00
BobbyJones 57467448ad Made the android set save functions private.
--HG--
branch : new-conf-flag-for-android-2
2016-01-09 10:35:20 -05:00
BobbyJones 3aa51763e2 made a method for setting external save location on android 2016-01-02 18:52:25 -05:00
Alex Szpakowski 46a2e7b85c Happy new year! 🎉 2016-01-01 00:05:06 -04:00
BobbyJones 3c83fb8626 Added a flag that changes android storage from internal to external. 2015-12-31 01:28:00 -05: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
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 0f986b10aa Cleaned up some code, the 'ry' parameter of love.graphics.rectangle now defaults to the value of 'rx' rather than defaulting to 0. 2015-05-27 17:36:27 -03:00
Alex Szpakowski 811b2db466 The full executable path, rather than argv[0], is now used when determining whether the executable is fused (resolves issue #1043.) 2015-05-04 10:38:28 -03:00
Alex Szpakowski e7f56241ec Removed the callback argument from love.filesystem.getDirectoryItems (resolves issue #877.)
Cleaned up the getDirectoryItems ccde to no longer call Lua API functions from Filesystem.cpp (now it's all in wrap_Filesystem.cpp.)
2015-04-25 00:16:10 -03:00
Alex Szpakowski 2844499ef7 Added the ability to have custom vertex attributes in Meshes (resolves issue #768.)
Added new love.graphics.newMesh variants: newMesh(vertexformat, vertices [, drawmode, meshusage]) and newMesh(vertexformat, numvertices [, drawmode, meshusage]).

Replaced the regular love.graphics.newMesh variants with newMesh(vertices [, drawmode, meshusage]) and newMesh(numvertices [, drawmode, meshusage]). To use an image or canvas with a mesh, use Mesh:setTexture.

vertexformat is a table with the following prototype:
{
  {attributename, datatype, components},
  {attributename, datatype, components},
  ...
}

Where attributename is the name of the vertex attribute (can be the built-in names 'VertexPosition', 'VertexTexCoord', or 'VertexColor', or a custom name for use in a vertex shader), datatype is the type of values used for the attribute ('float' or 'byte'), and components is the number of components in the vertex attribute (between 1 and 4.)

The vertex format is used to determine the layout of the vertices in the mesh, for example the 'regular' newMesh variants use this vertex format:
format = {
  {"VertexPosition", "float", 2},
  {"VertexTexCoord", "float", 2},
  {"VertexColor", "byte", 4},
}

The mesh usage parameter accepts the same constants as the spritebatch usage hint in love.graphics.newSpriteBatch - "dynamic", "static", and "stream".

Mesh:setVertex now sets *all* vertex attributes for a specific vertex in the Mesh.

Added Mesh:setVertexAttribute(vertexindex, attributeindex, attributevalue1, ...), which sets the values for a specific vertex attribute in a specific vertex in the Mesh (resolves issue #784.)

Added Mesh:getVertexFormat and Mesh:flush.

Added Mesh:setAttributeEnabled(attributename, enable) and Mesh:isAttributeEnabled(attributename), to enable or disable the use of a specific attribute when drawing the Mesh.

Added Mesh:attachAttribute(attributename, mesh), which makes the Mesh use a vertex attribute from another mesh when drawing the Mesh. This can be used to separate out vertex attributes which are updated at different rates into different meshes, and to share vertex data between multiple meshes.

Removed Mesh:setVertices, Mesh:getVertices, and Mesh:setVertexColors.
2015-04-08 22:24:17 -03: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 d229fb1129 Merged default into minor
--HG--
branch : minor
2015-02-09 21:43:31 -04:00
Alex Szpakowski 320ec8b472 Added love.filesystem.getRealDirectory(filepath).
It returns the platform-specific full path of the directory containing the filepath (rather than the file.) For example, if 'saves/save1.txt' exists in the save directory, love.filesystem.getRealDirectory("saves/save1.txt") will equal love.filesystem.getSaveDirectory().
2015-02-09 17:43:59 -04:00
Alex Szpakowski a7e4148869 Merged default into minor
--HG--
branch : minor
2015-01-16 15:47:26 -04:00
Bart van Strien ca343e063e Allow require paths without replacements
--HG--
branch : minor
2015-01-14 15:17:16 +01:00
Alex Szpakowski c7b45b3505 Updated copyright for the new year 2014-12-31 19:32:43 -04:00
Alex Szpakowski 8d0654a6a7 Added runtime drag-and-drop file and folder support via new love.filedropped and love.directorydropped event callback functions. filedropped has a single File object argument, and directorydropped has a single string argument containing the full path of the directory, which can be used with love.filesystem.mount.
--HG--
branch : minor
2014-10-18 20:30:36 -03:00
Bart van Strien 5b4ef23772 Move require path into filesystem module
--HG--
branch : minor
2014-09-05 07:57:42 +02:00
Bart van Strien ddf6816548 Add a require path (much like package.path) to love.filesystem, allowing to override the searched file paths for require
--HG--
branch : minor
2014-09-03 18:01:21 +02: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 aa05664d4c Merged default into minor
--HG--
branch : minor
2014-07-30 01:32:10 -03:00
Alex Szpakowski 73c0f1e222 Added love.filesystem.isSymlink, love.filesystem.setSymlinksEnabled, and love.filesystem.areSymlinksEnabled. Symbolic link support is disabled by default.
love.filesystem.isSymlink will always return false when symbolic link support is disabled, even if the given filepath is actually a symlink.
2014-07-24 00:31:11 -03:00
Alex Szpakowski 014b9a46e5 Updated the Lua wrapper code for modules to account for cases where the module's instance is removed from memory completely and recreated during the program's lifetime. 2014-07-21 14:52:01 -03:00
Alex Szpakowski bfa3ec9369 Merged default into minor
--HG--
branch : minor
2014-06-05 03:02:50 -03:00