• R/O
  • HTTP
  • SSH
  • HTTPS

Commit

Tags

Frequently used words (click to add to your profile)

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

Go で書き直した Ikemen


Commit MetaInfo

Revisioned23f5a21efdf715c8ceb7bf1f764cee0505b05a (tree)
Time2017-05-02 18:43:41
AuthorSUEHIRO <supersuehiro@user...>
CommiterSUEHIRO

Log Message

AngleDraw の scale の処理を修正

Change Summary

Incremental Difference

--- a/src/bytecode.go
+++ b/src/bytecode.go
@@ -4141,8 +4141,10 @@ func (sc angleDraw) Run(c *Char, _ []int32) bool {
41414141 case angleDraw_value:
41424142 c.angleSet(exp[0].evalF(c))
41434143 case angleDraw_scale:
4144- c.angleScalse[0] = exp[0].evalF(c)
4145- c.angleScalse[1] = exp[1].evalF(c)
4144+ c.angleScalse[0] *= exp[0].evalF(c)
4145+ if len(exp) > 1 {
4146+ c.angleScalse[1] *= exp[1].evalF(c)
4147+ }
41464148 }
41474149 return true
41484150 })
--- a/src/compiler.go
+++ b/src/compiler.go
@@ -5353,17 +5353,8 @@ func (c *Compiler) angleDraw(is IniSection, sc *StateControllerBase,
53535353 angleDraw_value, VT_Float, 1, false); err != nil {
53545354 return err
53555355 }
5356- if err := c.stateParam(is, "scale", func(data string) error {
5357- bes, err := c.exprs(data, VT_Float, 2)
5358- if err != nil {
5359- return err
5360- }
5361- if len(bes) < 2 {
5362- return Error("scaleの要素が足りません")
5363- }
5364- sc.add(angleDraw_scale, bes)
5365- return nil
5366- }); err != nil {
5356+ if err := c.paramValue(is, sc, "scale",
5357+ angleDraw_scale, VT_Float, 2, false); err != nil {
53675358 return err
53685359 }
53695360 return nil