• R/O
  • HTTP
  • SSH
  • HTTPS

コミット

タグ
未設定

よく使われているワード(クリックで追加)

javac++androidlinuxc#windowsobjective-ccocoa誰得qtpythonphprubygameguibathyscaphec計画中(planning stage)翻訳omegatframeworktwitterdomtestvb.netdirectxゲームエンジンbtronarduinopreviewer

Go で書き直した Ikemen


コミットメタ情報

リビジョン0eedec896d7f2966b8f6c3b816f8144a4b3c645c (tree)
日時2019-09-26 23:21:46
作者neatunsou <sisiy4excite@gmai...>
コミッターneatunsou

ログメッセージ

Windblade氏の更新に対応

変更サマリ

差分

--- a/script/main.lua
+++ b/script/main.lua
@@ -82,6 +82,12 @@ function main.f_animPosDraw(a, x, y)
8282 animDraw(a)
8383 end
8484
85+-- Check if files exists.
86+function main.file_exists(name)
87+ local f=io.open(name,"r")
88+ if f~=nil then io.close(f) return true else return false end
89+end
90+
8591 --textImgDraw at specified coordinates
8692 function main.f_textImgPosDraw(ti, x, y, align)
8793 align = align or 0
@@ -1227,7 +1233,7 @@ main.t_randomChars = {}
12271233 for i = 1, #main.t_selChars do
12281234 if main.t_selChars[i].stage ~= nil then
12291235 for j = 1, #main.t_selChars[i].stage do
1230- if main.t_stageDef[main.t_selChars[i].stage[j]] == nil then
1236+ if main.t_stageDef[main.t_selChars[i].stage[j]] == nil and main.file_exists(main.t_selChars[i].stage[j]) then
12311237 row = #main.t_selStages + 1
12321238 addStage(main.t_selChars[i].stage[j])
12331239 tmp = getStageName(row):match('^["%s]*(.-)["%s]*$') --needed for s-size ikemen
--- a/script/motif.lua
+++ b/script/motif.lua
@@ -1409,8 +1409,10 @@ for line in file:lines() do
14091409 if param ~= nil then
14101410 param = param:gsub('[%. ]', '_') --change param . and space to _
14111411 param = param:lower() --lowercase param
1412- if value == '' and (type(def_pos[param]) == 'number' or type(def_pos[param]) == 'table') then --text should remain empty
1413- value = '0'
1412+ if value ~= nil and def_pos ~= nil then -- Let's chech if it's even a valid param
1413+ if value == '' and (type(def_pos[param]) == 'number' or type(def_pos[param]) == 'table') then --text should remain empty
1414+ value = '0'
1415+ end
14141416 end
14151417 end
14161418 if param ~= nil and value ~= nil then --param = value pattern matched
--- a/script/select.lua
+++ b/script/select.lua
@@ -2464,7 +2464,8 @@ function select.f_selectVictory()
24642464 winnerNum,
24652465 motif.victory_screen.p1_offset[1],
24662466 motif.victory_screen.p1_offset[2],
2467- motif.victory_screen.p1_facing * motif.victory_screen.p1_scale[1],
2467+ motif.victory_screen.p1_facing,
2468+ motif.victory_screen.p1_scale[1],
24682469 motif.victory_screen.p1_scale[2]
24692470 )
24702471 else
@@ -2472,14 +2473,16 @@ function select.f_selectVictory()
24722473 p1Num,
24732474 motif.victory_screen.p1_offset[1],
24742475 motif.victory_screen.p1_offset[2],
2475- motif.victory_screen.p1_facing * motif.victory_screen.p1_scale[1],
2476+ motif.victory_screen.p1_facing,
2477+ motif.victory_screen.p1_scale[1],
24762478 motif.victory_screen.p1_scale[2]
24772479 )
24782480 drawVictoryPortrait(
24792481 p2Num,
24802482 motif.victory_screen.p2_offset[1],
24812483 motif.victory_screen.p2_offset[2],
2482- motif.victory_screen.p2_facing * motif.victory_screen.p2_scale[1],
2484+ motif.victory_screen.p2_facing,
2485+ motif.victory_screen.p2_scale[1],
24832486 motif.victory_screen.p2_scale[2]
24842487 )
24852488 end