1
0
Fork 0
mirror of https://github.com/ctruLua/ctruLua.git synced 2025-10-27 16:39:29 +00:00
Commit graph

24 commits

Author SHA1 Message Date
Reuh
b47971bfca Added rectangle gradients, triangles, updated sf2dlib
Gradients are done with additional parameters to gfx.rectangle, so old code that gave the function too many parameters and expected them to be ignored may break.
2016-06-27 15:29:55 +02:00
Reuh
d0fb704205 Added hotspot arguments when drawing rotated textures
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...
2016-04-25 19:43:09 +02:00
Firew0lf
b798818e99 Fixed the ROMFS, Removed some fields in fs.list(), Updated sftdlib
fs.list() now returns a table with tables containing the fields "name", "fileSize", and "isDirectory"
2016-04-16 13:24:03 +02:00
Firew0lf
eae356ce80 Added the :save() method to textures, Added support for some image formats
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.
2016-03-26 16:49:23 +01:00
Firew0lf
5107f0277c Updated sf2dlib, added a "thickness" argument to lines (warning: break some old lines), Added WIP render targets, Added arguments (main file and root path)
You'll need to update some of your codes if you used lines with colors, or you'll have some ... Nice line effects.
2016-03-22 21:48:52 +01:00
Reuh
e39fcc6c7b Added Tremor Ogg decoder, removed libvorbis from Makefile. OGG audio working perfectly.
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.
2015-12-29 17:25:34 +01:00
Reuh
bda9de4d1c ADDED AUDIO! WAV working perfectly
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.
2015-12-27 19:54:58 +01:00
Firew0lf
2e782ed9ea Updated to the latest ctrulib, Fixed some minor bugs.
Working with citra, untested on real hardware but should be OK.
IR should now work.
Let's add some 3D drawing and sound now !
2015-12-14 23:11:45 +01:00
Firew0lf
b4d025d602 Updated the sf2dlib and sftdlib; Added the gfx.color.hex() function; Added the New3DS CPU mode control.
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
2015-12-09 23:14:23 +01:00
Reuh
0105970ab7 Updated to Lua 5.3.2 2015-12-04 18:30:38 +01:00
Reuh
0efdc23576 Moved library path modifications to main.lua, made all paths relative
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.
2015-10-25 11:08:27 +01:00
Firew0lf
dcdeec6525 Updated the sftdlib, Added some functions in gfx and gfx.texture 2015-10-09 00:02:23 +02:00
Firew0lf
410b736ab0 Fixed a bug in the path 2015-10-04 21:15:26 +02:00
Reuh
4aad32d5ab Moved lzlib to the libs directory (cleaner) 2015-10-04 12:08:25 +02:00
Firew0lf
fb0bd5fc8c How could I do that ... 2015-10-02 08:43:54 +02:00
Firew0lf
b5036ecff8 Added "sdmc:/3ds/ctruLua/libs/" to the libraries path
You can now require("sprite") !
2015-10-02 08:38:35 +02:00
Reuh
3f48e6e66e Updated sf2dlib to the latest version of ctrulib
We should push these changes to the official sf2dlib repo. One day. Maybe.
2015-09-05 19:44:25 +02:00
Reuh
45f3216ed8 Updated font and fs lib; updated editor; updated sf2dlib
Libs additions: font.load, font:unload, font:getWidth, fs.getDirectory, fs.setDirectory, fs.exists

Editor additions: syntaxic coloring and mono font

sf2dlib update: you will need the latest version of ctrulib.

Also, because of the lib font needs, the sftdlib was modified.
2015-09-05 19:00:36 +02:00
Reuh
49ae4454d3 Updated sftdlib and sf2dlib 2015-08-22 19:10:37 +02:00
Reuh
2a5513473d Support for special characters in gfx.text; added scrolling to the default shell; updated sftdlib.
There is a known bug with different text size in sftdlib.
2015-08-22 16:45:32 +02:00
Reuh
7edb1e2f7b Added ctr.gfx.text and the Bitsream Vera font 2015-08-19 14:32:53 +02:00
Reuh
3a1b03dfab More .gitignore 2015-08-18 12:23:22 +02:00
Reuh
ebcd9f00ed Added missing dependicies 2015-08-17 21:10:54 +02:00
Reuh
03baa21c10 Added some code 2015-08-17 18:15:37 +02:00