Skip to content

Commit

Permalink
v0.2.0
Browse files Browse the repository at this point in the history
Squashed commit of the following:

commit e48ed2c
Author: Jeron Aldaron Lau <[email protected]>
Date:   Sun May 12 12:18:19 2019 -0500

    v0.2.0

commit 2c41196
Author: Jeron Aldaron Lau <[email protected]>
Date:   Sun May 12 12:04:06 2019 -0500

    Update controller.

commit d043f41
Author: Jeron Aldaron Lau <[email protected]>
Date:   Sun May 12 11:50:47 2019 -0500

    Update to use new `stick` version with (add controller support).

commit 24cbfbc
Author: Jeron Aldaron Lau <[email protected]>
Date:   Mon May 6 18:27:47 2019 -0500

    Shrink icon file size.

commit 0295ab5
Author: Jeron Aldaron Lau <[email protected]>
Date:   Mon May 6 18:21:34 2019 -0500

    Update README.md

commit a8a188e
Author: Jeron Aldaron Lau <[email protected]>
Date:   Wed May 1 11:31:40 2019 -0500

    Release cala 0.1.0

commit 7fcc2f5
Author: Jeron Aldaron Lau <[email protected]>
Date:   Wed May 1 10:25:46 2019 -0500

    Reduce icon file size.

commit 535bef2
Author: Jeron Aldaron Lau <[email protected]>
Date:   Wed May 1 10:24:56 2019 -0500

    Update default.html

commit 2160bb9
Author: Jeron Aldaron Lau <[email protected]>
Date:   Wed May 1 10:22:58 2019 -0500

    New icon.

commit b5aa582
Author: Jeron Aldaron Lau <[email protected]>
Date:   Wed May 1 10:02:46 2019 -0500

    Update README.md - Dive -> Cala

commit 2bafed7
Author: Jeron Aldaron Lau <[email protected]>
Date:   Sun Apr 28 22:54:27 2019 -0500

    Add whitespace in CHANGELOG.md

commit 89ca024
Author: Jeron Aldaron Lau <[email protected]>
Date:   Sun Apr 28 22:51:09 2019 -0500

    Markdown naming convention I guess is all caps usually.

commit dff2a5f
Author: Jeron Aldaron Lau <[email protected]>
Date:   Sun Apr 28 22:47:24 2019 -0500

    Try new format for changelog.

commit 820f0ef
Author: Jeron Aldaron Lau <[email protected]>
Date:   Sun Apr 28 22:32:36 2019 -0500

    Fix bad wording.

commit 5fb1f82
Author: Jeron Aldaron Lau <[email protected]>
Date:   Sun Apr 28 22:29:45 2019 -0500

    Update documentation.

commit 205d3e5
Author: Jeron Aldaron Lau <[email protected]>
Date:   Sun Apr 28 21:53:01 2019 -0500

    Add audio and file systems.

commit 415a0fc
Author: Jeron Aldaron Lau <[email protected]>
Date:   Sun Apr 28 16:37:30 2019 -0500

    Add API for getting user information.

commit 45749a5
Author: Jeron Aldaron Lau <[email protected]>
Date:   Tue Apr 9 20:37:36 2019 -0500

    Update changelog.md

commit 1e2a534
Author: Jeron Aldaron Lau <[email protected]>
Date:   Tue Apr 9 20:35:45 2019 -0500

    Update README.md

commit 328ecf8
Author: Jeron Aldaron Lau <[email protected]>
Date:   Tue Apr 9 20:35:02 2019 -0500

    Fixed up README.

commit f2c7bf6
Merge: b725cf9 a7d17bc
Author: Jeron Aldaron Lau <[email protected]>
Date:   Tue Apr 9 20:33:34 2019 -0500

    Merge branch 'master' of github.com:diveos/dive

commit b725cf9
Author: Jeron Aldaron Lau <[email protected]>
Date:   Tue Apr 9 20:32:21 2019 -0500

    Ready for first release.

commit 8778700
Author: Jeron Aldaron Lau <[email protected]>
Date:   Tue Apr 9 20:21:38 2019 -0500

    Dive, get ready to publish.

commit a7d17bc
Author: Jeron Aldaron Lau <[email protected]>
Date:   Thu Mar 21 23:29:18 2019 -0500

    Fixed Logo not showing in README.

commit bc1a930
Author: Jeron Aldaron Lau <[email protected]>
Date:   Thu Mar 21 23:18:41 2019 -0500

    Moved old stuff.

commit 7df559d
Author: Jeron Aldaron Lau <[email protected]>
Date:   Thu Feb 7 14:11:58 2019 -0600

    Added new files to automate git sync.

commit bb1a0d8
Author: Jeron Aldaron Lau <[email protected]>
Date:   Thu Feb 7 13:59:45 2019 -0600

    Some change

commit b7f778e
Author: Jeron Aldaron Lau <[email protected]>
Date:   Fri Feb 1 14:22:59 2019 -0600

    Some unused stuff away.

commit a4019f7
Author: Jeron Aldaron Lau <[email protected]>
Date:   Fri Feb 1 14:12:32 2019 -0600

    Add flipped texture coordinates for handling OpenGL coordinate system.

commit d33fab6
Author: Jeron Aldaron Lau <[email protected]>
Date:   Fri Feb 1 13:45:26 2019 -0600

    GPU accelerated texturing.

commit f06235c
Author: Jeron Aldaron Lau <[email protected]>
Date:   Thu Jan 31 22:16:44 2019 -0600

    Add bitmap rendering.

commit aff514f
Author: Jeron Aldaron Lau <[email protected]>
Date:   Thu Jan 31 12:34:33 2019 -0600

    Added simple texturing.

commit 94c5a70
Author: Jeron Aldaron Lau <[email protected]>
Date:   Tue Jan 29 18:20:54 2019 -0600

    Resizing now works properly.

commit adf3d6e
Author: Jeron Aldaron Lau <[email protected]>
Date:   Tue Jan 29 16:00:02 2019 -0600

    Started adding matrices.

commit c84b5f7
Author: Jeron Aldaron Lau <[email protected]>
Date:   Mon Jan 28 09:55:48 2019 -0600

    xcb_testzone clear screen.

commit 7bed6a9
Author: Jeron Aldaron Lau <[email protected]>
Date:   Mon Jan 21 16:08:08 2019 -0600

    Add xcb_testzone.

commit f936388
Author: Jeron Aldaron Lau <[email protected]>
Date:   Sun Jan 20 13:41:51 2019 -0600

    More on siyo command line program.

commit 3d2b559
Author: Jeron Aldaron Lau <[email protected]>
Date:   Thu Jan 10 09:41:24 2019 -0600

    Binary in siyo crate.

commit d13fb95
Author: Jeron Aldaron Lau <[email protected]>
Date:   Tue Jan 8 17:37:52 2019 -0600

    test_triangle works again.

