From b50a79e6f9cd09973a406e5ccc50510aee3423f2 Mon Sep 17 00:00:00 2001 From: Freya Murphy Date: Mon, 10 Nov 2025 13:31:04 -0500 Subject: graphics: have some window arguments passed in through cmd args, fix camera pos --- game/src/main.rs | 18 +++++++++++++++++- 1 file changed, 17 insertions(+), 1 deletion(-) (limited to 'game/src') diff --git a/game/src/main.rs b/game/src/main.rs index 5c9e8c7..d96273e 100644 --- a/game/src/main.rs +++ b/game/src/main.rs @@ -1,9 +1,25 @@ +use clap::Parser; use dungeon::*; use graphics::*; +#[derive(Parser)] +struct Args { + /// Enable vsync + #[arg(long)] + vsync: bool, + // Enable verbose logging + #[arg(short, long)] + verbose: bool, +} + fn main() -> Result<()> { + // Parse arguments + let args = Args::parse(); // Load the window - let mut window = Window::new_default()?; + let mut window = WindowBuilder::new() + .vsync(args.vsync) + .verbose(args.verbose) + .build()?; // Initial game state let mut dungeon = Dungeon::new(); -- cgit v1.2.3-freya