frozenLake

Untitled

Mar 4th, 2017
180
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.61 KB | None | 0 0
  1. Instead of having so many lines like this to define the skin color...
  2.  
  3. case SKINCOLOR_TEAL:
  4. // 5 color ramp
  5. for (i = 0; i < SKIN_RAMP_LENGTH; i++)
  6. {
  7. if (5*i/16 == 0)
  8. dest_colormap[starttranscolor + i] = 0xf7;
  9. else
  10. dest_colormap[starttranscolor + i] = (UINT8)(skinbasecolors[color - 1] + (5*i/SKIN_RAMP_LENGTH) - 1);
  11. }
  12. break;
  13.  
  14. Couldn't we have a table instead that looks more along the lines of this?
  15.  
  16. 247,247,247,247,247,220,220,220,221,221,221,222,222,222,223,223,223
  17. or if it needs to be in hex:
  18. 0xf7,0xf7,0xf7,0xf7,0xf7,0xdc,0xdc,0xdc,0xdd,0xdd,0xdd,0xde,0xde,0xde,0xdf,0xdf,0xdf
Advertisement
Add Comment
Please, Sign In to add comment