commit 86212e3
Author: Jeron Aldaron Lau <[email protected]>
Date:   Tue Jan 8 17:19:50 2019 -0600

    Re-organize repo.

commit c92eb38
Author: Jeron Aldaron Lau <[email protected]>
Date:   Tue Jan 8 16:53:42 2019 -0600

    Test webgl_generator as adi dependency.

commit 4ef8854
Author: Jeron Aldaron Lau <[email protected]>
Date:   Tue Jan 8 16:32:05 2019 -0600

    New ADI.

commit e5ef2ec
Author: Jeron Aldaron <[email protected]>
Date:   Tue Jan 8 11:15:40 2019 -0600

    Add siyo-web.

commit db19dfb
Author: Jeron Lau <[email protected]>
Date:   Mon Dec 31 10:28:56 2018 -0600

    Update README.md to match docs.

commit e4797c8
Author: Jeron Lau <[email protected]>
Date:   Mon Dec 31 01:33:00 2018 -0600

    Started to support WebGL in WASM.

commit b8c647e
Author: Jeron Lau <[email protected]>
Date:   Mon Dec 31 00:57:18 2018 -0600

    Remove unnecessary files.

commit 017ba37
Author: Jeron Lau <[email protected]>
Date:   Mon Dec 31 00:55:42 2018 -0600

    Add override for favicon.

commit 8caafaf
Author: Jeron Lau <[email protected]>
Date:   Sun Dec 30 23:45:28 2018 -0600

    Set theme jekyll-theme-slate

commit 5438307
Author: Jeron Lau <[email protected]>
Date:   Sun Dec 30 22:26:44 2018 -0600

    Added some cool features to cargo-siyo

commit 1fd80f5
Author: Jeron Lau <[email protected]>
Date:   Sun Dec 30 20:50:49 2018 -0600

    cargo-siyo now handles WASM ok.

commit f69fa78
Author: Jeron Lau <[email protected]>
Date:   Sun Dec 30 19:36:38 2018 -0600

    Add stuff

commit 3567234
Author: Jeron Lau <[email protected]>
Date:   Sun Dec 30 18:44:00 2018 -0600

    Add favicon.svg

commit 9567957
Author: Jeron Lau <[email protected]>
Date:   Sun Dec 30 18:30:49 2018 -0600

    Make icon.

commit 20ff20c
Author: Jeron Lau <[email protected]>
Date:   Sun Dec 30 18:22:04 2018 -0600

    Update README.md

commit 06d2171
Author: Jeron Lau <[email protected]>
Date:   Sun Dec 30 18:17:57 2018 -0600

    Bigger banner.

commit c4f80ef
Author: Jeron Lau <[email protected]>
Date:   Sun Dec 30 18:14:46 2018 -0600

    Update README.md

commit e4995c8
Author: Jeron Lau <[email protected]>
Date:   Sun Dec 30 18:11:49 2018 -0600

    Add cargo-siyo

commit 110a24c
Author: Jeron Lau <[email protected]>
Date:   Fri Dec 28 16:38:11 2018 -0600

    Update HID.

commit aeffe2b
Author: Jeron Lau <[email protected]>
Date:   Fri Dec 28 12:56:27 2018 -0600

    Renamed variants of `Key` enum.

commit 8ba424a
Author: Jeron Lau <[email protected]>
Date:   Wed Dec 26 18:17:39 2018 -0600

    Added ps button icons.

commit 8d9c13d
Author: Jeron Lau <[email protected]>
Date:   Wed Dec 26 17:32:19 2018 -0600

    Add images for each button.

commit 32a17fc
Author: Jeron Lau <[email protected]>
Date:   Wed Dec 26 16:53:17 2018 -0600

    Document all of the combinations for hid.

commit 49d7cfe
Author: Jeron Lau <[email protected]>
Date:   Wed Dec 26 13:27:28 2018 -0600

    Stuff for HID.

commit 29c1281
Author: Jeron Lau <[email protected]>
Date:   Tue Dec 25 23:28:57 2018 -0600

    Cargo fmt on siyo crate.

commit 92ee9c7
Author: Jeron Lau <[email protected]>
Date:   Tue Dec 25 23:27:50 2018 -0600

    Got rid of warnings, and unmaintained examples.

commit 22a812e
Author: Jeron Lau <[email protected]>
Date:   Tue Dec 25 22:57:15 2018 -0600

    Lots of stuff with textures.

commit a59608d
Author: Jeron Lau <[email protected]>
Date:   Mon Dec 24 18:02:30 2018 -0600

    Started improving texture API.

commit 26f85fb
Author: Jeron Lau <[email protected]>
Date:   Mon Dec 24 16:12:50 2018 -0600

    Renamed proc to math.

commit 9af0b74
Author: Jeron Lau <[email protected]>
Date:   Mon Dec 24 15:41:41 2018 -0600

    Fractions and fixed point.

commit 9afd0eb
Author: Jeron Lau <[email protected]>
Date:   Mon Dec 24 12:53:04 2018 -0600

    Started adding clock support with chrono.

commit 44165fb
Author: Jeron Lau <[email protected]>
Date:   Mon Dec 24 10:36:59 2018 -0600

    Initial release.

commit 23cf200
Author: Jeron A. Lau <[email protected]>
Date:   Mon Dec 24 10:25:07 2018 -0600

    Set theme jekyll-theme-slate

commit 8029024
Author: Jeron Lau <[email protected]>
Date:   Mon Dec 24 10:19:18 2018 -0600

    New project.

commit 5715f59
Author: Jeron Lau <[email protected]>
Date:   Sun Dec 23 13:34:12 2018 -0600

    Got rid of unused warnings when feature speaker is enabled without feature mic.

commit 381b127
Author: Jeron Lau <[email protected]>
Date:   Sun Dec 23 13:26:24 2018 -0600

    Some new functions in the API.

commit b857839
Author: Jeron Lau <[email protected]>
Date:   Fri Dec 21 20:21:42 2018 -0600

    Fix xkbcomp bug.

commit 6bd0fd7
Author: Jeron Lau <[email protected]>
Date:   Fri Dec 21 18:16:08 2018 -0600

    Fix small documentation mistake.

commit 6e277db
Author: Jeron Lau <[email protected]>
Date:   Sun Dec 9 23:20:37 2018 -0600

    Pre-Release 2: use 2018 edition and new version of barg.

commit ae3f6e4
Author: Jeron Lau <[email protected]>
Date:   Sat Dec 8 11:19:16 2018 -0600

    Next pre-release.

commit 2d0baa5
Author: Jeron Lau <[email protected]>
Date:   Sat Dec 1 09:31:26 2018 -0600

    Run `cargo fmt`

