Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- void Mask()
- {
- int i = 900;
- // copy the floor:
- while (i--) Goal[i] = Floor[i];
- BYTE *src = (BYTE *) Box;
- BYTE *dst = (BYTE *) Goal;
- i = 900;
- // additive blending:
- while (i--) {
- dst[0] = (BYTE)(((src[0]-dst[0])*100+(dst[0]<<8))>>8);
- dst[1] = (BYTE)(((src[1]-dst[1])*100+(dst[1]<<8))>>8);
- dst[2] = (BYTE)(((src[2]-dst[2])*100+(dst[2]<<8))>>8);
- dst+=4;
- src+=4;
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement