• R/O
  • HTTP
  • SSH
  • HTTPS

提交

標籤
無標籤

Frequently used words (click to add to your profile)

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

Go で書き直した Ikemen


Commit MetaInfo

修訂deb8e826f6c400a0990adf8b60dbbc3d72f19b59 (tree)
時間2019-12-05 22:41:45
作者neatunsou <sisiy4excite@gmai...>
Commiterneatunsou

Log Message

fvar(38)が参照できないバグを修正
QuickLaunchでのキャラセレでスプライトの読み込みを毎フレーム試みようとする場合があったのを修正

Change Summary

差異

--- a/src/bytecode.go
+++ b/src/bytecode.go
@@ -367,6 +367,9 @@ const (
367367 OC_ex_groundangle
368368 OC_ex_stagefrontedge
369369 OC_ex_stagebackedge
370+ OC_ex_const240p
371+ OC_ex_const480p
372+ OC_ex_const720p
370373 OC_ex_gethitvar_animtype
371374 OC_ex_gethitvar_airtype
372375 OC_ex_gethitvar_groundtype
@@ -398,12 +401,7 @@ const (
398401 OC_ex_gethitvar_fall_envshake_freq
399402 OC_ex_gethitvar_fall_envshake_ampl
400403 OC_ex_gethitvar_fall_envshake_phase
401-)
402-const (
403- OC_ex_const240p OpCode = iota + 100
404- OC_ex_const480p
405- OC_ex_const720p
406- OC_ailevelf // float version of AILevel
404+ OC_ex_ailevelf // float version of AILevel
407405 )
408406 const (
409407 NumVar = OC_sysvar0 - OC_var0
@@ -979,8 +977,6 @@ func (be BytecodeExp) run(c *Char) BytecodeValue {
979977 sys.bcStack.Swap()
980978 case OC_ailevel:
981979 sys.bcStack.PushI(int32(c.aiLevel()))
982- case OC_ailevelf:
983- sys.bcStack.PushF(c.aiLevel())
984980 case OC_alive:
985981 sys.bcStack.PushB(c.alive())
986982 case OC_anim:
@@ -1590,6 +1586,8 @@ func (be BytecodeExp) run_ex(c *Char, i *int, oc *Char) {
15901586 *sys.bcStack.Top() = c.constp(640, sys.bcStack.Top().ToF())
15911587 case OC_ex_const720p:
15921588 *sys.bcStack.Top() = c.constp(960, sys.bcStack.Top().ToF())
1589+ case OC_ex_ailevelf:
1590+ sys.bcStack.PushF(c.aiLevel())
15931591 default:
15941592 sys.errLog.Printf("%v\n", be[*i-1])
15951593 c.panic()
--- a/src/compiler.go
+++ b/src/compiler.go
@@ -1151,7 +1151,7 @@ func (c *Compiler) expValue(out *BytecodeExp, in *string,
11511151 case "ailevel":
11521152 out.append(OC_ailevel)
11531153 case "ailevelf":
1154- out.append(OC_ailevelf)
1154+ out.append(OC_ex_, OC_ex_ailevelf)
11551155 case "alive":
11561156 out.append(OC_alive)
11571157 case "anim":
--- a/src/script.go
+++ b/src/script.go
@@ -698,6 +698,7 @@ func systemScriptInit(l *lua.LState) {
698698 var err error
699699 c.sportrait, err = loadFromSff(file, sys.sel.sportrait[0], sys.sel.sportrait[1])
700700 if err != nil {
701+ c.sportrait = newSprite()
701702 return nil
702703 }
703704 if len(c.pal) == 0 {
@@ -1112,6 +1113,9 @@ func systemScriptInit(l *lua.LState) {
11121113 LoadFile(&c.sprite, c.def, func(file string) error {
11131114 var err error
11141115 c.lportrait, err = loadFromSff(file, sys.sel.lportrait[0], sys.sel.lportrait[1])
1116+ if err != nil {
1117+ c.lportrait = newSprite()
1118+ }
11151119 c.vsportrait, err = loadFromSff(file, sys.sel.vsportrait[0], sys.sel.vsportrait[1])
11161120 if err != nil {
11171121 c.vsportrait = c.lportrait
@@ -1119,6 +1123,7 @@ func systemScriptInit(l *lua.LState) {
11191123 c.vportrait, err = loadFromSff(file, sys.sel.vportrait[0], sys.sel.vportrait[1])
11201124 if err != nil {
11211125 c.vportrait = c.lportrait
1126+ return nil
11221127 }
11231128 if len(c.pal) == 0 {
11241129 c.pal, _ = selectablePalettes(file)