Go で書き直した Ikemen
修订版 | f64b8ff3eeb77dfd02b61800f423c11a94c3bba1 (tree) |
---|---|
时间 | 2018-12-20 22:35:21 |
作者 | neatunsou <sisiy4excite@gmai...> |
Commiter | neatunsou |
判定表示が透明になっていたのを修正
bgctrlでアニメを変えるとタイルと透過の情報がリセットされていたのを修正
Interpolate Blendで加算処理が減算処理になる場合があったのを修正
@@ -600,9 +600,9 @@ func (a *Animation) alpha() int32 { | ||
600 | 600 | } else { |
601 | 601 | sa = byte(a.interpolate_blend_srcalpha) |
602 | 602 | da = byte(a.interpolate_blend_dstalpha) |
603 | - //if sa == 255 && da == 1 { | |
604 | - // da = 255 | |
605 | - //} | |
603 | + if sa == 1 && da == 255 { | |
604 | + sa = 0 | |
605 | + } | |
606 | 606 | } |
607 | 607 | if sa == 1 && da == 255 { |
608 | 608 | return -2 |
@@ -812,8 +812,16 @@ func (s *Stage) runBgCtrl(bgc *bgCtrl) { | ||
812 | 812 | a := s.at.get(bgc.v[0]) |
813 | 813 | if a != nil { |
814 | 814 | for i := range bgc.bg { |
815 | + masktemp := bgc.bg[i].anim.mask | |
816 | + srcAlphatemp := bgc.bg[i].anim.srcAlpha | |
817 | + dstAlphatemp := bgc.bg[i].anim.dstAlpha | |
818 | + tiletmp := bgc.bg[i].anim.tile | |
815 | 819 | bgc.bg[i].actionno = bgc.v[0] |
816 | 820 | bgc.bg[i].anim = *a |
821 | + bgc.bg[i].anim.tile = tiletmp | |
822 | + bgc.bg[i].anim.dstAlpha = dstAlphatemp | |
823 | + bgc.bg[i].anim.srcAlpha = srcAlphatemp | |
824 | + bgc.bg[i].anim.mask = masktemp | |
817 | 825 | } |
818 | 826 | } |
819 | 827 | case BT_Visible: |
@@ -1212,15 +1212,15 @@ func (s *System) draw(x, y, scl float32) { | ||
1212 | 1212 | } |
1213 | 1213 | s.brightness = ob |
1214 | 1214 | if s.clsnDraw { |
1215 | - s.clsnSpr.Pal[0] = 0x0000ff | |
1215 | + s.clsnSpr.Pal[0] = 0xff0000ff | |
1216 | 1216 | s.drawc1.draw(0x3feff) |
1217 | - s.clsnSpr.Pal[0] = 0xff0000 | |
1217 | + s.clsnSpr.Pal[0] = 0xffff0000 | |
1218 | 1218 | s.drawc2.draw(0x3feff) |
1219 | - s.clsnSpr.Pal[0] = 0x00ff00 | |
1219 | + s.clsnSpr.Pal[0] = 0xff00ff00 | |
1220 | 1220 | s.drawc2sp.draw(0x3feff) |
1221 | - s.clsnSpr.Pal[0] = 0x002000 | |
1221 | + s.clsnSpr.Pal[0] = 0xff002000 | |
1222 | 1222 | s.drawc2mtk.draw(0x3feff) |
1223 | - s.clsnSpr.Pal[0] = 0x404040 | |
1223 | + s.clsnSpr.Pal[0] = 0xff404040 | |
1224 | 1224 | s.drawwh.draw(0x3feff) |
1225 | 1225 | } |
1226 | 1226 | } |