Advertisement
CaptainLepidus

Loop through tiles

Mar 11th, 2012
111
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. sx = max( 0 , min( player_x - fx / 2 , width - fx ) );
  2. sy = max( 0 , min( player_y - fy / 2 , height - fy ) );
  3. for(i=sx;i<sx+fx;i=i+1)
  4. for(j=sy;j<sy+fy;j=j+1)
  5. {
  6. //somehow i is getting greater then width, don't know about j
  7. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement