Updates for LÖVE 11
This changeset contains two categories of fixes:
- Update the demo GUI tool to work with LOVE 11.3
- Address issues that were found when testing load/save after that.
For (1) the changes:
a. update to the 11.x fork of LoveFrames that is being maintained by @linux-man
b. change any color literals to use components in the range (0,1) instead of (0,255)
c. move usage of deprecated love.filesystem functions to current versions.
d. fix a field name that was probably incorrect for a long time but now causes an assertion failure in LoveFrames.
e. reflect changes to LoveFrames skin API
For (2) the changes:
a. Make the version check not fail if the expected version == the found version when loading a lua file.
b. Replace references to globals freq and bits that are not defined in sfxr.lua in the wav export code with locals rate and depth.
Thanks for your work on this PR! sfxr is pretty useful and it's nice to have a working UI.
Edit: Nevermind. If you run love demo like the instructions say, you don't get this error. The error is because I used love . from within the demo directory.
~I swear this PR used to work for me (on 11.2?), but now I get "Error: main.lua:4: module 'sfxr' not found:" because sfxr.lua is in the directory above the demo.~
~To fix, add this to main.lua:~
package.path = package.path .. ";../?.lua"
~(Not sure why using love.filesystem.setRequirePath doesn't work either.)~
One change missed in this update was using the supported version of getDirectoryItems. The callback is no longer supported so the save/load dialogs never showed any files. Fix: https://github.com/idbrii/love-sfxr/commit/0da9d700297855255a77d2ee946db462f3e03b4b