• 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

Révision604b73cbcf832bea49354e549884660530f7047e (tree)
l'heure2018-11-14 18:20:52
Auteurneatunsou <sisiy4excite@gmai...>
Commiterneatunsou

Message de Log

explodのspaceに対応
airのangleがfacingを参照していなかったのを修正
airのtimeが0だとスプライトを読み込まないようにした
ポーズ時にズームアウトが止まらないようにした
explodのScreen系のpostypeの挙動をMUGEN1.1基準に修正
screenposを修正
angleの処理をglrotateに変更

Change Summary

Modification

--- a/src/anim.go
+++ b/src/anim.go
@@ -463,7 +463,7 @@ func (a *Animation) UpdateSprite() {
463463 a.time, a.newframe, a.current = 0, true, 0
464464 }
465465 }
466- if a.newframe && a.sff != nil {
466+ if a.newframe && a.sff != nil && a.frames[a.current].Time != 0 {
467467 a.spr = a.sff.GetSprite(a.curFrame().Group, a.curFrame().Number)
468468 }
469469 a.newframe, a.drawidx = false, a.current
@@ -634,20 +634,20 @@ func (a *Animation) pal(pfx *PalFX, neg bool) (p []uint32) {
634634 }
635635 return pfx.getFxPal(p, neg)
636636 }
637-func (a *Animation) drawSub1(angle float32) (h, v, agl float32) {
637+func (a *Animation) drawSub1(angle, facing float32) (h, v, agl float32) {
638638 h, v = float32(a.frames[a.drawidx].H), float32(a.frames[a.drawidx].V)
639639 agl = float32(float64(angle) * math.Pi / 180)
640640 h *= a.scale_x
641641 v *= a.scale_y
642- agl += a.angle
642+ agl += a.angle * facing
643643 return
644644 }
645645 func (a *Animation) Draw(window *[4]int32, x, y, xcs, ycs, xs, xbs, ys,
646- rxadd, angle, rcx float32, pfx *PalFX, old bool) {
646+ rxadd, angle, rcx float32, pfx *PalFX, old bool, facing float32) {
647647 if a.spr == nil || a.spr.Tex == nil {
648648 return
649649 }
650- h, v, angle := a.drawSub1(angle)
650+ h, v, angle := a.drawSub1(angle, facing)
651651 xs *= xcs * h
652652 ys *= ycs * v
653653 x = xcs*x + xs*(float32(a.frames[a.drawidx].X)+a.interpolate_offset_x)*(1/a.scale_x)
@@ -698,11 +698,12 @@ func (a *Animation) Draw(window *[4]int32, x, y, xcs, ycs, xs, xbs, ys,
698698 trans, window, rcx, rcy, pfx)
699699 }
700700 func (a *Animation) ShadowDraw(x, y, xscl, yscl, vscl, angle float32,
701- pfx *PalFX, old bool, color uint32, alpha int32) {
701+ pfx *PalFX, old bool, color uint32, alpha int32, facing float32) {
702702 if a.spr == nil || a.spr.Tex == nil {
703703 return
704704 }
705- h, v, angle := a.drawSub1(angle)
705+ h, v, angle := a.drawSub1(angle, facing)
706+ angle = -angle
706707 x += xscl * h * (float32(a.frames[a.drawidx].X) + a.interpolate_offset_x)
707708 y += yscl * vscl * v * (float32(a.frames[a.drawidx].Y) + a.interpolate_offset_y)
708709 var draw func(int32)
@@ -795,6 +796,7 @@ type SprData struct {
795796 screen bool
796797 bright bool
797798 oldVer bool
799+ facing float32
798800 }
799801 type DrawList []*SprData
800802
@@ -849,7 +851,7 @@ func (dl DrawList) draw(x, y, scl float32) {
849851 (y - s.pos[1])}
850852 }
851853 s.anim.Draw(&sys.scrrect, p[0], p[1], cs, cs, s.scl[0], s.scl[0],
852- s.scl[1], 0, s.angle, float32(sys.gameWidth)/2, s.fx, s.oldVer)
854+ s.scl[1], 0, s.angle, float32(sys.gameWidth)/2, s.fx, s.oldVer, s.facing)
853855 sys.brightness = ob
854856 }
855857 }
@@ -910,8 +912,8 @@ func (sl ShadowList) draw(x, y, scl float32) {
910912 s.anim.ShadowDraw(sys.cam.Offset[0]-(x-s.pos[0])*scl,
911913 sys.cam.GroundLevel()+sys.cam.Offset[1]-sys.envShake.getOffset()-
912914 (y+s.pos[1]*sys.stage.sdw.yscale-s.offsetY)*scl,
913- scl*s.scl[0], scl*-s.scl[1], sys.stage.sdw.yscale, -s.angle,
914- &sys.bgPalFX, s.oldVer, uint32(color), intensity)
915+ scl*s.scl[0], scl*-s.scl[1], sys.stage.sdw.yscale, s.angle,
916+ &sys.bgPalFX, s.oldVer, uint32(color), intensity, s.facing)
915917 }
916918 }
917919 func (sl ShadowList) drawReflection(x, y, scl float32) {
@@ -937,7 +939,7 @@ func (sl ShadowList) drawReflection(x, y, scl float32) {
937939 s.anim.Draw(&sys.scrrect, sys.cam.Offset[0]/scl-(x-s.pos[0]),
938940 (sys.cam.GroundLevel()+sys.cam.Offset[1]-sys.envShake.getOffset())/scl-
939941 (y+s.pos[1]-s.offsetY), scl, scl, s.scl[0], s.scl[0], -s.scl[1], 0,
940- -s.angle, float32(sys.gameWidth)/2, s.fx, s.oldVer)
942+ -s.angle, float32(sys.gameWidth)/2, s.fx, s.oldVer, s.facing)
941943 }
942944 }
943945
@@ -988,6 +990,6 @@ func (a *Anim) Draw() {
988990 if !sys.frameSkip {
989991 a.anim.Draw(&a.window, a.x+float32(sys.gameWidth-320)/2,
990992 a.y+float32(sys.gameHeight-240), 1, 1, a.xscl, a.xscl, a.yscl,
991- 0, 0, 0, nil, false)
993+ 0, 0, 0, nil, false, 1)
992994 }
993995 }
--- a/src/bytecode.go
+++ b/src/bytecode.go
@@ -1105,9 +1105,9 @@ func (be BytecodeExp) run(c *Char) BytecodeValue {
11051105 case OC_screenheight:
11061106 sys.bcStack.PushF(sys.screenHeight() / oc.localscl)
11071107 case OC_screenpos_x:
1108- sys.bcStack.PushF(c.screenPosX())
1108+ sys.bcStack.PushF((c.screenPosX()) / oc.localscl)
11091109 case OC_screenpos_y:
1110- sys.bcStack.PushF(c.screenPosY())
1110+ sys.bcStack.PushF((c.screenPosY()) / oc.localscl)
11111111 case OC_screenwidth:
11121112 sys.bcStack.PushF(sys.screenWidth() / oc.localscl)
11131113 case OC_selfanimexist:
@@ -2245,6 +2245,7 @@ const (
22452245 explod_xangle
22462246 explod_ignorehitpause
22472247 explod_bindid
2248+ explod_space
22482249 )
22492250
22502251 func (sc explod) Run(c *Char, _ []int32) bool {
@@ -2294,6 +2295,8 @@ func (sc explod) Run(c *Char, _ []int32) bool {
22942295 }
22952296 case explod_postype:
22962297 e.postype = PosType(exp[0].evalI(c))
2298+ case explod_space:
2299+ e.space = Space(exp[0].evalI(c))
22972300 case explod_velocity:
22982301 e.velocity[0] = exp[0].evalF(c)
22992302 if len(exp) > 1 {
--- a/src/camera.go
+++ b/src/camera.go
@@ -171,9 +171,10 @@ func (c *Camera) action(x, y *float32, leftest, rightest, lowest, highest,
171171 sclMul = MinF(4.0/3, Pow((Pow(2, c.ZoomSpeed)+3)/Pow(2, c.ZoomSpeed)-
172172 sclMul, 64))
173173 }
174- if pause {
175- sclMul = 1
176- } else if sclMul > 1 {
174+ //if pause {
175+ // sclMul = 1
176+ //} else if sclMul > 1 {
177+ if sclMul > 1 {
177178 sclMul = (sclMul-1)*Pow(c.zoomdelay, 8) + 1
178179 if tmp*sclMul > sys.xmax-sys.xmin {
179180 sclMul = (sys.xmax - sys.xmin) / tmp
--- a/src/char.go
+++ b/src/char.go
@@ -80,6 +80,14 @@ const (
8080 PT_N
8181 )
8282
83+type Space int32
84+
85+const (
86+ Space_none Space = iota
87+ Space_stage
88+ Space_screen
89+)
90+
8391 type ClsnRect [][4]float32
8492
8593 func (cr *ClsnRect) Add(clsn []float32, x, y, xs, ys float32) {
@@ -775,7 +783,7 @@ func (ai *AfterImage) recAndCue(sd *SprData, rec bool) {
775783 img := &ai.imgs[(ai.imgidx-i)&63]
776784 sys.sprites.add(&SprData{&img.anim, &ai.palfx[i/ai.framegap-1], img.pos,
777785 img.scl, ai.alpha, sd.priority - 2, img.angle, img.ascl,
778- false, sd.bright, sd.oldVer}, 0, 0, 0, 0)
786+ false, sd.bright, sd.oldVer, sd.facing}, 0, 0, 0, 0)
779787 }
780788 if rec {
781789 ai.recAfterImg(sd)
@@ -793,6 +801,7 @@ type Explod struct {
793801 accel [2]float32
794802 sprpriority int32
795803 postype PosType
804+ space Space
796805 offset [2]float32
797806 relativef int32
798807 pos [2]float32
@@ -817,7 +826,7 @@ type Explod struct {
817826
818827 func (e *Explod) clear() {
819828 *e = Explod{id: IErr, scale: [...]float32{1, 1}, removetime: -2,
820- postype: PT_P1, relativef: 1, facing: 1, vfacing: 1, localscl: 1,
829+ postype: PT_P1, relativef: 1, facing: 1, vfacing: 1, localscl: 1, space: Space_none,
821830 alpha: [...]int32{-1, 0}, playerId: -1, bindId: -1, ignorehitpause: true}
822831 }
823832 func (e *Explod) setX(x float32) {
@@ -839,47 +848,69 @@ func (e *Explod) setPos(c *Char) {
839848 lPos := func() {
840849 e.setX(sys.cam.ScreenPos[0]/e.localscl + e.offset[0]/sys.cam.Scale)
841850 e.setY(sys.cam.ScreenPos[1]/e.localscl + e.offset[1]/sys.cam.Scale)
851+ if e.bindtime == 0 {
852+ e.bindtime = 1
853+ }
842854 }
843855 rPos := func() {
844856 e.setX(sys.cam.ScreenPos[0]/e.localscl +
845857 (float32(sys.gameWidth)/e.localscl + e.offset[0]/sys.cam.Scale))
846858 e.setY(sys.cam.ScreenPos[1]/e.localscl + e.offset[1]/sys.cam.Scale)
847- }
848- switch e.postype {
849- case PT_P1:
850- pPos(c)
851- case PT_P2:
852- if p2 := sys.charList.enemyNear(c, 0, true); p2 != nil {
853- pPos(p2)
859+ if e.bindtime == 0 {
860+ e.bindtime = 1
854861 }
855- case PT_F, PT_B:
856- e.facing = c.facing * float32(e.relativef)
857- // front と back はバインドの都合で left か right になおす
858- if c.facing > 0 && e.postype == PT_F || c.facing < 0 && e.postype == PT_B {
859- if e.postype == PT_B {
860- e.offset[0] *= -1
862+ }
863+ if e.space >= Space_stage {
864+ e.postype = PT_N
865+ }
866+ if e.space <= Space_none {
867+ switch e.postype {
868+ case PT_P1:
869+ pPos(c)
870+ case PT_P2:
871+ if p2 := sys.charList.enemyNear(c, 0, true); p2 != nil {
872+ pPos(p2)
861873 }
862- e.postype = PT_R
863- rPos()
864- } else {
865- // explod の postype = front はキャラの向きで pos が反転しない
866- if e.postype == PT_F && c.gi().ver[0] != 1 {
874+ case PT_F, PT_B:
875+ e.facing = c.facing * float32(e.relativef)
876+ // front と back はバインドの都合で left か right になおす
877+ if c.facing > 0 && e.postype == PT_F || c.facing < 0 && e.postype == PT_B {
878+ if e.postype == PT_B {
879+ e.offset[0] *= -1
880+ }
881+ e.postype = PT_R
882+ rPos()
883+ } else {
884+ // explod の postype = front はキャラの向きで pos が反転しない
885+ //if e.postype == PT_F && c.gi().ver[0] != 1 {
867886 // 旧バージョンだと front は キャラの向きが facing に反映されない
887+ // 1.1でも反映されてない模様
868888 e.facing = float32(e.relativef)
889+ //}
890+ e.postype = PT_L
891+ lPos()
869892 }
870- e.postype = PT_L
893+ case PT_L:
894+ e.facing = float32(e.relativef)
871895 lPos()
896+ case PT_R:
897+ e.facing = float32(e.relativef)
898+ rPos()
899+ case PT_N:
900+ e.facing = float32(e.relativef)
901+ e.setX(e.offset[0])
902+ e.setY(e.offset[1])
903+ }
904+ } else {
905+ switch e.space {
906+ case Space_screen:
907+ e.facing = float32(e.relativef)
908+ lPos()
909+ case Space_stage:
910+ e.facing = float32(e.relativef)
911+ e.setX(e.offset[0])
912+ e.setY(e.offset[1])
872913 }
873- case PT_L:
874- e.facing = float32(e.relativef)
875- lPos()
876- case PT_R:
877- e.facing = float32(e.relativef)
878- rPos()
879- case PT_N:
880- e.facing = float32(e.relativef)
881- e.setX(e.offset[0])
882- e.setY(e.offset[1])
883914 }
884915 }
885916 func (e *Explod) matchId(eid, pid int32) bool {
@@ -916,14 +947,21 @@ func (e *Explod) update(oldVer bool, playerNo int) {
916947 }
917948 }
918949 screen := false
950+ if e.space == Space_screen || e.postype >= PT_L && e.postype != PT_N {
951+ screen = true
952+ }
919953 if e.bindtime != 0 {
920- if e.postype == PT_N && e.bindId < 0 {
954+ if e.space == Space_screen {
955+ e.pos[0] = e.offset[0]
956+ e.pos[1] = e.offset[1]
957+ e.pos[0] -= float32(sys.gameWidth) / e.localscl / 2
958+ } else if e.postype == PT_N && e.bindId < 0 {
921959 e.pos[0] = e.offset[0]
922960 e.pos[1] = e.offset[1]
961+ e.bindtime = 0
923962 } else if e.postype >= PT_L && e.postype != PT_N {
924963 e.pos[0] = e.offset[0]
925964 e.pos[1] = e.offset[1]
926- screen = true
927965 if e.postype == PT_L {
928966 e.pos[0] -= float32(sys.gameWidth) / e.localscl / 2
929967 } else {
@@ -973,24 +1011,30 @@ func (e *Explod) update(oldVer bool, playerNo int) {
9731011 var epos = [2]float32{e.pos[0] * e.localscl, e.pos[1] * e.localscl}
9741012 sprs.add(&SprData{e.anim, pfx, epos, [...]float32{e.facing * e.scale[0] * e.localscl,
9751013 e.vfacing * e.scale[1] * e.localscl}, alp, e.sprpriority, agl, [...]float32{1, 1},
976- screen, playerNo == sys.superplayer, oldVer},
1014+ screen, playerNo == sys.superplayer, oldVer, e.facing},
9771015 e.shadow[0]<<16|e.shadow[1]&0xff<<8|e.shadow[0]&0xff, sdwalp, 0, 0)
9781016 if sys.tickNextFrame() {
9791017 if e.bindtime > 0 {
9801018 e.bindtime--
981- if screen && e.bindtime == 0 {
982- switch e.postype {
983- case PT_L:
984- for i := range e.pos {
985- e.pos[i] = sys.cam.ScreenPos[i] + e.offset[i]/sys.cam.Scale
986- }
987- case PT_R:
988- e.pos[0] = sys.cam.ScreenPos[0] +
989- (float32(sys.gameWidth)+e.offset[0])/sys.cam.Scale
990- e.pos[1] = sys.cam.ScreenPos[1] + e.offset[1]/sys.cam.Scale
991- }
992- }
9931019 }
1020+ //if screen && e.bindtime == 0 {
1021+ // if e.space <= Space_none {
1022+ // switch e.postype {
1023+ // case PT_L:
1024+ // for i := range e.pos {
1025+ // e.pos[i] = sys.cam.ScreenPos[i] + e.offset[i]/sys.cam.Scale
1026+ // }
1027+ // case PT_R:
1028+ // e.pos[0] = sys.cam.ScreenPos[0] +
1029+ // (float32(sys.gameWidth)+e.offset[0])/sys.cam.Scale
1030+ // e.pos[1] = sys.cam.ScreenPos[1] + e.offset[1]/sys.cam.Scale
1031+ // }
1032+ // } else if e.space == Space_screen {
1033+ // for i := range e.pos {
1034+ // e.pos[i] = sys.cam.ScreenPos[i] + e.offset[i]/sys.cam.Scale
1035+ // }
1036+ // }
1037+ //}
9941038 if act {
9951039 if e.bindtime == 0 {
9961040 e.oldPos = e.pos
@@ -1261,7 +1305,7 @@ func (p *Projectile) cueDraw(oldVer bool, playerNo int) {
12611305 sd := &SprData{p.ani, p.palfx, [...]float32{p.pos[0] * p.localscl, p.pos[1] * p.localscl},
12621306 [...]float32{p.facing * p.scale[0] * p.localscl, p.scale[1] * p.localscl}, [2]int32{-1},
12631307 p.sprpriority, 0, [...]float32{1, 1}, false, playerNo == sys.superplayer,
1264- sys.cgi[playerNo].ver[0] != 1}
1308+ sys.cgi[playerNo].ver[0] != 1, p.facing}
12651309 p.aimg.recAndCue(sd, sys.tickNextFrame() && notpause)
12661310 sys.sprites.add(sd,
12671311 p.shadow[0]<<16|p.shadow[1]&255<<8|p.shadow[2]&255, 256, 0, 0)
@@ -2443,10 +2487,10 @@ func (c *Char) roundState() int32 {
24432487 }
24442488 }
24452489 func (c *Char) screenPosX() float32 {
2446- return (c.pos[0] - sys.cam.ScreenPos[0]/c.localscl) * sys.cam.Scale
2490+ return (c.pos[0]*c.localscl - sys.cam.ScreenPos[0]) // * sys.cam.Scale
24472491 }
24482492 func (c *Char) screenPosY() float32 {
2449- return (c.pos[1] - sys.cam.ScreenPos[1]/c.localscl) * sys.cam.Scale
2493+ return (c.pos[1]*c.localscl - sys.cam.ScreenPos[1]) // * sys.cam.Scale
24502494 }
24512495 func (c *Char) selfAnimExist(anim BytecodeValue) BytecodeValue {
24522496 if anim.IsSF() {
@@ -4454,7 +4498,7 @@ func (c *Char) cueDraw() {
44544498 sdf := func() *SprData {
44554499 sd := &SprData{c.anim, c.getPalfx(), pos,
44564500 scl, c.alpha, c.sprPriority, agl, c.angleScalse, false,
4457- c.playerNo == sys.superplayer, c.gi().ver[0] != 1}
4501+ c.playerNo == sys.superplayer, c.gi().ver[0] != 1, c.facing}
44584502 if !c.sf(CSF_trans) {
44594503 sd.alpha[0] = -1
44604504 }
--- a/src/common.go
+++ b/src/common.go
@@ -580,7 +580,7 @@ func (l *Layout) DrawAnim(r *[4]int32, x, y, scl float32, ln int16,
580580 a.Draw(r, x+l.offset[0], y+l.offset[1]+float32(sys.gameHeight-240),
581581 scl, scl, l.scale[0]*float32(l.facing), l.scale[0]*float32(l.facing),
582582 l.scale[1]*float32(l.vfacing),
583- 0, 0, float32(sys.gameWidth-320)/2, nil, false)
583+ 0, 0, float32(sys.gameWidth-320)/2, nil, false, 1)
584584 }
585585 }
586586 func (l *Layout) DrawText(x, y, scl float32, ln int16,
--- a/src/compiler.go
+++ b/src/compiler.go
@@ -2762,6 +2762,26 @@ func (c *Compiler) paramPostye(is IniSection, sc *StateControllerBase,
27622762 return nil
27632763 })
27642764 }
2765+
2766+func (c *Compiler) paramSpace(is IniSection, sc *StateControllerBase,
2767+ id byte) error {
2768+ return c.stateParam(is, "space", func(data string) error {
2769+ if len(data) <= 1 {
2770+ return Error("値が指定されていません")
2771+ }
2772+ var sp Space
2773+ if len(data) >= 2 {
2774+ if strings.ToLower(data[:2]) == "st" {
2775+ sp = Space_stage
2776+ } else if strings.ToLower(data[:2]) == "sc" {
2777+ sp = Space_screen
2778+ }
2779+ }
2780+ sc.add(id, sc.iToExp(int32(sp)))
2781+ return nil
2782+ })
2783+}
2784+
27652785 func (c *Compiler) paramTrans(is IniSection, sc *StateControllerBase,
27662786 prefix string, id byte, afterImage bool) error {
27672787 return c.stateParam(is, prefix+"trans", func(data string) error {
@@ -3443,6 +3463,9 @@ func (c *Compiler) explodSub(is IniSection,
34433463 if err := c.paramPostye(is, sc, explod_postype); err != nil {
34443464 return err
34453465 }
3466+ if err := c.paramSpace(is, sc, explod_space); err != nil {
3467+ return err
3468+ }
34463469 f := false
34473470 if err := c.stateParam(is, "vel", func(data string) error {
34483471 f = true
--- a/src/render.go
+++ b/src/render.go
@@ -232,10 +232,20 @@ func rmTileSub(w, h uint16, x, y float32, tl *[4]int32,
232232 pers = AbsF(xbs) / AbsF(xts)
233233 }
234234 if agl != 0 {
235- kaiten(&x1, &y1, float64(agl), rcx, rcy, vs)
236- kaiten(&x2, &y2, float64(agl), rcx, rcy, vs)
237- kaiten(&x3, &y3, float64(agl), rcx, rcy, vs)
238- kaiten(&x4, &y4, float64(agl), rcx, rcy, vs)
235+ // kaiten(&x1, &y1, float64(agl), rcx, rcy, vs)
236+ // kaiten(&x2, &y2, float64(agl), rcx, rcy, vs)
237+ // kaiten(&x3, &y3, float64(agl), rcx, rcy, vs)
238+ // kaiten(&x4, &y4, float64(agl), rcx, rcy, vs)
239+ if vs != 1 {
240+ y1 = rcy + ((y - ys*float32(h)) - rcy)
241+ y2 = y1
242+ y3 = rcy + (y - rcy)
243+ y4 = y3
244+ }
245+ gl.Translated(float64(rcx), float64(rcy), 0)
246+ gl.Scaled(1, float64(vs), 1)
247+ gl.Rotated(float64(agl/(math.Pi/180)), 0, 0, 1)
248+ gl.Translated(float64(-rcx), float64(-rcy), 0)
239249 drawQuads(x1, y1, x2, y2, x3, y3, x4, y4, r, g, b, a, pers)
240250 return
241251 }
--- a/src/stage.go
+++ b/src/stage.go
@@ -378,7 +378,7 @@ func (bg backGround) draw(pos [2]float32, scl, bgscl, lclscl float32,
378378 rect[3] = int32(math.Floor(float64(startrect1 + (float32(rect[3]) * sys.heightScale * wscl[1]) - float32(rect[1]))))
379379 bg.anim.Draw(&rect, x, y, sclx, scly, bg.xscale[0]*bgscl*(bg.scalestart[0]+xs)*xs3, xbs*bgscl*(bg.scalestart[0]+xs)*xs3, ys*(bg.scalestart[1]+ys2)*ys3,
380380 xras*x/(AbsF(ys*ys3)*lscl[1]*float32(bg.anim.spr.Size[1]))*sclx_recip,
381- 0, float32(sys.gameWidth)/2, &sys.bgPalFX, true)
381+ 0, float32(sys.gameWidth)/2, &sys.bgPalFX, true, 1)
382382 }
383383
384384 type bgCtrl struct {
--- a/src/system.go
+++ b/src/system.go
@@ -3,10 +3,6 @@ package main
33 import (
44 "bufio"
55 "fmt"
6- "github.com/go-gl/gl/v2.1/gl"
7- "github.com/go-gl/glfw/v3.2/glfw"
8- "github.com/timshannon/go-openal/openal"
9- "github.com/yuin/gopher-lua"
106 "io/ioutil"
117 "log"
128 "math"
@@ -15,6 +11,11 @@ import (
1511 "strings"
1612 "sync"
1713 "time"
14+
15+ "github.com/go-gl/gl/v2.1/gl"
16+ "github.com/go-gl/glfw/v3.2/glfw"
17+ "github.com/timshannon/go-openal/openal"
18+ "github.com/yuin/gopher-lua"
1819 )
1920
2021 const (
@@ -776,7 +777,7 @@ func (s *System) action(x, y *float32, scl float32) (leftest, rightest,
776777 if s.superanim != nil {
777778 s.topSprites.add(&SprData{s.superanim, &s.superpmap, s.superpos,
778779 [...]float32{s.superfacing, 1}, [2]int32{-1}, 5, 0, [2]float32{},
779- false, true, s.cgi[s.superplayer].ver[0] != 1}, 0, 0, 0, 0)
780+ false, true, s.cgi[s.superplayer].ver[0] != 1, 1}, 0, 0, 0, 0)
780781 if s.superanim.loopend {
781782 s.superanim = nil
782783 }