doctorlectro/flags.go

27 lines
586 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
)
flag.BoolVar(&fullscreen, "fullscreen", false, "run in fullscreen mode")
flag.IntVar(&world.Debug, "debug", 0, "print debug information")
flag.StringVar(&world.Give, "give", "", "give abilities to player (jump/magnetize/fire/doublejump)")
flag.BoolVar(&world.StartMuted, "mute", false, "mute music")
flag.Parse()
if fullscreen {
ebiten.SetFullscreen(true)
}
}