• 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évision51300d189cd17b3cac1152af43c9d14668c9d563 (tree)
l'heure2018-12-25 21:31:44
Auteurneatunsou <sisiy4excite@gmai...>
Commiterneatunsou

Message de Log

palfxでライフバーのポトレが消えていたのを修正
P3以降のキャラでP2以前のキャラが死んでるとP2系トリガーが機能しない場合があったのを修正
チーム戦でゲージを持ち越すようにした

Change Summary

Modification

--- a/src/char.go
+++ b/src/char.go
@@ -5448,12 +5448,14 @@ func (cl *CharList) enemyNear(c *Char, n int32, p2 bool) *Char {
54485448 var add func(*Char, int)
54495449 add = func(e *Char, idx int) {
54505450 for i := idx; i <= int(n); i++ {
5451+ if p2 && e.scf(SCF_ko_round_middle) || !p2 && e.helperIndex > 0 {
5452+ return
5453+ }
54515454 if i >= len(*cache) {
54525455 *cache = append(*cache, e)
54535456 return
54545457 }
5455- if (p2 && !e.scf(SCF_ko_round_middle) || !p2 && e.helperIndex == 0) &&
5456- AbsF(c.distX(e, c)) < AbsF(c.distX((*cache)[i], c)) {
5458+ if AbsF(c.distX(e, c)) < AbsF(c.distX((*cache)[i], c)) {
54575459 add((*cache)[i], i+1)
54585460 (*cache)[i] = e
54595461 }
--- a/src/common.go
+++ b/src/common.go
@@ -571,11 +571,9 @@ func (l *Layout) DrawSprite(x, y float32, ln int16, s *Sprite, fx *PalFX, fscale
571571 y += sys.lifebarFontScale
572572 }
573573 pal := s.Pal
574- if pal != nil {
575- pal = fx.getFxPal(pal, false)
576- }
574+
577575 s.Draw(x+l.offset[0], y+l.offset[1],
578- l.scale[0]*float32(l.facing)*fscale, l.scale[1]*float32(l.vfacing)*fscale, pal)
576+ l.scale[0]*float32(l.facing)*fscale, l.scale[1]*float32(l.vfacing)*fscale, pal, fx)
579577 }
580578 }
581579 func (l *Layout) DrawAnim(r *[4]int32, x, y, scl float32, ln int16,
--- a/src/image.go
+++ b/src/image.go
@@ -1004,7 +1004,7 @@ func (s *Sprite) glDraw(pal []uint32, mask int32, x, y float32, tile *[4]int32,
10041004 }
10051005 }
10061006 }
1007-func (s *Sprite) Draw(x, y, xscale, yscale float32, pal []uint32) {
1007+func (s *Sprite) Draw(x, y, xscale, yscale float32, pal []uint32, fx *PalFX) {
10081008 x += float32(sys.gameWidth-320)/2 - xscale*float32(s.Offset[0])
10091009 y += float32(sys.gameHeight-240) - yscale*float32(s.Offset[1])
10101010 if xscale < 0 {
@@ -1015,7 +1015,7 @@ func (s *Sprite) Draw(x, y, xscale, yscale float32, pal []uint32) {
10151015 }
10161016 s.glDraw(pal, 0, -x*sys.widthScale, -y*sys.heightScale, &notiling,
10171017 xscale*sys.widthScale, xscale*sys.widthScale, yscale*sys.heightScale, 0, 0, 0, 0,
1018- sys.brightness*255>>8|1<<9, &sys.scrrect, 0, 0, nil)
1018+ sys.brightness*255>>8|1<<9, &sys.scrrect, 0, 0, fx)
10191019 }
10201020
10211021 type Sff struct {
--- a/src/script.go
+++ b/src/script.go
@@ -621,7 +621,7 @@ func systemScriptInit(l *lua.LState) {
621621 xscl *= c.portrait_scale
622622 yscl *= c.portrait_scale
623623 }
624- c.lportrait.Draw(x, y, xscl, yscl, c.lportrait.Pal)
624+ c.lportrait.Draw(x, y, xscl, yscl, c.lportrait.Pal, nil)
625625 }
626626 }
627627 return 0
@@ -641,11 +641,11 @@ func systemScriptInit(l *lua.LState) {
641641 if c.sportrait != nil {
642642 c.sportrait.Draw(x+float32(i)*sys.sel.cellsize[0],
643643 y+float32(j)*sys.sel.cellsize[1], sys.sel.cellscale[0]*c.portrait_scale,
644- sys.sel.cellscale[1]*c.portrait_scale, c.sportrait.Pal)
644+ sys.sel.cellscale[1]*c.portrait_scale, c.sportrait.Pal, nil)
645645 } else if c.def == "randomselect" && sys.sel.randomspr != nil {
646646 sys.sel.randomspr.Draw(x+float32(i)*sys.sel.cellsize[0],
647647 y+float32(j)*sys.sel.cellsize[1], sys.sel.randomscl[0],
648- sys.sel.randomscl[1], sys.sel.randomspr.Pal)
648+ sys.sel.randomscl[1], sys.sel.randomspr.Pal, nil)
649649 }
650650 }
651651 }
@@ -986,7 +986,7 @@ func systemScriptInit(l *lua.LState) {
986986 xscl *= c.portrait_scale
987987 yscl *= c.portrait_scale
988988 }
989- c.sportrait.Draw(x, y, xscl, yscl, c.sportrait.Pal)
989+ c.sportrait.Draw(x, y, xscl, yscl, c.sportrait.Pal, nil)
990990 }
991991 }
992992 return 0
@@ -1007,7 +1007,7 @@ func systemScriptInit(l *lua.LState) {
10071007 xscl *= c.portrait_scale
10081008 yscl *= c.portrait_scale
10091009 }
1010- c.vsportrait.Draw(x, y, xscl, yscl, c.vsportrait.Pal)
1010+ c.vsportrait.Draw(x, y, xscl, yscl, c.vsportrait.Pal, nil)
10111011 }
10121012 }
10131013 return 0
@@ -1028,7 +1028,7 @@ func systemScriptInit(l *lua.LState) {
10281028 xscl *= c.portrait_scale
10291029 yscl *= c.portrait_scale
10301030 }
1031- c.vportrait.Draw(x, y, xscl, yscl, c.vportrait.Pal)
1031+ c.vportrait.Draw(x, y, xscl, yscl, c.vportrait.Pal, nil)
10321032 }
10331033 }
10341034 return 0
--- a/src/system.go
+++ b/src/system.go
@@ -1981,6 +1981,9 @@ func (l *Loader) loadChar(pn int) int {
19811981 } else {
19821982 p = newChar(pn, 0)
19831983 sys.cgi[pn].sff = nil
1984+ if len(sys.chars[pn]) > 0 {
1985+ p.power = sys.chars[pn][0].power
1986+ }
19841987 }
19851988 p.memberNo = memberNo
19861989 p.selectNo = sys.sel.selected[pn&1][memberNo][0]