commit 58c5e1e
Author: Jeron Lau <[email protected]>
Date:   Sat Dec 1 09:30:15 2018 -0600

    Fix bug on Vulkan with the resizing of the GUI texture not happenning.

commit fdd9eea
Author: Jeron Lau <[email protected]>
Date:   Mon Nov 26 11:01:20 2018 -0600

    Pre-release.

commit d7994b2
Author: Jeron Lau <[email protected]>
Date:   Sun Nov 25 17:04:47 2018 -0600

    Started adding camera support on Linux.

commit 0417dae
Author: Jeron Lau <[email protected]>
Date:   Sat Nov 24 01:25:11 2018 -0600

    Added `rumble_start` and `rumble_stop` for haptic vibration support.

commit 1334dbc
Author: Jeron Lau <[email protected]>
Date:   Fri Nov 23 22:34:47 2018 -0600

    Joystick-controller / multiple joystick-controller support.

commit 1b4e720
Author: Jeron Lau <[email protected]>
Date:   Fri Nov 23 17:24:08 2018 -0600

    The Compose key now works for getting input on Linux.

commit d5ba38a
Author: Jeron Lau <[email protected]>
Date:   Fri Nov 23 14:38:47 2018 -0600

    Fixed resizing the GUI under OpenGL not working properly.

commit 4c2d78e
Author: Jeron Lau <[email protected]>
Date:   Fri Nov 23 14:15:59 2018 -0600

    OpenGL support is no longer broken.

commit 2dfc2c0
Author: Jeron Lau <[email protected]>
Date:   Fri Nov 23 13:08:59 2018 -0600

    Fixed GUI not working under OpenGL.

commit ab83a72
Author: Jeron Lau <[email protected]>
Date:   Fri Nov 23 12:25:09 2018 -0600

    Fixed application freezing on resize.

commit 34fadde
Author: Jeron Lau <[email protected]>
Date:   Fri Nov 23 11:14:31 2018 -0600

    Fixed input issue.

commit a109804
Author: Jeron Lau <[email protected]>
Date:   Fri Nov 23 10:57:05 2018 -0600

    Made input work again.

commit 5a26020
Author: Jeron Lau <[email protected]>
Date:   Fri Nov 23 10:03:10 2018 -0600

    Moved some code around.

commit 803e09e
Author: Jeron Lau <[email protected]>
Date:   Tue Nov 20 23:32:48 2018 -0600

    Example use footile 0.2.0

commit b50e800
Author: Jeron Lau <[email protected]>
Date:   Tue Nov 20 22:49:37 2018 -0600

    Added some functionality to the HID module.

commit a532713
Author: Jeron Lau <[email protected]>
Date:   Sat Nov 17 23:55:52 2018 -0600

    Triangle example working with barg with footile underneath.

commit 4909532
Author: Jeron Lau <[email protected]>
Date:   Thu Nov 15 11:50:09 2018 -0600

    Removed a couple warnings.

commit bba6b22
Author: Jeron Lau <[email protected]>
Date:   Sat Nov 10 14:14:40 2018 -0600

    Added texture example.

commit e07dc5f
Author: Jeron Lau <[email protected]>
Date:   Sun Nov 4 00:19:31 2018 -0500

    Added barg examples.

commit 99e9d6f
Author: Jeron Lau <[email protected]>
Date:   Sat Nov 3 20:06:47 2018 -0500

    Worked on OpenGL rendering a bit.  Not up to speed with Vulkan yet.

commit 18ed588
Author: Jeron Lau <[email protected]>
Date:   Tue Oct 16 11:14:32 2018 -0500

    Add runner struct.

commit a838e56
Author: Jeron Lau <[email protected]>
Date:   Mon Oct 15 09:15:59 2018 -0500

    Renamed `Scene` to `Viewer`.

commit e8e0429
Author: Jeron Lau <[email protected]>
Date:   Sun Oct 14 01:08:24 2018 -0500

    Removed lots of unused code.

commit a175282
Author: Jeron Lau <[email protected]>
Date:   Sun Oct 14 00:53:59 2018 -0500

    Run `cargo fmt`

commit 5d911dc
Author: Jeron Lau <[email protected]>
Date:   Sun Oct 14 00:23:41 2018 -0500

    Vulkan uses previous camera, which is faster now.  Also added hid module.

commit dc8f868
Author: Jeron A. Lau <[email protected]>
Date:   Sun Sep 30 14:08:19 2018 -0500

    Start replacing Box Trait with function loading.

commit 830e6ee
Author: Jeron A. Lau <[email protected]>
Date:   Sat Sep 29 00:54:21 2018 -0500

    Added important files - now conforms to rust fmt.

commit 8137451
Author: Jeron A. Lau <[email protected]>
Date:   Sat Sep 22 15:12:12 2018 -0500

    Faster update for textures.

commit efee424
Author: Jeron A. Lau <[email protected]>
Date:   Sat Sep 22 00:52:24 2018 -0500

    Speed up texture updates on Vulkan.

commit 703ce2d
Author: Jeron A. Lau <[email protected]>
Date:   Sun Sep 16 00:34:34 2018 -0500

    Removed foggy remnants.

commit 1ee4b2f
Author: Jeron A. Lau <[email protected]>
Date:   Fri Sep 14 23:24:47 2018 -0500

    Got some warnings away.

commit 02055c3
Author: Jeron A. Lau <[email protected]>
Date:   Fri Sep 14 20:15:00 2018 -0500

    Added awi code.

commit de2925b
Author: Jeron A. Lau <[email protected]>
Date:   Fri Sep 14 18:30:38 2018 -0500

    Remove GUI stuffs from this repo.

commit 8c027d6
Author: Jeron A. Lau <[email protected]>
Date:   Sun Sep 2 18:09:30 2018 -0500

    Vulkan changes.

commit f02da99
Author: Jeron A. Lau <[email protected]>
Date:   Thu Aug 30 19:27:40 2018 -0500

    Fix Table in README.md

commit d20a6cd
Author: Jeron A. Lau <[email protected]>
Date:   Thu Aug 30 19:16:56 2018 -0500

    Add shared module for alsa with mic and speaker.

commit 7558089
Author: Jeron A. Lau <[email protected]>
Date:   Thu Aug 30 12:17:17 2018 -0500

    Consolidated adi_screen into this crate (adi).

commit c01ee7a
Author: Jeron A. Lau <[email protected]>
Date:   Sun Aug 12 23:51:08 2018 -0500

    Version 0.12

commit 37354d8
Author: Jeron A. Lau <[email protected]>
Date:   Mon Aug 6 15:03:11 2018 -0500

    Fix README typo.

commit def120a
Author: Jeron A. Lau <[email protected]>
Date:   Mon Aug 6 15:00:38 2018 -0500

    Version 0.11

commit 5baceb2
Author: Jeron A. Lau <[email protected]>
Date:   Sat Aug 4 23:02:31 2018 -0500

    Match dependency crates.

