diff options
Diffstat (limited to 'game/src/main.rs')
| -rw-r--r-- | game/src/main.rs | 18 |
1 files changed, 17 insertions, 1 deletions
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(); |