Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- var loopscore:Int = Core.getTime();
- var xSR:Float;
- var ySR:Float;
- var xSRr:Int;
- var ySRr:Int;
- var color:Int;
- var amount:Int;
- while(j<down) {
- xSR = xS;
- ySR = yS;
- if(xcos<0&&xSR>wClip) {amount = Math.floor((wClip-xSR)/xcos);i+=amount;xSR+=xcos*amount;ySR+=xsin*amount;}
- if(xsin<0&&ySR>hClip) {amount = Math.ceil((hClip-ySR)/xsin);i+=amount;xSR+=xcos*amount;ySR+=xsin*amount;}
- if(xcos>0&&xSR<-1) {amount = Math.ceil((-1-xSR)/xcos);i+=amount;xSR+=xcos*amount;ySR+=xsin*amount;}
- if(xsin>0&&ySR<-1) {amount = Math.round((-1-ySR)/xsin);i+=amount;xSR+=xcos*amount;ySR+=xsin*amount;}
- while(i<right) {
- xSRr = Math.round(xSR);
- ySRr = Math.round(ySR);
- 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;}
- if(xSRr>-1&&xSRr<wClip&&ySRr>-1&&ySRr<hClip) {
- color=getPixel(xSRr+xClip,ySRr+yClip);
- if(!transparency||color!=0xFF00FF) {_context.target.drawPixel(color,_x+i,_y+j);}
- }
- xSR+=xcos;
- ySR+=xsin;
- i++;
- }
- xS-=ysin;
- yS+=ycos;
- i=left;
- j++;
- }
- loopscore = Core.getTime()-loopscore;
Add Comment
Please, Sign In to add comment