Skip to content
Snippets Groups Projects
Verified Commit f3bdcfcd authored by Louis's avatar Louis :fire:
Browse files

Update deps

parent 62c9dc6f
No related branches found
No related tags found
No related merge requests found
......@@ -110,9 +110,9 @@ dependencies = [
[[package]]
name = "anyhow"
version = "1.0.62"
version = "1.0.65"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "1485d4d2cc45e7b201ee3767015c96faa5904387c9d87c6efdd0fb511f12d305"
checksum = "98161a4e3e2184da77bb14f02184cdd111e83bbbcc9979dfee3c44b9a85f5602"
[[package]]
name = "approx"
......@@ -453,14 +453,15 @@ dependencies = [
[[package]]
name = "bevy_kira_audio"
version = "0.11.0"
version = "0.12.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "d7d902ab6a15bd45af04d47b208a24f95205d8d2fd1fa15dd4e86a570fad813b"
checksum = "0379febb94c497ac6f6b5c0ef27775f7302f65dc780a33dbcec0c743a474b5f4"
dependencies = [
"anyhow",
"bevy",
"kira",
"parking_lot 0.12.1",
"thiserror",
]
[[package]]
......@@ -1493,7 +1494,7 @@ dependencies = [
"fastrand",
"iyes_loopless",
"log 0.4.17",
"musicbox",
"micro_musicbox",
"remote_events",
"serde",
"serde_json",
......@@ -1856,9 +1857,9 @@ dependencies = [
[[package]]
name = "js-sys"
version = "0.3.59"
version = "0.3.60"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "258451ab10b34f8af53416d1fdab72c22e805f0c92a1136d59470ec0b11138b2"
checksum = "49409df3e3bf0856b916e2ceaca09ee28e6871cf7d9ce97a692cacfdb2a25a47"
dependencies = [
"wasm-bindgen",
]
......@@ -2010,6 +2011,17 @@ dependencies = [
"objc",
]
[[package]]
name = "micro_musicbox"
version = "0.4.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "51777e5d26d5e3faf89e2f8265d27c579ef97088e57f9ea2ba933c67d9757d5e"
dependencies = [
"bevy",
"bevy_kira_audio",
"serde",
]
[[package]]
name = "mime"
version = "0.2.6"
......@@ -2046,17 +2058,6 @@ dependencies = [
"windows-sys",
]
[[package]]
name = "musicbox"
version = "0.2.0-pre.1"
source = "git+https://lab.lcr.gr/microhacks/micro-bevy-musicbox.git?rev=5ab4120a983e54ef0786ddca43b92a70605efd49#5ab4120a983e54ef0786ddca43b92a70605efd49"
dependencies = [
"bevy",
"bevy_kira_audio",
"serde",
"serde_json",
]
[[package]]
name = "naga"
version = "0.9.0"
......@@ -2327,9 +2328,9 @@ dependencies = [
[[package]]
name = "once_cell"
version = "1.13.1"
version = "1.15.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "074864da206b4973b84eb91683020dbefd6a8c3f0f38e054d93954e891935e4e"
checksum = "e82dad04139b71a90c080c8463fe0dc7902db5192d939bd0950f074d014339e1"
[[package]]
name = "opaque-debug"
......@@ -2839,18 +2840,18 @@ dependencies = [
[[package]]
name = "serde"
version = "1.0.143"
version = "1.0.145"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "53e8e5d5b70924f74ff5c6d64d9a5acd91422117c60f48c4e07855238a254553"
checksum = "728eb6351430bccb993660dfffc5a72f91ccc1295abaa8ce19b27ebe4f75568b"
dependencies = [
"serde_derive",
]
[[package]]
name = "serde_derive"
version = "1.0.143"
version = "1.0.145"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "d3d8e8de557aee63c26b85b947f5e59b690d0454c753f3adeb5cd7835ab88391"
checksum = "81fa1584d3d1bcacd84c277a0dfe21f5b0f6accf4a23d04d4c6d61f1af522b4c"
dependencies = [
"proc-macro2",
"quote",
......@@ -2859,9 +2860,9 @@ dependencies = [
[[package]]
name = "serde_json"
version = "1.0.83"
version = "1.0.85"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "38dd04e3c8279e75b31ef29dbdceebfe5ad89f4d0937213c53f7d49d01b3d5a7"
checksum = "e55a28e3aaef9d5ce0506d0a14dbba8054ddc7e499ef522dd8b26859ec9d4a44"
dependencies = [
"itoa",
"ryu",
......@@ -2958,9 +2959,7 @@ checksum = "17033fe05e4f7f10a6ad602c272bafd2520b2e5cdd9feb61494d9cdce08e002f"
dependencies = [
"lazy_static",
"symphonia-bundle-mp3",
"symphonia-codec-vorbis",
"symphonia-core",
"symphonia-format-ogg",
"symphonia-metadata",
]
......@@ -2977,17 +2976,6 @@ dependencies = [
"symphonia-metadata",
]
[[package]]
name = "symphonia-codec-vorbis"
version = "0.5.1"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "323b94435a1a807e1001e29490aeaef2660fb72b145d47497e8429a6cb1d67c3"
dependencies = [
"log 0.4.17",
"symphonia-core",
"symphonia-utils-xiph",
]
[[package]]
name = "symphonia-core"
version = "0.5.1"
......@@ -3001,18 +2989,6 @@ dependencies = [
"log 0.4.17",
]
[[package]]
name = "symphonia-format-ogg"
version = "0.5.1"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "8d2f741469a0f103607ed1f2605f7f00b13ba044ea9ddc616764558c6d3d9b7d"
dependencies = [
"log 0.4.17",
"symphonia-core",
"symphonia-metadata",
"symphonia-utils-xiph",
]
[[package]]
name = "symphonia-metadata"
version = "0.5.1"
......@@ -3025,21 +3001,11 @@ dependencies = [
"symphonia-core",
]
[[package]]
name = "symphonia-utils-xiph"
version = "0.5.1"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "73cbb0766ce77a8aef535f9438db645e7b6f1b2c4cf3be9bf246b4e11a7d5531"
dependencies = [
"symphonia-core",
"symphonia-metadata",
]
[[package]]
name = "syn"
version = "1.0.99"
version = "1.0.100"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "58dbef6ec655055e20b86b15a8cc6d439cca19b667537ac6a1369572d151ab13"
checksum = "52205623b1b0f064a4e71182c3b18ae902267282930c6d5462c91b859668426e"
dependencies = [
"proc-macro2",
"quote",
......@@ -3084,18 +3050,18 @@ dependencies = [
[[package]]
name = "thiserror"
version = "1.0.32"
version = "1.0.37"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "f5f6586b7f764adc0231f4c79be7b920e766bb2f3e51b3661cdb263828f19994"
checksum = "10deb33631e3c9018b9baf9dcbbc4f737320d2b576bac10f6aefa048fa407e3e"
dependencies = [
"thiserror-impl",
]
[[package]]
name = "thiserror-impl"
version = "1.0.32"
version = "1.0.37"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "12bafc5b54507e0149cdf1b145a5d80ab80a90bcd9275df43d4fff68460f6c21"
checksum = "982d17546b47146b28f7c22e3d08465f6b8903d0ea13c1660d9d84a6e7adcdbb"
dependencies = [
"proc-macro2",
"quote",
......@@ -3260,9 +3226,9 @@ checksum = "099b7128301d285f79ddd55b9a83d5e6b9e97c92e0ea0daebee7263e932de992"
[[package]]
name = "unicode-ident"
version = "1.0.3"
version = "1.0.4"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "c4f5b37a154999a8f3f98cc23a628d850e154479cd94decf3414696e12e31aaf"
checksum = "dcc811dc4066ac62f84f11307873c4850cb653bfa9b1719cee2bd2204a4bc5dd"
[[package]]
name = "unicode-normalization"
......@@ -3361,9 +3327,9 @@ checksum = "9c8d87e72b64a3b4db28d11ce29237c246188f4f51057d65a7eab63b7987e423"
[[package]]
name = "wasm-bindgen"
version = "0.2.82"
version = "0.2.83"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "fc7652e3f6c4706c8d9cd54832c4a4ccb9b5336e2c3bd154d5cccfbf1c1f5f7d"
checksum = "eaf9f5aceeec8be17c128b2e93e031fb8a4d469bb9c4ae2d7dc1888b26887268"
dependencies = [
"cfg-if 1.0.0",
"wasm-bindgen-macro",
......@@ -3371,9 +3337,9 @@ dependencies = [
[[package]]
name = "wasm-bindgen-backend"
version = "0.2.82"
version = "0.2.83"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "662cd44805586bd52971b9586b1df85cdbbd9112e4ef4d8f41559c334dc6ac3f"
checksum = "4c8ffb332579b0557b52d268b91feab8df3615f265d5270fec2a8c95b17c1142"
dependencies = [
"bumpalo",
"log 0.4.17",
......@@ -3398,9 +3364,9 @@ dependencies = [
[[package]]
name = "wasm-bindgen-macro"
version = "0.2.82"
version = "0.2.83"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "b260f13d3012071dfb1512849c033b1925038373aea48ced3012c09df952c602"
checksum = "052be0f94026e6cbc75cdefc9bae13fd6052cdcaf532fa6c45e7ae33a1e6c810"
dependencies = [
"quote",
"wasm-bindgen-macro-support",
......@@ -3408,9 +3374,9 @@ dependencies = [
[[package]]
name = "wasm-bindgen-macro-support"
version = "0.2.82"
version = "0.2.83"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "5be8e654bdd9b79216c2929ab90721aa82faf65c48cdf08bdc4e7f51357b80da"
checksum = "07bc0c051dc5f23e307b13285f9d75df86bfdf816c5721e573dec1f9b8aa193c"
dependencies = [
"proc-macro2",
"quote",
......@@ -3421,9 +3387,9 @@ dependencies = [
[[package]]
name = "wasm-bindgen-shared"
version = "0.2.82"
version = "0.2.83"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "6598dd0bd3c7d51095ff6531a5b23e02acdc81804e30d8f07afb77b7215a140a"
checksum = "1c38c045535d93ec4f0b4defec448e4291638ee608530863b1e2ba115d4fff7f"
[[package]]
name = "wasm-sockets"
......@@ -3439,9 +3405,9 @@ dependencies = [
[[package]]
name = "web-sys"
version = "0.3.59"
version = "0.3.60"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "ed055ab27f941423197eb86b2035720b1a3ce40504df082cac2ecc6ed73335a1"
checksum = "bcda906d8be16e728fd5adc5b729afad4e444e106ab28cd1c7256e54fa61510f"
dependencies = [
"js-sys",
"wasm-bindgen",
......
......@@ -6,6 +6,15 @@ members = [
"game_core",
]
[workspace.dependencies]
anyhow = "1.0.65"
log = "0.4.17"
thiserror = "1.0.37"
serde = "1.0.145"
serde_json = "1.0.85"
[profile.release]
debug = 0
opt-level = 3
......@@ -6,19 +6,20 @@ edition = "2021"
# See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html
[dependencies]
fastrand = "1.7"
anyhow = "1"
log = "0.4"
thiserror = "1"
serde = "1"
serde_json = "1"
iyes_loopless = "0.7"
anyhow.workspace = true
log.workspace = true
thiserror.workspace = true
serde.workspace = true
serde_json.workspace = true
musicbox = { git = "https://lab.lcr.gr/microhacks/micro-bevy-musicbox.git", rev = "5ab4120a983e54ef0786ddca43b92a70605efd49"}
fastrand = "1.8.0"
iyes_loopless = "0.7.1"
micro_musicbox = { version = "0.4.0", features = ["serde", "mp3"] }
remote_events = { git = "https://lab.lcr.gr/microhacks/micro-bevy-remote-events.git", rev = "be0c6b43a73e4c5e7ece20797e3d6f59340147b4"}
[target.'cfg(target_arch = "wasm32")'.dependencies]
web-sys = { version = "0.3.58", features = ["Window"] }
web-sys = { version = "0.3.60", features = ["Window"] }
[dependencies.bevy]
version = "0.8"
......
......@@ -4,7 +4,7 @@ use bevy::asset::LoadState;
use bevy::ecs::system::SystemParam;
use bevy::prelude::*;
use bevy::reflect::TypeUuid;
use musicbox::prelude::AudioSource;
use micro_musicbox::prelude::AudioSource;
use crate::assets::{AssetHandles, FixedAssetNameMapping, SpriteSheetConfig};
......
use bevy::prelude::*;
use bevy::utils::HashMap;
use musicbox::prelude::AudioSource;
use musicbox::utilities::SuppliesAudio;
use micro_musicbox::prelude::AudioSource;
use micro_musicbox::utilities::{SuppliesAudio, TrackType};
#[derive(Copy, Clone, Debug)]
pub struct SpriteSheetConfig {
......@@ -69,6 +69,14 @@ impl AssetHandles {
}
impl SuppliesAudio for AssetHandles {
fn resolve_track_name<T: ToString>(&self, name: T) -> TrackType<String> {
if self.sounds.contains_key(&name.to_string()) {
TrackType::Single(name.to_string())
} else {
TrackType::Missing
}
}
fn get_audio_track<T: ToString>(&self, name: T) -> Option<Handle<AudioSource>> {
self.sounds.get(&name.to_string()).map(Handle::clone_weak)
}
......
......@@ -2,8 +2,9 @@ use bevy::prelude::*;
use game_core::system::flow::AppState;
use game_core::system::resources::DefaultResourcesPlugin;
use iyes_loopless::prelude::AppLooplessStateExt;
use musicbox::CombinedAudioPlugins;
use micro_musicbox::CombinedAudioPlugins;
use remote_events::RemoteEventPlugin;
use game_core::assets::AssetHandles;
fn main() {
App::new()
......@@ -11,7 +12,7 @@ fn main() {
.add_plugin(DefaultResourcesPlugin)
.add_plugins(DefaultPlugins)
.add_plugin(game_core::assets::AssetsPlugin)
.add_plugins(CombinedAudioPlugins)
.add_plugins(CombinedAudioPlugins::<AssetHandles>::new())
.add_plugin(game_core::splash_screen::SplashScreenPlugin)
.add_plugin(game_core::system::camera::CameraManagementPlugin)
.add_plugin(RemoteEventPlugin::<
......
......@@ -2,7 +2,7 @@ use bevy::prelude::*;
use bevy::render::render_resource::FilterMode;
use bevy::render::texture::ImageSampler;
use iyes_loopless::state::NextState;
use musicbox::prelude::MusicBox;
use micro_musicbox::prelude::MusicBox;
use crate::assets::AssetHandles;
use crate::splash_screen::components::{
......@@ -65,7 +65,7 @@ pub fn setup_splash_screen(
};
image_data.sampler_descriptor = ImageSampler::linear();
music_box.play_effect_once("splash_sting");
music_box.play_sfx("splash_sting");
commands
.spawn_bundle(SpriteBundle {
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment