Before it would return a retained value if it returned a freshly constructed file, and an unretained value otherwise.
Also update all (3) call sites, to correctly retain or release as needed.
- Add mount(Data, archivename, mountpoint [, appendtopath]). 'archivename' must be a string that has not been used with mount before.
- Add mount(FileData, mountpoint [, appendtopath]). The file path of the FileData is used as the archive name.
- Add unmount(Data).
- unmount(archivename) also works.
The previous algorithm would seek every time. This meant that although reading
from a filesystem would be quick (especially with disk caching), but reading
from a zip would be extremely slow.
The new version is rouhgly as fast on a filesystem, but appears not to slow
down on zips at all. Not in my tests, at least.
--HG--
branch : minor
All enum errors have (hopefully) been changed to a luax_enumerror, which has a
fixed error message. If additionally a list of valid options is passed, it
lists that in the error message. For every enum error with few options I've
implemented this using a getConstants call.
This solution has been designed specifically to reduce the number of template
instantiations (as I've been told that was a concern). All new template code
happens in places where there already was an instantiation of the relevant
StringMap. Of course there is still std::vector<std::string>...
--HG--
branch : minor
- Moved love.math.compress / decompress / decode / encode / hash to love.data.
- Changed love.data.compress/decompress to take the format argument first instead of second.
- Added love.data.newDataView. Returns a read-only subsection of an existing Data object.
- Added love.data.newByteData. Mostly useful in combination with LuaJIT's FFI as it has no extra methods currently.
- Added implementations of Lua 5.3's data packing APIs: love.data.packString / packData / unpack / getPackedSize.
Resolves issue #1336.
Resolves issue #1331.
--HG--
branch : minor
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
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.
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.