commit bc56bc0
Author: Jeron A. Lau <[email protected]>
Date:   Thu Jul 26 10:26:33 2018 -0500

    Changed to triple-license under Boost, MIT & Apache.

commit e9edb4b
Author: Jeron A. Lau <[email protected]>
Date:   Thu Jun 21 23:13:09 2018 -0500

    Oops

commit dfa3cac
Author: Jeron A. Lau <[email protected]>
Date:   Thu Jun 21 23:10:26 2018 -0500

    Version 0.10

commit a4316a7
Author: Jeron A. Lau <[email protected]>
Date:   Thu Jun 21 00:29:21 2018 -0500

    Version 0.9

commit 58408be
Author: Jeron A. Lau <[email protected]>
Date:   Fri May 25 23:37:56 2018 -0500

    Version 0.8

commit 41bd3cf
Author: Jeron A. Lau <[email protected]>
Date:   Fri May 25 22:10:33 2018 -0500

    Version 0.7.1

commit 8254ae7
Author: Jeron A. Lau <[email protected]>
Date:   Fri May 25 22:04:11 2018 -0500

    Added redirect to version.

commit 13d0a30
Author: Jeron A. Lau <[email protected]>
Date:   Fri May 25 21:52:57 2018 -0500

    Fixed url

commit 7548677
Author: Jeron A. Lau <[email protected]>
Date:   Fri May 25 21:51:06 2018 -0500

    Moved documentation onto the website.

commit 78c1043
Author: Jeron A. Lau <[email protected]>
Date:   Fri May 25 20:33:29 2018 -0500

    Version 0.7!

commit 011ab86
Author: Jeron A. Lau <[email protected]>
Date:   Fri May 25 14:40:42 2018 -0500

    Removed stick.

commit c0c3077
Author: Jeron A. Lau <[email protected]>
Date:   Sat Apr 14 18:54:14 2018 -0500

    Update license information.

commit 9b23e3e
Author: Jeron Aldaron Lau <[email protected]>
Date:   Sat Apr 14 16:26:09 2018 -0500

    Local stick.

commit 0ccc058
Author: Jeron A. Lau <[email protected]>
Date:   Mon Apr 2 11:09:08 2018 -0500

    Add stick as a dependency.

commit a667143
Author: Jeron A. Lau <[email protected]>
Date:   Sun Apr 1 18:57:45 2018 -0500

    debug for adi_screen

commit 55e7e01
Author: Jeron Aldaron Lau <[email protected]>
Date:   Sat Feb 24 23:12:21 2018 -0600

    Version 0.6.0

commit 4dd9730
Author: Jeron Aldaron Lau <[email protected]>
Date:   Fri Feb 9 11:12:44 2018 -0600

    Version 0.5.0

commit 3daad9b
Author: Jeron Aldaron Lau <[email protected]>
Date:   Tue Feb 6 22:37:47 2018 -0600

    Updated to local dependency.

commit 1197f93
Author: Jeron Aldaron Lau <[email protected]>
Date:   Sat Jan 20 13:43:53 2018 -0600

    Set theme jekyll-theme-slate

commit 4a8f403
Author: Jeron Aldaron Lau <[email protected]>
Date:   Sat Jan 20 13:40:39 2018 -0600

    Ready for release.

commit 96a422b
Author: Jeron Aldaron Lau <[email protected]>
Date:   Sat Jan 20 11:15:28 2018 -0600

    Macro and files.

commit 3712ddd
Author: Jeron Aldaron Lau <[email protected]>
Date:   Sat Jan 6 13:20:29 2018 -0600

    Add some new files.

commit fc14dcb
Author: Jeron Aldaron Lau <[email protected]>
Date:   Wed Jun 7 21:43:00 2017 -0500

    Update adi_screen.

commit 3127b9c
Author: Jeron Aldaron Lau <[email protected]>
Date:   Sat May 27 18:12:30 2017 -0500

    Updated some stuff.

commit a940e8a
Author: Jeron Aldaron Lau <[email protected]>
Date:   Sat May 27 18:08:16 2017 -0500

    adi Version 0.3.0

commit f0b2f55
Author: Jeron Aldaron Lau <[email protected]>
Date:   Wed May 17 14:48:30 2017 -0500

    Fixed reexport warning.

commit 982064e
Author: Jeron Aldaron Lau <[email protected]>
Date:   Mon May 15 22:15:39 2017 -0500

    Updated to use adi_screen 0.1.0 & adi_clock 0.2.0

commit 494aa2c
Author: Jeron Aldaron Lau <[email protected]>
Date:   Fri Apr 28 21:41:45 2017 -0500

    Updated link style in docs.

commit 472bdbb
Author: Jeron Aldaron Lau <[email protected]>
Date:   Fri Apr 28 21:16:24 2017 -0500

    Change docs website style

commit b27d71c
Author: Jeron Aldaron Lau <[email protected]>
Date:   Mon Apr 24 15:23:55 2017 -0500

    Removed screen module, added TODO & updated license.

commit 1e8455a
Author: Jeron Aldaron Lau <[email protected]>
Date:   Sat Apr 22 14:17:19 2017 -0500

    Improved timer on linux

commit 106f13a
Author: Jeron Aldaron Lau <[email protected]>
Date:   Fri Apr 21 23:47:29 2017 -0500

    Timer works on Linux now, still not ideal.

commit 0d1a28a
Author: Jeron Aldaron Lau <[email protected]>
Date:   Wed Apr 19 14:07:00 2017 -0500

    Replaced time module with timer and clock.

commit e21519f
Author: Jeron Aldaron Lau <[email protected]>
Date:   Sat Apr 15 11:31:39 2017 -0500

    Updated license identifier.

commit 2926982
Author: Jeron Aldaron Lau <[email protected]>
Date:   Sat Apr 15 11:29:45 2017 -0500

    Cut down keywords to 5

commit 74ff5b3
Author: Jeron Aldaron Lau <[email protected]>
Date:   Sat Apr 15 11:27:31 2017 -0500

    Updated keywords.

commit 968a128
Merge: 4f935ea 210d824
Author: Jeron Aldaron Lau <[email protected]>
Date:   Sat Apr 15 11:24:51 2017 -0500

    Merge branch 'master' of https://github.com/plopgrizzly/adi

commit 4f935ea
Author: Jeron Aldaron Lau <[email protected]>
Date:   Sat Apr 15 11:24:41 2017 -0500

    Added a TODO file.

commit 210d824
Author: Jeron Aldaron Lau <[email protected]>
Date:   Sat Apr 15 11:23:45 2017 -0500

    Update README.md

    changed Emscripten to Web Assembly for the target name

commit 4114b8a
Author: Jeron Aldaron Lau <[email protected]>
Date:   Sat Apr 15 11:10:05 2017 -0500

    Update README.md

