CptSpaceToaster / CptsModdingLight

Do What The F*ck You Want To Public License
38 stars 15 forks source link

Changed integers in bitwise arithmetic to hex #20

Closed Kizby closed 9 years ago

Kizby commented 9 years ago

Changed most (all?) of the integer constants used in bitwise ANDs and ORs to their hex representation to make them more transparent. Also started making any progress at all grokking the internals of this mod :D

CptSpaceToaster commented 9 years ago

Looks pretty good... sadly, some of the numbers STILL look like junk, but that's just unavoidable with the spacing we chose.

Note, that the zeros in the compacted light integer (0BBBB 0GGGG 0RRRR 0LLLL) are there for optimization. When you take one compacted integer, and subtract it from another compacted light integer, then you can check to see if there are any bits in the 0 positions, indicating that the second value had a color component that was greater than the first.

CptSpaceToaster commented 9 years ago

Resolved most of issue #5. Closing it for now

Kizby commented 9 years ago

Err, did you mean to close the pull request or the issue?

CptSpaceToaster commented 9 years ago

I meant to close both, as this PR was able to cover most of the issues with #5. Did I miss something?

CptSpaceToaster commented 9 years ago

Ahh I think I confused close terminology accidentally....