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

189 commits

Author SHA1 Message Date
9a97ad0bca Update links before they break 2021-06-27 14:27:16 +02:00
Firew0lf
f118baa37c README rewrite 2016-06-27 20:16:38 +02:00
Reuh
5888ee3810 Fixed UDP sockets, added documentation, cleaning
udp:receivefrom arguments and return value changed so it actually works.
2016-06-27 19:31:07 +02:00
Reuh
3303e9783d Fix documentation 2016-06-27 15:38:26 +02:00
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
4a2c1a7c68 Updated ctr.apt to the latest ctrulib, added ctr.apt.isNew3DS() 2016-06-27 13:42:38 +02:00
Firew0lf
20f8cd3cb9 Added "ctr.hid.cstick()", untested with the circle pad pro, works on New 3DS.
I'm working on the issue with :bind(), looks like it's not just my code ...
2016-06-06 19:17:47 +02:00
Firew0lf
5494f3d2e5 Added some sleep mode related functions, fixed the example, fixed some things 2016-05-09 23:28:41 +02:00
Reuh
b4ceb200ea Added gfx.linedRectangle and gfx.linedCircle 2016-04-29 17:55:59 +02:00
Firew0lf
707b1a451e Added the ctr.uds lib (3DS-to-3DS wireless communication), Added a function to add ssl certificates for HTTP contexts, Minor documentation update.
The UDS lib is completely untested, because I only have 1 3DS.
2016-04-26 14:44:18 +02:00
Reuh
f554f53a47 ctr.time() returns a negative value; updated documentation and sprite.lua 2016-04-25 21:02:32 +02:00
Reuh
2504fc90f1 Merge branch 'master' of https://github.com/ctruLua/ctruLua 2016-04-25 19:43:38 +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
Reuh
ac47b1d981 Added missing documentation in texture.load 2016-04-24 18:21:21 +02:00
Reuh
4d1e3ec455 Improved map:draw a lot, fixed GC issues with ctr.map, changed some things internally
map:draw should be faster and more flexible.
2016-04-22 16:45:56 +02:00
Reuh
358b68c643 Renamed item.fileSize to item.size in fs.list() return value, enabled 3D in the editor, added a lot of missing documentation
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.
2016-04-22 13:42:59 +02:00
Reuh
2b7d37304d Made the editor usable
It was able to edit file before, but didn't show the changes on the screen, so this was easy to do.

Also renamed some setTextSize->setSize missed in last commit.
2016-04-21 22:31:48 +02:00
Reuh
347e480d5a Moved ctr.gfx.set|getTextSize to ctr.gfx.font.set|getSize, added missing documentation to font:width
Started working again on the editor
2016-04-21 21:51:45 +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
6b65df0b8e Fixed some documentation, added some things to sockets, "Fixed" the ROMFS
The romfs is still not working, but it works better.
2016-04-13 16:19:25 +02:00
Firew0lf
e7ff54d58c Added SSL support to sockets, Added console/stdout support, Removed apt.init/apt.shutdown, Added some SSL options to httpc
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.
2016-04-10 01:47:52 +02:00
Reuh
e87651a404 Readd require('ctr') in keyboard 2016-04-02 19:09:40 +02:00
Reuh
15bb00780b Fixed sublime-completions doc building 2016-04-02 19:03:24 +02:00
Neil Zeke Cecchini
1f23b86379 Changed the icon, and deleted the test files.
The new one is much nicer. As for the test files, they had nothing to do
here from the start.
2016-04-02 18:41:25 +02:00
Neil Zeke Cecchini
05c9adc2a0 Updated apps that rely on file selection
The editor doesn't use openfile.lua anymore, the main shell is updated
to use filepicker.filePicker's new format. Also, updated the editor to
use resources/VeraMono.ttf instead of its own copy, which was deleted.
2016-04-02 18:41:25 +02:00
Neil Zeke Cecchini
4669a68402 Updated filepicker.lua and adding documentation
Effectively rendering openfile.lua completely obsolete, which is why it
was deleted. filepicker.lua is now way smarter, handles file creation
and has a documentation file in LDoc.
2016-04-02 18:41:25 +02:00
Neil Zeke Cecchini
c687efcfb4 Made keyboard.lua use a configuration file
Thus removing the need to edit it directly as an user
2016-04-02 18:41:25 +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
Reuh
6143341760 Fixed audio looping when using streaming
Also made sure the chunk size is lower or equal the total file size.
2016-03-24 18:07:41 +01:00
Reuh
4c9bdf75fa Unload streaming data when stopping audio
Forgot some memory freeing, sorry.
2016-03-23 20:16:20 +01:00
Reuh
04eb578892 Updated audio example 2016-03-23 19:53:46 +01:00
Reuh
6ac83ca6df Added streaming support to ctr.audio
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.
2016-03-23 19:50:10 +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
Neil Zeke Cecchini
694159f444 Updated LSH to use the new constants
Doesn't change much anyway.
2016-03-13 21:30:14 +01:00
Firew0lf
e5467b663d Added ctr.root, close #7, changed the max path length to 1024
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$
2016-03-12 23:14:42 +01:00
Firew0lf
6a9fbbb133 Added ":addTrustedRootCA()" to the httpc contexts, close #8, Added some values in ctr.
I didn't test :addTrustedRootCA(), but it's just a simple string-to-char+size function.
2016-03-12 19:57:59 +01:00
Reuh
9db21c7831 Added gfx.scissor
Note: doesn't work on citra but it does on real hardware.
2016-03-09 16:13:06 +01:00
Reuh
acd41db805 Update README.md links 2016-03-09 13:30:15 +01:00
Reuh
34c48f360e Added a way to build the documentation as .sublime-completions files (make build-doc-st)
Also replaced make build-doc with make build-doc-html so we can easily add new documentation formats in the future.

To add ctrµLua API autocompletion to Sublime Text, simply copy the output directory (doc/sublimetext) to your ST's package directory.
2016-02-29 19:42:52 +01:00
Firew0lf
e84ab0e3b2 Added functions to set/get the default text size, closes #4 2016-02-24 21:48:28 +01:00
Reuh
f180d4352d Merge pull request #3 from ctruLua/lsh
Replacing the old shell with LSH
2016-02-24 19:07:06 +01:00
Neil Zeke Cecchini
34d12eae0f Added VeraMono.ttf, for real this time 2016-02-24 19:04:17 +01:00
Neil Zeke Cecchini
60b304b2d3 Forgot the font 2016-02-24 19:00:47 +01:00
Neil Zeke Cecchini
cbfc7bfaca Oopsie. 2016-02-24 18:01:37 +01:00
Neil Zeke Cecchini
b6beaddf66 Tabulation correction 2016-02-24 17:55:12 +01:00
Firew0lf
a380f09a34 Updated httpc.c to the latest ctrulib, fixed the cfgu example.
The name is still buggy, can't find why.
2016-02-24 14:46:11 +01:00
Neil Zeke Cecchini
3eb41b5062 Tidbits of documentation 2016-02-24 14:23:36 +01:00
Neil Zeke Cecchini
116575fb5f Replaced the old shell with LSH 2016-02-24 14:19:16 +01:00
Firew0lf
499bfa99a3 ADDED THREAD ! Minor changes on other libs.
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.
2016-01-17 12:18:39 +01:00
Firew0lf
ca22cf1558 Added ctr.mic, Added a function to get a µs counter value.
Didn't test ctr.mic.
2016-01-05 19:41:25 +01:00