• R/O
  • HTTP
  • SSH
  • HTTPS

Commit

Tags
No Tags

Frequently used words (click to add to your profile)

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

Go で書き直した Ikemen


Commit MetaInfo

Revisión0c973a890d814ea7da0059bfa45e744e0a1afc3f (tree)
Tiempo2019-01-18 23:45:32
Autorneatunsou <sisiy4excite@gmai...>
Commiterneatunsou

Log Message

Simulでパワーゲージを共有するとライフバーのレベル表示が動かないのを修正
Statetype=LでHitdefを受けた時ステート内で一度でもステコンでyvelかyposを変更されていると5020に移動する処理が無かったのを修正

Cambiar Resumen

Diferencia incremental

--- a/src/char.go
+++ b/src/char.go
@@ -1503,6 +1503,7 @@ type Char struct {
15031503 inguarddist bool
15041504 pushed bool
15051505 hitdefContact bool
1506+ movedY bool
15061507 atktmp int8
15071508 hittmp int8
15081509 acttmp int8
@@ -2080,6 +2081,9 @@ func (c *Char) setXV(xv float32) {
20802081 }
20812082 func (c *Char) setYV(yv float32) {
20822083 c.vel[1] = yv
2084+ if yv != 0 {
2085+ c.movedY = true
2086+ }
20832087 }
20842088 func (c *Char) changeAnim(animNo int32) {
20852089 if a := c.getAnim(animNo, false); a != nil {
@@ -2707,6 +2711,7 @@ func (c *Char) changeStateEx(no int32, pn int, anim, ctrl int32) {
27072711 if ctrl >= 0 {
27082712 c.setCtrl(ctrl != 0)
27092713 }
2714+ c.movedY = false
27102715 if c.stateChange1(no, pn) && sys.changeStateNest == 0 && c.minus == 0 {
27112716 for c.stchtmp && sys.changeStateNest < 2500 {
27122717 c.stateChange2()
@@ -3015,18 +3020,27 @@ func (c *Char) setX(x float32) {
30153020 func (c *Char) setY(y float32) {
30163021 c.oldPos[1], c.drawPos[1] = y, y
30173022 c.setPosY(y)
3023+ if y != 0 {
3024+ c.movedY = true
3025+ }
30183026 }
30193027 func (c *Char) addX(x float32) {
30203028 c.setX(c.pos[0] + c.facing*x)
30213029 }
30223030 func (c *Char) addY(y float32) {
30233031 c.setY(c.pos[1] + y)
3032+ if y != 0 {
3033+ c.movedY = true
3034+ }
30243035 }
30253036 func (c *Char) addXV(xv float32) {
30263037 c.vel[0] += xv
30273038 }
30283039 func (c *Char) addYV(yv float32) {
30293040 c.vel[1] += yv
3041+ if yv != 0 {
3042+ c.movedY = true
3043+ }
30303044 }
30313045 func (c *Char) mulXV(xv float32) {
30323046 c.vel[0] *= xv
@@ -4473,7 +4487,11 @@ func (c *Char) tick() {
44734487 if c.stchtmp {
44744488 c.ss.prevno = 0
44754489 } else if c.ss.stateType == ST_L {
4476- c.changeStateEx(5080, pn, -1, 0)
4490+ if c.movedY {
4491+ c.changeStateEx(5020, pn, -1, 0)
4492+ } else {
4493+ c.changeStateEx(5080, pn, -1, 0)
4494+ }
44774495 } else if c.ghv.guarded && (c.ghv.damage < c.life || sys.sf(GSF_noko)) {
44784496 switch c.ss.stateType {
44794497 case ST_S:
@@ -4879,7 +4897,11 @@ func (cl *CharList) clsn(getter *Char, proj bool) {
48794897 ghv.hittime = hd.down_hittime
48804898 ghv.ctrltime = hd.down_hittime
48814899 ghv.xvel = hd.down_velocity[0] * c.localscl / getter.localscl
4882- ghv.yvel = hd.down_velocity[1] * c.localscl / getter.localscl
4900+ if getter.movedY {
4901+ ghv.yvel = hd.air_velocity[1] * c.localscl / getter.localscl
4902+ } else {
4903+ ghv.yvel = hd.down_velocity[1] * c.localscl / getter.localscl
4904+ }
48834905 if !hd.down_bounce {
48844906 ghv.fall.xvelocity = float32(math.NaN())
48854907 ghv.fall.yvelocity = 0
--- a/src/lifebar.go
+++ b/src/lifebar.go
@@ -1189,12 +1189,8 @@ func (l *Lifebar) draw(layerno int16) {
11891189 l.pb[i].bgDraw(layerno)
11901190 }
11911191 for i := range l.pb {
1192- lvi := i
1193- if sys.tmode[i] == TM_Simul {
1194- lvi += 2
1195- }
11961192 l.pb[i].draw(layerno, float32(sys.chars[i][0].power)/
1197- float32(sys.chars[i][0].powerMax), sys.chars[lvi][0].power/1000,
1193+ float32(sys.chars[i][0].powerMax), sys.chars[i][0].power/1000,
11981194 l.fnt[:])
11991195 }
12001196 for ti, tm := range sys.tmode {