diff options
Diffstat (limited to 'main.go')
| -rw-r--r-- | main.go | 20 |
1 files changed, 9 insertions, 11 deletions
@@ -10,17 +10,25 @@ package main import ( "embed" + "go.wit.com/dev/alexflint/arg" "go.wit.com/log" "go.wit.com/toolkits/tree" "github.com/faiface/pixel/pixelgl" - "github.com/gookit/config" + // "github.com/gookit/config" ) +// sent via -ldflags +var VERSION string +var BUILDTIME string + //go:embed *.glsl var glFile embed.FS +var pp *arg.Parser func init() { + pp = arg.MustParse(&argv) + log.Log(INFO, "Init()") me.myTree = tree.New() @@ -42,12 +50,6 @@ func init() { go simpleStdin() - config.Set("width", 640) - config.Set("height", 480) - config.Set("glDrift", 0.01) - // config.Set("filename", "planetfall.glsl") - config.Set("filename", "seascape.glsl") - // I think this doesn't work as a goroutine because // opengl closes. This plugin probably has to wait // until there is some sort of protobuf + socket interface @@ -60,10 +62,6 @@ func init() { // I assume it's for testing the code in a stand alone way func main() { - config.Set("width", 1024) - config.Set("height", 768) - config.Set("glDrift", 0.01) - config.Set("filename", "planetfall.glsl") // This parses the command line arguments // parseConfig() pixelgl.Run(run) |
