From f96754018d307945dd164d26dbf0f34ec9ba5660 Mon Sep 17 00:00:00 2001 From: Louis Capitanchik <contact@louiscap.co> Date: Sat, 20 Aug 2022 18:37:17 +0100 Subject: [PATCH] Set resolution for cabinet --- assets/jamsplash.png | 3 +++ assets/splash.png | 3 --- game_core/Cargo.toml | 4 ++++ game_core/src/assets/startup.rs | 2 +- game_core/src/system/load_config.rs | 12 ++++++------ 5 files changed, 14 insertions(+), 10 deletions(-) create mode 100644 assets/jamsplash.png delete mode 100644 assets/splash.png diff --git a/assets/jamsplash.png b/assets/jamsplash.png new file mode 100644 index 0000000..8a600a3 --- /dev/null +++ b/assets/jamsplash.png @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:9d9461d43ff1217e0911bb400582db3e300ff0c0365572da4192728d44d251db +size 112087 diff --git a/assets/splash.png b/assets/splash.png deleted file mode 100644 index 2eb93fa..0000000 --- a/assets/splash.png +++ /dev/null @@ -1,3 +0,0 @@ -version https://git-lfs.github.com/spec/v1 -oid sha256:c716cb36410f2e725e4bb7abf84cc5d472864d1a618f22289db0365a94e25809 -size 121272 diff --git a/game_core/Cargo.toml b/game_core/Cargo.toml index 36b103b..d9ff3cc 100644 --- a/game_core/Cargo.toml +++ b/game_core/Cargo.toml @@ -5,6 +5,10 @@ edition = "2021" # See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html +[features] +default = [] +no-aspect = [] + [dependencies] fastrand = "1.7" anyhow = "1" diff --git a/game_core/src/assets/startup.rs b/game_core/src/assets/startup.rs index cb6d71e..7013a56 100644 --- a/game_core/src/assets/startup.rs +++ b/game_core/src/assets/startup.rs @@ -12,7 +12,7 @@ pub fn start_preload_resources(mut commands: Commands) { } pub fn start_load_resources(mut loader: AssetTypeLoader) { - loader.load_images(&[("splash.png", "splash")]); + loader.load_images(&[("jamsplash.png", "splash")]); loader.load_audio(&[("splash_sting.mp3", "splash_sting")]); } diff --git a/game_core/src/system/load_config.rs b/game_core/src/system/load_config.rs index 4eba511..345f147 100644 --- a/game_core/src/system/load_config.rs +++ b/game_core/src/system/load_config.rs @@ -10,7 +10,7 @@ mod setup { } pub fn initial_size() -> (f32, f32) { - (1280.0, 720.0) + (1024.0, 768.0) } } @@ -22,8 +22,8 @@ mod setup { #[cfg(feature = "no_aspect")] pub fn initial_size() -> (f32, f32) { - static default_width: f32 = 1280.0; - static default_height: f32 = 720.0; + static default_width: f32 = 1024.0; + static default_height: f32 = 768.0; web_sys::window() .and_then(|window: web_sys::Window| { @@ -45,9 +45,9 @@ mod setup { #[cfg(not(feature = "no_aspect"))] pub fn initial_size() -> (f32, f32) { - static default_width: f32 = 1280.0; - static default_height: f32 = 720.0; - static ratio: f32 = 1280.0 / 720.0; + static default_width: f32 = 1024.0; + static default_height: f32 = 768.0; + static ratio: f32 = 1024.0 / 768.0; web_sys::window() .and_then(|window: web_sys::Window| { -- GitLab