Revision | 3f6bd3d347c7c177829794c47a8c1d6a8a20415d (tree) |
---|---|
Time | 2017-03-05 14:11:55 |
Author | SUEHIRO <supersuehiro@user...> |
Commiter | SUEHIRO |
xscale, yscale がマイナスだと回転が反転するのを修正
@@ -99,7 +99,7 @@ public void addAnimList( | ||
99 | 99 | as~screen = `scr; |
100 | 100 | as~xscl = `xs; |
101 | 101 | as~yscl = `ys; |
102 | - as~angle = (`ax < 0.0) == (`ay < 0.0) ? `an : -`an; | |
102 | + as~angle = `an; | |
103 | 103 | as~oVer = `oVer; |
104 | 104 | as~bright = `b; |
105 | 105 | as~axscl = `ax; |
@@ -3094,7 +3094,8 @@ public &Char | ||
3094 | 3094 | float an; |
3095 | 3095 | branch{ |
3096 | 3096 | cond `ls(.lsANGLEDRAW): |
3097 | - an = `sysfvar[.fANGLE] == 0.0 ? 360.0 : `sysfvar[.fANGLE]; | |
3097 | + an = `sysfvar[.fANGLE] == 0.0 ? 360.0 | |
3098 | + : `facing > 0 ? `sysfvar[.fANGLE] : -`sysfvar[.fANGLE]; | |
3098 | 3099 | else: |
3099 | 3100 | an = 0.0; |
3100 | 3101 | } |
@@ -5479,7 +5480,7 @@ public void Explod::update(bool oVer, int playerNo) | ||
5479 | 5480 | .addAnimList( |
5480 | 5481 | a=, `ani, `sprpriority, `x, `y, screen, |
5481 | 5482 | (float)`facing*`scalex, (float)`vfacing*`scaley, |
5482 | - `scalex < 0.0 == `scaley < 0.0 ? `angle : -`angle, | |
5483 | + `facing < 0 == `vfacing < 0 ? `angle : -`angle, | |
5483 | 5484 | oVer, 1.0, 1.0, `alphas < 0 ? (int)-1 : `alphas, |
5484 | 5485 | `alphad, playerNo == .superplayer, |
5485 | 5486 | pfx, `shadowr<<16 | (`shadowg&255)<<8 | (`shadowb&255), |
@@ -1300,7 +1300,6 @@ public &Anim<frame_t> | ||
1300 | 1300 | `exParam(`frames[`drawidx]=, h=, v=, agl=); |
1301 | 1301 | float rx = x+xs*h*(float)`frames[`drawidx].x+(float).com.GameWidth/2.0; |
1302 | 1302 | /?/*.cfg.OpenGL: |
1303 | - agl *= (float)((xs < 0.0 ? -1: 1) * (ys < 0.0 ? -1: 1)); | |
1304 | 1303 | `spr~glDraw( |
1305 | 1304 | `palFoo(fx), `mask, #(xs*h)*(float)`spr~rct.x*.com.WidthScale, |
1306 | 1305 | #(ys*v)*(float)`spr~rct.y*.com.HeightScale, `tile=, |
@@ -1316,7 +1315,6 @@ public &Anim<frame_t> | ||
1316 | 1315 | 1.0, 1.0, xs, xs, ys, 0.0, (float).com.GameWidth/2.0, fx, false); |
1317 | 1316 | ret; |
1318 | 1317 | } |
1319 | - agl *= (float)((xs < 0.0 ? -1: 1) * (ys < 0.0 ? -1: 1)); | |
1320 | 1318 | .m.limRange!float?(xs=, -16000.0/.com.WidthScale, 16000.0/.com.WidthScale); |
1321 | 1319 | .m.limRange!float?( |
1322 | 1320 | ys=, -16000.0/.com.HeightScale, 16000.0/.com.HeightScale); |
@@ -1340,7 +1338,6 @@ public &Anim<frame_t> | ||
1340 | 1338 | `exParam(`frames[`drawidx]=, h=, v=, agl=); |
1341 | 1339 | float x2 = x + xs*h*(float)`frames[`drawidx].x; |
1342 | 1340 | float y2 = y + ys*vscale*v*(float)`frames[`drawidx].y; |
1343 | - agl *= (float)((xs < 0.0 ? -1: 1) * (ys < 0.0 ? -1: 1)); | |
1344 | 1341 | /?/*.cfg.OpenGL: |
1345 | 1342 | if(color != 0x0 && `spr~rle != -12) loop{index i = 0; do: |
1346 | 1343 | .com.tmppl[i] = color; |