• R/O
  • HTTP
  • SSH
  • HTTPS

提交

标签
No Tags

Frequently used words (click to add to your profile)

javac++androidlinuxc#windowsobjective-ccocoa誰得qtpythonphprubygameguibathyscaphec計画中(planning stage)翻訳omegatframeworktwitterdomtestvb.netdirectxゲームエンジンbtronarduinopreviewer

Commit MetaInfo

修订版f07c95bc5c3f962399518a1d0d5df3356e0ce650 (tree)
时间2017-03-05 15:04:16
作者SUEHIRO <supersuehiro@user...>
CommiterSUEHIRO

Log Message

ソフト描画のスケール制限ができてなくて危ないのを修正

更改概述

差异

--- a/ssz/sff.ssz
+++ b/ssz/sff.ssz
@@ -1315,16 +1315,18 @@ public &Anim<frame_t>
13151315 1.0, 1.0, xs, xs, ys, 0.0, (float).com.GameWidth/2.0, fx, false);
13161316 ret;
13171317 }
1318+ xs *= h;
1319+ ys *= v;
13181320 .m.limRange!float?(xs=, -16000.0/.com.WidthScale, 16000.0/.com.WidthScale);
13191321 .m.limRange!float?(
13201322 ys=, -16000.0/.com.HeightScale, 16000.0/.com.HeightScale);
13211323 .sdl.renderMugenZoom(
13221324 .com.scrrect=, rx*.com.WidthScale,
1323- (y+ys*v*(float)`frames[`drawidx].y)*.com.HeightScale,
1325+ (y+ys*(float)`frames[`drawidx].y)*.com.HeightScale,
13241326 `spr~pxl, `palFoo(fx), `mask, `spr~rct=,
1325- #(xs*h)*(float)`spr~rct.x*.com.WidthScale,
1326- #(ys*v)*(float)`spr~rct.y*.com.HeightScale, `tile=,
1327- xs*h*.com.WidthScale, xs*h*.com.WidthScale, ys*v*.com.HeightScale,
1327+ #xs*(float)`spr~rct.x*.com.WidthScale,
1328+ #ys*(float)`spr~rct.y*.com.HeightScale, `tile=,
1329+ xs*.com.WidthScale, xs*.com.WidthScale, ys*.com.HeightScale,
13281330 0.0, uagl, `alphaFoo(), `spr~rle, `spr~pluginbuf=);
13291331 /*?*/
13301332 }
@@ -1333,11 +1335,11 @@ public &Anim<frame_t>
13331335 ^&.com.PalFX fx, bool oVer, uint color, int alpha)
13341336 {
13351337 if(#`spr == 0 || #`spr~pxl == 0) ret;
1336- float h = (float)`frames[`drawidx].h, v = (float)`frames[`drawidx].v;
1337- float xs = xscale, ys = yscale, agl = angle;
1338- `exParam(`frames[`drawidx]=, h=, v=, agl=);
1339- float x2 = x + xs*h*(float)`frames[`drawidx].x;
1340- float y2 = y + ys*vscale*v*(float)`frames[`drawidx].y;
1338+ float xs = xscale * (float)`frames[`drawidx].h;
1339+ float ys = yscale * (float)`frames[`drawidx].v, agl = angle;
1340+ `exParam(`frames[`drawidx]=, xs=, ys=, agl=);
1341+ float x2 = x + xs*(float)`frames[`drawidx].x;
1342+ float y2 = y + ys*vscale*(float)`frames[`drawidx].y;
13411343 /?/*.cfg.OpenGL:
13421344 if(color != 0x0 && `spr~rle != -12) loop{index i = 0; do:
13431345 .com.tmppl[i] = color;
@@ -1346,20 +1348,20 @@ public &Anim<frame_t>
13461348 `spr~rle == -12 ? [void(int alp){
13471349 .sdl.RenderMugenGlFcS(:
13481350 `spr~pxl<>, `spr~rct=,
1349- #(xs*h)*(float)`spr~rct.x*.com.WidthScale,
1350- #(ys*v)*(float)`spr~rct.y*.com.HeightScale, `tile=,
1351- xs*h*.com.WidthScale, xs*h*.com.WidthScale,
1352- ys*v*.com.HeightScale, vscale, 0.0, agl,
1351+ #xs*(float)`spr~rct.x*.com.WidthScale,
1352+ #ys*(float)`spr~rct.y*.com.HeightScale, `tile=,
1353+ xs*.com.WidthScale, xs*.com.WidthScale,
1354+ ys*.com.HeightScale, vscale, 0.0, agl,
13531355 alp, .com.scrrect=, (x2+(float).com.GameWidth/2.0)*.com.WidthScale,
13541356 y2*.com.HeightScale, color:);
13551357 }]
13561358 : [void(int alp){
13571359 .sdl.RenderMugenGl(:
13581360 `spr~pxl<>, .com.tmppl<>=, `mask, `spr~rct=,
1359- #(xs*h)*(float)`spr~rct.x*.com.WidthScale,
1360- #(ys*v)*(float)`spr~rct.y*.com.HeightScale, `tile=,
1361- xs*h*.com.WidthScale, xs*h*.com.WidthScale,
1362- ys*v*.com.HeightScale, vscale, 0.0, agl,
1361+ #xs*(float)`spr~rct.x*.com.WidthScale,
1362+ #ys*(float)`spr~rct.y*.com.HeightScale, `tile=,
1363+ xs*.com.WidthScale, xs*.com.WidthScale,
1364+ ys*.com.HeightScale, vscale, 0.0, agl,
13631365 alp, .com.scrrect=, (x2+(float).com.GameWidth/2.0)*.com.WidthScale,
13641366 y2*.com.HeightScale:);
13651367 }];
@@ -1373,9 +1375,9 @@ public &Anim<frame_t>
13731375 .sdl.renderMugenShadow(
13741376 .com.scrrect=, (x2+(float).com.GameWidth/2.0)*.com.WidthScale,
13751377 y2*.com.HeightScale, `spr~pxl, color, `spr~rct=,
1376- #(xs*h)*(float)`spr~rct.x*.com.WidthScale,
1377- #(ys*v)*(float)`spr~rct.y*.com.HeightScale,
1378- xs*h*.com.WidthScale, ys*v*.com.HeightScale, vscale,
1378+ #xs*(float)`spr~rct.x*.com.WidthScale,
1379+ #ys*(float)`spr~rct.y*.com.HeightScale,
1380+ xs*.com.WidthScale, ys*.com.HeightScale, vscale,
13791381 uagl, alpha, `spr~rle, `spr~pluginbuf=);
13801382 /*?*/
13811383 }