From 66c4285902860ada66afebacc8efdf98d827f890 Mon Sep 17 00:00:00 2001 From: Jeff Carr Date: Wed, 4 Dec 2024 00:36:06 -0600 Subject: update. still doesn't build with go-clone Signed-off-by: Jeff Carr --- main.go | 20 +++++++++----------- 1 file changed, 9 insertions(+), 11 deletions(-) (limited to 'main.go') diff --git a/main.go b/main.go index 8b67ba3..d92b0b4 100644 --- a/main.go +++ b/main.go @@ -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) -- cgit v1.2.3