key-fall

[Archive] Game Idea/Prototype. Similar to Synthesia but playable with a MIDI piano/keyboard. Uses the Amethyst Engine.
git clone https://git.jojolepro.com/key-fall.git
Log | Files | Refs | README

commit b13f52a153a6cbdfac52ff076db2eb05abd654c5
parent 73d1b6460e6957e9fc85840a91bef1045abcb4a9
Author: jojo <jojolepromain@gmail.com>
Date:   Fri, 11 May 2018 15:01:18 -0400

Midi reading, amethyst integration, note spawning, note positionning

Diffstat:
M.idea/workspace.xml | 109+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++--------
MCargo.lock | 245++++++++++++++++++++++++++++++++++++++++++++-----------------------------------
MCargo.toml | 7++++---
Aassets/main/config/display.ron | 1+
Aassets/main/config/input.ron | 1+
Msrc/main.rs | 338+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++--------
Axi - akasha.mid | 0
7 files changed, 547 insertions(+), 154 deletions(-)

diff --git a/.idea/workspace.xml b/.idea/workspace.xml @@ -2,7 +2,10 @@ <project version="4"> <component name="ChangeListManager"> <list default="true" id="7f4db088-d833-442b-8045-f3ffe2b74658" name="Default" comment=""> - <change type="MODIFICATION" beforePath="$PROJECT_DIR$/.gitignore" afterPath="$PROJECT_DIR$/.gitignore" /> + <change type="MODIFICATION" beforePath="$PROJECT_DIR$/.idea/workspace.xml" afterPath="$PROJECT_DIR$/.idea/workspace.xml" /> + <change type="MODIFICATION" beforePath="$PROJECT_DIR$/Cargo.lock" afterPath="$PROJECT_DIR$/Cargo.lock" /> + <change type="MODIFICATION" beforePath="$PROJECT_DIR$/Cargo.toml" afterPath="$PROJECT_DIR$/Cargo.toml" /> + <change type="MODIFICATION" beforePath="$PROJECT_DIR$/src/main.rs" afterPath="$PROJECT_DIR$/src/main.rs" /> </list> <option name="EXCLUDED_CONVERTED_TO_IGNORED" value="true" /> <option name="TRACKING_ENABLED" value="true" /> @@ -12,12 +15,22 @@ <option name="LAST_RESOLUTION" value="IGNORE" /> </component> <component name="FileEditorManager"> - <leaf> - <file leaf-file-name=".gitignore" pinned="false" current-in-tab="true"> - <entry file="file://$PROJECT_DIR$/.gitignore"> + <leaf SIDE_TABS_SIZE_LIMIT_KEY="300"> + <file leaf-file-name="main.rs" pinned="false" current-in-tab="true"> + <entry file="file://$PROJECT_DIR$/src/main.rs"> <provider selected="true" editor-type-id="text-editor"> - <state relative-caret-position="17"> - <caret line="1" column="0" lean-forward="false" selection-start-line="1" selection-start-column="0" selection-end-line="1" selection-end-column="0" /> + <state relative-caret-position="153"> + <caret line="351" column="68" lean-forward="false" selection-start-line="351" selection-start-column="68" selection-end-line="351" selection-end-column="68" /> + <folding /> + </state> + </provider> + </entry> + </file> + <file leaf-file-name="Cargo.toml" pinned="false" current-in-tab="false"> + <entry file="file://$PROJECT_DIR$/Cargo.toml"> + <provider selected="true" editor-type-id="text-editor"> + <state relative-caret-position="204"> + <caret line="12" column="45" lean-forward="false" selection-start-line="12" selection-start-column="45" selection-end-line="12" selection-end-column="45" /> <folding /> </state> </provider> @@ -25,6 +38,11 @@ </file> </leaf> </component> + <component name="FindInProjectRecents"> + <findStrings> + <find>came</find> + </findStrings> + </component> <component name="Git.Settings"> <option name="RECENT_GIT_ROOT_PATH" value="$PROJECT_DIR$" /> </component> @@ -37,6 +55,8 @@ <option name="CHANGED_PATHS"> <list> <option value="$PROJECT_DIR$/.gitignore" /> + <option value="$PROJECT_DIR$/Cargo.toml" /> + <option value="$PROJECT_DIR$/src/main.rs" /> </list> </option> </component> @@ -61,8 +81,9 @@ <foldersAlwaysOnTop value="true" /> </navigator> <panes> + <pane id="AndroidView" /> + <pane id="Scratches" /> <pane id="Scope" /> - <pane id="PackagesPane" /> <pane id="ProjectPane"> <subPane> <expand> @@ -70,12 +91,16 @@ <item name="key-fall" type="b2602c69:ProjectViewProjectNode" /> <item name="key-fall" type="462c0819:PsiDirectoryNode" /> </path> + <path> + <item name="key-fall" type="b2602c69:ProjectViewProjectNode" /> + <item name="key-fall" type="462c0819:PsiDirectoryNode" /> + <item name="src" type="462c0819:PsiDirectoryNode" /> + </path> </expand> <select /> </subPane> </pane> - <pane id="AndroidView" /> - <pane id="Scratches" /> + <pane id="PackagesPane" /> </panes> </component> <component name="PropertiesComponent"> @@ -84,6 +109,7 @@ <property name="project.structure.last.edited" value="Modules" /> <property name="project.structure.proportion" value="0.0" /> <property name="project.structure.side.proportion" value="0.35794184" /> + <property name="org.rust.cargo.project.model.PROJECT_DISCOVERY" value="true" /> </component> <component name="RunDashboard"> <option name="ruleStates"> @@ -215,7 +241,7 @@ <window_info id="Terminal" active="false" anchor="bottom" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" show_stripe_button="true" weight="0.33" sideWeight="0.5" order="7" side_tool="false" content_ui="tabs" /> <window_info id="Capture Tool" active="false" anchor="left" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" show_stripe_button="true" weight="0.33" sideWeight="0.5" order="2" side_tool="false" content_ui="tabs" /> <window_info id="Designer" active="false" anchor="left" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" show_stripe_button="true" weight="0.33" sideWeight="0.5" order="2" side_tool="false" content_ui="tabs" /> - <window_info id="Project" active="false" anchor="left" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="true" show_stripe_button="true" weight="0.24972972" sideWeight="0.5" order="0" side_tool="false" content_ui="combo" /> + <window_info id="Project" active="false" anchor="left" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="true" show_stripe_button="true" weight="0.12216216" sideWeight="0.5" order="0" side_tool="false" content_ui="combo" /> <window_info id="Structure" active="false" anchor="left" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" show_stripe_button="true" weight="0.24972972" sideWeight="0.5" order="1" side_tool="false" content_ui="tabs" /> <window_info id="Ant Build" active="false" anchor="right" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" show_stripe_button="true" weight="0.25" sideWeight="0.5" order="1" side_tool="false" content_ui="tabs" /> <window_info id="UI Designer" active="false" anchor="left" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" show_stripe_button="true" weight="0.33" sideWeight="0.5" order="2" side_tool="false" content_ui="tabs" /> @@ -238,10 +264,73 @@ <watches-manager /> </component> <component name="editorHistoryManager"> + <entry file="file://$PROJECT_DIR$/src/main.rs"> + <provider selected="true" editor-type-id="text-editor"> + <state relative-caret-position="0"> + <caret line="0" column="0" lean-forward="false" selection-start-line="0" selection-start-column="0" selection-end-line="0" selection-end-column="0" /> + <folding /> + </state> + </provider> + </entry> + <entry file="file://$PROJECT_DIR$/Cargo.toml"> + <provider selected="true" editor-type-id="text-editor"> + <state relative-caret-position="204"> + <caret line="12" column="45" lean-forward="false" selection-start-line="12" selection-start-column="45" selection-end-line="12" selection-end-column="45" /> + <folding /> + </state> + </provider> + </entry> + <entry file="file://$PROJECT_DIR$/src/main.rs"> + <provider selected="true" editor-type-id="text-editor"> + <state relative-caret-position="0"> + <caret line="0" column="0" lean-forward="false" selection-start-line="0" selection-start-column="0" selection-end-line="0" selection-end-column="0" /> + <folding /> + </state> + </provider> + </entry> + <entry file="file://$PROJECT_DIR$/src/main.rs"> + <provider selected="true" editor-type-id="text-editor"> + <state relative-caret-position="0"> + <caret line="0" column="0" lean-forward="false" selection-start-line="0" selection-start-column="0" selection-end-line="0" selection-end-column="0" /> + <folding /> + </state> + </provider> + </entry> + <entry file="file://$PROJECT_DIR$/src/main.rs"> + <provider selected="true" editor-type-id="text-editor"> + <state relative-caret-position="0"> + <caret line="0" column="0" lean-forward="false" selection-start-line="0" selection-start-column="0" selection-end-line="0" selection-end-column="0" /> + <folding /> + </state> + </provider> + </entry> <entry file="file://$PROJECT_DIR$/.gitignore"> <provider selected="true" editor-type-id="text-editor"> <state relative-caret-position="17"> <caret line="1" column="0" lean-forward="false" selection-start-line="1" selection-start-column="0" selection-end-line="1" selection-end-column="0" /> + </state> + </provider> + </entry> + <entry file="file://$PROJECT_DIR$/Cargo.toml"> + <provider selected="true" editor-type-id="text-editor"> + <state relative-caret-position="204"> + <caret line="12" column="45" lean-forward="false" selection-start-line="12" selection-start-column="45" selection-end-line="12" selection-end-column="45" /> + <folding /> + </state> + </provider> + </entry> + <entry file="file://$USER_HOME$/.cargo/git/checkouts/amethyst-fedb0a1032a075ce/108486f/amethyst_core/src/transform/bundle.rs"> + <provider selected="true" editor-type-id="text-editor"> + <state relative-caret-position="302"> + <caret line="22" column="11" lean-forward="false" selection-start-line="22" selection-start-column="11" selection-end-line="22" selection-end-column="11" /> + <folding /> + </state> + </provider> + </entry> + <entry file="file://$PROJECT_DIR$/src/main.rs"> + <provider selected="true" editor-type-id="text-editor"> + <state relative-caret-position="153"> + <caret line="351" column="68" lean-forward="false" selection-start-line="351" selection-start-column="68" selection-end-line="351" selection-end-column="68" /> <folding /> </state> </provider> diff --git a/Cargo.lock b/Cargo.lock @@ -19,7 +19,7 @@ name = "alsa" version = "0.2.0" source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ - "alsa-sys 0.1.1 (registry+https://github.com/rust-lang/crates.io-index)", + "alsa-sys 0.1.2 (registry+https://github.com/rust-lang/crates.io-index)", "bitflags 0.9.1 (registry+https://github.com/rust-lang/crates.io-index)", "libc 0.2.40 (registry+https://github.com/rust-lang/crates.io-index)", "nix 0.9.0 (registry+https://github.com/rust-lang/crates.io-index)", @@ -27,7 +27,7 @@ dependencies = [ [[package]] name = "alsa-sys" -version = "0.1.1" +version = "0.1.2" source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ "libc 0.2.40 (registry+https://github.com/rust-lang/crates.io-index)", @@ -37,7 +37,7 @@ dependencies = [ [[package]] name = "amethyst" version = "0.6.0" -source = "git+https://github.com/amethyst/amethyst?branch=develop#3af95c40aee518aa816e9879d5b4d66c30777dc2" +source = "git+https://github.com/amethyst/amethyst?branch=develop#108486f610e1f66de788f4125277ad5b2e5ee2e6" dependencies = [ "amethyst_animation 0.1.0 (git+https://github.com/amethyst/amethyst?branch=develop)", "amethyst_assets 0.2.0 (git+https://github.com/amethyst/amethyst?branch=develop)", @@ -54,15 +54,26 @@ dependencies = [ "log 0.4.1 (registry+https://github.com/rust-lang/crates.io-index)", "rayon 1.0.1 (registry+https://github.com/rust-lang/crates.io-index)", "rustc_version_runtime 0.1.3 (registry+https://github.com/rust-lang/crates.io-index)", - "shrev 0.8.2 (registry+https://github.com/rust-lang/crates.io-index)", "vergen 0.1.1 (registry+https://github.com/rust-lang/crates.io-index)", - "winit 0.12.0 (registry+https://github.com/rust-lang/crates.io-index)", + "winit 0.13.1 (registry+https://github.com/rust-lang/crates.io-index)", +] + +[[package]] +name = "amethyst-extra" +version = "0.1.0" +dependencies = [ + "amethyst 0.6.0 (git+https://github.com/amethyst/amethyst?branch=develop)", + "dirty 0.2.0 (git+https://github.com/jojolepro/dirty)", + "log 0.4.1 (registry+https://github.com/rust-lang/crates.io-index)", + "ron 0.2.1 (registry+https://github.com/rust-lang/crates.io-index)", + "serde 1.0.53 (registry+https://github.com/rust-lang/crates.io-index)", + "serde_derive 1.0.53 (registry+https://github.com/rust-lang/crates.io-index)", ] [[package]] name = "amethyst_animation" version = "0.1.0" -source = "git+https://github.com/amethyst/amethyst?branch=develop#3af95c40aee518aa816e9879d5b4d66c30777dc2" +source = "git+https://github.com/amethyst/amethyst?branch=develop#108486f610e1f66de788f4125277ad5b2e5ee2e6" dependencies = [ "amethyst_assets 0.2.0 (git+https://github.com/amethyst/amethyst?branch=develop)", "amethyst_core 0.1.0 (git+https://github.com/amethyst/amethyst?branch=develop)", @@ -72,13 +83,13 @@ dependencies = [ "itertools 0.7.8 (registry+https://github.com/rust-lang/crates.io-index)", "log 0.4.1 (registry+https://github.com/rust-lang/crates.io-index)", "minterpolate 0.2.2 (registry+https://github.com/rust-lang/crates.io-index)", - "serde 1.0.46 (registry+https://github.com/rust-lang/crates.io-index)", + "serde 1.0.53 (registry+https://github.com/rust-lang/crates.io-index)", ] [[package]] name = "amethyst_assets" version = "0.2.0" -source = "git+https://github.com/amethyst/amethyst?branch=develop#3af95c40aee518aa816e9879d5b4d66c30777dc2" +source = "git+https://github.com/amethyst/amethyst?branch=develop#108486f610e1f66de788f4125277ad5b2e5ee2e6" dependencies = [ "amethyst_core 0.1.0 (git+https://github.com/amethyst/amethyst?branch=develop)", "crossbeam 0.3.2 (registry+https://github.com/rust-lang/crates.io-index)", @@ -94,7 +105,7 @@ dependencies = [ [[package]] name = "amethyst_audio" version = "0.1.0" -source = "git+https://github.com/amethyst/amethyst?branch=develop#3af95c40aee518aa816e9879d5b4d66c30777dc2" +source = "git+https://github.com/amethyst/amethyst?branch=develop#108486f610e1f66de788f4125277ad5b2e5ee2e6" dependencies = [ "amethyst_assets 0.2.0 (git+https://github.com/amethyst/amethyst?branch=develop)", "amethyst_core 0.1.0 (git+https://github.com/amethyst/amethyst?branch=develop)", @@ -107,29 +118,28 @@ dependencies = [ [[package]] name = "amethyst_config" version = "0.5.0" -source = "git+https://github.com/amethyst/amethyst?branch=develop#3af95c40aee518aa816e9879d5b4d66c30777dc2" +source = "git+https://github.com/amethyst/amethyst?branch=develop#108486f610e1f66de788f4125277ad5b2e5ee2e6" dependencies = [ "ron 0.1.7 (registry+https://github.com/rust-lang/crates.io-index)", - "serde 1.0.46 (registry+https://github.com/rust-lang/crates.io-index)", + "serde 1.0.53 (registry+https://github.com/rust-lang/crates.io-index)", ] [[package]] name = "amethyst_controls" version = "0.1.0" -source = "git+https://github.com/amethyst/amethyst?branch=develop#3af95c40aee518aa816e9879d5b4d66c30777dc2" +source = "git+https://github.com/amethyst/amethyst?branch=develop#108486f610e1f66de788f4125277ad5b2e5ee2e6" dependencies = [ "amethyst_core 0.1.0 (git+https://github.com/amethyst/amethyst?branch=develop)", "amethyst_input 0.2.1 (git+https://github.com/amethyst/amethyst?branch=develop)", "amethyst_renderer 0.6.1 (git+https://github.com/amethyst/amethyst?branch=develop)", "log 0.4.1 (registry+https://github.com/rust-lang/crates.io-index)", - "shrev 0.8.2 (registry+https://github.com/rust-lang/crates.io-index)", - "winit 0.12.0 (registry+https://github.com/rust-lang/crates.io-index)", + "winit 0.13.1 (registry+https://github.com/rust-lang/crates.io-index)", ] [[package]] name = "amethyst_core" version = "0.1.0" -source = "git+https://github.com/amethyst/amethyst?branch=develop#3af95c40aee518aa816e9879d5b4d66c30777dc2" +source = "git+https://github.com/amethyst/amethyst?branch=develop#108486f610e1f66de788f4125277ad5b2e5ee2e6" dependencies = [ "cgmath 0.16.1 (registry+https://github.com/rust-lang/crates.io-index)", "error-chain 0.11.0 (registry+https://github.com/rust-lang/crates.io-index)", @@ -138,31 +148,31 @@ dependencies = [ "log 0.4.1 (registry+https://github.com/rust-lang/crates.io-index)", "quickcheck 0.4.1 (registry+https://github.com/rust-lang/crates.io-index)", "rayon 1.0.1 (registry+https://github.com/rust-lang/crates.io-index)", - "serde 1.0.46 (registry+https://github.com/rust-lang/crates.io-index)", + "serde 1.0.53 (registry+https://github.com/rust-lang/crates.io-index)", "shred 0.7.0-alpha5 (registry+https://github.com/rust-lang/crates.io-index)", - "specs 0.11.0-alpha5 (registry+https://github.com/rust-lang/crates.io-index)", - "specs-hierarchy 0.1.0-alpha5 (registry+https://github.com/rust-lang/crates.io-index)", + "shrev 1.0.0 (registry+https://github.com/rust-lang/crates.io-index)", + "specs 0.11.0-alpha6 (registry+https://github.com/rust-lang/crates.io-index)", + "specs-hierarchy 0.1.0-alpha6 (registry+https://github.com/rust-lang/crates.io-index)", ] [[package]] name = "amethyst_input" version = "0.2.1" -source = "git+https://github.com/amethyst/amethyst?branch=develop#3af95c40aee518aa816e9879d5b4d66c30777dc2" +source = "git+https://github.com/amethyst/amethyst?branch=develop#108486f610e1f66de788f4125277ad5b2e5ee2e6" dependencies = [ "amethyst_config 0.5.0 (git+https://github.com/amethyst/amethyst?branch=develop)", "amethyst_core 0.1.0 (git+https://github.com/amethyst/amethyst?branch=develop)", "derivative 1.0.0 (registry+https://github.com/rust-lang/crates.io-index)", "fnv 1.0.6 (registry+https://github.com/rust-lang/crates.io-index)", - "serde 1.0.46 (registry+https://github.com/rust-lang/crates.io-index)", - "shrev 0.8.2 (registry+https://github.com/rust-lang/crates.io-index)", + "serde 1.0.53 (registry+https://github.com/rust-lang/crates.io-index)", "smallvec 0.4.4 (registry+https://github.com/rust-lang/crates.io-index)", - "winit 0.12.0 (registry+https://github.com/rust-lang/crates.io-index)", + "winit 0.13.1 (registry+https://github.com/rust-lang/crates.io-index)", ] [[package]] name = "amethyst_renderer" version = "0.6.1" -source = "git+https://github.com/amethyst/amethyst?branch=develop#3af95c40aee518aa816e9879d5b4d66c30777dc2" +source = "git+https://github.com/amethyst/amethyst?branch=develop#108486f610e1f66de788f4125277ad5b2e5ee2e6" dependencies = [ "amethyst_assets 0.2.0 (git+https://github.com/amethyst/amethyst?branch=develop)", "amethyst_core 0.1.0 (git+https://github.com/amethyst/amethyst?branch=develop)", @@ -173,25 +183,24 @@ dependencies = [ "gfx_core 0.8.2 (registry+https://github.com/rust-lang/crates.io-index)", "gfx_device_gl 0.15.2 (registry+https://github.com/rust-lang/crates.io-index)", "gfx_macros 0.2.1 (registry+https://github.com/rust-lang/crates.io-index)", - "gfx_window_glutin 0.22.0 (registry+https://github.com/rust-lang/crates.io-index)", - "glutin 0.14.0 (registry+https://github.com/rust-lang/crates.io-index)", + "gfx_window_glutin 0.23.0 (registry+https://github.com/rust-lang/crates.io-index)", + "glutin 0.15.0 (registry+https://github.com/rust-lang/crates.io-index)", "hetseq 0.1.5 (registry+https://github.com/rust-lang/crates.io-index)", "hibitset 0.5.0 (registry+https://github.com/rust-lang/crates.io-index)", "imagefmt 4.0.0 (registry+https://github.com/rust-lang/crates.io-index)", "log 0.4.1 (registry+https://github.com/rust-lang/crates.io-index)", "rayon 1.0.1 (registry+https://github.com/rust-lang/crates.io-index)", - "serde 1.0.46 (registry+https://github.com/rust-lang/crates.io-index)", - "serde_derive 1.0.46 (registry+https://github.com/rust-lang/crates.io-index)", - "shrev 0.8.2 (registry+https://github.com/rust-lang/crates.io-index)", + "serde 1.0.53 (registry+https://github.com/rust-lang/crates.io-index)", + "serde_derive 1.0.53 (registry+https://github.com/rust-lang/crates.io-index)", "smallvec 0.4.4 (registry+https://github.com/rust-lang/crates.io-index)", "wavefront_obj 5.1.0 (registry+https://github.com/rust-lang/crates.io-index)", - "winit 0.12.0 (registry+https://github.com/rust-lang/crates.io-index)", + "winit 0.13.1 (registry+https://github.com/rust-lang/crates.io-index)", ] [[package]] name = "amethyst_ui" version = "0.2.0" -source = "git+https://github.com/amethyst/amethyst?branch=develop#3af95c40aee518aa816e9879d5b4d66c30777dc2" +source = "git+https://github.com/amethyst/amethyst?branch=develop#108486f610e1f66de788f4125277ad5b2e5ee2e6" dependencies = [ "amethyst_assets 0.2.0 (git+https://github.com/amethyst/amethyst?branch=develop)", "amethyst_core 0.1.0 (git+https://github.com/amethyst/amethyst?branch=develop)", @@ -206,19 +215,18 @@ dependencies = [ "rusttype 0.4.3 (registry+https://github.com/rust-lang/crates.io-index)", "shred 0.7.0-alpha5 (registry+https://github.com/rust-lang/crates.io-index)", "shred-derive 0.5.0-alpha1 (registry+https://github.com/rust-lang/crates.io-index)", - "shrev 0.8.2 (registry+https://github.com/rust-lang/crates.io-index)", - "unicode-normalization 0.1.6 (registry+https://github.com/rust-lang/crates.io-index)", + "unicode-normalization 0.1.7 (registry+https://github.com/rust-lang/crates.io-index)", "unicode-segmentation 1.2.1 (registry+https://github.com/rust-lang/crates.io-index)", - "winit 0.12.0 (registry+https://github.com/rust-lang/crates.io-index)", + "winit 0.13.1 (registry+https://github.com/rust-lang/crates.io-index)", ] [[package]] name = "amethyst_utils" version = "0.2.0" -source = "git+https://github.com/amethyst/amethyst?branch=develop#3af95c40aee518aa816e9879d5b4d66c30777dc2" +source = "git+https://github.com/amethyst/amethyst?branch=develop#108486f610e1f66de788f4125277ad5b2e5ee2e6" dependencies = [ "amethyst_core 0.1.0 (git+https://github.com/amethyst/amethyst?branch=develop)", - "winit 0.12.0 (registry+https://github.com/rust-lang/crates.io-index)", + "winit 0.13.1 (registry+https://github.com/rust-lang/crates.io-index)", ] [[package]] @@ -378,7 +386,7 @@ dependencies = [ "mint 0.5.0 (registry+https://github.com/rust-lang/crates.io-index)", "num-traits 0.1.43 (registry+https://github.com/rust-lang/crates.io-index)", "rand 0.4.2 (registry+https://github.com/rust-lang/crates.io-index)", - "serde 1.0.46 (registry+https://github.com/rust-lang/crates.io-index)", + "serde 1.0.53 (registry+https://github.com/rust-lang/crates.io-index)", ] [[package]] @@ -402,7 +410,7 @@ dependencies = [ "strsim 0.7.0 (registry+https://github.com/rust-lang/crates.io-index)", "textwrap 0.9.0 (registry+https://github.com/rust-lang/crates.io-index)", "unicode-width 0.1.4 (registry+https://github.com/rust-lang/crates.io-index)", - "vec_map 0.8.0 (registry+https://github.com/rust-lang/crates.io-index)", + "vec_map 0.8.1 (registry+https://github.com/rust-lang/crates.io-index)", ] [[package]] @@ -512,7 +520,7 @@ dependencies = [ "core-foundation 0.2.3 (registry+https://github.com/rust-lang/crates.io-index)", "core-foundation-sys 0.2.3 (registry+https://github.com/rust-lang/crates.io-index)", "coremidi-sys 2.0.2 (registry+https://github.com/rust-lang/crates.io-index)", - "time 0.1.39 (registry+https://github.com/rust-lang/crates.io-index)", + "time 0.1.40 (registry+https://github.com/rust-lang/crates.io-index)", ] [[package]] @@ -528,7 +536,7 @@ name = "cpal" version = "0.8.1" source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ - "alsa-sys 0.1.1 (registry+https://github.com/rust-lang/crates.io-index)", + "alsa-sys 0.1.2 (registry+https://github.com/rust-lang/crates.io-index)", "core-foundation-sys 0.5.1 (registry+https://github.com/rust-lang/crates.io-index)", "coreaudio-rs 0.9.1 (registry+https://github.com/rust-lang/crates.io-index)", "lazy_static 0.2.11 (registry+https://github.com/rust-lang/crates.io-index)", @@ -584,6 +592,11 @@ dependencies = [ ] [[package]] +name = "dirty" +version = "0.2.0" +source = "git+https://github.com/jojolepro/dirty#4039880795ddef515aa1b6e292107b4413bba38f" + +[[package]] name = "dlib" version = "0.4.1" source = "registry+https://github.com/rust-lang/crates.io-index" @@ -597,7 +610,7 @@ version = "0.8.0" source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ "bitflags 1.0.3 (registry+https://github.com/rust-lang/crates.io-index)", - "serde 1.0.46 (registry+https://github.com/rust-lang/crates.io-index)", + "serde 1.0.53 (registry+https://github.com/rust-lang/crates.io-index)", ] [[package]] @@ -713,7 +726,7 @@ dependencies = [ "derivative 1.0.0 (registry+https://github.com/rust-lang/crates.io-index)", "draw_state 0.8.0 (registry+https://github.com/rust-lang/crates.io-index)", "log 0.4.1 (registry+https://github.com/rust-lang/crates.io-index)", - "serde 1.0.46 (registry+https://github.com/rust-lang/crates.io-index)", + "serde 1.0.53 (registry+https://github.com/rust-lang/crates.io-index)", ] [[package]] @@ -747,7 +760,7 @@ dependencies = [ "ordered-float 0.5.0 (registry+https://github.com/rust-lang/crates.io-index)", "rusttype 0.4.3 (registry+https://github.com/rust-lang/crates.io-index)", "twox-hash 1.1.0 (registry+https://github.com/rust-lang/crates.io-index)", - "unicode-normalization 0.1.6 (registry+https://github.com/rust-lang/crates.io-index)", + "unicode-normalization 0.1.7 (registry+https://github.com/rust-lang/crates.io-index)", "xi-unicode 0.1.0 (registry+https://github.com/rust-lang/crates.io-index)", ] @@ -762,12 +775,12 @@ dependencies = [ [[package]] name = "gfx_window_glutin" -version = "0.22.0" +version = "0.23.0" source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ "gfx_core 0.8.2 (registry+https://github.com/rust-lang/crates.io-index)", "gfx_device_gl 0.15.2 (registry+https://github.com/rust-lang/crates.io-index)", - "glutin 0.14.0 (registry+https://github.com/rust-lang/crates.io-index)", + "glutin 0.15.0 (registry+https://github.com/rust-lang/crates.io-index)", ] [[package]] @@ -804,7 +817,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" [[package]] name = "glutin" -version = "0.14.0" +version = "0.15.0" source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ "android_glue 0.2.3 (registry+https://github.com/rust-lang/crates.io-index)", @@ -820,7 +833,7 @@ dependencies = [ "shared_library 0.1.8 (registry+https://github.com/rust-lang/crates.io-index)", "wayland-client 0.12.5 (registry+https://github.com/rust-lang/crates.io-index)", "winapi 0.3.4 (registry+https://github.com/rust-lang/crates.io-index)", - "winit 0.12.0 (registry+https://github.com/rust-lang/crates.io-index)", + "winit 0.13.1 (registry+https://github.com/rust-lang/crates.io-index)", "x11-dl 2.17.5 (registry+https://github.com/rust-lang/crates.io-index)", ] @@ -868,16 +881,6 @@ dependencies = [ ] [[package]] -name = "jack-sys" -version = "0.1.5" -source = "registry+https://github.com/rust-lang/crates.io-index" -dependencies = [ - "lazy_static 0.2.11 (registry+https://github.com/rust-lang/crates.io-index)", - "libc 0.2.40 (registry+https://github.com/rust-lang/crates.io-index)", - "libloading 0.4.3 (registry+https://github.com/rust-lang/crates.io-index)", -] - -[[package]] name = "kernel32-sys" version = "0.2.2" source = "registry+https://github.com/rust-lang/crates.io-index" @@ -891,8 +894,9 @@ name = "key-fall" version = "0.1.0" dependencies = [ "amethyst 0.6.0 (git+https://github.com/amethyst/amethyst?branch=develop)", + "amethyst-extra 0.1.0", "ghakuf 0.5.1 (registry+https://github.com/rust-lang/crates.io-index)", - "log 0.3.9 (registry+https://github.com/rust-lang/crates.io-index)", + "log 0.4.1 (registry+https://github.com/rust-lang/crates.io-index)", "midir 0.5.0 (registry+https://github.com/rust-lang/crates.io-index)", ] @@ -1024,7 +1028,6 @@ dependencies = [ "alsa 0.2.0 (registry+https://github.com/rust-lang/crates.io-index)", "bitflags 0.3.3 (registry+https://github.com/rust-lang/crates.io-index)", "coremidi 0.3.0 (registry+https://github.com/rust-lang/crates.io-index)", - "jack-sys 0.1.5 (registry+https://github.com/rust-lang/crates.io-index)", "libc 0.2.40 (registry+https://github.com/rust-lang/crates.io-index)", "memalloc 0.1.0 (registry+https://github.com/rust-lang/crates.io-index)", "nix 0.9.0 (registry+https://github.com/rust-lang/crates.io-index)", @@ -1061,7 +1064,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ "mint 0.4.9 (registry+https://github.com/rust-lang/crates.io-index)", "num 0.1.42 (registry+https://github.com/rust-lang/crates.io-index)", - "serde 1.0.46 (registry+https://github.com/rust-lang/crates.io-index)", + "serde 1.0.53 (registry+https://github.com/rust-lang/crates.io-index)", ] [[package]] @@ -1100,10 +1103,10 @@ source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ "num-bigint 0.1.43 (registry+https://github.com/rust-lang/crates.io-index)", "num-complex 0.1.43 (registry+https://github.com/rust-lang/crates.io-index)", - "num-integer 0.1.36 (registry+https://github.com/rust-lang/crates.io-index)", - "num-iter 0.1.35 (registry+https://github.com/rust-lang/crates.io-index)", + "num-integer 0.1.37 (registry+https://github.com/rust-lang/crates.io-index)", + "num-iter 0.1.36 (registry+https://github.com/rust-lang/crates.io-index)", "num-rational 0.1.42 (registry+https://github.com/rust-lang/crates.io-index)", - "num-traits 0.2.2 (registry+https://github.com/rust-lang/crates.io-index)", + "num-traits 0.2.3 (registry+https://github.com/rust-lang/crates.io-index)", ] [[package]] @@ -1111,8 +1114,8 @@ name = "num-bigint" version = "0.1.43" source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ - "num-integer 0.1.36 (registry+https://github.com/rust-lang/crates.io-index)", - "num-traits 0.2.2 (registry+https://github.com/rust-lang/crates.io-index)", + "num-integer 0.1.37 (registry+https://github.com/rust-lang/crates.io-index)", + "num-traits 0.2.3 (registry+https://github.com/rust-lang/crates.io-index)", "rand 0.4.2 (registry+https://github.com/rust-lang/crates.io-index)", "rustc-serialize 0.3.24 (registry+https://github.com/rust-lang/crates.io-index)", ] @@ -1122,25 +1125,25 @@ name = "num-complex" version = "0.1.43" source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ - "num-traits 0.2.2 (registry+https://github.com/rust-lang/crates.io-index)", + "num-traits 0.2.3 (registry+https://github.com/rust-lang/crates.io-index)", "rustc-serialize 0.3.24 (registry+https://github.com/rust-lang/crates.io-index)", ] [[package]] name = "num-integer" -version = "0.1.36" +version = "0.1.37" source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ - "num-traits 0.2.2 (registry+https://github.com/rust-lang/crates.io-index)", + "num-traits 0.2.3 (registry+https://github.com/rust-lang/crates.io-index)", ] [[package]] name = "num-iter" -version = "0.1.35" +version = "0.1.36" source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ - "num-integer 0.1.36 (registry+https://github.com/rust-lang/crates.io-index)", - "num-traits 0.2.2 (registry+https://github.com/rust-lang/crates.io-index)", + "num-integer 0.1.37 (registry+https://github.com/rust-lang/crates.io-index)", + "num-traits 0.2.3 (registry+https://github.com/rust-lang/crates.io-index)", ] [[package]] @@ -1149,8 +1152,8 @@ version = "0.1.42" source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ "num-bigint 0.1.43 (registry+https://github.com/rust-lang/crates.io-index)", - "num-integer 0.1.36 (registry+https://github.com/rust-lang/crates.io-index)", - "num-traits 0.2.2 (registry+https://github.com/rust-lang/crates.io-index)", + "num-integer 0.1.37 (registry+https://github.com/rust-lang/crates.io-index)", + "num-traits 0.2.3 (registry+https://github.com/rust-lang/crates.io-index)", "rustc-serialize 0.3.24 (registry+https://github.com/rust-lang/crates.io-index)", ] @@ -1159,12 +1162,12 @@ name = "num-traits" version = "0.1.43" source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ - "num-traits 0.2.2 (registry+https://github.com/rust-lang/crates.io-index)", + "num-traits 0.2.3 (registry+https://github.com/rust-lang/crates.io-index)", ] [[package]] name = "num-traits" -version = "0.2.2" +version = "0.2.3" source = "registry+https://github.com/rust-lang/crates.io-index" [[package]] @@ -1244,6 +1247,15 @@ dependencies = [ ] [[package]] +name = "parking_lot" +version = "0.5.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +dependencies = [ + "owning_ref 0.3.3 (registry+https://github.com/rust-lang/crates.io-index)", + "parking_lot_core 0.2.14 (registry+https://github.com/rust-lang/crates.io-index)", +] + +[[package]] name = "parking_lot_core" version = "0.2.14" source = "registry+https://github.com/rust-lang/crates.io-index" @@ -1433,7 +1445,16 @@ name = "ron" version = "0.1.7" source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ - "serde 1.0.46 (registry+https://github.com/rust-lang/crates.io-index)", + "serde 1.0.53 (registry+https://github.com/rust-lang/crates.io-index)", +] + +[[package]] +name = "ron" +version = "0.2.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +dependencies = [ + "bitflags 1.0.3 (registry+https://github.com/rust-lang/crates.io-index)", + "serde 1.0.53 (registry+https://github.com/rust-lang/crates.io-index)", ] [[package]] @@ -1487,15 +1508,15 @@ source = "registry+https://github.com/rust-lang/crates.io-index" [[package]] name = "serde" -version = "1.0.46" +version = "1.0.53" source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ - "serde_derive 1.0.46 (registry+https://github.com/rust-lang/crates.io-index)", + "serde_derive 1.0.53 (registry+https://github.com/rust-lang/crates.io-index)", ] [[package]] name = "serde_derive" -version = "1.0.46" +version = "1.0.53" source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ "proc-macro2 0.3.8 (registry+https://github.com/rust-lang/crates.io-index)", @@ -1535,15 +1556,19 @@ dependencies = [ [[package]] name = "shrev" -version = "0.8.2" +version = "1.0.0" source = "registry+https://github.com/rust-lang/crates.io-index" +dependencies = [ + "derivative 1.0.0 (registry+https://github.com/rust-lang/crates.io-index)", + "parking_lot 0.5.5 (registry+https://github.com/rust-lang/crates.io-index)", +] [[package]] name = "smallvec" version = "0.4.4" source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ - "serde 1.0.46 (registry+https://github.com/rust-lang/crates.io-index)", + "serde 1.0.53 (registry+https://github.com/rust-lang/crates.io-index)", ] [[package]] @@ -1553,7 +1578,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" [[package]] name = "specs" -version = "0.11.0-alpha5" +version = "0.11.0-alpha6" source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ "crossbeam 0.3.2 (registry+https://github.com/rust-lang/crates.io-index)", @@ -1565,20 +1590,20 @@ dependencies = [ "rayon 1.0.1 (registry+https://github.com/rust-lang/crates.io-index)", "shred 0.7.0-alpha5 (registry+https://github.com/rust-lang/crates.io-index)", "shred-derive 0.5.0-alpha1 (registry+https://github.com/rust-lang/crates.io-index)", - "shrev 0.8.2 (registry+https://github.com/rust-lang/crates.io-index)", + "shrev 1.0.0 (registry+https://github.com/rust-lang/crates.io-index)", "tuple_utils 0.2.0 (registry+https://github.com/rust-lang/crates.io-index)", ] [[package]] name = "specs-hierarchy" -version = "0.1.0-alpha5" +version = "0.1.0-alpha6" source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ "hibitset 0.5.0 (registry+https://github.com/rust-lang/crates.io-index)", "shred 0.7.0-alpha5 (registry+https://github.com/rust-lang/crates.io-index)", "shred-derive 0.5.0-alpha1 (registry+https://github.com/rust-lang/crates.io-index)", - "shrev 0.8.2 (registry+https://github.com/rust-lang/crates.io-index)", - "specs 0.11.0-alpha5 (registry+https://github.com/rust-lang/crates.io-index)", + "shrev 1.0.0 (registry+https://github.com/rust-lang/crates.io-index)", + "specs 0.11.0-alpha6 (registry+https://github.com/rust-lang/crates.io-index)", ] [[package]] @@ -1643,7 +1668,7 @@ dependencies = [ [[package]] name = "tempfile" -version = "3.0.1" +version = "3.0.2" source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ "libc 0.2.40 (registry+https://github.com/rust-lang/crates.io-index)", @@ -1699,7 +1724,7 @@ dependencies = [ [[package]] name = "time" -version = "0.1.39" +version = "0.1.40" source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ "libc 0.2.40 (registry+https://github.com/rust-lang/crates.io-index)", @@ -1732,7 +1757,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" [[package]] name = "unicode-normalization" -version = "0.1.6" +version = "0.1.7" source = "registry+https://github.com/rust-lang/crates.io-index" [[package]] @@ -1783,7 +1808,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" [[package]] name = "vec_map" -version = "0.8.0" +version = "0.8.1" source = "registry+https://github.com/rust-lang/crates.io-index" [[package]] @@ -1792,7 +1817,7 @@ version = "0.1.1" source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ "bitflags 0.7.0 (registry+https://github.com/rust-lang/crates.io-index)", - "time 0.1.39 (registry+https://github.com/rust-lang/crates.io-index)", + "time 0.1.40 (registry+https://github.com/rust-lang/crates.io-index)", ] [[package]] @@ -1863,7 +1888,7 @@ version = "0.13.3" source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ "memmap 0.6.2 (registry+https://github.com/rust-lang/crates.io-index)", - "tempfile 3.0.1 (registry+https://github.com/rust-lang/crates.io-index)", + "tempfile 3.0.2 (registry+https://github.com/rust-lang/crates.io-index)", "wayland-client 0.12.5 (registry+https://github.com/rust-lang/crates.io-index)", "wayland-protocols 0.12.5 (registry+https://github.com/rust-lang/crates.io-index)", ] @@ -1907,7 +1932,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" [[package]] name = "winit" -version = "0.12.0" +version = "0.13.1" source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ "android_glue 0.2.3 (registry+https://github.com/rust-lang/crates.io-index)", @@ -1980,7 +2005,7 @@ dependencies = [ "checksum aho-corasick 0.5.3 (registry+https://github.com/rust-lang/crates.io-index)" = "ca972c2ea5f742bfce5687b9aef75506a764f61d37f8f649047846a9686ddb66" "checksum aho-corasick 0.6.4 (registry+https://github.com/rust-lang/crates.io-index)" = "d6531d44de723825aa81398a6415283229725a00fa30713812ab9323faa82fc4" "checksum alsa 0.2.0 (registry+https://github.com/rust-lang/crates.io-index)" = "fe0820f7fc33380123dcd5deaadbc4467d56b6cecb60e5d80d6cd523a9664adc" -"checksum alsa-sys 0.1.1 (registry+https://github.com/rust-lang/crates.io-index)" = "9013f855a808ab924a4c08b5c1ec9bd6b04fdb2295b4d570fb723e0ed2802a4f" +"checksum alsa-sys 0.1.2 (registry+https://github.com/rust-lang/crates.io-index)" = "b0edcbbf9ef68f15ae1b620f722180b82a98b6f0628d30baa6b8d2a5abc87d58" "checksum amethyst 0.6.0 (git+https://github.com/amethyst/amethyst?branch=develop)" = "<none>" "checksum amethyst_animation 0.1.0 (git+https://github.com/amethyst/amethyst?branch=develop)" = "<none>" "checksum amethyst_assets 0.2.0 (git+https://github.com/amethyst/amethyst?branch=develop)" = "<none>" @@ -2034,6 +2059,7 @@ dependencies = [ "checksum crossbeam-epoch 0.3.1 (registry+https://github.com/rust-lang/crates.io-index)" = "927121f5407de9956180ff5e936fe3cf4324279280001cd56b669d28ee7e9150" "checksum crossbeam-utils 0.2.2 (registry+https://github.com/rust-lang/crates.io-index)" = "2760899e32a1d58d5abb31129f8fae5de75220bc2176e77ff7c627ae45c918d9" "checksum derivative 1.0.0 (registry+https://github.com/rust-lang/crates.io-index)" = "67b3d6d0e84e53a5bdc263cc59340541877bb541706a191d762bfac6a481bdde" +"checksum dirty 0.2.0 (git+https://github.com/jojolepro/dirty)" = "<none>" "checksum dlib 0.4.1 (registry+https://github.com/rust-lang/crates.io-index)" = "77e51249a9d823a4cb79e3eca6dcd756153e8ed0157b6c04775d04bf1b13b76a" "checksum draw_state 0.8.0 (registry+https://github.com/rust-lang/crates.io-index)" = "33cf9537e2d06891448799b96d5a8c8083e0e90522a7fdabe6ebf4f41d79d651" "checksum either 1.5.0 (registry+https://github.com/rust-lang/crates.io-index)" = "3be565ca5c557d7f59e7cfcf1844f9e3033650c929c6566f511e8005f205c1d0" @@ -2055,19 +2081,18 @@ dependencies = [ "checksum gfx_gl 0.5.0 (registry+https://github.com/rust-lang/crates.io-index)" = "3e8a920f8f6c1025a7ddf9dd25502bf059506fd3cd765dfbe8dba0b56b7eeecb" "checksum gfx_glyph 0.9.1 (registry+https://github.com/rust-lang/crates.io-index)" = "d06682b5ff9d6216ae531eb12c0ad727e205bf82641b86886cb5fbda360f2b80" "checksum gfx_macros 0.2.1 (registry+https://github.com/rust-lang/crates.io-index)" = "d38f9e1d3f4705b26e73437e35fd71c955aba5781f6bb5391d37a166204d301f" -"checksum gfx_window_glutin 0.22.0 (registry+https://github.com/rust-lang/crates.io-index)" = "23c53ff042d5b25efb8a56d0eb3e75c0ed2828ccba5606311c9df95613713f65" +"checksum gfx_window_glutin 0.23.0 (registry+https://github.com/rust-lang/crates.io-index)" = "5e7ab34e95020625700ffed78b870e9f3fe4f024f23f9ff744af4f6e2c238921" "checksum ghakuf 0.5.1 (registry+https://github.com/rust-lang/crates.io-index)" = "13e9c67552cb8e25aea67430d003303a8bc618f6b1f20f18c2f21d37752362f5" "checksum gl_generator 0.9.0 (registry+https://github.com/rust-lang/crates.io-index)" = "7a795170cbd85b5a7baa58d6d7525cae6a03e486859860c220f7ebbbdd379d0a" "checksum gleam 0.5.0 (registry+https://github.com/rust-lang/crates.io-index)" = "e47b39459e47b76be4d2c82702932cdc66df09dcb8f813424167991adb8b3380" "checksum glob 0.2.11 (registry+https://github.com/rust-lang/crates.io-index)" = "8be18de09a56b60ed0edf84bc9df007e30040691af7acd1c41874faac5895bfb" -"checksum glutin 0.14.0 (registry+https://github.com/rust-lang/crates.io-index)" = "5ed2d11d21384aa2e0ad027105a26d93d5ca22c73da4000ddd0ecede89571cf0" +"checksum glutin 0.15.0 (registry+https://github.com/rust-lang/crates.io-index)" = "a9caee44b73388b2b4452ab783b13a1af80edb363bfc6e5292bdb2dd990a3171" "checksum hetseq 0.1.5 (registry+https://github.com/rust-lang/crates.io-index)" = "dbe13b9e03ea85e9efb4cd214c760399619f5e9ad0b36d8656b6649f03645063" "checksum hibitset 0.5.0 (registry+https://github.com/rust-lang/crates.io-index)" = "1e9fb2efbf0be917eff1a4d6a26f72b86c187759c2467b25ec55c7f92994ba82" "checksum hound 3.4.0 (registry+https://github.com/rust-lang/crates.io-index)" = "8a164bb2ceaeff4f42542bdb847c41517c78a60f5649671b2a07312b6e117549" "checksum imagefmt 4.0.0 (registry+https://github.com/rust-lang/crates.io-index)" = "6ccf4a97bdaf8e465ee22c8583834000188c3f44fd3b6b3d15f858cbaf2b362f" "checksum itertools 0.5.10 (registry+https://github.com/rust-lang/crates.io-index)" = "4833d6978da405305126af4ac88569b5d71ff758581ce5a987dbfa3755f694fc" "checksum itertools 0.7.8 (registry+https://github.com/rust-lang/crates.io-index)" = "f58856976b776fedd95533137617a02fb25719f40e7d9b01c7043cd65474f450" -"checksum jack-sys 0.1.5 (registry+https://github.com/rust-lang/crates.io-index)" = "e69f13dd363a7a3b14048ac0f9155e2cf38d015665cc8c906539a1186e4c318e" "checksum kernel32-sys 0.2.2 (registry+https://github.com/rust-lang/crates.io-index)" = "7507624b29483431c0ba2d82aece8ca6cdba9382bff4ddd0f7490560c056098d" "checksum khronos_api 2.2.0 (registry+https://github.com/rust-lang/crates.io-index)" = "037ab472c33f67b5fbd3e9163a2645319e5356fcd355efa6d4eb7fff4bbcb554" "checksum lazy_static 0.2.11 (registry+https://github.com/rust-lang/crates.io-index)" = "76f033c7ad61445c5b347c7382dd1237847eb1bce590fe50365dcb33d546be73" @@ -2098,11 +2123,11 @@ dependencies = [ "checksum num 0.1.42 (registry+https://github.com/rust-lang/crates.io-index)" = "4703ad64153382334aa8db57c637364c322d3372e097840c72000dabdcf6156e" "checksum num-bigint 0.1.43 (registry+https://github.com/rust-lang/crates.io-index)" = "81b483ea42927c463e191802e7334556b48e7875297564c0e9951bd3a0ae53e3" "checksum num-complex 0.1.43 (registry+https://github.com/rust-lang/crates.io-index)" = "b288631d7878aaf59442cffd36910ea604ecd7745c36054328595114001c9656" -"checksum num-integer 0.1.36 (registry+https://github.com/rust-lang/crates.io-index)" = "f8d26da319fb45674985c78f1d1caf99aa4941f785d384a2ae36d0740bc3e2fe" -"checksum num-iter 0.1.35 (registry+https://github.com/rust-lang/crates.io-index)" = "4b226df12c5a59b63569dd57fafb926d91b385dfce33d8074a412411b689d593" +"checksum num-integer 0.1.37 (registry+https://github.com/rust-lang/crates.io-index)" = "2fef16815bb502c6a3be7fd842b7fd6e3371d5fbd33acc8ada7cc6c616cb4798" +"checksum num-iter 0.1.36 (registry+https://github.com/rust-lang/crates.io-index)" = "fb8282dab9e151b14bfe11ee81e5ead059f99e1e604bdd76a7653155ba7d20c5" "checksum num-rational 0.1.42 (registry+https://github.com/rust-lang/crates.io-index)" = "ee314c74bd753fc86b4780aa9475da469155f3848473a261d2d18e35245a784e" "checksum num-traits 0.1.43 (registry+https://github.com/rust-lang/crates.io-index)" = "92e5113e9fd4cc14ded8e499429f396a20f98c772a47cc8622a736e1ec843c31" -"checksum num-traits 0.2.2 (registry+https://github.com/rust-lang/crates.io-index)" = "dee092fcdf725aee04dd7da1d21debff559237d49ef1cb3e69bcb8ece44c7364" +"checksum num-traits 0.2.3 (registry+https://github.com/rust-lang/crates.io-index)" = "c22f20a157cb4af265c71e47db525852368feeb4a0013f0f8c68a7f4ef0d0fc1" "checksum num_cpus 1.8.0 (registry+https://github.com/rust-lang/crates.io-index)" = "c51a3322e4bca9d212ad9a158a02abc6934d005490c054a2778df73a70aa0a30" "checksum objc 0.2.2 (registry+https://github.com/rust-lang/crates.io-index)" = "877f30f37acef6749b1841cceab289707f211aecfc756553cd63976190e6cc2e" "checksum objc-foundation 0.1.1 (registry+https://github.com/rust-lang/crates.io-index)" = "1add1b659e36c9607c7aab864a76c7a4c2760cd0cd2e120f3fb8b952c7e22bf9" @@ -2112,6 +2137,7 @@ dependencies = [ "checksum osmesa-sys 0.1.2 (registry+https://github.com/rust-lang/crates.io-index)" = "88cfece6e95d2e717e0872a7f53a8684712ad13822a7979bc760b9c77ec0013b" "checksum owning_ref 0.3.3 (registry+https://github.com/rust-lang/crates.io-index)" = "cdf84f41639e037b484f93433aa3897863b561ed65c6e59c7073d7c561710f37" "checksum parking_lot 0.4.8 (registry+https://github.com/rust-lang/crates.io-index)" = "149d8f5b97f3c1133e3cfcd8886449959e856b557ff281e292b733d7c69e005e" +"checksum parking_lot 0.5.5 (registry+https://github.com/rust-lang/crates.io-index)" = "d4d05f1349491390b1730afba60bb20d55761bef489a954546b58b4b34e1e2ac" "checksum parking_lot_core 0.2.14 (registry+https://github.com/rust-lang/crates.io-index)" = "4db1a8ccf734a7bce794cc19b3df06ed87ab2f3907036b693c68f56b4d4537fa" "checksum peeking_take_while 0.1.2 (registry+https://github.com/rust-lang/crates.io-index)" = "19b17cddbe7ec3f8bc800887bab5e717348c95ea2ca0b1bf0837fb964dc67099" "checksum percent-encoding 1.0.1 (registry+https://github.com/rust-lang/crates.io-index)" = "31010dd2e1ac33d5b46a5b413495239882813e0369f8ed8a5e266f173602f831" @@ -2135,6 +2161,7 @@ dependencies = [ "checksum remove_dir_all 0.5.1 (registry+https://github.com/rust-lang/crates.io-index)" = "3488ba1b9a2084d38645c4c08276a1752dcbf2c7130d74f1569681ad5d2799c5" "checksum rodio 0.7.0 (registry+https://github.com/rust-lang/crates.io-index)" = "1e2767a246f9b284ec568e45e17ed3e6c52a91a3d42fa11ba00466b6ea5a6b55" "checksum ron 0.1.7 (registry+https://github.com/rust-lang/crates.io-index)" = "da06feaa07f69125ab9ddc769b11de29090122170b402547f64b86fe16ebc399" +"checksum ron 0.2.1 (registry+https://github.com/rust-lang/crates.io-index)" = "f529ed7508da0ac9c2e79289beb5aad2894631799ff655a3092169d205906344" "checksum rustc-demangle 0.1.8 (registry+https://github.com/rust-lang/crates.io-index)" = "76d7ba1feafada44f2d38eed812bd2489a03c0f5abb975799251518b68848649" "checksum rustc-serialize 0.3.24 (registry+https://github.com/rust-lang/crates.io-index)" = "dcf128d1287d2ea9d80910b5f1120d0b8eede3fbf1abe91c40d39ea7d51e6fda" "checksum rustc_version 0.1.7 (registry+https://github.com/rust-lang/crates.io-index)" = "c5f5376ea5e30ce23c03eb77cbe4962b988deead10910c372b226388b594c084" @@ -2142,16 +2169,16 @@ dependencies = [ "checksum rusttype 0.4.3 (registry+https://github.com/rust-lang/crates.io-index)" = "11ff03da02f6d340bbee5ec55eed03ff9abd6ea013b93bc7c35973cc28f65999" "checksum scopeguard 0.3.3 (registry+https://github.com/rust-lang/crates.io-index)" = "94258f53601af11e6a49f722422f6e3425c52b06245a5cf9bc09908b174f5e27" "checksum semver 0.1.20 (registry+https://github.com/rust-lang/crates.io-index)" = "d4f410fedcf71af0345d7607d246e7ad15faaadd49d240ee3b24e5dc21a820ac" -"checksum serde 1.0.46 (registry+https://github.com/rust-lang/crates.io-index)" = "40916f132d93723c5b744f50de984e4c90a43a391b6af9273fcda5f06e28f001" -"checksum serde_derive 1.0.46 (registry+https://github.com/rust-lang/crates.io-index)" = "382f3ccc4b0b1ecb609070aa2df922beb8f95b30cdf06872d8bc06d5119dacd1" +"checksum serde 1.0.53 (registry+https://github.com/rust-lang/crates.io-index)" = "de4dee3b122edad92d80c66cac8d967ec7f8bf16a3b452247d6eb1dbf83c8f22" +"checksum serde_derive 1.0.53 (registry+https://github.com/rust-lang/crates.io-index)" = "7149ef7af607b09e0e7df38b1fd74264f08a29a67f604d5cb09d3fbdb1e256bc" "checksum shared_library 0.1.8 (registry+https://github.com/rust-lang/crates.io-index)" = "8254bf098ce4d8d7cc7cc6de438c5488adc5297e5b7ffef88816c0a91bd289c1" "checksum shred 0.7.0-alpha5 (registry+https://github.com/rust-lang/crates.io-index)" = "4621228891d68822e59154247e5226af4be7e335c45e7a275cc9876e044ed7e0" "checksum shred-derive 0.5.0-alpha1 (registry+https://github.com/rust-lang/crates.io-index)" = "38dd238e9335702dca589a7a82ff6a9784961ee053a2940836be3334a7b7d834" -"checksum shrev 0.8.2 (registry+https://github.com/rust-lang/crates.io-index)" = "69bcbc0bd5a03f058312e45ea14c87b388faded87541a20f091431a13577494f" +"checksum shrev 1.0.0 (registry+https://github.com/rust-lang/crates.io-index)" = "800971605703aae3a54b739c6bb9ed1939dca3425b9402ff6e88815dfea526e6" "checksum smallvec 0.4.4 (registry+https://github.com/rust-lang/crates.io-index)" = "ee4f357e8cd37bf8822e1b964e96fd39e2cb5a0424f8aaa284ccaccc2162411c" "checksum smallvec 0.6.1 (registry+https://github.com/rust-lang/crates.io-index)" = "03dab98ab5ded3a8b43b2c80751194608d0b2aa0f1d46cf95d1c35e192844aa7" -"checksum specs 0.11.0-alpha5 (registry+https://github.com/rust-lang/crates.io-index)" = "9025777ee178f90720de2e40571b04d26439281cbf9165e096076192a379304e" -"checksum specs-hierarchy 0.1.0-alpha5 (registry+https://github.com/rust-lang/crates.io-index)" = "68d37edbb8cd25e815e1cc8cc49d90a2b7f92af3fd9a305c96c9dfd9cd3084d4" +"checksum specs 0.11.0-alpha6 (registry+https://github.com/rust-lang/crates.io-index)" = "1b5e6245ecb2ceef91f0095c3ebec8997c10c5232065e54bae317b20ab04f7a0" +"checksum specs-hierarchy 0.1.0-alpha6 (registry+https://github.com/rust-lang/crates.io-index)" = "75795180d8849c0fbf544953dc49faaadbce7a9353b2221ba16a21cc5e49f1cf" "checksum stable_deref_trait 1.0.0 (registry+https://github.com/rust-lang/crates.io-index)" = "15132e0e364248108c5e2c02e3ab539be8d6f5d52a01ca9bbf27ed657316f02b" "checksum stb_truetype 0.2.2 (registry+https://github.com/rust-lang/crates.io-index)" = "52ce2b38abdd11cffbc68928810248e0dd003fea489a88a404dc1ba7ae2d5538" "checksum stdweb 0.1.3 (registry+https://github.com/rust-lang/crates.io-index)" = "ef5430c8e36b713e13b48a9f709cc21e046723fe44ce34587b73a830203b533e" @@ -2160,18 +2187,18 @@ dependencies = [ "checksum syn 0.11.11 (registry+https://github.com/rust-lang/crates.io-index)" = "d3b891b9015c88c576343b9b3e41c2c11a51c219ef067b264bd9c8aa9b441dad" "checksum syn 0.13.7 (registry+https://github.com/rust-lang/crates.io-index)" = "61b8f1b737f929c6516ba46a3133fd6d5215ad8a62f66760f851f7048aebedfb" "checksum synom 0.11.3 (registry+https://github.com/rust-lang/crates.io-index)" = "a393066ed9010ebaed60b9eafa373d4b1baac186dd7e008555b0f702b51945b6" -"checksum tempfile 3.0.1 (registry+https://github.com/rust-lang/crates.io-index)" = "8cddbd26c5686ece823b507f304c8f188daef548b4cb753512d929ce478a093c" +"checksum tempfile 3.0.2 (registry+https://github.com/rust-lang/crates.io-index)" = "47776f63b85777d984a50ce49d6b9e58826b6a3766a449fc95bc66cd5663c15b" "checksum termion 1.5.1 (registry+https://github.com/rust-lang/crates.io-index)" = "689a3bdfaab439fd92bc87df5c4c78417d3cbe537487274e9b0b2dce76e92096" "checksum textwrap 0.9.0 (registry+https://github.com/rust-lang/crates.io-index)" = "c0b59b6b4b44d867f1370ef1bd91bfb262bf07bf0ae65c202ea2fbc16153b693" "checksum thread-id 2.0.0 (registry+https://github.com/rust-lang/crates.io-index)" = "a9539db560102d1cef46b8b78ce737ff0bb64e7e18d35b2a5688f7d097d0ff03" "checksum thread_local 0.2.7 (registry+https://github.com/rust-lang/crates.io-index)" = "8576dbbfcaef9641452d5cf0df9b0e7eeab7694956dd33bb61515fb8f18cfdd5" "checksum thread_local 0.3.5 (registry+https://github.com/rust-lang/crates.io-index)" = "279ef31c19ededf577bfd12dfae728040a21f635b06a24cd670ff510edd38963" -"checksum time 0.1.39 (registry+https://github.com/rust-lang/crates.io-index)" = "a15375f1df02096fb3317256ce2cee6a1f42fc84ea5ad5fc8c421cfe40c73098" +"checksum time 0.1.40 (registry+https://github.com/rust-lang/crates.io-index)" = "d825be0eb33fda1a7e68012d51e9c7f451dc1a69391e7fdc197060bb8c56667b" "checksum token_store 0.1.2 (registry+https://github.com/rust-lang/crates.io-index)" = "a686838375fc11103b9c1529c6508320b7bd5e2401cd62831ca51b3e82e61849" "checksum tuple_utils 0.2.0 (registry+https://github.com/rust-lang/crates.io-index)" = "cbfecd7bb8f0a3e96b3b31c46af2677a55a588767c0091f484601424fcb20e7e" "checksum twox-hash 1.1.0 (registry+https://github.com/rust-lang/crates.io-index)" = "475352206e7a290c5fccc27624a163e8d0d115f7bb60ca18a64fc9ce056d7435" "checksum ucd-util 0.1.1 (registry+https://github.com/rust-lang/crates.io-index)" = "fd2be2d6639d0f8fe6cdda291ad456e23629558d466e2789d2c3e9892bda285d" -"checksum unicode-normalization 0.1.6 (registry+https://github.com/rust-lang/crates.io-index)" = "90d662d111b0dbb08a180f2761026cba648c258023c355954a7c00e00e354636" +"checksum unicode-normalization 0.1.7 (registry+https://github.com/rust-lang/crates.io-index)" = "6a0180bc61fc5a987082bfa111f4cc95c4caff7f9799f3e46df09163a937aa25" "checksum unicode-segmentation 1.2.1 (registry+https://github.com/rust-lang/crates.io-index)" = "aa6024fc12ddfd1c6dbc14a80fa2324d4568849869b779f6bd37e5e4c03344d1" "checksum unicode-width 0.1.4 (registry+https://github.com/rust-lang/crates.io-index)" = "bf3a113775714a22dcb774d8ea3655c53a32debae63a063acc00a91cc586245f" "checksum unicode-xid 0.0.4 (registry+https://github.com/rust-lang/crates.io-index)" = "8c1f860d7d29cf02cb2f3f359fd35991af3d30bac52c57d265a3c461074cb4dc" @@ -2180,7 +2207,7 @@ dependencies = [ "checksum unreachable 1.0.0 (registry+https://github.com/rust-lang/crates.io-index)" = "382810877fe448991dfc7f0dd6e3ae5d58088fd0ea5e35189655f84e6814fa56" "checksum utf8-ranges 0.1.3 (registry+https://github.com/rust-lang/crates.io-index)" = "a1ca13c08c41c9c3e04224ed9ff80461d97e121589ff27c753a16cb10830ae0f" "checksum utf8-ranges 1.0.0 (registry+https://github.com/rust-lang/crates.io-index)" = "662fab6525a98beff2921d7f61a39e7d59e0b425ebc7d0d9e66d316e55124122" -"checksum vec_map 0.8.0 (registry+https://github.com/rust-lang/crates.io-index)" = "887b5b631c2ad01628bbbaa7dd4c869f80d3186688f8d0b6f58774fbe324988c" +"checksum vec_map 0.8.1 (registry+https://github.com/rust-lang/crates.io-index)" = "05c78687fb1a80548ae3250346c3db86a80a7cdd77bda190189f2d0a0987c81a" "checksum vergen 0.1.1 (registry+https://github.com/rust-lang/crates.io-index)" = "8c3365f36c57e5df714a34be40902b27a992eeddb9996eca52d0584611cf885d" "checksum void 1.0.2 (registry+https://github.com/rust-lang/crates.io-index)" = "6a02e4885ed3bc0f2de90ea6dd45ebcbb66dacffe03547fadbb0eeae2770887d" "checksum wavefront_obj 5.1.0 (registry+https://github.com/rust-lang/crates.io-index)" = "33c9cbb65c5aac6493000cdabe11f49588d19b547ccd7501f44fc96a6b9406ff" @@ -2196,7 +2223,7 @@ dependencies = [ "checksum winapi-build 0.1.1 (registry+https://github.com/rust-lang/crates.io-index)" = "2d315eee3b34aca4797b2da6b13ed88266e6d612562a0c46390af8299fc699bc" "checksum winapi-i686-pc-windows-gnu 0.4.0 (registry+https://github.com/rust-lang/crates.io-index)" = "ac3b87c63620426dd9b991e5ce0329eff545bccbbb34f3be09ff6fb6ab51b7b6" "checksum winapi-x86_64-pc-windows-gnu 0.4.0 (registry+https://github.com/rust-lang/crates.io-index)" = "712e227841d057c1ee1cd2fb22fa7e5a5461ae8e48fa2ca79ec42cfc1931183f" -"checksum winit 0.12.0 (registry+https://github.com/rust-lang/crates.io-index)" = "a282d348b2a57f74617972c08dda0ff74a7383c9fe4f861a882e6fbba46a6521" +"checksum winit 0.13.1 (registry+https://github.com/rust-lang/crates.io-index)" = "3706b5ba299cc9ed06d39b8021fc5edd5a7d27d8e99355ca09636fddd9b14cc0" "checksum winmm-sys 0.2.0 (registry+https://github.com/rust-lang/crates.io-index)" = "20a57a816b63ca4bf31aec70b4c334be13c4b73a30ab5b546135041627866035" "checksum x11-clipboard 0.2.2 (registry+https://github.com/rust-lang/crates.io-index)" = "2e7374c7699210cca7084ca61d57e09640fc744d1391808cb9ae2fe4ca9bd1df" "checksum x11-dl 2.17.5 (registry+https://github.com/rust-lang/crates.io-index)" = "3235540540fde1ae074c8df49054166c0e070407f1c6e1ee17b8c87c2c7bcc7d" diff --git a/Cargo.toml b/Cargo.toml @@ -4,8 +4,10 @@ version = "0.1.0" authors = ["Joël Lupien (Jojolepro) <jojolepromain@gmail.com>"] [dependencies] -midir = { version = "0.5", features = ["jack"] } +#midir = { version = "0.5", features = ["jack"] } +midir = { version = "0.5" } #nom-midi = "0.2.0" ghakuf = "0.5" amethyst = { git = "https://github.com/amethyst/amethyst", branch = "develop" } -log = "*"- \ No newline at end of file +log = "*" +amethyst-extra = { path = "../amethyst-extra/" } diff --git a/assets/main/config/display.ron b/assets/main/config/display.ron @@ -0,0 +1 @@ +( dimensions: None, max_dimensions: None, min_dimensions: None, fullscreen: false, multisampling: 0, title: "Taiko", visibility: true, vsync: true, ) diff --git a/assets/main/config/input.ron b/assets/main/config/input.ron @@ -0,0 +1 @@ +( axes: { "P2": ( pos: Key(Z), neg: Key(X), ), "P1": ( pos: Key(W), neg: Key(S), ), }, actions: { }, ) diff --git a/src/main.rs b/src/main.rs @@ -3,57 +3,328 @@ extern crate ghakuf; #[macro_use] extern crate log; extern crate amethyst; +extern crate amethyst_extra; use midir::{MidiInput,Ignore}; use std::io::{stdout,stdin,Write}; use ghakuf::messages::*; use ghakuf::reader::*; +use ghakuf::messages::MidiEvent::*; use std::path::Path; use amethyst::audio::{AudioBundle, SourceHandle}; +use amethyst::assets::{ProgressCounter,Loader}; use amethyst::core::frame_limiter::FrameRateLimitStrategy; -use amethyst::core::transform::TransformBundle; +use amethyst::core::transform::{Transform,GlobalTransform,TransformBundle}; use amethyst::core::Time; +use amethyst::core::cgmath::{Matrix4,Vector3}; use amethyst::input::InputBundle; use amethyst::prelude::*; use amethyst::utils::fps_counter::FPSCounterBundle; -use amethyst::renderer::{DisplayConfig, DrawFlat, Pipeline, PosTex, RenderBundle, - Stage}; +use amethyst::renderer::{Camera,DisplayConfig, DrawFlat, Pipeline, PosTex, RenderBundle, + Stage, Projection,Event,Material,MeshHandle,MaterialDefaults}; +use amethyst::shrev::{ReaderId,EventChannel}; +use amethyst::ui::UiEvent; use std::time::Duration; use amethyst::Application; +use amethyst_extra::*; +use amethyst::ecs::prelude::*; + +#[derive(Default,Debug)] +pub struct Note{ + key: u8, + channel: u8, + start: f64, + end: f64, + velocity: u8, +} + +#[derive(Default,Debug)] +pub struct MidiSong{ + length: f64, + bpm: f64, + notes: Vec<Note>, +} + +#[derive(Debug)] +pub struct MidiFileHandler{ + song: MidiSong, + delta_accum: f64, + current_bpm: f64, + tpm: u16, +} + +impl MidiFileHandler{ + pub fn new()->Self{ + MidiFileHandler{ + song: MidiSong::default(), + delta_accum: 0.0, + current_bpm: 120.0, + tpm: 0, + } + } + fn end_note(&mut self, note: u8,time: f64){ + if let Some(mut l) = self.song.notes.iter_mut().filter(|n| n.key == note).last().as_mut(){ + if l.end == 0.0{ + l.end = time; + } + } + } + + fn time_for(&mut self, delta: u32)->f64{ + let microsec_per_beat = 60.0 * 1000000.0 / self.current_bpm; + let microsec_per_tick = microsec_per_beat / self.tpm as f64; + let sec_per_tick = microsec_per_tick / 1000000.0; + let offset = sec_per_tick * delta as f64; + self.delta_accum += offset; + self.delta_accum + } +} -struct MidiFileHandler; impl Handler for MidiFileHandler { fn header(&mut self, format: u16, track: u16, time_base: u16) { - // Something + self.tpm = time_base; } fn meta_event(&mut self, delta_time: u32, event: &MetaEvent, data: &Vec<u8>) { - // you + // TODO: time changes } fn midi_event(&mut self, delta_time: u32, event: &MidiEvent) { - // want - println!("Midi event: {:?} at delta time {}",event,delta_time); + //println!("Midi event: {:?} at delta time {}",event,delta_time); + let t = self.time_for(delta_time); + match event{ + &NoteOn{ch,note,velocity} => { + if velocity == 0 { + self.end_note(note, t); + } else { + self.song.notes.push(Note { + key: note, + channel: ch, + start: t, + end: 0.0, + velocity, + }); + } + }, + &NoteOff{ch,note,velocity} => self.end_note(note,t), + _ => {}, + } } fn sys_ex_event(&mut self, delta_time: u32, event: &SysExEvent, data: &Vec<u8>) { - // to } fn track_change(&mut self) { - // do } } + +#[derive(Default)] +struct LoadState{ + progress: ProgressCounter, +} + +struct MainMenuState{ + ui_event_reader: Option<ReaderId<UiEvent>>, +} + +struct DeviceChooserState; + +struct PauseState; + +struct GameState; + + +/*impl State for LoadState{ + fn on_start(&mut self, mut world: &mut World) { + // Load stuff + } + + fn update(&mut self, mut world: &mut World) -> Trans { + if self.progress.is_complete() { + Trans::Switch(Box::new(MainMenuState)) + }else{ + Trans::None + } + } + + fn handle_event(&mut self, mut world: &mut World, event: Event) -> Trans { + self.internal.handle_event(&mut world, event) + } +}*/ + +/*impl State for MainMenuState{ + fn on_start(&mut self, mut world: &mut World) { + self.ui_event_reader = Some(world.read::<EventChannel<UiEvent>>().register_reader()); + // add buttons + + } + + fn update(&mut self, mut world: &mut World) -> Trans { + for ev in world.read::<EventChannel<UiEvent>>().read(&self.ui_event_reader){ + if let Some(nav) = world.read_storage::<NavigationButton>(){ + return nav.target(); + } + } + } + + fn handle_event(&mut self, mut world: &mut World, event: Event) -> Trans { + self.internal.handle_event(&mut world, event) + } +}*/ + + +impl State for GameState{ + fn on_start(&mut self, mut world: &mut World) { + println!("Sample midi file read test"); + //let path = Path::new("test.mid"); + let path = Path::new("Sayonara Heaven.mid"); + let mut handler = MidiFileHandler::new(); + { + let mut reader = Reader::new( + &mut handler, + &path, + ).unwrap(); + let res = reader.read(); + } + world.add_resource(handler); + + + let mesh = gen_rectangle_mesh(0.1,0.1,&world.read_resource(),&world.read_resource()); + let color = world.read_resource::<Loader>().load_from_data([0.1,0.5,0.3,1.0].into(), (), &world.read_resource()); + + + let mat_defaults = world.read_resource::<MaterialDefaults>().0.clone(); + let mat = Material { + albedo: color.clone(), + ..mat_defaults.clone() + }; + + let ad = AssetData{ + mesh, + mat, + }; + + world.add_resource(ad); + + + + world + .create_entity() + .with(Camera::from(Projection::orthographic( + 0.0, + 1.0, + 1.0, + 0.0, + ))) + .with(GlobalTransform( + Matrix4::from_translation(Vector3::new(0.0, 0.0, 1.0)).into(), + )) + .build(); + } + + fn update(&mut self, mut world: &mut World) -> Trans { + Trans::None + } +} + +pub struct NoteDebugSystem; + +impl<'a> System<'a> for NoteDebugSystem { + type SystemData = (Read<'a, Time>, ReadExpect<'a, MidiFileHandler>); + fn run(&mut self, (time, midi): Self::SystemData) { + let lower = time.absolute_time_seconds() - time.delta_seconds() as f64; + let upper = time.absolute_time_seconds(); + for n in &midi.song.notes{ + if n.start >= lower && n.start < upper{ + println!("Note Start: {:?}",n); + } + } + } +} + +pub struct AssetData{ + mesh: MeshHandle, + mat: Material, +} + +pub struct NoteComponent{ + key: u8, + time: f64, +} + +impl Component for NoteComponent{ + type Storage = DenseVecStorage<Self>; +} + +#[derive(Default)] +pub struct NoteSpawnSystem{ + last_spawn: f64, +} + +impl NoteSpawnSystem{ + pub fn can_spawn(&mut self, time: f64, note_time: f64, last_frame: f64)->bool{ + // 1.0 = note scroll delay + note_time < time - 1.0 && note_time > self.last_spawn + } +} + +impl<'a> System<'a> for NoteSpawnSystem { + type SystemData = ( + Entities<'a>, + Read<'a, Time>, + ReadExpect<'a,AssetData>, + ReadExpect<'a, MidiFileHandler>, + WriteStorage<'a,GlobalTransform>, + WriteStorage<'a,Transform>, + WriteStorage<'a,DestroyAtTime>, + WriteStorage<'a,MeshHandle>, + WriteStorage<'a,Material>, + WriteStorage<'a,NoteComponent>,); + fn run(&mut self, (entities,time, asset, midi, mut gt, mut tr, mut dat, mut meshes, mut mats, mut nc): Self::SystemData) { + let lower = time.absolute_time_seconds() - time.delta_seconds() as f64; + let upper = time.absolute_time_seconds(); + for n in &midi.song.notes{ + if n.start < upper{ + if n.start >= lower{ + println!("Spawning note: {:?}, scheduled for destruction at: {}",n,time.absolute_time_seconds() + n.end + 0.1); + let e = entities.create(); + gt.insert(e,GlobalTransform::default()); + tr.insert(e,Transform::default()); + dat.insert(e,DestroyAtTime{ time: time.absolute_time_seconds() + n.end + 0.1 }); + meshes.insert(e,asset.mesh.clone()); + mats.insert(e,asset.mat.clone()); + nc.insert(e,NoteComponent{key: n.key,time: n.start}); + } + }else{ + break; + } + } + } +} + +pub struct NoteMoveSystem; + +impl<'a> System<'a> for NoteMoveSystem { + type SystemData = ( + Read<'a, Time>, + ReadExpect<'a, MidiFileHandler>, + WriteStorage<'a,Transform>, + ReadStorage<'a,NoteComponent>); + fn run(&mut self, (time,midi,mut tr, nc): Self::SystemData) { + for (mut tr, nc) in (&mut tr,&nc).join(){ + tr.translation.x = (nc.key as f32 - 50.0) / 30.0; + // 1.0 = scroll speed. + tr.translation.y = (nc.time + (nc.time - time.absolute_time_seconds()) / 1.0) as f32; + } + } +} + fn main() { - let path = format!("{}/resources/config.ron", env!("CARGO_MANIFEST_DIR")); + let path = format!("{}/assets/main/config/display.ron", env!("CARGO_MANIFEST_DIR")); + let input_path = format!("{}/assets/main/config/input.ron", env!("CARGO_MANIFEST_DIR")); + let display_config = DisplayConfig::load(path); - let paths = Paths::from_file(&format!("{}/paths.ron", env!("CARGO_MANIFEST_DIR"))); - let input_path = paths - .path("input") - .expect("Failed to find input config path") - .clone(); - println!("{}", input_path); let pipe = Pipeline::build().with_stage( Stage::with_backbuffer() @@ -62,36 +333,39 @@ fn main() { .with_pass(DrawFlat::<PosTex>::new()), ); //let maps_dir = format!("{}/resources/assets/maps/", env!("CARGO_MANIFEST_DIR")); - let game = Application::build("", MenuState) + let game = Application::build("", GameState) .unwrap() .with_frame_limit( FrameRateLimitStrategy::SleepAndYield(Duration::from_millis(2)), 144, ) - .with_resource(paths) - .with_bundle(FPSCounterBundle::new(20)) - .expect("Failed to create FPSCounterBundle") + //.with_bundle(FPSCounterBundle::new(20)) + //.expect("Failed to create FPSCounterBundle") .with_bundle(InputBundle::<String, String>::new().with_bindings_from_file(&input_path)) .expect("Failed to load input bindings") - .with_bundle(TransformBundle::new()) - .expect("Failed to build transform bundle") .with_bundle(AudioBundle::new(|music: &mut Time| None)) .expect("Failed to build dj bundle") .with_bundle(RenderBundle::new(pipe, Some(display_config))) - .expect("Failed to load render bundle"); + .expect("Failed to load render bundle") + .with(NoteSpawnSystem::default(),"note_spawn",&[]) + .with(NoteMoveSystem,"note_move",&["note_spawn"]) + .with_bundle(TransformBundle::new().with_dep(&["note_move"])) + .expect("Failed to build transform bundle"); game.build().expect("Failed to build game").run(); /*println!("Sample midi file read test"); //let path = Path::new("test.mid"); let path = Path::new("Sayonara Heaven.mid"); - let mut handler = MidiFileHandler; - let mut reader = Reader::new( - &mut handler, - &path, - ).unwrap(); - let _ = reader.read(); - - //println!("Midi data: {:?}",midi_data); + let mut handler = MidiFileHandler::new(); + { + let mut reader = Reader::new( + &mut handler, + &path, + ).unwrap(); + let res = reader.read(); + } + + println!("Midi data: {:?}",handler); println!("Midi file read end"); diff --git a/xi - akasha.mid b/xi - akasha.mid Binary files differ.