Guest User

Untitled

a guest
Feb 19th, 2018
95
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1.       var loopscore:Int = Core.getTime();
  2.      
  3.       var xSR:Float;
  4.       var ySR:Float;
  5.       var xSRr:Int;
  6.       var ySRr:Int;
  7.       var color:Int;
  8.       var amount:Int;
  9.      
  10.       while(j<down) {
  11.         xSR = xS;
  12.         ySR = yS;
  13.         if(xcos<0&&xSR>wClip) {amount = Math.floor((wClip-xSR)/xcos);i+=amount;xSR+=xcos*amount;ySR+=xsin*amount;}
  14.         if(xsin<0&&ySR>hClip) {amount = Math.ceil((hClip-ySR)/xsin);i+=amount;xSR+=xcos*amount;ySR+=xsin*amount;}
  15.         if(xcos>0&&xSR<-1) {amount = Math.ceil((-1-xSR)/xcos);i+=amount;xSR+=xcos*amount;ySR+=xsin*amount;}
  16.         if(xsin>0&&ySR<-1) {amount = Math.round((-1-ySR)/xsin);i+=amount;xSR+=xcos*amount;ySR+=xsin*amount;}
  17.         while(i<right) {
  18.           xSRr = Math.round(xSR);
  19.           ySRr = Math.round(ySR);
  20.           if(xcos>0&&xSRr>wClip-1||xsin>0&&ySRr>hClip-1||xcos<0&&xSRr<0||xsin<0&&ySRr<0) {xSR+=xcos*(right-i);ySR+=xsin*(right-i);break;}
  21.           if(xSRr>-1&&xSRr<wClip&&ySRr>-1&&ySRr<hClip) {
  22.             color=getPixel(xSRr+xClip,ySRr+yClip);
  23.             if(!transparency||color!=0xFF00FF) {_context.target.drawPixel(color,_x+i,_y+j);}
  24.           }
  25.           xSR+=xcos;
  26.           ySR+=xsin;
  27.           i++;
  28.         }
  29.         xS-=ysin;
  30.         yS+=ycos;
  31.         i=left;
  32.         j++;
  33.       }
  34.       loopscore = Core.getTime()-loopscore;
Add Comment
Please, Sign In to add comment