From a1003f20dbc587c2b9b4b8a8d2c52a45749c2645 Mon Sep 17 00:00:00 2001 From: Jeron Aldaron Lau Date: Tue, 30 Jul 2019 01:33:37 -0500 Subject: [PATCH] v0.2.0 Squashed commit of the following: commit e48ed2c8721b9c3449b46b215bc7d421e606b8cf Author: Jeron Aldaron Lau Date: Sun May 12 12:18:19 2019 -0500 v0.2.0 commit 2c41196fc063ecf057cc5ca576e51a092c0fba0a Author: Jeron Aldaron Lau Date: Sun May 12 12:04:06 2019 -0500 Update controller. commit d043f41bd75efec235ecb71f538b35a52f8dbcc0 Author: Jeron Aldaron Lau Date: Sun May 12 11:50:47 2019 -0500 Update to use new `stick` version with (add controller support). commit 24cbfbcfb2f62ed85aea368f6358512fbaa775d2 Author: Jeron Aldaron Lau Date: Mon May 6 18:27:47 2019 -0500 Shrink icon file size. commit 0295ab5fcc25b7a29289af73888fcdb5eae9b6d8 Author: Jeron Aldaron Lau Date: Mon May 6 18:21:34 2019 -0500 Update README.md commit a8a188eadc04011ef1a593ad69aa31405f2716d4 Author: Jeron Aldaron Lau Date: Wed May 1 11:31:40 2019 -0500 Release cala 0.1.0 commit 7fcc2f5966bacd1ec2c0fd528dd82e754ac48da2 Author: Jeron Aldaron Lau Date: Wed May 1 10:25:46 2019 -0500 Reduce icon file size. commit 535bef27bcd872598fd3979034bbf5ff437814c0 Author: Jeron Aldaron Lau Date: Wed May 1 10:24:56 2019 -0500 Update default.html commit 2160bb900c81471385664872a35c23a8d98a06c1 Author: Jeron Aldaron Lau Date: Wed May 1 10:22:58 2019 -0500 New icon. commit b5aa5820f29a74d84c6d4d5d53a47740343cd6de Author: Jeron Aldaron Lau Date: Wed May 1 10:02:46 2019 -0500 Update README.md - Dive -> Cala commit 2bafed730b0eedb4d87e321a3b3fa537e895560e Author: Jeron Aldaron Lau Date: Sun Apr 28 22:54:27 2019 -0500 Add whitespace in CHANGELOG.md commit 89ca024ee060244abccfa25b5d10ca8cec8e147a Author: Jeron Aldaron Lau Date: Sun Apr 28 22:51:09 2019 -0500 Markdown naming convention I guess is all caps usually. commit dff2a5f1f25db4353b74cd2ef4222b85beaeecc1 Author: Jeron Aldaron Lau Date: Sun Apr 28 22:47:24 2019 -0500 Try new format for changelog. commit 820f0efab4db3acbe2d9dfd8cd45377a4968f554 Author: Jeron Aldaron Lau Date: Sun Apr 28 22:32:36 2019 -0500 Fix bad wording. commit 5fb1f82e731c866532a7418a637e579234ae9135 Author: Jeron Aldaron Lau Date: Sun Apr 28 22:29:45 2019 -0500 Update documentation. commit 205d3e5c58b5316a0b6417e1001237316c6a6e87 Author: Jeron Aldaron Lau Date: Sun Apr 28 21:53:01 2019 -0500 Add audio and file systems. commit 415a0fcec99fc36e0dc52cbe98beb8906e82a6a9 Author: Jeron Aldaron Lau Date: Sun Apr 28 16:37:30 2019 -0500 Add API for getting user information. commit 45749a52ea40009cfe1a4eba196dce6e22e043ba Author: Jeron Aldaron Lau Date: Tue Apr 9 20:37:36 2019 -0500 Update changelog.md commit 1e2a534b9afb5571530e59b2190639430560fba9 Author: Jeron Aldaron Lau Date: Tue Apr 9 20:35:45 2019 -0500 Update README.md commit 328ecf82be0e938b5331754e17baf09258ef3afc Author: Jeron Aldaron Lau Date: Tue Apr 9 20:35:02 2019 -0500 Fixed up README. commit f2c7bf62dab7ad4dd8b16895f0f87342c7ae2fdd Merge: b725cf9 a7d17bc Author: Jeron Aldaron Lau Date: Tue Apr 9 20:33:34 2019 -0500 Merge branch 'master' of github.com:diveos/dive commit b725cf9fccb5eb823ba3f54a4f16d6c6abb92054 Author: Jeron Aldaron Lau Date: Tue Apr 9 20:32:21 2019 -0500 Ready for first release. commit 8778700c2f11f224dd2644fd66b1a56c4c8c0949 Author: Jeron Aldaron Lau Date: Tue Apr 9 20:21:38 2019 -0500 Dive, get ready to publish. commit a7d17bce97ee79e6a794a1e4b8a5d0b90694e5b7 Author: Jeron Aldaron Lau Date: Thu Mar 21 23:29:18 2019 -0500 Fixed Logo not showing in README. commit bc1a930a88be1cb853706f07ae24d0e64b42465c Author: Jeron Aldaron Lau Date: Thu Mar 21 23:18:41 2019 -0500 Moved old stuff. commit 7df559d1a82b71d912cbc87edd7f86e1cf5a4ced Author: Jeron Aldaron Lau Date: Thu Feb 7 14:11:58 2019 -0600 Added new files to automate git sync. commit bb1a0d8d89389409668cad936ac468fbcfc62d65 Author: Jeron Aldaron Lau Date: Thu Feb 7 13:59:45 2019 -0600 Some change commit b7f778ed60ab7ce92c7b3e5fa11eb008983a066c Author: Jeron Aldaron Lau Date: Fri Feb 1 14:22:59 2019 -0600 Some unused stuff away. commit a4019f7a902617341825a892b3bcc8f2f07acccf Author: Jeron Aldaron Lau Date: Fri Feb 1 14:12:32 2019 -0600 Add flipped texture coordinates for handling OpenGL coordinate system. commit d33fab6ef3b5dabfe97cc2c12e7e1313f8908734 Author: Jeron Aldaron Lau Date: Fri Feb 1 13:45:26 2019 -0600 GPU accelerated texturing. commit f06235c39216b0c9c83350745250b368d36af1e0 Author: Jeron Aldaron Lau Date: Thu Jan 31 22:16:44 2019 -0600 Add bitmap rendering. commit aff514fb7bf88fcd3c003718150a905e2820764f Author: Jeron Aldaron Lau Date: Thu Jan 31 12:34:33 2019 -0600 Added simple texturing. commit 94c5a70ce2921eb54d314fc23c167845fdad0b5c Author: Jeron Aldaron Lau Date: Tue Jan 29 18:20:54 2019 -0600 Resizing now works properly. commit adf3d6eb92fbbace60223f9888faabcc48339629 Author: Jeron Aldaron Lau Date: Tue Jan 29 16:00:02 2019 -0600 Started adding matrices. commit c84b5f73afbf60136ab65e81e81c6fb68810af9c Author: Jeron Aldaron Lau Date: Mon Jan 28 09:55:48 2019 -0600 xcb_testzone clear screen. commit 7bed6a98aeba44c406166f34ce2ed5ac927a3771 Author: Jeron Aldaron Lau Date: Mon Jan 21 16:08:08 2019 -0600 Add xcb_testzone. commit f93638827aef675ad03450895c028ee4d14dd1a1 Author: Jeron Aldaron Lau Date: Sun Jan 20 13:41:51 2019 -0600 More on siyo command line program. commit 3d2b559d3065fb6eda6e8be5fe164fc0ae95ebcd Author: Jeron Aldaron Lau Date: Thu Jan 10 09:41:24 2019 -0600 Binary in siyo crate. commit d13fb95701bcff300834524f68fe5f0086b04e64 Author: Jeron Aldaron Lau Date: Tue Jan 8 17:37:52 2019 -0600 test_triangle works again. commit 86212e3b28286f146cfb1287604fc589e3516c33 Author: Jeron Aldaron Lau Date: Tue Jan 8 17:19:50 2019 -0600 Re-organize repo. commit c92eb38ce03661c21c67f948a71fd90437efe455 Author: Jeron Aldaron Lau Date: Tue Jan 8 16:53:42 2019 -0600 Test webgl_generator as adi dependency. commit 4ef885452120a361416d33a5697e3c985d591350 Author: Jeron Aldaron Lau Date: Tue Jan 8 16:32:05 2019 -0600 New ADI. commit e5ef2ec80064fcbfb0796b920e32fc3993723eaf Author: Jeron Aldaron Date: Tue Jan 8 11:15:40 2019 -0600 Add siyo-web. commit db19dfb895395c25cf1118a6d34636bc1fe0e04b Author: Jeron Lau Date: Mon Dec 31 10:28:56 2018 -0600 Update README.md to match docs. commit e4797c84f8bfb02c5eb23d1ceda3c59779541ec6 Author: Jeron Lau Date: Mon Dec 31 01:33:00 2018 -0600 Started to support WebGL in WASM. commit b8c647e3b67c2a77ac6783c5dc04c49a12a400e3 Author: Jeron Lau Date: Mon Dec 31 00:57:18 2018 -0600 Remove unnecessary files. commit 017ba3774a85de5decb8fdbe600fbf5416d530e6 Author: Jeron Lau Date: Mon Dec 31 00:55:42 2018 -0600 Add override for favicon. commit 8caafaf80fbfd849f6190b5422cded900eacc516 Author: Jeron Lau Date: Sun Dec 30 23:45:28 2018 -0600 Set theme jekyll-theme-slate commit 5438307a55ec235c8389d3894a59c9f7800e07c1 Author: Jeron Lau Date: Sun Dec 30 22:26:44 2018 -0600 Added some cool features to cargo-siyo commit 1fd80f50907fdb5b31345738cec9c090d4e17b3a Author: Jeron Lau Date: Sun Dec 30 20:50:49 2018 -0600 cargo-siyo now handles WASM ok. commit f69fa78b5d74a453a58515d08801aa96a71777ff Author: Jeron Lau Date: Sun Dec 30 19:36:38 2018 -0600 Add stuff commit 35672347b264a9d57484ad11081bb6cd8db36996 Author: Jeron Lau Date: Sun Dec 30 18:44:00 2018 -0600 Add favicon.svg commit 9567957080a0cd9d791e4850c353cb6f2f147f79 Author: Jeron Lau Date: Sun Dec 30 18:30:49 2018 -0600 Make icon. commit 20ff20cf6e50bcddf3aaf2dcfd611d4037f14ddb Author: Jeron Lau Date: Sun Dec 30 18:22:04 2018 -0600 Update README.md commit 06d217100b09c7265b17ad11ec9f8ddf1efe67fe Author: Jeron Lau Date: Sun Dec 30 18:17:57 2018 -0600 Bigger banner. commit c4f80ef72f5688994378f4d16037e098e95ef0e5 Author: Jeron Lau Date: Sun Dec 30 18:14:46 2018 -0600 Update README.md commit e4995c8f6409fc466e304e6c8ede592575613c20 Author: Jeron Lau Date: Sun Dec 30 18:11:49 2018 -0600 Add cargo-siyo commit 110a24cfeffe5bee6971eb8824d6c91967681b22 Author: Jeron Lau Date: Fri Dec 28 16:38:11 2018 -0600 Update HID. commit aeffe2b4020ca8f8cdb6b295082a994294339651 Author: Jeron Lau Date: Fri Dec 28 12:56:27 2018 -0600 Renamed variants of `Key` enum. commit 8ba424a5a3f4556a5d0f0f96b238b913151e80a6 Author: Jeron Lau Date: Wed Dec 26 18:17:39 2018 -0600 Added ps button icons. commit 8d9c13d5a3123c69218ab56f1a9aac092f887675 Author: Jeron Lau Date: Wed Dec 26 17:32:19 2018 -0600 Add images for each button. commit 32a17fcf4a629617637e289f790791b7958c316a Author: Jeron Lau Date: Wed Dec 26 16:53:17 2018 -0600 Document all of the combinations for hid. commit 49d7cfe7539028426af7b18d9356cf5566bcfd94 Author: Jeron Lau Date: Wed Dec 26 13:27:28 2018 -0600 Stuff for HID. commit 29c128169e4e327ad18459f2db68527bd577ec7f Author: Jeron Lau Date: Tue Dec 25 23:28:57 2018 -0600 Cargo fmt on siyo crate. commit 92ee9c77e2e0b39d3e5e578839764a4afb9651fd Author: Jeron Lau Date: Tue Dec 25 23:27:50 2018 -0600 Got rid of warnings, and unmaintained examples. commit 22a812eef7ddbf5af218995d3b511affe9bc7330 Author: Jeron Lau Date: Tue Dec 25 22:57:15 2018 -0600 Lots of stuff with textures. commit a59608dcd15f54faf00df9358826ce307b38bb33 Author: Jeron Lau Date: Mon Dec 24 18:02:30 2018 -0600 Started improving texture API. commit 26f85fb3437a978f8de38f69a9ac58931d428095 Author: Jeron Lau Date: Mon Dec 24 16:12:50 2018 -0600 Renamed proc to math. commit 9af0b74efd895bacf821dd9c8fd423dc3bae1292 Author: Jeron Lau Date: Mon Dec 24 15:41:41 2018 -0600 Fractions and fixed point. commit 9afd0ebb08df992f39302b50b2e846d462325c6b Author: Jeron Lau Date: Mon Dec 24 12:53:04 2018 -0600 Started adding clock support with chrono. commit 44165fb5a0ae5e7b1c3f38054ed44f2b2b88b591 Author: Jeron Lau Date: Mon Dec 24 10:36:59 2018 -0600 Initial release. commit 23cf200e8f659fafbde05f96dcd9235edbb8545f Author: Jeron A. Lau Date: Mon Dec 24 10:25:07 2018 -0600 Set theme jekyll-theme-slate commit 8029024925edbd82f44a32aac2601fd290e12282 Author: Jeron Lau Date: Mon Dec 24 10:19:18 2018 -0600 New project. commit 5715f59a2a48e34deca584a164afc6b39d53bbe3 Author: Jeron Lau Date: Sun Dec 23 13:34:12 2018 -0600 Got rid of unused warnings when feature speaker is enabled without feature mic. commit 381b12734f9be3d4e55a04200b1475149685df66 Author: Jeron Lau Date: Sun Dec 23 13:26:24 2018 -0600 Some new functions in the API. commit b857839b0f31507f4da3ff20ece7e11d95b8ae3b Author: Jeron Lau Date: Fri Dec 21 20:21:42 2018 -0600 Fix xkbcomp bug. commit 6bd0fd730c96749543c66830fb8801a413e7e373 Author: Jeron Lau Date: Fri Dec 21 18:16:08 2018 -0600 Fix small documentation mistake. commit 6e277dba6cb7662a03ce410acc6bdaf77427f87b Author: Jeron Lau Date: Sun Dec 9 23:20:37 2018 -0600 Pre-Release 2: use 2018 edition and new version of barg. commit ae3f6e4e59760c88a6b47d9281b6b575d3107ba9 Author: Jeron Lau Date: Sat Dec 8 11:19:16 2018 -0600 Next pre-release. commit 2d0baa5b9c41a810b38aaa43f87c452a5f0d6797 Author: Jeron Lau Date: Sat Dec 1 09:31:26 2018 -0600 Run `cargo fmt` commit 58c5e1e3bbfb5eac32a33f5b1b1b59981e1591e6 Author: Jeron Lau Date: Sat Dec 1 09:30:15 2018 -0600 Fix bug on Vulkan with the resizing of the GUI texture not happenning. commit fdd9eea2600bfc145e055193bea70b53fb8615fa Author: Jeron Lau Date: Mon Nov 26 11:01:20 2018 -0600 Pre-release. commit d7994b287962f56a0f4d3a023ae5268a4c72f840 Author: Jeron Lau Date: Sun Nov 25 17:04:47 2018 -0600 Started adding camera support on Linux. commit 0417dae25f660c88068858835b5a25407a5deb69 Author: Jeron Lau Date: Sat Nov 24 01:25:11 2018 -0600 Added `rumble_start` and `rumble_stop` for haptic vibration support. commit 1334dbc40604d1a1349f6cdf42f74d341e305edd Author: Jeron Lau Date: Fri Nov 23 22:34:47 2018 -0600 Joystick-controller / multiple joystick-controller support. commit 1b4e7203b1e5f907bdf53ddab39699853efeb3d9 Author: Jeron Lau Date: Fri Nov 23 17:24:08 2018 -0600 The Compose key now works for getting input on Linux. commit d5ba38ac7291bb5ef108d64c1fbdc0938614978a Author: Jeron Lau Date: Fri Nov 23 14:38:47 2018 -0600 Fixed resizing the GUI under OpenGL not working properly. commit 4c2d78e87c6a90d2839666db358aa8082864f743 Author: Jeron Lau Date: Fri Nov 23 14:15:59 2018 -0600 OpenGL support is no longer broken. commit 2dfc2c00c82d827ca7f36243ae3c055f1ce929a3 Author: Jeron Lau Date: Fri Nov 23 13:08:59 2018 -0600 Fixed GUI not working under OpenGL. commit ab83a72c58feac6851c315034bb590b5121594bb Author: Jeron Lau Date: Fri Nov 23 12:25:09 2018 -0600 Fixed application freezing on resize. commit 34fadde4a825b8983802b65bae25b7ad09ba17e2 Author: Jeron Lau Date: Fri Nov 23 11:14:31 2018 -0600 Fixed input issue. commit a1098048380fc7de352a6234144abe504eb628a7 Author: Jeron Lau Date: Fri Nov 23 10:57:05 2018 -0600 Made input work again. commit 5a2602003570412d6be993e26375b32aa58508da Author: Jeron Lau Date: Fri Nov 23 10:03:10 2018 -0600 Moved some code around. commit 803e09e935465cb4d13caf27e49615c213caabe1 Author: Jeron Lau Date: Tue Nov 20 23:32:48 2018 -0600 Example use footile 0.2.0 commit b50e800509a59568956a225a8bf805420d013393 Author: Jeron Lau Date: Tue Nov 20 22:49:37 2018 -0600 Added some functionality to the HID module. commit a5327139ec15d06b504036a0ad9ab0e2a839a762 Author: Jeron Lau Date: Sat Nov 17 23:55:52 2018 -0600 Triangle example working with barg with footile underneath. commit 4909532a2ff8d1d19b7dd72ae8ae0f51f74ccbb8 Author: Jeron Lau Date: Thu Nov 15 11:50:09 2018 -0600 Removed a couple warnings. commit bba6b224338cbf8c91775848037a439883a22fc7 Author: Jeron Lau Date: Sat Nov 10 14:14:40 2018 -0600 Added texture example. commit e07dc5fe69bc0fe39b8293713b431036bc2883d2 Author: Jeron Lau Date: Sun Nov 4 00:19:31 2018 -0500 Added barg examples. commit 99e9d6fa662d7b7d28835b05019c4b3c50656ff9 Author: Jeron Lau Date: Sat Nov 3 20:06:47 2018 -0500 Worked on OpenGL rendering a bit. Not up to speed with Vulkan yet. commit 18ed5883c1e71c2ccbf8175683218ce4a7b8afef Author: Jeron Lau Date: Tue Oct 16 11:14:32 2018 -0500 Add runner struct. commit a838e5658e96a37895d795644089f0577734b333 Author: Jeron Lau Date: Mon Oct 15 09:15:59 2018 -0500 Renamed `Scene` to `Viewer`. commit e8e04296ff573ae21defddf9a0e02588265ce0fc Author: Jeron Lau Date: Sun Oct 14 01:08:24 2018 -0500 Removed lots of unused code. commit a175282e84bab85ce8c3b0c6e22fb9d0c5515b99 Author: Jeron Lau Date: Sun Oct 14 00:53:59 2018 -0500 Run `cargo fmt` commit 5d911dc9b2cebff0ee7d01ca61e33429137ab33e Author: Jeron Lau Date: Sun Oct 14 00:23:41 2018 -0500 Vulkan uses previous camera, which is faster now. Also added hid module. commit dc8f868e522a73b60c2e1cb6c73da84598622e6a Author: Jeron A. Lau Date: Sun Sep 30 14:08:19 2018 -0500 Start replacing Box Trait with function loading. commit 830e6ee91336b54c6d35e96d1686fdcfed2fefbf Author: Jeron A. Lau Date: Sat Sep 29 00:54:21 2018 -0500 Added important files - now conforms to rust fmt. commit 81374513095c665e8a85364d921b4c1ca87e9f93 Author: Jeron A. Lau Date: Sat Sep 22 15:12:12 2018 -0500 Faster update for textures. commit efee4245aa215409264779d2010284cf3a8cf2d5 Author: Jeron A. Lau Date: Sat Sep 22 00:52:24 2018 -0500 Speed up texture updates on Vulkan. commit 703ce2d8a26472ade9b4e56dc46e53cc2c7ae03e Author: Jeron A. Lau Date: Sun Sep 16 00:34:34 2018 -0500 Removed foggy remnants. commit 1ee4b2f7a976887a4d4c98391986dfc02563022b Author: Jeron A. Lau Date: Fri Sep 14 23:24:47 2018 -0500 Got some warnings away. commit 02055c3e513b30986d249082ca1d1b87b3479abc Author: Jeron A. Lau Date: Fri Sep 14 20:15:00 2018 -0500 Added awi code. commit de2925b58b9cc7ab3a1325de3ecc3f4819d638ba Author: Jeron A. Lau Date: Fri Sep 14 18:30:38 2018 -0500 Remove GUI stuffs from this repo. commit 8c027d6a4ce416f1d6a4d289260c0b254c018376 Author: Jeron A. Lau Date: Sun Sep 2 18:09:30 2018 -0500 Vulkan changes. commit f02da99b9d5c7da46782809260ac03e6a1d7e6b7 Author: Jeron A. Lau Date: Thu Aug 30 19:27:40 2018 -0500 Fix Table in README.md commit d20a6cdb39198ee1b240ecad6ee9c8340fc53ecf Author: Jeron A. Lau Date: Thu Aug 30 19:16:56 2018 -0500 Add shared module for alsa with mic and speaker. commit 755808920b6000ffd49044207ca2b57a41608c22 Author: Jeron A. Lau Date: Thu Aug 30 12:17:17 2018 -0500 Consolidated adi_screen into this crate (adi). commit c01ee7a43d818ed9ed8b99d4ffcb90368bd3e1f7 Author: Jeron A. Lau Date: Sun Aug 12 23:51:08 2018 -0500 Version 0.12 commit 37354d801021f703d90f11f707920351291663db Author: Jeron A. Lau Date: Mon Aug 6 15:03:11 2018 -0500 Fix README typo. commit def120a1cc7999b2d760f0ca1de646ae522dd160 Author: Jeron A. Lau Date: Mon Aug 6 15:00:38 2018 -0500 Version 0.11 commit 5baceb289cb45919436bc6ec81217a36e0514f85 Author: Jeron A. Lau Date: Sat Aug 4 23:02:31 2018 -0500 Match dependency crates. commit bc56bc0772269c91ea7c0639dde28f4646dbb8c3 Author: Jeron A. Lau Date: Thu Jul 26 10:26:33 2018 -0500 Changed to triple-license under Boost, MIT & Apache. commit e9edb4bbbbb8607672d1b7fb05cc17424b51908b Author: Jeron A. Lau Date: Thu Jun 21 23:13:09 2018 -0500 Oops commit dfa3cac741b031c90d2dfdb06b1eaec422228f43 Author: Jeron A. Lau Date: Thu Jun 21 23:10:26 2018 -0500 Version 0.10 commit a4316a798a7f2982c720643bc45043d55137ddc4 Author: Jeron A. Lau Date: Thu Jun 21 00:29:21 2018 -0500 Version 0.9 commit 58408be93c10688e5f0a762d49d439f4e016589f Author: Jeron A. Lau Date: Fri May 25 23:37:56 2018 -0500 Version 0.8 commit 41bd3cfb1d25d808fba47d72c6ea108f628a7eea Author: Jeron A. Lau Date: Fri May 25 22:10:33 2018 -0500 Version 0.7.1 commit 8254ae7ef2e480d691f3c8000c6ba784e854607a Author: Jeron A. Lau Date: Fri May 25 22:04:11 2018 -0500 Added redirect to version. commit 13d0a30de079f5da309ce80e49f769df567db2ea Author: Jeron A. Lau Date: Fri May 25 21:52:57 2018 -0500 Fixed url commit 75486770a38b0b486c7f2d19e0bc230395a73231 Author: Jeron A. Lau Date: Fri May 25 21:51:06 2018 -0500 Moved documentation onto the website. commit 78c1043c4de1126b37437708a22f302116cdefa6 Author: Jeron A. Lau Date: Fri May 25 20:33:29 2018 -0500 Version 0.7! commit 011ab86c4ab397b8611473f2df72e5630e7a44f3 Author: Jeron A. Lau Date: Fri May 25 14:40:42 2018 -0500 Removed stick. commit c0c30777cb620f251518aa3657b47fd1c4cb485e Author: Jeron A. Lau Date: Sat Apr 14 18:54:14 2018 -0500 Update license information. commit 9b23e3e2b94d70889fbe23a4ab0ec2d394f3558d Author: Jeron Aldaron Lau Date: Sat Apr 14 16:26:09 2018 -0500 Local stick. commit 0ccc0582752f510c674d5f060c7382844355fb13 Author: Jeron A. Lau Date: Mon Apr 2 11:09:08 2018 -0500 Add stick as a dependency. commit a6671437c0a032524159592adefa90ccdbf4a058 Author: Jeron A. Lau Date: Sun Apr 1 18:57:45 2018 -0500 debug for adi_screen commit 55e7e01cad36a9192833661b41914228d7c3cfcf Author: Jeron Aldaron Lau Date: Sat Feb 24 23:12:21 2018 -0600 Version 0.6.0 commit 4dd9730fa28c9a2e5b371223c39e3b2802e7177e Author: Jeron Aldaron Lau Date: Fri Feb 9 11:12:44 2018 -0600 Version 0.5.0 commit 3daad9b28c601698268962e86122079e1b9c45f5 Author: Jeron Aldaron Lau Date: Tue Feb 6 22:37:47 2018 -0600 Updated to local dependency. commit 1197f9300bdbe189355c6d13f73ade9593c87836 Author: Jeron Aldaron Lau Date: Sat Jan 20 13:43:53 2018 -0600 Set theme jekyll-theme-slate commit 4a8f403f2106ca98cfaf154914b076ac522fc548 Author: Jeron Aldaron Lau Date: Sat Jan 20 13:40:39 2018 -0600 Ready for release. commit 96a422bd8dbca4cfaacdf668ce668a69a8f21c10 Author: Jeron Aldaron Lau Date: Sat Jan 20 11:15:28 2018 -0600 Macro and files. commit 3712ddd4678aabbe2bda0f66540f12c12d0b07ee Author: Jeron Aldaron Lau Date: Sat Jan 6 13:20:29 2018 -0600 Add some new files. commit fc14dcbb0bec510770bcdafda1759b6dc9dc4566 Author: Jeron Aldaron Lau Date: Wed Jun 7 21:43:00 2017 -0500 Update adi_screen. commit 3127b9cad7e03ee8e4b2f97a0a0d2d7039a3a673 Author: Jeron Aldaron Lau Date: Sat May 27 18:12:30 2017 -0500 Updated some stuff. commit a940e8a7ebea63f3a80cecfd53335bb87ac4362d Author: Jeron Aldaron Lau Date: Sat May 27 18:08:16 2017 -0500 adi Version 0.3.0 commit f0b2f557a2e800929084fc723399b7576dd502ff Author: Jeron Aldaron Lau Date: Wed May 17 14:48:30 2017 -0500 Fixed reexport warning. commit 982064ee2569d48305ff2169808faeeaa084575a Author: Jeron Aldaron Lau Date: Mon May 15 22:15:39 2017 -0500 Updated to use adi_screen 0.1.0 & adi_clock 0.2.0 commit 494aa2c8262ceb432d2941c0305387700328404b Author: Jeron Aldaron Lau Date: Fri Apr 28 21:41:45 2017 -0500 Updated link style in docs. commit 472bdbb61dc5d7cf7d706667653e3b5dac0660d8 Author: Jeron Aldaron Lau Date: Fri Apr 28 21:16:24 2017 -0500 Change docs website style commit b27d71c3019c3ce79ec26c4cae90ba0f261b595a Author: Jeron Aldaron Lau Date: Mon Apr 24 15:23:55 2017 -0500 Removed screen module, added TODO & updated license. commit 1e8455afdd11f2959c8809f4601d74fe78516184 Author: Jeron Aldaron Lau Date: Sat Apr 22 14:17:19 2017 -0500 Improved timer on linux commit 106f13aec2cd21330b7a60fcd277a9765a7b1ada Author: Jeron Aldaron Lau Date: Fri Apr 21 23:47:29 2017 -0500 Timer works on Linux now, still not ideal. commit 0d1a28a791ec248c362b31a08ae032a8dc95ad3f Author: Jeron Aldaron Lau Date: Wed Apr 19 14:07:00 2017 -0500 Replaced time module with timer and clock. commit e21519f827c129ea9e2ca7626046342f8375d1fd Author: Jeron Aldaron Lau Date: Sat Apr 15 11:31:39 2017 -0500 Updated license identifier. commit 292698230e46716083a29ad7fda4b7b6a9a929f0 Author: Jeron Aldaron Lau Date: Sat Apr 15 11:29:45 2017 -0500 Cut down keywords to 5 commit 74ff5b3d2ea47a045b641f1619943f2f3a9d73d4 Author: Jeron Aldaron Lau Date: Sat Apr 15 11:27:31 2017 -0500 Updated keywords. commit 968a12825799f3c27edc3feed5cc0b75d95d070c Merge: 4f935ea 210d824 Author: Jeron Aldaron Lau Date: Sat Apr 15 11:24:51 2017 -0500 Merge branch 'master' of https://github.com/plopgrizzly/adi commit 4f935eabaf7ca1b63a3201f81bc48d90cfe3473b Author: Jeron Aldaron Lau Date: Sat Apr 15 11:24:41 2017 -0500 Added a TODO file. commit 210d824115543411d0c5c56619aa542df46b900e Author: Jeron Aldaron Lau Date: Sat Apr 15 11:23:45 2017 -0500 Update README.md changed Emscripten to Web Assembly for the target name commit 4114b8a55fa77bef9f004c29920fbd96def29e94 Author: Jeron Aldaron Lau Date: Sat Apr 15 11:10:05 2017 -0500 Update README.md commit b15277939c3699375efb9615cff6d1a4c9e09b9c Author: Jeron Aldaron Lau Date: Sat Apr 15 11:03:14 2017 -0500 Moved third-party directory. commit 63ce7095f9302441873a097d7320f5f43a18ec2a Author: Jeron Aldaron Lau Date: Sat Apr 15 01:46:55 2017 -0500 Added to the Cargo.toml commit b2cc1ddbbed56fa74c39ff918d84f1d8c79e9164 Author: Jeron Aldaron Lau Date: Sat Apr 15 01:23:43 2017 -0500 Fixed Linux port of library not compiling. commit 903c57e7caca70c4c17bdb9f54d04ea74441b0c9 Merge: e977d20 6fd7022 Author: Jeron Aldaron Lau Date: Sat Apr 15 00:55:55 2017 -0500 Merge branch 'master' of https://github.com/plopgrizzly/adi commit e977d20c339e1c29c00261e6c4974da72dab04bb Author: Jeron Aldaron Lau Date: Sat Apr 15 00:55:40 2017 -0500 Found a bug though vulkan-validation layers. commit 6fd7022e46a10ec6725af25756c5caefe85210db Author: Jeron Aldaron Lau Date: Sat Apr 15 00:39:48 2017 -0500 Implemented pause and resume ( changing focus ) on windows. commit feab776e9dd41e5cf7768681cd65773dc295e2f6 Author: Jeron Aldaron Lau Date: Sat Apr 15 00:31:55 2017 -0500 Implemented Window Icon on Windows. commit 92ff81b5651f758c69899e104692c145f22d97f7 Author: Jeron Aldaron Lau Date: Fri Apr 14 23:19:39 2017 -0500 Removed warning messages on windows. commit 027bf92c2823cd1581b4cc205b2af6f09fb4d123 Author: Jeron Aldaron Lau Date: Fri Apr 14 23:14:58 2017 -0500 Right Alt, Right Ctrl, Right Shift & Left Alt now work on windows. commit 990a7dae19e8310cf6d9c73500ede9f02fac816e Author: Jeron Aldaron Lau Date: Fri Apr 14 21:50:08 2017 -0500 Improved time module for Windows - sleep is more precise. commit a8c5ab23d970e026f39bd828df114cce065335b2 Author: Jeron Aldaron Lau Date: Fri Apr 14 19:55:10 2017 -0500 Implemented toggle fullscreen on Windows. commit dd0efbe382b423204cff9d73b2270654d65608bc Author: Jeron Aldaron Lau Date: Fri Apr 14 17:36:43 2017 -0500 Implemented mouse enter and mouse leave events on windows. Maximizing now works too. commit f813e89b0cf48fd782f624ff1846073d0d4f7d45 Author: Jeron Aldaron Lau Date: Fri Apr 14 13:29:59 2017 -0500 Windows mouse input now adjusts according to window position. commit 7cfe16f0c9e79b1af4bd03a88f08cbf50a9c65b6 Author: Jeron Aldaron Lau Date: Wed Apr 5 22:45:31 2017 -0500 Added Key type for keyboard input, and updated docs. commit b9710adc120ee301d1b8cc280fcb801dc3a0ae4f Author: Jeron Aldaron Lau Date: Wed Apr 5 20:03:05 2017 -0500 Added return value to sleep() telling how long it actually slept. commit 859772144fb0bc9bd5b4e23f6090eb525ee846d8 Author: Jeron Aldaron Lau Date: Tue Apr 4 08:01:31 2017 -0500 Moved input out of screen module, and into input module. commit cd4cdfe790ff52234f0cc1d61cf058acf163efe1 Author: Jeron Aldaron Lau Date: Sun Apr 2 17:32:05 2017 -0500 Update README.md commit cf1e7957dcbc8406a7df3d146edeb95eb22940f0 Author: Jeron Aldaron Lau Date: Sun Apr 2 17:17:22 2017 -0500 More standardized input across linux and windows commit 64f793912cbc6b80ae687330c5e1e6529e80cabe Merge: 130bcb2 cf352f6 Author: Jeron Aldaron Lau Date: Tue Mar 28 19:43:39 2017 -0500 Merge branch 'master' of https://github.com/plopgrizzly/adi commit 130bcb25d57783c8d5d1e48cd5532e3b2f656657 Author: Jeron Aldaron Lau Date: Tue Mar 28 19:43:20 2017 -0500 Removed unneeded stuff. commit cf352f65a0fa51d8d14ad35795038318cb38cbd7 Author: Jeron Aldaron Lau Date: Tue Mar 28 15:58:25 2017 -0500 Keyboard Input on Windows is mostly fully implemented. commit 5248c30f931f3562e7e2205eab78d3f2da1d657a Author: Jeron Aldaron Lau Date: Sat Mar 25 20:31:08 2017 -0500 Fixed many bugs on the windows port - only missing input now. commit 5493262797ecff1690ca2dae07c5bc11ef8ab794 Author: Jeron Aldaron Lau Date: Wed Mar 22 22:18:54 2017 -0500 Enabled vulkan validation layers - fixed all of the validation errors. commit 90ceeaaf7ddebc2b3634b0ce27732fc4f6c21d87 Author: Jeron Aldaron Lau Date: Sat Mar 11 23:50:37 2017 -0600 Started porting to Windows, freezes on vkWaitForFences, though. commit b6a11a7a73517c0d82bf2fd87317a3d48216e4c1 Author: Jeron Aldaron Lau Date: Thu Mar 9 17:15:08 2017 -0600 Fixed typo in demo. commit ecb56755fe7b47102a98cf6d22deb050c977fe5e Author: Jeron Aldaron Lau Date: Thu Mar 9 17:13:26 2017 -0600 User input has been modified a bit. Removed Unknown, and added Back. commit 70942719ebc9a083f22c2466e59f260ba2b0a723 Author: Jeron Aldaron Lau Date: Thu Mar 9 12:13:50 2017 -0600 Changed regulation algorithm. commit bac9647e4b5d9f0b4398f66549db2beb33f029e2 Author: Jeron Aldaron Lau Date: Wed Mar 8 14:47:06 2017 -0600 Minor API changes, and complete documentation. commit e69fd0f5c5a7b164f62b20b1a06ae80131a1bd8c Author: Jeron Aldaron Lau Date: Tue Mar 7 00:34:40 2017 -0600 Updated API for types related to vw. commit c4491cc1b1678075bf818031351f8c6bf699e65c Author: Jeron Aldaron Lau Date: Mon Mar 6 23:00:42 2017 -0600 Moved math from screen to base module. commit 89f3e28c3c9f705b51ecdb296144ef3171dd62de Author: Jeron Aldaron Lau Date: Mon Mar 6 19:09:07 2017 -0600 Renamed window -> screen, added new pulse animation functions in base module. commit 87796652432be0b2ab02de136a7ada97c00c0d23 Author: Jeron Aldaron Lau Date: Sun Mar 5 20:28:24 2017 -0600 Readme now contains link to documentation commit 1da240dfb723f585b5a1694d9952011106b68769 Author: Jeron Aldaron Lau Date: Sun Mar 5 19:21:02 2017 -0600 Added documentation website. commit 422077172944ea0b6cf3af98d31c87c7338276b3 Author: Jeron Aldaron Lau Date: Sun Mar 5 18:07:27 2017 -0600 Add logo to readme commit 1bf2a81da8b81e46f6bdab930d3a4e88cc6f3e2f Author: Jeron Aldaron Lau Date: Sun Mar 5 18:04:13 2017 -0600 Updated Logo commit 2a9957cc7dfe51a78f28b64dbb13b456a43e902f Author: Jeron Aldaron Lau Date: Sun Mar 5 16:46:29 2017 -0600 README.md and Cargo.toml have more detail. commit e5626d0624caa4763ccc8f760a4213e3969c7c83 Author: Jeron Aldaron Lau Date: Thu Mar 2 23:52:49 2017 -0600 Added license information to each file. commit 9507c665b7d5235450d7ee26d2f79b212c74cdb6 Author: Jeron Aldaron Lau Date: Sat Feb 25 18:49:37 2017 -0600 Removed unused imports, variables, etc. commit 04ed2cbc5dd43d64efb7f373d6257a864a891c9a Author: Jeron Aldaron Lau Date: Thu Feb 23 22:19:20 2017 -0600 Added a lot of GUI interface stuff. commit 982697b3ab8cfac3f270b18d7f19e4d3531cdf7e Author: Jeron Aldaron Lau Date: Sun Feb 19 22:57:37 2017 -0600 Rendering is now handled by the library, and you can now do bitmap animations. commit c3b4c81d880cd826d974b8023d9bdb147edeea00 Author: Jeron Aldaron Lau Date: Sun Feb 19 16:55:57 2017 -0600 added scrolling left and right for input. commit 5e364ac9d2b2a7a0b6f210806d30ce71ab0c9c11 Author: Jeron Aldaron Lau Date: Sat Feb 18 22:37:18 2017 -0600 Changed the way instances work, and made them work. commit 3902cfaca7870c653c008b109b3239897618de98 Merge: 2abcaf1 ef3d001 Author: Jeron Aldaron Lau Date: Fri Feb 17 08:23:43 2017 -0600 Merge branch 'master' of http://github.com/PlopGrizzly/aldaron commit 2abcaf1499d07ec85cbecfb87bd337769b5f531d Author: Jeron Aldaron Lau Date: Fri Feb 17 08:23:08 2017 -0600 Fixed textures causing problems on certain types of GPU's. commit ef3d0013f032bcb384c4128e34d07597f626b565 Author: Jeron Aldaron Lau Date: Sat Feb 4 16:11:20 2017 -0600 Changed alpha key better. commit 28feaff73477400fb6b2dfc5e7795178f817106c Author: Jeron Aldaron Lau Date: Tue Jan 31 15:02:59 2017 -0600 Added alpha key support. commit 9d8fbcf2e697b454c2cd15cfa72b30480df2c9be Author: Jeron Aldaron Lau Date: Mon Jan 30 17:45:19 2017 -0600 Keep better track of timing frames, should be closer to 60 fps. commit 835aebc8ae965de6fa049d192323d1263f12200b Author: Jeron Aldaron Lau Date: Sun Jan 29 18:39:45 2017 -0600 Perspective matrix now works with adjustable pov. commit ddc31238c73ca313bf18927bf0a2e1e3fbe6bba8 Author: Jeron Aldaron Lau Date: Sun Jan 29 18:15:19 2017 -0600 You can now render two of the same shape. commit 1fae0bc5aff25d04002abeb8d3d664eb156b5d94 Author: Jeron Aldaron Lau Date: Fri Jan 27 17:48:35 2017 -0600 Added working texturing. commit a64abc0093f3c0deca504fe0537c8c5067efe894 Author: Jeron Aldaron Lau Date: Sun Jan 15 23:49:33 2017 -0600 Abstracted .vw out of function calls. commit 6cb1aaf8833fa502c5eff000ce472a9e4726107b Author: Jeron Aldaron Lau Date: Sun Jan 15 23:45:14 2017 -0600 Enabled color blending. commit bc8e8832c4e484bdd2cd17f1b3feb371808c3cdd Author: Jeron Aldaron Lau Date: Sun Jan 15 23:15:59 2017 -0600 Made vw_vulkan_shape return the shape instead of setting through a pointer. commit a544f556e1b49871bbde6d32db45a8c461396d12 Author: Jeron Aldaron Lau Date: Sun Jan 15 23:02:10 2017 -0600 Fixed translation matrix depth testing not working. commit 90149c6943a84852529780d143a4414d7916c082 Author: Jeron Aldaron Lau Date: Sun Jan 15 22:52:18 2017 -0600 Each shape can now have it's own transformation matrix. commit 8ec35773b4a1a704c6bd12d5e34ab41e3b0a19df Author: Jeron Aldaron Lau Date: Tue Jan 10 13:29:09 2017 -0600 Added yaw, pitch and roll rotations using quaternions. commit a30dedfcb09b698382ac828f620527ba568b14f9 Author: Jeron Aldaron Lau Date: Sun Jan 8 10:20:21 2017 -0600 Added perspective projection matrix. commit e1628a522aef28c3935ed96d5e9cca5970b8b1dd Author: Jeron Aldaron Lau Date: Sat Jan 7 23:20:53 2017 -0600 Added matrix type, and translations through a math module with a Vec3 type. commit 49eb629c4401d425be6ad0cdb59813a592cf8732 Author: Jeron Aldaron Lau Date: Sat Jan 7 21:47:15 2017 -0600 Added matrix transforms. commit 9fe7c3b0497c5ceeedcf9d48ead03becca0a00f1 Author: Jeron Aldaron Lau Date: Sat Jan 7 18:32:10 2017 -0600 Added change colors of drawn objects. commit cba8cafc2a2c44f348b8a464161d0e47c963d0ca Author: Jeron Aldaron Lau Date: Sun Jan 1 18:42:43 2017 -0600 You can now set the window icon. commit 21582aa9f90ccbdc6c14ecb72fe0560b21bf92a4 Author: Jeron Aldaron Lau Date: Sun Jan 1 16:42:44 2017 -0600 Added fullscreen support. commit 51dc3051e3ee02c8199a9352423ad950f62eaed5 Author: Jeron Aldaron Lau Date: Sun Jan 1 15:50:32 2017 -0600 Window title can be set now, and resize events won't repeat. commit eb544bfc7cfea92687d03ac110f34d67d82bd280 Author: Jeron Aldaron Lau Date: Sun Jan 1 15:24:48 2017 -0600 Vulkan drawing and XCB code now go together! commit de6d2eedb517e29cf4d21c6b7b21c1b2a63304ce Author: Jeron Aldaron Lau Date: Sat Dec 31 21:24:53 2016 -0600 Now there is a triangle drawn in vulkan for example 'demo'. commit f7dfcec869b32d0093992724395653eb6cafaccf Author: Jeron Aldaron Lau Date: Tue Dec 27 14:11:46 2016 -0600 Prepare #6: Render Pass commit 2769ed4fcb016890b76eaef3a5d581ad002d5f9f Author: Jeron Aldaron Lau Date: Mon Dec 26 21:47:52 2016 -0600 Prepare #5 descriptor layout commit 7f40ff47ddaf4e84e017a5e573208b83918f1a13 Author: Jeron Aldaron Lau Date: Wed Dec 21 15:42:39 2016 -0600 Prepare #3: Textures commit 0482a53b4ff0907a59a2f87eb86e56aa0cdc8027 Author: Jeron Aldaron Lau Date: Tue Dec 20 13:22:41 2016 -0600 Reduced repeated code for error checking. commit d4a98017eb80655b14d078487c386e00fdb989a5 Author: Jeron Aldaron Lau Date: Mon Dec 19 23:32:49 2016 -0600 Prepare #3: Load Textures commit 0c542dec75f9c89000df96d217239388e591c781 Author: Jeron Aldaron Lau Date: Sun Dec 18 22:49:53 2016 -0600 Prepare #2: Depth buffer. commit a9697a1ed6e2a39129a0e454150a04ebd0d957c0 Author: Jeron Aldaron Lau Date: Sat Dec 17 22:22:27 2016 -0600 Prepare #1 Buffers. commit 43737a0023eb4d07eccf7fc85085b66781828658 Author: Jeron Aldaron Lau Date: Sat Dec 17 18:26:43 2016 -0600 Now loads device function pointers. commit ca29081088226c933c6c11865b510a70c969127b Author: Jeron Aldaron Lau Date: Sat Dec 17 15:53:45 2016 -0600 Fixed instance pointers not working. commit 85fe625b8ee5d3d79a9099dc111a61952e60a9aa Author: Jeron Aldaron Lau Date: Sat Dec 17 13:41:30 2016 -0600 Cleaned up some stuff, escape & x on window do same thing now. commit 4a10c120001be36107efd8cbb747aa8f5d39e39d Author: Jeron Aldaron Lau Date: Sat Dec 17 13:20:37 2016 -0600 Keyboard input with XCB commit 2834af3f57786e088974df3b5ea56a5c6cbe4203 Author: Jeron Aldaron Lau Date: Fri Dec 16 23:50:01 2016 -0600 XCB module now actually opens a window - but nothing else happens. commit d0479d30ac370176a8206da6bca448d71ef33445 Author: Jeron Aldaron Lau Date: Fri Dec 16 20:54:05 2016 -0600 Aldaron can now load C function pointer from Vulkan into Rust and call them. commit 7cddba2f8d16b6592781d1939fc620506018c0c1 Author: Jeron Aldaron Lau Date: Wed Dec 14 20:14:09 2016 -0600 Can now obtain the physical device in Vulkan. commit 79a6776b418266bff4e44690a5d72bf637fb4b6c Author: Jeron Aldaron Lau Date: Tue Dec 13 23:49:13 2016 -0600 vkCreateInstance() now runs fine from within rust. commit c2f6f4a8bb63352d3503721963f6aa5b6f64c5f4 Author: Jeron Aldaron Lau Date: Mon Dec 12 20:18:34 2016 -0600 Removed repeated code in image.rs. commit c07cd533c715f1f26fe3bbcd29d057b5b6d43d7f Author: Jeron Aldaron Lau Date: Mon Dec 12 18:22:01 2016 -0600 Added *.ppm image files support. commit aa7e48e24947ef690f8880d30e9ee267c354c934 Author: Jeron Aldaron Lau Date: Fri Nov 25 14:20:17 2016 -0600 Added window icon feature. commit 7e3b015e4543b6ce8329eb2f49d00011c1ad672a Author: Jeron Aldaron Lau Date: Fri Nov 25 12:46:00 2016 -0600 Improved API. commit 9e773e6cbd369164bea5cb3d01ea8817a18ac80a Author: Jeron Aldaron Lau Date: Thu Nov 24 21:43:40 2016 -0600 Added clear method. commit 3dae344692f7af683e7f5458ba7bbcaed2ac2b5e Author: Jeron Aldaron Lau Date: Thu Nov 24 12:24:23 2016 -0600 Removed dependency of libc. commit 13e3eb524d5da5bd97c2b73fc0b1f8faa366957e Author: Jeron Aldaron Lau Date: Wed Nov 23 23:27:06 2016 -0600 Added framebuffer for window, and maximized by default. commit fef549d6842c6770f90cc1097d4d0cae8700c227 Author: Jeron Aldaron Lau Date: Wed Nov 23 16:43:15 2016 -0600 More advanced input with no repeated key presses, and floating-point mouse positions. commit 64f3f02fedbd260168b16d5711a9079a4c4c3216 Author: jeron Date: Wed Nov 23 14:17:15 2016 -0600 Added mouse events. commit d450d1fe77969a699a45925fb85fbe183a37135c Author: Jeron Aldaron Lau Date: Sun Nov 20 20:53:56 2016 -0600 Added more to events. commit a451aa1c6172dc50e8c810b88c490fc799684ab8 Author: Jeron Aldaron Lau Date: Sun Nov 20 19:00:36 2016 -0600 Added window title argument to window::init() commit a393ffa192b115ce1239a891f0d99dee035b50e8 Author: Jeron Aldaron Lau Date: Sun Nov 20 17:55:25 2016 -0600 Added xwindows support through X11. commit 5b7efd8b6facbe602abe795a22d527405d835f17 Merge: 03e1039 b17ee4c Author: jeron Date: Sun Nov 20 14:21:21 2016 -0600 Merge https://github.com/PlopGrizzly/aldaron commit b17ee4cb8ec9febfb70bdd2b43435180d711693e Author: Jeron Lau Date: Sun Nov 20 14:21:02 2016 -0600 Initial commit --- CHANGELOG.md | 17 ++-- CONTRIBUTORS.md | 3 +- Cargo.toml | 3 +- README.md | 35 ++++---- examples/controller.rs | 17 ++++ icon.svg | 2 +- res/controller.png | Bin 9408 -> 13136 bytes src/controller.rs | 177 +++++++++++++++++++++++++++++++++++++++++ src/dive.rs | 119 +++++++++++++++++++++++++++ src/lib.rs | 12 +-- 10 files changed, 349 insertions(+), 36 deletions(-) create mode 100644 examples/controller.rs create mode 100644 src/controller.rs diff --git a/CHANGELOG.md b/CHANGELOG.md index b57a929..c8e5b8e 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -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). diff --git a/CONTRIBUTORS.md b/CONTRIBUTORS.md index 5990d23..f6e7c56 100644 --- a/CONTRIBUTORS.md +++ b/CONTRIBUTORS.md @@ -1,3 +1,2 @@ # Contributors - -* [OxyDeadbeef](https://github.com/OxyDeadbeef) +- [JeronAldaron](https://github.com/JeronAldaron) diff --git a/Cargo.toml b/Cargo.toml index 9391758..1052f88 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -7,7 +7,7 @@ [package] name = "cala" -version = "0.1.0" +version = "0.2.0" authors = ["Jeron Aldaron Lau "] edition = "2018" @@ -25,3 +25,4 @@ whoami = "0.5" # user wavy = "0.1" # audio stronghold = "0.2" # file serde = "1.0" +stick = "0.5" # joystick / controller diff --git a/README.md b/README.md index 5335f22..8cee6f9 100644 --- a/README.md +++ b/README.md @@ -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/) diff --git a/examples/controller.rs b/examples/controller.rs new file mode 100644 index 0000000..00e658c --- /dev/null +++ b/examples/controller.rs @@ -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)); + } +} diff --git a/icon.svg b/icon.svg index 71f5c40..9243018 100644 --- a/icon.svg +++ b/icon.svg @@ -1 +1 @@ - \ No newline at end of file + \ No newline at end of file diff --git a/res/controller.png b/res/controller.png index 50bf279b4ff027bb1f1b3b3daaa5adf8044edbc3..43fe40fff1cf6b0d2d1f9824938fa4de8c08d4b2 100644 GIT binary patch literal 13136 zcmV-WGq22vP) zaB^>EX>4U6ba`-PAZ2)IW&i+q+O3>tavZyoh5us}Zwc^bIj|A4gIWH32h}v9DEDHn zE=h@OR>5Q*lgMhb|M!26`Okm;<7_S7#8hf-Ia~gVEjHizOSR8`&sS&T{e1sx{`E8W z;}=SNeSiG;eN*P^I`ws-*ALz<7<6Zi;&sFNx=`@X z_ucE?=544wf11wg<4oW5tu&q=ef@VVEXGP)FL>j3aKS#GpF0Ic5nAYcO?-C2dws{> z?*u-F(0*P&^S*T7EMO1cub-W-SA>t{crNrdt^8%3Uf*}=`}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ZOk` zehW*b{dERGN0^iTR;Pf4wvTrdnN}ZYO*k(?I9VIHe1v|qr<+iEI)4h00n$O6v|;IN z_Twx3aYseH1960y2H0DF0!RN~c>p4O=hZ$nzi5A2EA?Krv$vLz)cn8~Z-;^bKZJzq z^a_@}f6iW&cZvfbDa}(^3|~bv<~veZcYVa7LvO7h?YU^^vfWIw9OT+AljM^e!=~PmWXh^&R4E^BB1?k8TXEZGM3bI+W9>+9T~-W>h!R7!5J^U zK$}KQI2#?S(cuV*GX#-N0%{o)ncRYQJ;7=H zL521SHE|T%&N?qwV|+Vj;YdYb>Jd60Mtx#!MDZ1VF3t)Y41<8g%vjE02 z6t>1mI|-d>CC2*etx|DN2`;Y6L9!F8G0*IOd=^?}a5c{bz@7|LVOB_)vDM%LV9y3B z3D$Q(y-=h8gM0&(1WO`7g!BXT9wPkHmzHgVCRA4= z04|>3U29Ybnot2QzEHyi>=L<_e7-7`(?SkwVa;Xn+jq0nqu{X|dC(VO%)%n{)9fn* z*0%w20#IJ;+X$9+#l3^+$G)MhKrL76eJJ&5U*oe5o3kE2?c*u`_N*|sCMB5w^tiUD z-OiEackQRje-?-LCR({Oc`cfK(`}3_<OGqbehBJ$<;;kk`bgMUAdl6Pn;CHrG|B9i*JFM5rc&bX@83$j z>f0mio%Q_b^k7=`i5+F}dM)wexSx_emloCAyL`ny1y>tXagaw?DjtR!)iUhXwhzN& zLGyL`Mf6SRUX9%cmG=x|_Pop22ObMTj5Ysk5cPq_f)Ha_h_#ktj6>I~Z$iUkLGV~J z>dB|g*!5W0eGakBTX297#5N%YT+pcSDme@SFz7Z=Z~X&t8__Oc(-W2e0000} diff --git a/src/controller.rs b/src/controller.rs new file mode 100644 index 0000000..cd63f9b --- /dev/null +++ b/src/controller.rs @@ -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: +/// +/// +pub struct ControllerLayout { + pub(crate) joy: Option, + pub(crate) cam: Option, + pub(crate) lrt: Option, + pub(crate) pitch: Option, + pub(crate) yaw: Option, + pub(crate) abxy: Option, + pub(crate) dpad: Option, + pub(crate) quit: Option, + pub(crate) menu: Option, + pub(crate) wz: Option, + pub(crate) cd: Option, + pub(crate) lrb: Option, + pub(crate) axis: Vec, + pub(crate) btns: Vec, +} + +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 + } +} diff --git a/src/dive.rs b/src/dive.rs index 33f1f34..5f6aa55 100644 --- a/src/dive.rs +++ b/src/dive.rs @@ -1,13 +1,21 @@ use crate::user::*; use crate::audio::*; +use crate::controller::*; /// The Dive Application Context. pub struct App { + // User user: User, + // Audio mic: MicrophoneSystem, speaker: SpeakerSystem, + // Store file: T, changed: bool, + // Controller + controller_port: ControllerPort, + axis: [f32; 8], + btns: [bool; 16], } impl App { @@ -19,6 +27,9 @@ impl App { speaker: SpeakerSystem::new(SampleRate::Normal).unwrap(), file, changed: false, + controller_port: ControllerPort::new(), + axis: [0.0; 8], + btns: [false; 16], } } @@ -71,4 +82,112 @@ impl App { pub fn play(&mut self, callback: &mut FnMut() -> AudioSample) { self.speaker.play(callback); } + + /// Return the number of controllers. + pub fn controller_update(&mut self) -> u16 { + self.controller_port.update() + } + + /// Get the state of a controller from the requested controller layout. + pub fn controller_get(&mut self, id: u16, layout: &ControllerLayout) -> (&[f32], &[bool]) { + let mut state = self.controller_port.get(id); + let mut i_axis = 0; + let mut i_btns = 0; + + for axis in 0..layout.axis.len() { + match layout.axis[axis] { + Axis::JoyXY => { + // TODO: Fallback. + let (x, y) = state.joy().unwrap_or((0.0, 0.0)); + self.axis[i_axis] = x; + i_axis += 1; + self.axis[i_axis] = y; + i_axis += 1; + }, + Axis::CamXY => { + // TODO: Fallback. + let (x, y) = state.cam().unwrap_or((0.0, 0.0)); + self.axis[i_axis] = x; + i_axis += 1; + self.axis[i_axis] = y; + i_axis += 1; + }, + Axis::Lrt => { + // TODO: Fallback. +// let (x, y) = state.lr().unwrap_or((0.0, 0.0)); + // TODO: Not supported yet. + let (x, y) = (0.0, 0.0); + self.axis[i_axis] = x; + i_axis += 1; + self.axis[i_axis] = y; + i_axis += 1; + }, + Axis::Pitch => { + // TODO: Fallback. + let x = state.pitch().unwrap_or(0.0); + self.axis[i_axis] = x; + i_axis += 1; + }, + Axis::Yaw => { +// let x = state.yaw().unwrap_or(0.0); + // TODO: Not supported yet. + self.axis[i_axis] = 0.0; + i_axis += 1; + }, + } + } + + for btn in 0..layout.btns.len() { + match layout.btns[btn] { + Btns::Abxy => { + self.btns[i_btns] = state.btn(Btn::A).unwrap_or(false); + i_btns += 1; + self.btns[i_btns] = state.btn(Btn::B).unwrap_or(false); + i_btns += 1; + self.btns[i_btns] = state.btn(Btn::X).unwrap_or(false); + i_btns += 1; + self.btns[i_btns] = state.btn(Btn::Y).unwrap_or(false); + i_btns += 1; + }, + Btns::Dpad => { + self.btns[i_btns] = state.btn(Btn::Up).unwrap_or(false); + i_btns += 1; + self.btns[i_btns] = state.btn(Btn::Down).unwrap_or(false); + i_btns += 1; + self.btns[i_btns] = state.btn(Btn::Left).unwrap_or(false); + i_btns += 1; + self.btns[i_btns] = state.btn(Btn::Right).unwrap_or(false); + i_btns += 1; + }, + Btns::Quit => { + self.btns[i_btns] = state.btn(Btn::E).unwrap_or(false); + i_btns += 1; + }, + Btns::Menu => { + self.btns[i_btns] = state.btn(Btn::F).unwrap_or(false); + i_btns += 1; + }, + Btns::Wz => { + self.btns[i_btns] = state.btn(Btn::W).unwrap_or(false); + i_btns += 1; + self.btns[i_btns] = state.btn(Btn::Z).unwrap_or(false); + i_btns += 1; + }, + Btns::Lr => { + self.btns[i_btns] = state.btn(Btn::L).unwrap_or(false); + i_btns += 1; + self.btns[i_btns] = state.btn(Btn::R).unwrap_or(false); + i_btns += 1; + }, + Btns::Dc => { + self.btns[i_btns] = state.btn(Btn::D).unwrap_or(false); + i_btns += 1; + self.btns[i_btns] = state.btn(Btn::C).unwrap_or(false); + i_btns += 1; + } + } + } + + (&self.axis[..i_axis], &self.btns[..i_btns]) + } } diff --git a/src/lib.rs b/src/lib.rs index c18430d..e36ff82 100644 --- a/src/lib.rs +++ b/src/lib.rs @@ -1,9 +1,9 @@ //!

