doctorlectro/flags.go

31 lines
634 B
Go
Raw Normal View History

2022-06-17 21:17:03 +00:00
//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")
2022-06-29 03:07:49 +00:00
flag.StringVar(&world.Give, "give", "", "give abilities to player (jump/magnetize/fire/switch)")
2022-06-28 19:53:04 +00:00
flag.BoolVar(&world.StartMuted, "mute", false, "mute music")
2022-06-17 21:17:03 +00:00
flag.Parse()
if fullscreen {
ebiten.SetFullscreen(true)
}
2022-06-29 05:12:06 +00:00
if world.Debug > 0 {
world.ShownIntro = true
}
2022-06-17 21:17:03 +00:00
}