doctorlectro/flags.go

32 lines
606 B
Go

//go:build !js || !wasm
// +build !js !wasm
package main
import (
"flag"
"code.rocketnine.space/tslocum/doctorlectro/world"
"github.com/hajimehoshi/ebiten/v2"
)
func parseFlags() {
var (
fullscreen bool
skipIntro bool
)
flag.BoolVar(&fullscreen, "fullscreen", false, "run in fullscreen mode")
flag.BoolVar(&skipIntro, "skip", false, "skip intro screens")
flag.BoolVar(&world.GodMode, "god", false, "enable god mode")
flag.IntVar(&world.Debug, "debug", 0, "print debug information")
flag.Parse()
if fullscreen {
ebiten.SetFullscreen(true)
}
if skipIntro {
world.StartGame()
}
}