commit b152779
Author: Jeron Aldaron Lau <[email protected]>
Date:   Sat Apr 15 11:03:14 2017 -0500

    Moved third-party directory.

commit 63ce709
Author: Jeron Aldaron Lau <[email protected]>
Date:   Sat Apr 15 01:46:55 2017 -0500

    Added to the Cargo.toml

commit b2cc1dd
Author: Jeron Aldaron Lau <[email protected]>
Date:   Sat Apr 15 01:23:43 2017 -0500

    Fixed Linux port of library not compiling.

commit 903c57e
Merge: e977d20 6fd7022
Author: Jeron Aldaron Lau <[email protected]>
Date:   Sat Apr 15 00:55:55 2017 -0500

    Merge branch 'master' of https://github.com/plopgrizzly/adi

commit e977d20
Author: Jeron Aldaron Lau <[email protected]>
Date:   Sat Apr 15 00:55:40 2017 -0500

    Found a bug though vulkan-validation layers.

commit 6fd7022
Author: Jeron Aldaron Lau <[email protected]>
Date:   Sat Apr 15 00:39:48 2017 -0500

    Implemented pause and resume ( changing focus ) on windows.

commit feab776
Author: Jeron Aldaron Lau <[email protected]>
Date:   Sat Apr 15 00:31:55 2017 -0500

    Implemented Window Icon on Windows.

commit 92ff81b
Author: Jeron Aldaron Lau <[email protected]>
Date:   Fri Apr 14 23:19:39 2017 -0500

    Removed warning messages on windows.

commit 027bf92
Author: Jeron Aldaron Lau <[email protected]>
Date:   Fri Apr 14 23:14:58 2017 -0500

    Right Alt, Right Ctrl, Right Shift & Left Alt now work on windows.

commit 990a7da
Author: Jeron Aldaron Lau <[email protected]>
Date:   Fri Apr 14 21:50:08 2017 -0500

    Improved time module for Windows - sleep is more precise.

commit a8c5ab2
Author: Jeron Aldaron Lau <[email protected]>
Date:   Fri Apr 14 19:55:10 2017 -0500

    Implemented toggle fullscreen on Windows.

commit dd0efbe
Author: Jeron Aldaron Lau <[email protected]>
Date:   Fri Apr 14 17:36:43 2017 -0500

    Implemented mouse enter and mouse leave events on windows.  Maximizing
    now works too.

commit f813e89
Author: Jeron Aldaron Lau <[email protected]>
Date:   Fri Apr 14 13:29:59 2017 -0500

    Windows mouse input now adjusts according to window position.

commit 7cfe16f
Author: Jeron Aldaron Lau <[email protected]>
Date:   Wed Apr 5 22:45:31 2017 -0500

    Added Key type for keyboard input, and updated docs.

commit b9710ad
Author: Jeron Aldaron Lau <[email protected]>
Date:   Wed Apr 5 20:03:05 2017 -0500

    Added return value to sleep() telling how long it actually slept.

commit 8597721
Author: Jeron Aldaron Lau <[email protected]>
Date:   Tue Apr 4 08:01:31 2017 -0500

    Moved input out of screen module, and into input module.

commit cd4cdfe
Author: Jeron Aldaron Lau <[email protected]>
Date:   Sun Apr 2 17:32:05 2017 -0500

    Update README.md

commit cf1e795
Author: Jeron Aldaron Lau <[email protected]>
Date:   Sun Apr 2 17:17:22 2017 -0500

    More standardized input across linux and windows

commit 64f7939
Merge: 130bcb2 cf352f6
Author: Jeron Aldaron Lau <[email protected]>
Date:   Tue Mar 28 19:43:39 2017 -0500

    Merge branch 'master' of https://github.com/plopgrizzly/adi

commit 130bcb2
Author: Jeron Aldaron Lau <[email protected]>
Date:   Tue Mar 28 19:43:20 2017 -0500

    Removed unneeded stuff.

commit cf352f6
Author: Jeron Aldaron Lau <[email protected]>
Date:   Tue Mar 28 15:58:25 2017 -0500

    Keyboard Input on Windows is mostly fully implemented.

commit 5248c30
Author: Jeron Aldaron Lau <[email protected]>
Date:   Sat Mar 25 20:31:08 2017 -0500

    Fixed many bugs on the windows port - only missing input now.

commit 5493262
Author: Jeron Aldaron Lau <[email protected]>
Date:   Wed Mar 22 22:18:54 2017 -0500

    Enabled vulkan validation layers - fixed all of the validation errors.

commit 90ceeaa
Author: Jeron Aldaron Lau <[email protected]>
Date:   Sat Mar 11 23:50:37 2017 -0600

    Started porting to Windows, freezes on vkWaitForFences, though.

commit b6a11a7
Author: Jeron Aldaron Lau <[email protected]>
Date:   Thu Mar 9 17:15:08 2017 -0600

    Fixed typo in demo.

commit ecb5675
Author: Jeron Aldaron Lau <[email protected]>
Date:   Thu Mar 9 17:13:26 2017 -0600

    User input has been modified a bit.  Removed Unknown, and added Back.

commit 7094271
Author: Jeron Aldaron Lau <[email protected]>
Date:   Thu Mar 9 12:13:50 2017 -0600

    Changed regulation algorithm.

commit bac9647
Author: Jeron Aldaron Lau <[email protected]>
Date:   Wed Mar 8 14:47:06 2017 -0600

    Minor API changes, and complete documentation.

commit e69fd0f
Author: Jeron Aldaron Lau <[email protected]>
Date:   Tue Mar 7 00:34:40 2017 -0600

    Updated API for types related to vw.

commit c4491cc
Author: Jeron Aldaron Lau <[email protected]>
Date:   Mon Mar 6 23:00:42 2017 -0600

    Moved math from screen to base module.

commit 89f3e28
Author: Jeron Aldaron Lau <[email protected]>
Date:   Mon Mar 6 19:09:07 2017 -0600

    Renamed window -> screen, added new pulse animation functions in base module.

commit 8779665
Author: Jeron Aldaron Lau <[email protected]>
Date:   Sun Mar 5 20:28:24 2017 -0600

    Readme now contains link to documentation

commit 1da240d
Author: Jeron Aldaron Lau <[email protected]>
Date:   Sun Mar 5 19:21:02 2017 -0600

    Added documentation website.

commit 4220771
Author: Jeron Aldaron Lau <[email protected]>
Date:   Sun Mar 5 18:07:27 2017 -0600

    Add logo to readme

commit 1bf2a81
Author: Jeron Aldaron Lau <[email protected]>
Date:   Sun Mar 5 18:04:13 2017 -0600

    Updated Logo

commit 2a9957c
Author: Jeron Aldaron Lau <[email protected]>
Date:   Sun Mar 5 16:46:29 2017 -0600

    README.md and Cargo.toml have more detail.

