Advertisement
Guest User

Untitled

a guest
Sep 22nd, 2017
54
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.43 KB | None | 0 0
  1. void Mask()
  2. {
  3. int i = 900;
  4.  
  5. // copy the floor:
  6. while (i--) Goal[i] = Floor[i];
  7.  
  8. BYTE *src = (BYTE *) Box;
  9. BYTE *dst = (BYTE *) Goal;
  10.  
  11. i = 900;
  12.  
  13. // additive blending:
  14. while (i--) {
  15. dst[0] = (BYTE)(((src[0]-dst[0])*100+(dst[0]<<8))>>8);
  16. dst[1] = (BYTE)(((src[1]-dst[1])*100+(dst[1]<<8))>>8);
  17. dst[2] = (BYTE)(((src[2]-dst[2])*100+(dst[2]<<8))>>8);
  18. dst+=4;
  19. src+=4;
  20. }
  21. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement