Welcome to the Creatures Wiki! Log in and join the community.

PALETTE.DTA

From Creatures Wiki
Revision as of 22:28, 12 September 2005 by Don (talk) (To save other developers the hassle here's some extra detail)
Jump to navigation Jump to search

PALLETTE.DTA is a file in Creatures 1 which maps from 8-bit colors to 24-bit RGB pairs. The format seems simple: The file is simply a 256-entry array of 24-bit B-G-R values; Each color component having one byte. However, each colour byte needs to be multiplied separately by 4 to reach the full 0-255 range - initially it is just 0-64.

In addition, this format is:

BB GG RR BB GG RR . . . 

Most programs will want something more like this (padding to 32 bits):

RR GG BB 00 RR GG BB 00 . . .

If you use ResHacker to look at the SpriteExtension.dll file installed in the Windows\System32 directory by the Sprite Thumbnail Viewer, you will find a pre-converted resource in this format in the "PALETTE" resource section.

Contents of PALETTE.DTA

The complete, default set of 256 entries (hopefully correct) for any budding developers:

0x00,0x00,0x00, 0x3f,0x3f,0x3f, 0x3f,0x3f,0x3f, 0x3f,0x3f,0x3f, 0x3f,0x3f,0x3f, 0x3f,0x3f,0x3f,
0x3f,0x3f,0x3f, 0x3f,0x3f,0x3f, 0x3f,0x3f,0x3f, 0x3f,0x3f,0x3f, 0x3f,0x3f,0x3f, 0x04,0x02,0x02,
0x05,0x06,0x0a, 0x06,0x0a,0x04, 0x06,0x09,0x0c, 0x0b,0x04,0x02, 0x0a,0x06,0x09, 0x0d,0x0a,0x04,
0x0c,0x0b,0x0c, 0x06,0x07,0x11, 0x05,0x0d,0x15, 0x06,0x0f,0x18, 0x09,0x07,0x11, 0x0b,0x0d,0x12,
0x0b,0x0e,0x1a, 0x07,0x10,0x07, 0x07,0x10,0x0a, 0x0d,0x12,0x06, 0x0d,0x12,0x0b, 0x0f,0x18,0x06,
0x0f,0x18,0x0a, 0x06,0x10,0x17, 0x07,0x10,0x19, 0x0d,0x11,0x14, 0x0b,0x13,0x1a, 0x0e,0x18,0x13,
0x0f,0x18,0x1c, 0x12,0x06,0x02, 0x12,0x07,0x09, 0x14,0x0b,0x04, 0x12,0x0d,0x0b, 0x1a,0x06,0x03,
0x1b,0x07,0x09, 0x1b,0x0c,0x04, 0x1a,0x0d,0x09, 0x12,0x0e,0x12, 0x12,0x0e,0x1a, 0x1a,0x0d,0x12,
0x1d,0x0d,0x1a, 0x14,0x12,0x05, 0x14,0x12,0x0c, 0x14,0x19,0x06, 0x13,0x1a,0x0b, 0x1c,0x12,0x05,
0x1b,0x13,0x0b, 0x1c,0x19,0x05, 0x1d,0x19,0x0c, 0x13,0x13,0x13, 0x13,0x15,0x1b, 0x15,0x19,0x14,
0x15,0x19,0x1c, 0x1a,0x15,0x13, 0x1a,0x16,0x1a, 0x1c,0x1a,0x14, 0x1b,0x1b,0x1b, 0x0c,0x0f,0x21,
0x0e,0x17,0x24, 0x10,0x0f,0x21, 0x13,0x16,0x23, 0x12,0x16,0x2c, 0x14,0x1a,0x23, 0x12,0x1b,0x2b,
0x19,0x16,0x22, 0x19,0x17,0x2b, 0x1b,0x1c,0x23, 0x1b,0x1d,0x2a, 0x13,0x17,0x31, 0x14,0x1d,0x32,
0x17,0x1c,0x3b, 0x1a,0x1e,0x33, 0x19,0x1e,0x3d, 0x1a,0x23,0x0d, 0x17,0x21,0x13, 0x17,0x20,0x1a,
0x1b,0x23,0x13, 0x1d,0x22,0x1c, 0x1e,0x29,0x13, 0x1e,0x29,0x1a, 0x16,0x20,0x23, 0x17,0x20,0x2e,
0x1c,0x21,0x25, 0x1d,0x22,0x2b, 0x1f,0x29,0x23, 0x1e,0x29,0x2c, 0x16,0x21,0x33, 0x16,0x24,0x39,
0x16,0x29,0x3c, 0x1c,0x22,0x33, 0x1d,0x22,0x3f, 0x1e,0x28,0x36, 0x1c,0x29,0x3b, 0x23,0x06,0x04,
0x24,0x07,0x09, 0x22,0x0d,0x04, 0x23,0x0d,0x0a, 0x2b,0x06,0x04, 0x2b,0x07,0x08, 0x2a,0x0c,0x04,
0x2b,0x0c,0x0a, 0x26,0x0d,0x12, 0x23,0x13,0x05, 0x23,0x14,0x0a, 0x24,0x1a,0x05, 0x24,0x1a,0x0c,
0x2b,0x14,0x05, 0x2a,0x15,0x0a, 0x2c,0x1a,0x05, 0x2b,0x1b,0x0b, 0x22,0x15,0x12, 0x22,0x16,0x1b,
0x23,0x1b,0x13, 0x22,0x1d,0x1b, 0x2b,0x14,0x12, 0x2c,0x15,0x19, 0x2a,0x1d,0x12, 0x2b,0x1d,0x1a,
0x34,0x0b,0x07, 0x35,0x0d,0x12, 0x32,0x15,0x05, 0x32,0x15,0x0a, 0x33,0x1a,0x05, 0x33,0x1c,0x0b,
0x3a,0x14,0x05, 0x3a,0x14,0x0b, 0x3a,0x1d,0x05, 0x3a,0x1d,0x0a, 0x33,0x14,0x12, 0x33,0x15,0x19,
0x33,0x1d,0x12, 0x32,0x1d,0x1a, 0x3a,0x14,0x14, 0x3b,0x16,0x18, 0x3c,0x1c,0x12, 0x3b,0x1c,0x1c,
0x24,0x0f,0x21, 0x23,0x14,0x21, 0x21,0x1e,0x24, 0x21,0x1e,0x2a, 0x2a,0x1e,0x22, 0x29,0x1f,0x29,
0x20,0x1f,0x31, 0x34,0x0c,0x20, 0x36,0x1c,0x22, 0x3b,0x1d,0x33, 0x29,0x22,0x0b, 0x25,0x21,0x14,
0x24,0x22,0x1c, 0x22,0x2b,0x14, 0x23,0x2b,0x1b, 0x2c,0x22,0x14, 0x2b,0x23,0x1b, 0x2d,0x29,0x14,
0x2d,0x2a,0x1c, 0x27,0x31,0x0f, 0x29,0x34,0x17, 0x34,0x22,0x06, 0x34,0x22,0x0c, 0x35,0x2a,0x05,
0x34,0x2a,0x0b, 0x3c,0x23,0x05, 0x3b,0x23,0x0b, 0x3d,0x2b,0x05, 0x3d,0x2b,0x0c, 0x33,0x23,0x13,
0x32,0x25,0x1a, 0x34,0x2a,0x14, 0x34,0x2a,0x1c, 0x3b,0x24,0x12, 0x3b,0x24,0x19, 0x3c,0x2b,0x13,
0x3b,0x2c,0x1b, 0x34,0x31,0x0e, 0x3d,0x33,0x03, 0x3e,0x33,0x0c, 0x3f,0x3c,0x03, 0x3f,0x3b,0x0b,
0x35,0x31,0x14, 0x35,0x31,0x1c, 0x32,0x3d,0x14, 0x33,0x3d,0x1b, 0x3e,0x32,0x13, 0x3d,0x33,0x1b,
0x3e,0x3b,0x13, 0x3f,0x3a,0x1c, 0x23,0x22,0x24, 0x23,0x24,0x2b, 0x24,0x2a,0x24, 0x25,0x2a,0x2d,
0x2a,0x24,0x23, 0x29,0x26,0x2c, 0x2c,0x2a,0x24, 0x2b,0x2a,0x2d, 0x22,0x25,0x33, 0x21,0x26,0x3e,
0x25,0x29,0x34, 0x24,0x2a,0x3f, 0x28,0x27,0x31, 0x2b,0x2b,0x33, 0x29,0x2e,0x3d, 0x2a,0x32,0x2a,
0x26,0x31,0x31, 0x2c,0x30,0x34, 0x2a,0x31,0x3f, 0x2c,0x3a,0x31, 0x2e,0x39,0x3a, 0x33,0x24,0x24,
0x32,0x26,0x29, 0x33,0x2c,0x23, 0x32,0x2c,0x2c, 0x3b,0x24,0x23, 0x3b,0x24,0x29, 0x3a,0x2d,0x22,
0x3a,0x2d,0x2a, 0x31,0x2e,0x32, 0x31,0x2f,0x38, 0x3d,0x2b,0x33, 0x35,0x32,0x24, 0x34,0x32,0x2c,
0x33,0x3c,0x22, 0x33,0x39,0x2c, 0x3c,0x33,0x24, 0x3b,0x34,0x2b, 0x3e,0x3a,0x24, 0x3e,0x3b,0x2c,
0x35,0x32,0x33, 0x32,0x32,0x3a, 0x35,0x39,0x33, 0x36,0x3a,0x39, 0x39,0x35,0x34, 0x38,0x34,0x38,
0x3c,0x3a,0x34, 0x3d,0x3d,0x3b, 0x3f,0x3f,0x3f, 0x00,0x00,0x00, 0x00,0x00,0x00, 0x00,0x00,0x00,
0x3f,0x3f,0x3f, 0x3f,0x3f,0x3f, 0x3f,0x3f,0x3f, 0x3f,0x3f,0x3f, 0x3f,0x3f,0x3f, 0x3f,0x3f,0x3f,
0x3f,0x3f,0x3f, 0x3f,0x3f,0x3f, 0x3f,0x3f,0x3f, 0x3f,0x3f,0x3f

References