30 lines
634 B
Go
30 lines
634 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/switch)")
|
|
flag.BoolVar(&world.StartMuted, "mute", false, "mute music")
|
|
flag.Parse()
|
|
|
|
if fullscreen {
|
|
ebiten.SetFullscreen(true)
|
|
}
|
|
|
|
if world.Debug > 0 {
|
|
world.ShownIntro = true
|
|
}
|
|
}
|