comparison mde/types/Colour.d @ 91:4d5d53e4f881

Shared alignment for dynamic content lists - finally implemented! Lots of smaller changes too. Some debugging improvements. When multiple .mtt files are read for merging, files with invalid headers are ignored and no error is thrown so long as at least one file os valid.
author Diggory Hardy <diggory.hardy@gmail.com>
date Thu, 16 Oct 2008 17:43:48 +0100
parents b525ff28774b
children
comparison
equal deleted inserted replaced
90:b525ff28774b 91:4d5d53e4f881
47 return c; 47 return c;
48 } 48 }
49 /// Construct from 0xRRGGBB 49 /// Construct from 0xRRGGBB
50 Colour opCall (int col) { 50 Colour opCall (int col) {
51 Colour c; 51 Colour c;
52 c.r = cast(float) (col >> 16u) / 255f; 52 c.r = cast(float) ((col >> 16u) & 0xFF) / 255f;
53 c.g = cast(float) (col >> 8u) / 255f; 53 c.g = cast(float) ((col >> 8u) & 0xFF) / 255f;
54 c.b = cast(float) col / 255f; 54 c.b = cast(float) (col & 0xFF) / 255f;
55 return c; 55 return c;
56 } 56 }
57 } 57 }
58 } 58 }