commit e5626d0
Author: Jeron Aldaron Lau <[email protected]>
Date:   Thu Mar 2 23:52:49 2017 -0600

    Added license information to each file.

commit 9507c66
Author: Jeron Aldaron Lau <[email protected]>
Date:   Sat Feb 25 18:49:37 2017 -0600

    Removed unused imports, variables, etc.

commit 04ed2cb
Author: Jeron Aldaron Lau <[email protected]>
Date:   Thu Feb 23 22:19:20 2017 -0600

    Added a lot of GUI interface stuff.

commit 982697b
Author: Jeron Aldaron Lau <[email protected]>
Date:   Sun Feb 19 22:57:37 2017 -0600

    Rendering is now handled by the library, and you can now do bitmap animations.

commit c3b4c81
Author: Jeron Aldaron Lau <[email protected]>
Date:   Sun Feb 19 16:55:57 2017 -0600

    added scrolling left and right for input.

commit 5e364ac
Author: Jeron Aldaron Lau <[email protected]>
Date:   Sat Feb 18 22:37:18 2017 -0600

    Changed the way instances work, and made them work.

commit 3902cfa
Merge: 2abcaf1 ef3d001
Author: Jeron Aldaron Lau <[email protected]>
Date:   Fri Feb 17 08:23:43 2017 -0600

    Merge branch 'master' of http://github.com/PlopGrizzly/aldaron

commit 2abcaf1
Author: Jeron Aldaron Lau <[email protected]>
Date:   Fri Feb 17 08:23:08 2017 -0600

    Fixed textures causing problems on certain types of GPU's.

commit ef3d001
Author: Jeron Aldaron Lau <[email protected]>
Date:   Sat Feb 4 16:11:20 2017 -0600

    Changed alpha key better.

commit 28feaff
Author: Jeron Aldaron Lau <[email protected]>
Date:   Tue Jan 31 15:02:59 2017 -0600

    Added alpha key support.

commit 9d8fbcf
Author: Jeron Aldaron Lau <[email protected]>
Date:   Mon Jan 30 17:45:19 2017 -0600

    Keep better track of timing frames, should be closer to 60 fps.

commit 835aebc
Author: Jeron Aldaron Lau <[email protected]>
Date:   Sun Jan 29 18:39:45 2017 -0600

    Perspective matrix now works with adjustable pov.

commit ddc3123
Author: Jeron Aldaron Lau <[email protected]>
Date:   Sun Jan 29 18:15:19 2017 -0600

    You can now render two of the same shape.

commit 1fae0bc
Author: Jeron Aldaron Lau <[email protected]>
Date:   Fri Jan 27 17:48:35 2017 -0600

    Added working texturing.

commit a64abc0
Author: Jeron Aldaron Lau <[email protected]>
Date:   Sun Jan 15 23:49:33 2017 -0600

    Abstracted .vw out of function calls.

commit 6cb1aaf
Author: Jeron Aldaron Lau <[email protected]>
Date:   Sun Jan 15 23:45:14 2017 -0600

    Enabled color blending.

commit bc8e883
Author: Jeron Aldaron Lau <[email protected]>
Date:   Sun Jan 15 23:15:59 2017 -0600

    Made vw_vulkan_shape return the shape instead of setting through a pointer.

commit a544f55
Author: Jeron Aldaron Lau <[email protected]>
Date:   Sun Jan 15 23:02:10 2017 -0600

    Fixed translation matrix depth testing not working.

commit 90149c6
Author: Jeron Aldaron Lau <[email protected]>
Date:   Sun Jan 15 22:52:18 2017 -0600

    Each shape can now have it's own transformation matrix.

commit 8ec3577
Author: Jeron Aldaron Lau <[email protected]>
Date:   Tue Jan 10 13:29:09 2017 -0600

    Added yaw, pitch and roll rotations using quaternions.

commit a30dedf
Author: Jeron Aldaron Lau <[email protected]>
Date:   Sun Jan 8 10:20:21 2017 -0600

    Added perspective projection matrix.

commit e1628a5
Author: Jeron Aldaron Lau <[email protected]>
Date:   Sat Jan 7 23:20:53 2017 -0600

    Added matrix type, and translations through a math module with a Vec3 type.

commit 49eb629
Author: Jeron Aldaron Lau <[email protected]>
Date:   Sat Jan 7 21:47:15 2017 -0600

    Added matrix transforms.

commit 9fe7c3b
Author: Jeron Aldaron Lau <[email protected]>
Date:   Sat Jan 7 18:32:10 2017 -0600

    Added change colors of drawn objects.

commit cba8caf
Author: Jeron Aldaron Lau <[email protected]>
Date:   Sun Jan 1 18:42:43 2017 -0600

    You can now set the window icon.

commit 21582aa
Author: Jeron Aldaron Lau <[email protected]>
Date:   Sun Jan 1 16:42:44 2017 -0600

    Added fullscreen support.

commit 51dc305
Author: Jeron Aldaron Lau <[email protected]>
Date:   Sun Jan 1 15:50:32 2017 -0600

    Window title can be set now, and resize events won't repeat.

commit eb544bf
Author: Jeron Aldaron Lau <[email protected]>
Date:   Sun Jan 1 15:24:48 2017 -0600

    Vulkan drawing and XCB code now go together!

commit de6d2ee
Author: Jeron Aldaron Lau <[email protected]>
Date:   Sat Dec 31 21:24:53 2016 -0600

    Now there is a triangle drawn in vulkan for example 'demo'.

commit f7dfcec
Author: Jeron Aldaron Lau <[email protected]>
Date:   Tue Dec 27 14:11:46 2016 -0600

    Prepare #6: Render Pass

commit 2769ed4
Author: Jeron Aldaron Lau <[email protected]>
Date:   Mon Dec 26 21:47:52 2016 -0600

    Prepare #5 descriptor layout

commit 7f40ff4
Author: Jeron Aldaron Lau <[email protected]>
Date:   Wed Dec 21 15:42:39 2016 -0600

    Prepare #3: Textures

commit 0482a53
Author: Jeron Aldaron Lau <[email protected]>
Date:   Tue Dec 20 13:22:41 2016 -0600

    Reduced repeated code for error checking.

commit d4a9801
Author: Jeron Aldaron Lau <[email protected]>
Date:   Mon Dec 19 23:32:49 2016 -0600

    Prepare #3: Load Textures

commit 0c542de
Author: Jeron Aldaron Lau <[email protected]>
Date:   Sun Dec 18 22:49:53 2016 -0600

    Prepare #2: Depth buffer.

commit a9697a1
Author: Jeron Aldaron Lau <[email protected]>
Date:   Sat Dec 17 22:22:27 2016 -0600

    Prepare #1 Buffers.

commit 43737a0
Author: Jeron Aldaron Lau <[email protected]>
Date:   Sat Dec 17 18:26:43 2016 -0600

    Now loads device function pointers.

commit ca29081
Author: Jeron Aldaron Lau <[email protected]>
Date:   Sat Dec 17 15:53:45 2016 -0600

    Fixed instance pointers not working.

commit 85fe625
Author: Jeron Aldaron Lau <[email protected]>
Date:   Sat Dec 17 13:41:30 2016 -0600

    Cleaned up some stuff, escape & x on window do same thing now.

commit 4a10c12
Author: Jeron Aldaron Lau <[email protected]>
Date:   Sat Dec 17 13:20:37 2016 -0600

    Keyboard input with XCB

commit 2834af3
Author: Jeron Aldaron Lau <[email protected]>
Date:   Fri Dec 16 23:50:01 2016 -0600

    XCB module now actually opens a window - but nothing else happens.

commit d0479d3
Author: Jeron Aldaron Lau <[email protected]>
Date:   Fri Dec 16 20:54:05 2016 -0600

    Aldaron can now load C function pointer from Vulkan into Rust and call them.

commit 7cddba2
Author: Jeron Aldaron Lau <[email protected]>
Date:   Wed Dec 14 20:14:09 2016 -0600

    Can now obtain the physical device in Vulkan.

commit 79a6776
Author: Jeron Aldaron Lau <[email protected]>
Date:   Tue Dec 13 23:49:13 2016 -0600

    vkCreateInstance() now runs fine from within rust.

commit c2f6f4a
Author: Jeron Aldaron Lau <[email protected]>
Date:   Mon Dec 12 20:18:34 2016 -0600

    Removed repeated code in image.rs.

commit c07cd53
Author: Jeron Aldaron Lau <[email protected]>
Date:   Mon Dec 12 18:22:01 2016 -0600

    Added *.ppm image files support.

commit aa7e48e
Author: Jeron Aldaron Lau <[email protected]>
Date:   Fri Nov 25 14:20:17 2016 -0600

    Added window icon feature.

commit 7e3b015
Author: Jeron Aldaron Lau <[email protected]>
Date:   Fri Nov 25 12:46:00 2016 -0600

    Improved API.

commit 9e773e6
Author: Jeron Aldaron Lau <[email protected]>
Date:   Thu Nov 24 21:43:40 2016 -0600

    Added clear method.

commit 3dae344
Author: Jeron Aldaron Lau <[email protected]>
Date:   Thu Nov 24 12:24:23 2016 -0600

    Removed dependency of libc.

commit 13e3eb5
Author: Jeron Aldaron Lau <[email protected]>
Date:   Wed Nov 23 23:27:06 2016 -0600

    Added framebuffer for window, and maximized by default.

commit fef549d
Author: Jeron Aldaron Lau <[email protected]>
Date:   Wed Nov 23 16:43:15 2016 -0600

    More advanced input with no repeated key presses, and floating-point mouse positions.

commit 64f3f02
Author: jeron <[email protected]>
Date:   Wed Nov 23 14:17:15 2016 -0600

    Added mouse events.

commit d450d1f
Author: Jeron Aldaron Lau <[email protected]>
Date:   Sun Nov 20 20:53:56 2016 -0600

    Added more to events.

commit a451aa1
Author: Jeron Aldaron Lau <[email protected]>
Date:   Sun Nov 20 19:00:36 2016 -0600

    Added window title argument to window::init()

commit a393ffa
Author: Jeron Aldaron Lau <[email protected]>
Date:   Sun Nov 20 17:55:25 2016 -0600

    Added xwindows support through X11.

commit 5b7efd8
Merge: 03e1039 b17ee4c
Author: jeron <[email protected]>
Date:   Sun Nov 20 14:21:21 2016 -0600

    Merge https://github.com/PlopGrizzly/aldaron

commit b17ee4c
Author: Jeron Lau <[email protected]>
Date:   Sun Nov 20 14:21:02 2016 -0600

    Initial commit
  • Loading branch information
AldaronLau committed Jul 30, 2019
1 parent 27e22c5 commit a1003f2
Show file tree
Hide file tree
Showing 10 changed files with 349 additions and 36 deletions.
17 changes: 7 additions & 10 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,19 +6,16 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0

## [Unreleased]
### Added
- ...

### Removed
- ...

### Changed
- ...

### Fixed
- ...

## [0.2.0] - 2019-05-12
### Added
- Joystick / controller support with API for emulation (not complete yet).

## [0.1.0] - 2019-05-01
### Added
- Getting user information (Linux, Windows, MacOS)
- Playing / recording audio (Linux)
- Filesystem loading / saving ZIP files (Linux, Windows)
- Getting user information (Linux, Windows, MacOS).
- Playing / recording audio (Linux).
- Filesystem loading / saving ZIP files (Linux, Windows).
3 changes: 1 addition & 2 deletions CONTRIBUTORS.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,2 @@
# Contributors

* [OxyDeadbeef](https://github.com/OxyDeadbeef)
- [JeronAldaron](https://github.com/JeronAldaron)
3 changes: 2 additions & 1 deletion Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@

[package]
name = "cala"
version = "0.1.0"
version = "0.2.0"
authors = ["Jeron Aldaron Lau <[email protected]>"]
edition = "2018"

Expand All @@ -25,3 +25,4 @@ whoami = "0.5" # user
wavy = "0.1" # audio
stronghold = "0.2" # file
serde = "1.0"
stick = "0.5" # joystick / controller
35 changes: 18 additions & 17 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -11,24 +11,25 @@ Easily create cross-platform applications. Some common tasks are not easily por
Cala is a platform-agnostic system interface for hardware IO. This means that eventually, Cala should support all of the different hardware that's connected to your computer. Cala is designed so that it talks to the operating system to interface with the hardware, so no special permissions are needed for your application.

## Features
* Targeted Platforms: Linux (includes Raspberry Pi), MacOS, Redox, Android, Windows, iOS, Web (WASM), Nintendo Switch, XBox, PlayStation, FreeBSD, others (Maybe FreeDOS for fun 😉️).
* Getting user information (Linux, Windows, MacOS)
* Playing / recording audio (Linux)
* Filesystem loading / saving ZIP files (Linux, Windows)
* Hardware acceleration - SIMD, GPU (NOT IMPLEMENTED YET)
* Clock - Date, Time of day, Timer (NOT IMPLEMENTED YET)
* GUI - Render, Mouse & Keyboard (NOT IMPLEMENTED YET)
* Game Controller - JoyStick (NOT IMPLEMENTED YET)
* Camera - Webcam (NOT IMPLEMENTED YET)
* Network - Bluetooth & Wifi Direct (NOT IMPLEMENTED YET)
- Targeted Platforms: Linux (includes Raspberry Pi), MacOS, Redox, Android, Windows, iOS, Web (WASM), Nintendo Switch, XBox, PlayStation, FreeBSD, others (Maybe FreeDOS for fun 😉️).
- Getting user information (Linux, Windows, MacOS)
- Playing / recording audio (Linux)
- Filesystem loading / saving ZIP files (Linux, Windows)
- Game Controller - JoyStick (Linux)
- Hardware acceleration - SIMD, GPU (NOT IMPLEMENTED YET)
- Clock - Date, Time of day, Timer (NOT IMPLEMENTED YET)
- GUI - Render, Mouse & Keyboard (NOT IMPLEMENTED YET)
- Camera - Webcam (NOT IMPLEMENTED YET)
- Network - Bluetooth & Wifi Direct (NOT IMPLEMENTED YET)

## Getting Started
* TODO
- TODO

## Links
* [Website](https://jeronaldaron.github.io/cala/)
* [Cargo](https://crates.io/crates/cala)
* [Documentation](https://docs.rs/cala)
* [Change Log](https://jeronaldaron.github.io/cala/CHANGELOG)
* [Contributors](https://jeronaldaron.github.io/cala/CONTRIBUTORS)
* [Code of Conduct](https://jeronaldaron.github.io/cala/CODEOFCONDUCT)
- [Website](https://jeronaldaron.github.io/cala/)
- [Cargo](https://crates.io/crates/cala)
- [Documentation](https://docs.rs/cala)
- [Change Log](https://jeronaldaron.github.io/cala/CHANGELOG)
- [Contributors](https://jeronaldaron.github.io/cala/CONTRIBUTORS)
- [Code of Conduct](https://jeronaldaron.github.io/cala/CODEOFCONDUCT)
- [Join Zulip Chat](https://plopgrizzly.zulipchat.com/join/pp13s6clnexk03tvlnrtjvi1/)
17 changes: 17 additions & 0 deletions examples/controller.rs
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
//! Get joystick input.

use cala::*;

fn main() {
let mut app = App::new(());

let layout = cala::ControllerLayout::new().joy(false).abxy(false);

loop {
for id in 0..app.controller_update() {
let state = app.controller_get(id, &layout);
println!("{}: {:?}", id, state);
}
std::thread::sleep(std::time::Duration::from_millis(16));
}
}
2 changes: 1 addition & 1 deletion icon.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified res/controller.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
177 changes: 177 additions & 0 deletions src/controller.rs
Original file line number Diff line number Diff line change
@@ -0,0 +1,177 @@
pub(crate) use stick::Port as ControllerPort;
pub(crate) use stick::Btn;

pub(crate) enum Axis {
JoyXY,
CamXY,
Lrt,
Pitch,
Yaw,
}

pub(crate) enum Btns {
Abxy,
Dpad,
Quit,
Menu,
Wz,
Lr,
Dc,
}

/// Select which buttons and axis you want on your controller.
///
/// Button names are from this contoller layout:
///
/// <img src="https://jeronaldaron.github.io/cala/res/controller.png" width="292">
pub struct ControllerLayout {
pub(crate) joy: Option<bool>,
pub(crate) cam: Option<bool>,
pub(crate) lrt: Option<bool>,
pub(crate) pitch: Option<bool>,
pub(crate) yaw: Option<bool>,
pub(crate) abxy: Option<bool>,
pub(crate) dpad: Option<bool>,
pub(crate) quit: Option<bool>,
pub(crate) menu: Option<bool>,
pub(crate) wz: Option<bool>,
pub(crate) cd: Option<bool>,
pub(crate) lrb: Option<bool>,
pub(crate) axis: Vec<Axis>,
pub(crate) btns: Vec<Btns>,
}

impl ControllerLayout {
/// Create a new `ControllerLayout`.
pub fn new() -> Self {
ControllerLayout {
joy: None,
cam: None,
lrt: None,
pitch: None,
yaw: None,
abxy: None,
dpad: None,
quit: None,
menu: None,
wz: None,
cd: None,
lrb: None,
axis: vec![],
btns: vec![],
}
}

/// Request an x & y axis for main joystick.
pub fn joy(mut self, optional: bool) -> Self {
// Don't do twice!
if self.joy.is_some() { return self; }

self.joy = Some(optional);
self.axis.push(Axis::JoyXY);
self
}

/// Request an x & y axis for camera (secondary) joystick.
pub fn cam(mut self, optional: bool) -> Self {
// Don't do twice!
if self.cam.is_some() { return self; }

self.cam = Some(optional);
self.axis.push(Axis::CamXY);
self
}

/// Request an x & y axis for camera (secondary) joystick.
pub fn lrt(mut self, optional: bool) -> Self {
// Don't do twice!
if self.lrt.is_some() { return self; }

self.cam = Some(optional);
self.axis.push(Axis::Lrt);
self
}

/// Request an axis for pitch (stationary throttle).
pub fn pitch(mut self, optional: bool) -> Self {
// Don't do twice!
if self.pitch.is_some() { return self; }

self.pitch = Some(optional);
self.axis.push(Axis::Pitch);
self
}

/// Request an axis for yaw (stationary throttle).
pub fn yaw(mut self, optional: bool) -> Self {
// Don't do twice!
if self.yaw.is_some() { return self; }

self.yaw = Some(optional);
self.axis.push(Axis::Yaw);
self
}

/// Request ABXY buttons.
pub fn abxy(mut self, optional: bool) -> Self {
if self.abxy.is_some() { return self; }

self.abxy = Some(optional);
self.btns.push(Btns::Abxy);
self
}

/// Request arrow buttons.
pub fn arrow(mut self, optional: bool) -> Self {
if self.dpad.is_some() { return self; }

self.dpad = Some(optional);
self.btns.push(Btns::Dpad);
self
}

/// Request Back button.
pub fn back(mut self, optional: bool) -> Self {
if self.quit.is_some() { return self; }

self.quit = Some(optional);
self.btns.push(Btns::Quit);
self
}

/// Request Menu button.
pub fn menu(mut self, optional: bool) -> Self {
if self.menu.is_some() { return self; }

self.menu = Some(optional);
self.btns.push(Btns::Menu);
self
}

/// Request W & Z buttons.
pub fn wz(mut self, optional: bool) -> Self {
if self.wz.is_some() { return self; }

self.wz = Some(optional);
self.btns.push(Btns::Wz);
self
}

/// Request D & C buttons (Push in joystick).
pub fn dc(mut self, optional: bool) -> Self {
if self.cd.is_some() { return self; }

self.cd = Some(optional);
self.btns.push(Btns::Dc);
self
}

/// Request L & R buttons.
pub fn lrb(mut self, optional: bool) -> Self {
if self.lrb.is_some() { return self; }

self.lrb = Some(optional);
self.btns.push(Btns::Lr);
self
}
}
Loading

0 comments on commit a1003f2

Please sign in to comment.