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

167 commits

Author SHA1 Message Date
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
Reuh
e7c9a60d61 Alphabetical sorting in openfile.lua 2015-12-31 15:54:10 +01:00
Firew0lf
e10a101a4a Added some examples, fixed a typo 2015-12-31 15:41:09 +01:00
Reuh
b87b2676e6 gfx.GFX_TOP, gfx.GFX_BOTTOM, gfx.GFX_LEFT, gfx.GFX_RIGHT -> gfx.TOP, gfx.BOTTOM, gfx.LEFT, gfx.RIGHT
Also commented and moved tests/audio to examples/audio because the code is quite clean, and we lack examples.
2015-12-30 19:15:46 +01:00
Reuh
73b5c55133 gfx.startFrame -> gfx.start and gfx.endFrame -> gfx.stop 2015-12-30 18:19:13 +01:00
Reuh
07d5316d72 Changed map format to CSV, added ability to load maps from a Lua table 2015-12-30 14:51:51 +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
c053997f96 Reset defaults before starting a file (main.lua) 2015-12-29 17:20:29 +01:00
Firew0lf
b4f5365e96 Rolled back to RAM by default for textures (not working on hardware) 2015-12-28 20:57:03 +01:00
Reuh
7359512ebe Merge branch 'master' of https://github.com/ctruLua/ctruLua
Merge with master
2015-12-27 19:59:55 +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
fe894820a2 The ctr.news library should now be bug-free !
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.
2015-12-24 23:58:16 +01:00
Firew0lf
bebfa8b72d Merge branch 'master' of https://github.com/Firew0lf/ctruLua 2015-12-24 18:45:40 +01:00
Firew0lf
5c4da69997 Added the ctr.apt library, tweaked ctr.news a bit, fixed a typo in cfgu.c 2015-12-24 18:44:22 +01:00
Reuh
716c42b849 Fixed keyboard and editor colors 2015-12-24 13:15:00 +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
4acd13de9b Close socket on GC 2015-10-25 18:56:39 +01:00
Reuh
e6e99f59c4 In ctr.fs: automatically select archive when using absolute paths without archive prefix; fs.list should work with RomFS 2015-10-25 17:01:26 +01:00
Reuh
b32fa5da2b Moved keyboard.lua and openfile.lua to the libs/ directory 2015-10-25 12:41:43 +01:00
Reuh
095308732c Documented ctr.gfx.color 2015-10-25 12:33:44 +01:00
Reuh
3b8d56de63 Documented ctr.fs 2015-10-25 12:22:58 +01:00