Remove the -win-x and -win-y options for the ordoor binary

This commit is contained in:
2020-03-22 22:12:20 +00:00
parent cfa56a0e12
commit 0adbfaa573
6 changed files with 30 additions and 14 deletions

View File

@@ -17,6 +17,9 @@ import (
var (
gamePath = flag.String("game-path", "./orig", "Path to a WH40K: Chaos Gate installation")
gameMap = flag.String("map", "", "Name of a map, e.g., Chapter01")
winX = flag.Int("win-x", 1280, "Pre-scaled window X dimension")
winY = flag.Int("win-y", 1024, "Pre-scaled window Y dimension")
)
type env struct {
@@ -69,7 +72,7 @@ func main() {
lastState: state,
}
win, err := ui.NewWindow(env, "View Map "+*gameMap)
win, err := ui.NewWindow(env, "View Map "+*gameMap, *winX, *winY)
if err != nil {
log.Fatal("Couldn't create window: %v", err)
}

View File

@@ -12,6 +12,9 @@ import (
var (
gamePath = flag.String("game-path", "./orig", "Path to a WH40K: Chaos Gate installation")
menuName = flag.String("menu", "", "Name of a menu, e.g. Main")
winX = flag.Int("win-x", 1280, "Pre-scaled window X dimension")
winY = flag.Int("win-y", 1024, "Pre-scaled window Y dimension")
)
func main() {
@@ -37,7 +40,7 @@ func main() {
log.Fatalf("Couldn't initialize interface: %v", err)
}
win, err := ui.NewWindow(iface, "View Menu: "+*menuName)
win, err := ui.NewWindow(iface, "View Menu: "+*menuName, *winX, *winY)
if err != nil {
log.Fatal("Couldn't create window: %v", err)
}

View File

@@ -21,6 +21,9 @@ var (
gamePath = flag.String("game-path", "./orig", "Path to a WH40K: Chaos Gate installation")
mapFile = flag.String("map", "", "Prefix path to a .map file, e.g. ./orig/Maps/Chapter01.MAP")
txtFile = flag.String("txt", "", "Prefix path to a .txt file, e.g. ./orig/Maps/Chapter01.txt")
winX = flag.Int("win-x", 1280, "Pre-scaled window X dimension")
winY = flag.Int("win-y", 1024, "Pre-scaled window Y dimension")
)
type env struct {
@@ -71,7 +74,7 @@ func main() {
}
env := &env{gameMap: gameMap, set: mapSet, state: state, lastState: state}
win, err := ui.NewWindow(env, "View Map "+*mapFile)
win, err := ui.NewWindow(env, "View Map "+*mapFile, *winX, *winY)
if err != nil {
log.Fatal("Couldn't create window: %v", err)
}

View File

@@ -17,6 +17,9 @@ var (
gamePath = flag.String("game-path", "./orig", "Path to a WH40K: Chaos Gate installation")
objFile = flag.String("obj-file", "", "Path of an .obj file, e.g. ./orig/Obj/TZEENTCH.OBJ")
objName = flag.String("obj-name", "", "Name of an .obj file, e.g. TZEENTCH")
winX = flag.Int("win-x", 1280, "Pre-scaled window X dimension")
winY = flag.Int("win-y", 1024, "Pre-scaled window Y dimension")
)
type env struct {
@@ -68,7 +71,7 @@ func main() {
lastState: state,
}
win, err := ui.NewWindow(env, "View Object: "+*objName)
win, err := ui.NewWindow(env, "View Object: "+*objName, *winX, *winY)
if err != nil {
log.Fatal(err)
}

View File

@@ -16,6 +16,9 @@ import (
var (
gamePath = flag.String("game-path", "./orig", "Path to a WH40K: Chaos Gate installation")
setName = flag.String("set", "", "Name of a set, e.g., map01")
winX = flag.Int("win-x", 1280, "Pre-scaled window X dimension")
winY = flag.Int("win-y", 1024, "Pre-scaled window Y dimension")
)
type env struct {
@@ -58,7 +61,7 @@ func main() {
lastState: state,
}
win, err := ui.NewWindow(env, "View Set: "+*setName)
win, err := ui.NewWindow(env, "View Set: "+*setName, *winX, *winY)
if err != nil {
log.Fatal("Couldn't create window: %v", err)
}