Revisión | d8a4145606bb0d4106afb28d3d0acffc9956ae17 (tree) |
---|---|
Tiempo | 2017-02-20 20:23:01 |
Autor | SUEHIRO <supersuehiro@user...> |
Commiter | SUEHIRO |
ステージの影などを修正
@@ -78,15 +78,15 @@ void drawClsn() | ||
78 | 78 | { |
79 | 79 | public ^&.AnimSprite as; |
80 | 80 | public int color, alpha; |
81 | - public float offsety = 0.0; | |
81 | + public float offsety = 0.0, fadeoffset = 0.0; | |
82 | 82 | } |
83 | 83 | |
84 | 84 | %^&ShadowSprite shadows; |
85 | 85 | |
86 | 86 | public void addAnimList( |
87 | 87 | %^&.AnimSprite al=, ^&.act.Action a, int p, float x, float y, bool scr, |
88 | - float xs, float ys, float an, bool oVer, float ax, float ay, | |
89 | - int sa, int da, bool b, ^&.com.PalFX fx, int sc, int salp, float so) | |
88 | + float xs, float ys, float an, bool oVer, float ax, float ay, int sa, int da, | |
89 | + bool b, ^&.com.PalFX fx, int sc, int salp, float so, float fo) | |
90 | 90 | { |
91 | 91 | ^&.AnimSprite newSprite() |
92 | 92 | { |
@@ -107,7 +107,7 @@ public void addAnimList( | ||
107 | 107 | as~salpha = `sa; |
108 | 108 | as~dalpha = `da; |
109 | 109 | as~fx = `fx; |
110 | - if(`sc != 0) .addShadowList(as, `sc, `so, `salp); | |
110 | + if(`sc != 0) .addShadowList(as, `sc, `so, `salp, `fo); | |
111 | 111 | ret as; |
112 | 112 | } |
113 | 113 | if(.se.fskip || #a == 0 || #a~ani.spr == 0) ret; |
@@ -182,7 +182,8 @@ public void drawAnimList(%^&.AnimSprite al=, float x, float y, float scl) | ||
182 | 182 | while i < #al:} |
183 | 183 | } |
184 | 184 | |
185 | -public void addShadowList(^&.AnimSprite as, int sc, float so, int alpha) | |
185 | +public void addShadowList( | |
186 | + ^&.AnimSprite as, int sc, float so, int alpha, float fo) | |
186 | 187 | { |
187 | 188 | ^&.ShadowSprite newSprite() |
188 | 189 | { |
@@ -191,6 +192,7 @@ public void addShadowList(^&.AnimSprite as, int sc, float so, int alpha) | ||
191 | 192 | ss~color = `sc; |
192 | 193 | ss~alpha = .m.max!int?(0, .m.min!int?(256, `alpha)); |
193 | 194 | ss~offsety = `so * (`as~oVer ? 1.5 : 1.0); |
195 | + ss~fadeoffset = `fo; | |
194 | 196 | ret ss; |
195 | 197 | } |
196 | 198 | int p = as~priority; |
@@ -227,12 +229,14 @@ public void drawShadowList(float x, float y, float scl) | ||
227 | 229 | branch{ |
228 | 230 | int alpha = ss.alpha; |
229 | 231 | branch{ |
230 | - cond ss.as~y < (float).stg~sdw.fadeend*.stg~localscl: | |
232 | + float y = ss.as~y - ss.fadeoffset; | |
233 | + cond .stg~sdw.fadebgn >= .stg~sdw.fadeend: | |
234 | + cond y <= (float).stg~sdw.fadeend * .stg~localscl: | |
231 | 235 | ret; |
232 | - cond ss.as~y < (float).stg~sdw.fadebgn*.stg~localscl: | |
236 | + cond y < (float).stg~sdw.fadebgn * .stg~localscl: | |
233 | 237 | alpha = |
234 | 238 | (int)( |
235 | - (float)alpha * ((float).stg~sdw.fadeend*.stg~localscl-ss.as~y) | |
239 | + (float)alpha * ((float).stg~sdw.fadeend * .stg~localscl - y) | |
236 | 240 | / ( |
237 | 241 | ((float).stg~sdw.fadeend - (float).stg~sdw.fadebgn) |
238 | 242 | * .stg~localscl)); |
@@ -498,7 +502,7 @@ public void drawReflection(float x, float y, float scl) | ||
498 | 502 | `imgs[`imgidx-i&63].angle, `imgs[`imgidx-i&63].oVer, |
499 | 503 | `imgs[`imgidx-i&63].axscl, `imgs[`imgidx-i&63].ayscl, |
500 | 504 | `alphas, `alphad, br, `palfx[pfxi .. pfxi + 1], |
501 | - 0, 0, 0.0); | |
505 | + 0, 0, 0.0, 0.0); | |
502 | 506 | i += `framegap; |
503 | 507 | while i <= end:} |
504 | 508 | if(rec) `recAfterImg(a=, x, y, xs, ys, an, oVer, ax, ay, cfx); |
@@ -2010,7 +2014,7 @@ public &Projectile | ||
2010 | 2014 | .addAnimList( |
2011 | 2015 | .anims=, `ani, `sprpriority, `x, `y, false, (float)`facing*`scalex, |
2012 | 2016 | `scaley, 0.0, oVer, 1.0, 1.0, -1, 0, br, `palfx, |
2013 | - `shadowr<<16 | (`shadowg&255)<<8 | (`shadowb&255), 256, 0.0); | |
2017 | + `shadowr<<16 | (`shadowg&255)<<8 | (`shadowb&255), 256, 0.0, 0.0); | |
2014 | 2018 | `aimg.recAndAddAL( |
2015 | 2019 | `ani<>=, `sprpriority, `x, `y, (float)`facing*`scalex, `scaley, |
2016 | 2020 | 0.0, .cgi[playerNo].mver0 != 1, 1.0, 1.0, |
@@ -3104,9 +3108,8 @@ public &Char | ||
3104 | 3108 | `sysfvar[.fANGLESCALEX], `sysfvar[.fANGLESCALEY], |
3105 | 3109 | `ls(.lsTRANS) ? `sysivar[.iALPHAS] : -1, |
3106 | 3110 | `sysivar[.iALPHAD], br, `getPalfx(), |
3107 | - `ls(.lsNOSHADOW) ? 0 : -1, | |
3108 | - `ls(.lsTRANS) ? `sysivar[.iALPHAS] : 256, | |
3109 | - (float)`sysivar[.iSHADOWOFFSET]); | |
3111 | + `ls(.lsNOSHADOW) ? 0 : -1, `ls(.lsTRANS) ? `sysivar[.iALPHAS] : 256, | |
3112 | + (float)`sysivar[.iSHADOWOFFSET], `offsetY()); | |
3110 | 3113 | `aimg.recAndAddAL( |
3111 | 3114 | `ani<>=, `sprpriority, x, y, xs, ys, an, `mver0() != 1, |
3112 | 3115 | `sysfvar[.fANGLESCALEX], `sysfvar[.fANGLESCALEY], |
@@ -5476,7 +5479,7 @@ public void Explod::update(bool oVer, int playerNo) | ||
5476 | 5479 | oVer, 1.0, 1.0, `alphas < 0 ? (int)-1 : `alphas, |
5477 | 5480 | `alphad, playerNo == .superplayer, |
5478 | 5481 | pfx, `shadowr<<16 | (`shadowg&255)<<8 | (`shadowb&255), |
5479 | - `alphas < 0 ? 256 : `alphas, 0.0); | |
5482 | + `alphas < 0 ? 256 : `alphas, 0.0, 0.0); | |
5480 | 5483 | }]; |
5481 | 5484 | cond `ontop != 0: |
5482 | 5485 | aal(:.topanims=:); |
@@ -6639,7 +6642,7 @@ public float action( | ||
6639 | 6642 | .addAnimList( |
6640 | 6643 | .topanims=, .superanim, 5, .superposx, .superposy, false, |
6641 | 6644 | (float).superfacing, 1.0, 0.0, .cgi[.superplayer].mver0 != 1, |
6642 | - 1.0, 1.0, -1, 0, true, .superpmap, 0, 0, 0.0); | |
6645 | + 1.0, 1.0, -1, 0, true, .superpmap, 0, 0, 0.0, 0.0); | |
6643 | 6646 | if(.superanim~ani.loopend) .superanim.new(0); |
6644 | 6647 | } |
6645 | 6648 | .anim(); |
@@ -1165,6 +1165,7 @@ public &Anim<frame_t> | ||
1165 | 1165 | branch{ |
1166 | 1166 | cond `dalpha < 0: |
1167 | 1167 | da = ((uint)!`dalpha + `frames[`drawidx].dalpha) >> 0x1; |
1168 | + if(sa == 0d1 && da == 0d255) sa = 0d0; | |
1168 | 1169 | else: |
1169 | 1170 | da = (ubyte)`dalpha; |
1170 | 1171 | } |