Advertisement
Guest User

Untitled

a guest
Feb 22nd, 2017
68
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C++ 0.47 KB | None | 0 0
  1.     for(int j=margin.wid; j<buf_size.hei - margin.wid; ++j)
  2.     for(int i=margin.hei; i<buf_size.wid - margin.hei; ++i)
  3.     {
  4.         if(pos.x-margin.wid+i > _i*Size && pos.y-margin.hei+j > _j*Size
  5.         && pos.x-margin.wid+i < (_i+1)*Size && pos.y-margin.hei+j < (_j+1)*Size )
  6.         {
  7.             unsigned c = raw_data[ (i + j*(int)buf_size.wid) << 1 ];
  8.             shadows_pixels.setpixel(pos.x+i-margin.wid - _i*Size, pos.y+j-margin.hei - _j*Size, c);
  9.         }
  10.     }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement