Did related changes to sprite.lua and cleaned stuff.
I had to add a function to sf2dlib to make this work, so a make build-sf2dlib is required. Also, we should probably send this change to the original sf2dlib repository...
For the return values, I followed this rule: if the fuction returns true on success, it should return false, error on error; for every other case it should return nil, error on error.
Also, who doesn't want to edit code in 3D ? The line depth depends on the indentation level.
The console can __not__ be used with gfx.start() on a screen. You don't have to gfx.render() while print()ing, but you should do it when you are in the main loop.
The SSL sockets don't work with Citra.
The new image formats are loaded with stb_image, and the textures are saved with stb_image_write.
https://github.com/nothings/stb
You can now load GIFs (not animated), PSD, TGA, HDR, PIC and PNM.
The texture loading still uses sfil for JPEG, PNG, and BMP. You can force the use of stbi by loading with
the "type" argument in texture.load() set to 242 (or anything 5<x<250, but 242 is a good value).
The :save() formats are PNG and BMP only.
Currently runs in the main thread because I can't get it to work on another thread.
You will need to call audio.update() each frame to make audio streaming work.
ctr.root is not exactly the path to ctruLua.3dsx minus the file name, but is equivalent with HBL and $
(other launchers may work too, and it works perfectly with Citra), and is "romfs:/" if romfs is enabl$
To communicate with a thread, use sockets on localhost, this should work.
Or use the return code, or the "last error", but that's crappy.
For the return code, just `return <number>`; only works with integers.
Tremor is extremly similar to libogg but only uses integers (and doesn't provide an encoder). The playing problem with libvorbis was probably a float-precision related issue.
No need for make build-all.
Added libogg, libvorbis and libvorbisfile to 3ds_portlibs. You will need to compile thems using make build-portlibs. Opening OGG files works but they play badly.
Added a very simple error handler in main.lua
Added audio example.
Renamed isGfxInitialised to isGfxInitialized.
Did you know? The audio module is the longest ctrµLua module.
Untested, but checked 3 times with citra, and everything matches the doc.
Warning: there is no check of any kind, so don't put weird stuff as arguments.
As the color order of the sf2dlib changed, you have to change it in your code, or use the color.hex() function.
To fix the problems, just change "0xRRGGBBAA" to "0xAABBGGRR".
Also, the shader compiler changed to Picasso, so you'll need it in order to compile.
https://github.com/fincs/picasso
The library path can now be easlily modified.
Instead of always launching /3ds/ctruLua/main.lua, ctruLua will now launch the main.lua in the current directory (the ctruLua.3dsx directory when launched with HBL).
On citra, this will be the root of the sdmc directory.
I didn't find a server/protocol to test the UDP sockets, so I didn't test.
Also, there's no built-in "pseudo-connected" mode, you have to manage it in your code.