citylimits/flags.go

34 lines
781 B
Go
Raw Permalink Normal View History

2022-01-09 17:10:40 +00:00
//go:build !js || !wasm
// +build !js !wasm
package main
import (
"flag"
"code.rocketnine.space/tslocum/citylimits/world"
"github.com/hajimehoshi/ebiten/v2"
)
func parseFlags() {
var (
fullscreen bool
noSplash bool
)
flag.BoolVar(&fullscreen, "fullscreen", false, "run in fullscreen mode")
flag.BoolVar(&world.World.NativeResolution, "native", false, "display at native resolution")
flag.BoolVar(&noSplash, "no-splash", false, "skip splash screen")
2022-01-11 23:02:02 +00:00
flag.BoolVar(&world.World.MuteMusic, "mute-music", false, "mute music")
2022-01-09 17:10:40 +00:00
flag.IntVar(&world.World.Debug, "debug", 0, "print debug information")
flag.Parse()
if fullscreen {
ebiten.SetFullscreen(true)
}
if noSplash || world.World.Debug > 0 {
world.StartGame()
//world.World.MessageVisible = false
}
}