-//! Dive +//! Cala //!

//! //! ### Note -//! Dive is a complete redesign of previous library [ADI](https://crates.io/crates/adi). It is still in it's early stages. +//! Cala is a complete redesign of previous library [ADI](https://crates.io/crates/adi). It is still in it's early stages. //! //! # About //! Easily create cross-platform applications. Some common tasks are not easily portable across different platforms, and this crate hopes to fix that. That way you don't have to worry about how to port your GUI, audio, or bluetooth interface, etc. and can dive right in to building your application's content! @@ -15,10 +15,10 @@ //! * 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) -//! * Game Controller - JoyStick (NOT IMPLEMENTED YET) //! * Camera - Webcam (NOT IMPLEMENTED YET) //! * Network - Bluetooth & Wifi Direct (NOT IMPLEMENTED YET) //! @@ -27,16 +27,18 @@ #![warn(missing_docs)] #![doc( - html_logo_url = "https://dive.ga/dive/icon.svg", - html_favicon_url = "https://dive.ga/dive/icon.svg" + html_logo_url = "https://jeronaldaron.github.io/cala/icon.svg", + html_favicon_url = "https://jeronaldaron.github.io/cala/icon.svg" )] mod user; mod dive; mod audio; +mod controller; pub use dive::App; pub use audio::AudioSample; +pub use controller::ControllerLayout; #[cfg(test)] mod tests {