summaryrefslogtreecommitdiff
path: root/game/src
diff options
context:
space:
mode:
Diffstat (limited to 'game/src')
-rw-r--r--game/src/main.rs15
1 files changed, 8 insertions, 7 deletions
diff --git a/game/src/main.rs b/game/src/main.rs
index 53d17b7..6905fe3 100644
--- a/game/src/main.rs
+++ b/game/src/main.rs
@@ -1,4 +1,4 @@
-use clap::Parser;
+use argh::FromArgs;
use dungeon::*;
use graphics::*;
@@ -76,19 +76,20 @@ impl Game {
}
}
-#[derive(Parser)]
+/// Play a dungeon crawl game
+#[derive(FromArgs)]
struct Args {
- /// Enable vsync
- #[arg(long)]
+ /// enable vsync
+ #[argh(switch)]
vsync: bool,
- // Enable verbose logging
- #[arg(short, long)]
+ /// enable verbose logging
+ #[argh(switch, short = 'v')]
verbose: bool,
}
fn main() -> Result<()> {
// Parse arguments
- let args = Args::parse();
+ let args: Args = argh::from_env();
// Load the window
let window = WindowBuilder::new()
.vsync(args.vsync)