Go で書き直した Ikemen
Révision | 878f5a36c2426c3f1f3847851a8ae712f9afe35c (tree) |
---|---|
l'heure | 2019-08-16 18:00:53 |
Auteur | neatunsou <sisiy4excite@gmai...> |
Commiter | neatunsou |
Windblade氏の更新に対応
@@ -35,6 +35,8 @@ func closeLog(f *os.File) { | ||
35 | 35 | f.Close() |
36 | 36 | } |
37 | 37 | func main() { |
38 | + os.Mkdir("save", os.ModeSticky|0755) | |
39 | + os.Mkdir("save/replays", os.ModeSticky|0755) | |
38 | 40 | if len(os.Args[1:]) > 0 { |
39 | 41 | sys.cmdFlags = make(map[string]string) |
40 | 42 | key := "" |
@@ -115,6 +117,7 @@ func main() { | ||
115 | 117 | "ZoomMax":1.1, |
116 | 118 | "ZoomSpeed":1, |
117 | 119 | "RoundTime":99, |
120 | + "SingleTeamMode":true, | |
118 | 121 | "NumTurns":4, |
119 | 122 | "NumSimul":4, |
120 | 123 | "NumTag":4, |
@@ -175,7 +178,7 @@ func main() { | ||
175 | 178 | QuickLaunch int |
176 | 179 | }{} |
177 | 180 | chk(json.Unmarshal(defcfg, &tmp)) |
178 | - const configFile = "data/config.json" | |
181 | + const configFile = "save/config.json" | |
179 | 182 | if bytes, err := ioutil.ReadFile(configFile); err != nil { |
180 | 183 | f, err := os.Create(configFile) |
181 | 184 | chk(err) |
@@ -473,7 +473,7 @@ func systemScriptInit(l *lua.LState) { | ||
473 | 473 | l.RaiseError("すでに通信中です。") |
474 | 474 | } |
475 | 475 | sys.chars = [len(sys.chars)][]*Char{} |
476 | - sys.netInput = NewNetInput("replay/netplay.replay") | |
476 | + sys.netInput = NewNetInput("save/replays/netplay.replay") | |
477 | 477 | if host := strArg(l, 1); host != "" { |
478 | 478 | sys.netInput.Connect(host, sys.listenPort) |
479 | 479 | } else { |
@@ -52,7 +52,7 @@ var sys = System{ | ||
52 | 52 | ignoreMostErrors: true, |
53 | 53 | superpmap: *newPalFX(), |
54 | 54 | wincnt: wincntMap(make(map[string][]int32)), |
55 | - wincntFileName: "autolevel.txt", | |
55 | + wincntFileName: "save/autolevel.save", | |
56 | 56 | powerShare: [...]bool{true, true}, |
57 | 57 | oldNextAddTime: 1, |
58 | 58 | commandLine: make(chan string), |
@@ -64,15 +64,15 @@ var sys = System{ | ||
64 | 64 | keyInput: glfw.KeyUnknown, |
65 | 65 | keyString: "", |
66 | 66 | // Localcoord sceenpack |
67 | - luaSpriteScale: 1, | |
68 | - luaSmallPortraitScale: 1, | |
69 | - luaBigPortraitScale: 1, | |
70 | - luaSpriteOffsetX: 0, | |
71 | - lifebarScale: 1, | |
72 | - lifebarOffsetX: 0, | |
67 | + luaSpriteScale: 1, | |
68 | + luaSmallPortraitScale: 1, | |
69 | + luaBigPortraitScale: 1, | |
70 | + luaSpriteOffsetX: 0, | |
71 | + lifebarScale: 1, | |
72 | + lifebarOffsetX: 0, | |
73 | 73 | //Shader vars |
74 | 74 | MultisampleAntialiasing: false, |
75 | - PostProcessingShader: 0, | |
75 | + PostProcessingShader: 0, | |
76 | 76 | } |
77 | 77 | |
78 | 78 | type TeamMode int32 |