• 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

Revisiona17a9afea827b0b947846a0e8a3ccae8e73688b3 (tree)
Zeit2019-01-26 08:16:38
Autorsuehiro <supersuehiro@user...>
Commitersuehiro

Log Message

デバッグキーでポーズがかかるタイミングをMugenと同じに修正。その他バグ修正

Ändern Zusammenfassung

Diff

--- a/get.sh
+++ b/get.sh
@@ -8,3 +8,4 @@ go get -u github.com/timshannon/go-openal/openal
88 go get -u github.com/faiface/beep
99 go get -u github.com/hajimehoshi/oto
1010 go get -u github.com/hajimehoshi/go-mp3
11+go get -u github.com/pkg/errors
--- a/src/char.go
+++ b/src/char.go
@@ -2354,7 +2354,7 @@ func (c *Char) leftEdge() float32 {
23542354 return sys.cam.ScreenPos[0] / c.localscl
23552355 }
23562356 func (c *Char) lose() bool {
2357- return sys.winTeam == ^c.teamside
2357+ return sys.winTeam == 1^c.teamside
23582358 }
23592359 func (c *Char) loseKO() bool {
23602360 return c.lose() && sys.finish == FT_KO
@@ -4091,8 +4091,8 @@ func (c *Char) action() {
40914091 c.acttmp = -int8(Btoi(p)) * 2
40924092 c.unsetSCF(SCF_guard)
40934093 if !(c.scf(SCF_ko) || c.ctrlOver()) &&
4094- (c.scf(SCF_ctrl) || c.ss.no == 52 || c.inGuardState()) &&
4095- c.ss.moveType == MT_I && c.cmd != nil &&
4094+ ((c.scf(SCF_ctrl) || c.ss.no == 52) &&
4095+ c.ss.moveType == MT_I || c.inGuardState()) && c.cmd != nil &&
40964096 (sys.autoguard[c.playerNo] || c.cmd[0].Buffer.B > 0) &&
40974097 (c.ss.stateType == ST_S && !c.sf(CSF_nostandguard) ||
40984098 c.ss.stateType == ST_C && !c.sf(CSF_nocrouchguard) ||
@@ -5417,7 +5417,6 @@ func (cl *CharList) clsn(getter *Char, proj bool) {
54175417 cr += c.pos[0] * c.localscl
54185418 if gl < cr && cl < gr && (contact > 0 ||
54195419 getter.clsnCheck(c, false, false)) {
5420- drawposOvrd := true
54215420 getter.pushed, c.pushed = true, true
54225421 tmp := getter.distX(c, getter)
54235422 if tmp == 0 {
@@ -5436,7 +5435,6 @@ func (cl *CharList) clsn(getter *Char, proj bool) {
54365435 }
54375436 if getter.sf(CSF_screenbound) {
54385437 getter.pos[0] = MaxF(gxmin/getter.localscl, MinF(gxmax/getter.localscl, getter.pos[0]))
5439- drawposOvrd = false
54405438 }
54415439 if c.sf(CSF_screenbound) {
54425440 l, r := c.getEdge(c.edge[0], true), -c.getEdge(c.edge[1], true)
@@ -5449,9 +5447,7 @@ func (cl *CharList) clsn(getter *Char, proj bool) {
54495447 getter.pos[0]))
54505448 c.pos[0] = MaxF(sys.stage.leftbound/c.localscl, MinF(sys.stage.rightbound/c.localscl,
54515449 c.pos[0]))
5452- if drawposOvrd {
5453- getter.drawPos[0], c.drawPos[0] = getter.pos[0], c.pos[0]
5454- }
5450+ getter.drawPos[0], c.drawPos[0] = getter.pos[0], c.pos[0]
54555451 }
54565452 }
54575453 }
--- a/src/system.go
+++ b/src/system.go
@@ -642,10 +642,11 @@ func (s *System) nextRound() {
642642 }
643643 }
644644 func (s *System) tickFrame() bool {
645- return s.oldTickCount < s.tickCount
645+ return (!s.paused || s.step) && s.oldTickCount < s.tickCount
646646 }
647647 func (s *System) tickNextFrame() bool {
648- return int(s.tickCountF+s.nextAddTime) > s.tickCount
648+ return int(s.tickCountF+s.nextAddTime) > s.tickCount &&
649+ !s.paused || s.step || s.oldTickCount >= s.tickCount
649650 }
650651 func (s *System) tickInterpola() float32 {
651652 if s.tickNextFrame() {
@@ -654,6 +655,10 @@ func (s *System) tickInterpola() float32 {
654655 return s.tickCountF - s.lastTick + s.nextAddTime
655656 }
656657 func (s *System) addFrameTime(t float32) bool {
658+ if s.paused && !s.step && s.oldTickCount < s.tickCount {
659+ s.oldNextAddTime = 0
660+ return true
661+ }
657662 s.oldTickCount = s.tickCount
658663 if int(s.tickCountF) > s.tickCount {
659664 s.tickCount++
@@ -1085,11 +1090,8 @@ func (s *System) action(x, y *float32, scl float32) (leftest, rightest,
10851090 s.intro = 0
10861091 }
10871092 }
1088- if s.turbo == 0 || s.tickNextFrame() {
1093+ if s.tickNextFrame() {
10891094 spd := s.accel
1090- if s.paused && !s.step {
1091- spd = 0
1092- }
10931095 _else := s.sf(GSF_nokoslow) || s.time == 0
10941096 if !_else {
10951097 slowt := -(s.lifebar.ro.over_hittime + (s.lifebar.ro.slow_time+3)>>2)