diff --git a/TODO.md b/TODO.md index 9773dec..428c790 100644 --- a/TODO.md +++ b/TODO.md @@ -1,7 +1,6 @@ # Specific projects ## Currently working on: - - first: fix animation transition timings - first: fix particles & physics - clickable buttons - planet outfitter @@ -218,6 +217,7 @@ - Naming: atlas, sprite, image, frame, texture - Outfits may not change unless you've landed. They might not change ever for CC ships! - All angle adjustments happen in content & shaders + - Reserved texture: index zero ## Ideas diff --git a/crates/galactica/src/main.rs b/crates/galactica/src/main.rs index 0fbc79b..be7a39e 100644 --- a/crates/galactica/src/main.rs +++ b/crates/galactica/src/main.rs @@ -17,7 +17,20 @@ use winit::{ window::WindowBuilder, }; -fn main() -> Result<()> { +fn main() { + if let Err(err) = try_main() { + eprintln!("Galactica failed with an error"); + + let mut i = 0; + for e in err.chain().rev() { + eprintln!("{i:02}: {}", e); + i += 1; + } + std::process::exit(1); + } +} + +fn try_main() -> Result<()> { let cache_dir = Path::new(ASSET_CACHE); fs::create_dir_all(cache_dir)?; diff --git a/crates/render/src/shaderprocessor.rs b/crates/render/src/shaderprocessor.rs index 23b81f1..1e45286 100644 --- a/crates/render/src/shaderprocessor.rs +++ b/crates/render/src/shaderprocessor.rs @@ -1,5 +1,6 @@ use crate::globaluniform::GlobalUniform; +// TODO: build script? /// Basic wgsl preprocesser pub(crate) fn preprocess_shader( shader: &str, diff --git a/crates/render/src/vertexbuffer/types.rs b/crates/render/src/vertexbuffer/types.rs index 2584c11..6399522 100644 --- a/crates/render/src/vertexbuffer/types.rs +++ b/crates/render/src/vertexbuffer/types.rs @@ -152,6 +152,7 @@ pub struct UiInstance { /// What texture to use for this instance pub texture_index: [u32; 2], + /// Fade parameter between textures pub texture_fade: f32,