Advertisement
Guest User

Untitled

a guest
Dec 23rd, 2015
103
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.58 KB | None | 0 0
  1. fluid1.getColor() = 2013252778 => ‭0111 0111 1111 1111 1100 1100 1010 1010‬ => 4 bytes
  2. fluid2.getColor() = -263978855 => ‭1111 1111 1111 1111 1111 1111 1111 1111 1111 0000 0100 0100 0000 0000 1001 1001‬ => 8 bytes
  3.  
  4. with the first number: red = n; green = n >> 8; blue = n >> 16; alpha = n >> 24
  5. Since the second has 8 bytes, am I right to assume this? red = n; green = n >> 16; blue = n >> 32; alpha = n >> 48
  6.  
  7. Also, since I'd like my renderer to work with any fluid, I'm sure there's a way to have the mod compute the number of bytes of each Integer and evaluate the shifts?
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement