0.1.0-0-pre.5-fix.1

This commit is contained in:
2026-09-16 01:26:41 +02:00
parent 8451d09da0
commit 4a5471c5f4
11 changed files with 336 additions and 108 deletions

View File

@@ -1,18 +1,22 @@
# file: crates/apps/game-reflex-poc-desktop/Cargo.toml
# version: 2
# version: 4
[package]
name = "game-reflex-poc-desktop"
version.workspace = true
edition.workspace = true
license.workspace = true
repository.workspace = true
authors.workspace = true
publish.workspace = true
[dependencies]
engine-v1-common = { path = "../../engines/engine-v1-common" }
engine-v1-platform-api = { path = "../../engines/engine-v1-platform-api" }
engine-v1-sdl = { path = "../../engines/engine-v1-sdl" }
game-logging-lib = { path = "../../common/game-logging-lib" }
game-reflex-poc = { path = "../../games/game-reflex-poc" }
tracing.workspace = true
[lints.rust]
missing_docs = "warn"
unsafe_code = "forbid"
[lints]
workspace = true

View File

@@ -1,14 +1,30 @@
// file: crates/apps/game-reflex-poc-desktop/src/main.rs
// version: 3
// version: 4
use engine_v1_sdl::SdlRuntime;
use game_reflex_poc::ReflexGame;
#![warn(missing_docs)]
#![deny(unreachable_pub)]
#![forbid(unsafe_code)]
fn main() -> Result<(), String> {
let _guard = game_logging_lib::init_default_tracing("games::runner").map_err(|error| error.to_string())?;
tracing::info!(game = "reflex", "desktop SDL3 runner started");
//! SDL3 Desktop development runner for the Reflex POC game library.
let runtime = SdlRuntime::new("Reflex POC", 720, 1280, 16);
let mut game = ReflexGame::default();
return runtime.run(&mut game);
fn main() {
let _logging_guard = match game_logging_lib::init_console_tracing() {
std::result::Result::Ok(guard) => guard,
std::result::Result::Err(error) => {
eprintln!("failed to initialize tracing: {error}");
return;
},
};
tracing::info!(target: "games::runner", game = "reflex", "desktop SDL3 runner started");
let _monetization = engine_v1_platform_api::MonetizationCapabilities::disabled();
let runtime = engine_v1_sdl::SdlRuntime::new("Reflex POC", 720, 1280, std::time::Duration::from_millis(16));
let mut state = game_reflex_poc::ReflexState::new();
match runtime.run(&mut state) {
std::result::Result::Ok(()) => {},
std::result::Result::Err(error) => {
tracing::error!(target: "games::runner", game = "reflex", %error, "desktop SDL3 runner failed");
eprintln!("Reflex POC desktop runner failed: {error}");
},
}
return;
}

View File

@@ -1,18 +1,22 @@
# file: crates/apps/game-snake-poc-desktop/Cargo.toml
# version: 2
# version: 4
[package]
name = "game-snake-poc-desktop"
version.workspace = true
edition.workspace = true
license.workspace = true
repository.workspace = true
authors.workspace = true
publish.workspace = true
[dependencies]
engine-v1-common = { path = "../../engines/engine-v1-common" }
engine-v1-platform-api = { path = "../../engines/engine-v1-platform-api" }
engine-v1-sdl = { path = "../../engines/engine-v1-sdl" }
game-logging-lib = { path = "../../common/game-logging-lib" }
game-snake-poc = { path = "../../games/game-snake-poc" }
tracing.workspace = true
[lints.rust]
missing_docs = "warn"
unsafe_code = "forbid"
[lints]
workspace = true

View File

@@ -1,14 +1,30 @@
// file: crates/apps/game-snake-poc-desktop/src/main.rs
// version: 3
// version: 4
use engine_v1_sdl::SdlRuntime;
use game_snake_poc::SnakeGame;
#![warn(missing_docs)]
#![deny(unreachable_pub)]
#![forbid(unsafe_code)]
fn main() -> Result<(), String> {
let _guard = game_logging_lib::init_default_tracing("games::runner").map_err(|error| error.to_string())?;
tracing::info!(game = "snake", "desktop SDL3 runner started");
//! SDL3 Desktop development runner for the Snake POC game library.
let runtime = SdlRuntime::new("Snake POC", 720, 1280, 16);
let mut game = SnakeGame::default();
return runtime.run(&mut game);
fn main() {
let _logging_guard = match game_logging_lib::init_console_tracing() {
std::result::Result::Ok(guard) => guard,
std::result::Result::Err(error) => {
eprintln!("failed to initialize tracing: {error}");
return;
},
};
tracing::info!(target: "games::runner", game = "snake", "desktop SDL3 runner started");
let _monetization = engine_v1_platform_api::MonetizationCapabilities::disabled();
let runtime = engine_v1_sdl::SdlRuntime::new("Snake POC", 720, 1280, std::time::Duration::from_millis(16));
let mut state = game_snake_poc::SnakeState::new();
match runtime.run(&mut state) {
std::result::Result::Ok(()) => {},
std::result::Result::Err(error) => {
tracing::error!(target: "games::runner", game = "snake", %error, "desktop SDL3 runner failed");
eprintln!("Snake POC desktop runner failed: {error}");
},
}
return;
}