Previous: 4.51.1. ObjGfx40 Unit Constants, Variables, and Data Types To the Table of Contents Next: 4.51.1.2. OG_DATA_STATE_STR[] constant
4.51.1. ObjGfx40 Unit Constants, Variables, and Data Types Table of Contents 4.51.1.2. OG_DATA_STATE_STR[] constant

- 4.51.1.1. -
Table of Contents
4. Standard Units
4.51. ObjGfx40 - ObjectGraphics 4.0 Unit
4.51.1. ObjGfx40 Unit Constants, Variables, and Data Types
4.51.1.1. DEFAULT_PALETTE constant


4.51.1.1. DEFAULT_PALETTE constant

Targets: MS-DOS, Win32 console


ObjGfx40 Unit

There is a base palette inside each ogSurface object. The palette is only used for 8BPP surfaces and is ingored otherwise. The palette in each surface is copied from the DEFAULT_PALETTE constant when the surface is created.

The alpha field is used in cases where the 8BPP surface is copied to a non-indexed colour surface (e.g. dest32bppSurface.ogCopy(source8bppSurface); ). If ogIsBlending() of the destination surface is true, then the alpha field for each palette entry will be honored and the two surfaces will be blended appropiately. If ogIsBlending() of the destination surface is false, then the alpha field will be encoded into the pixel (provided the destination surface has an alpha channel) when it is repacked to the destination surface

Declaration:
const
  OG_DEFAULT_PALETTE : ogPal =
    ((red:0; green:0; blue:0; alpha:255),
     (red:0; green:0; blue:170; alpha:255),
     (red:0; green:170; blue:0; alpha:255),
     (red:0; green:170; blue:170; alpha:255), 
     (red:170; green:0; blue:0; alpha:255),
     (red:170; green:0; blue:170; alpha:255),
     (red:170; green:85; blue:0; alpha:255),
     (red:170; green:170; blue:170; alpha:255),
     (red:85; green:85; blue:85; alpha:255),
     (red:85; green:85; blue:255; alpha:255),
     (red:85; green:255; blue:85; alpha:255),
     (red:85; green:255; blue:255; alpha:255), 
     (red:255; green:85; blue:85; alpha:255),
     (red:255; green:85; blue:255; alpha:255),
     (red:255; green:255; blue:85; alpha:255),
     (red:255; green:255; blue:255; alpha:255), 
     (red:16; green:16; blue:16; alpha:255),
     (red:32; green:32; blue:32; alpha:255),
     (red:48; green:48; blue:48; alpha:255),
     (red:64; green:64; blue:64; alpha:255),
     (red:80; green:80; blue:80; alpha:255),
     (red:96; green:96; blue:96; alpha:255),
     (red:112; green:112; blue:112; alpha:255),
     (red:128; green:128; blue:128; alpha:255),
     (red:144; green:144; blue:144; alpha:255),
     (red:160; green:160; blue:160; alpha:255),
     (red:176; green:176; blue:176; alpha:255),
     (red:192; green:192; blue:192; alpha:255),
     (red:208; green:208; blue:208; alpha:255),
     (red:224; green:224; blue:224; alpha:255),
     (red:240; green:240; blue:240; alpha:255),
     (red:255; green:255; blue:255; alpha:255), 
     (red:59; green:0; blue:0; alpha:255),
     (red:79; green:0; blue:0; alpha:255),
     (red:103; green:0; blue:0; alpha:255),
     (red:123; green:0; blue:0; alpha:255),
     (red:143; green:7; blue:7; alpha:255),
     (red:167; green:7; blue:7; alpha:255),
     (red:187; green:11; blue:11; alpha:255),
     (red:211; green:15; blue:15; alpha:255),
     (red:231; green:19; blue:19; alpha:255),
     (red:255; green:27; blue:27; alpha:255),
     (red:255; green:59; blue:59; alpha:255),
     (red:255; green:91; blue:91; alpha:255),
     (red:255; green:119; blue:119; alpha:255),
     (red:255; green:151; blue:151; alpha:255),
     (red:255; green:183; blue:183; alpha:255),
     (red:255; green:215; blue:215; alpha:255),
     (red:55; green:55; blue:0; alpha:255),
     (red:71; green:71; blue:0; alpha:255),
     (red:87; green:87; blue:0; alpha:255),
     (red:103; green:103; blue:7; alpha:255),
     (red:119; green:119; blue:7; alpha:255),
     (red:135; green:135; blue:11; alpha:255),
     (red:155; green:155; blue:19; alpha:255),
     (red:171; green:171; blue:23; alpha:255),
     (red:187; green:187; blue:31; alpha:255),
     (red:203; green:203; blue:35; alpha:255),
     (red:219; green:219; blue:43; alpha:255),
     (red:239; green:239; blue:59; alpha:255),
     (red:255; green:255; blue:63; alpha:255),
     (red:255; green:255; blue:127; alpha:255),
     (red:255; green:255; blue:187; alpha:255),
     (red:255; green:255; blue:255; alpha:255),
     (red:0; green:43; blue:0; alpha:255),
     (red:0; green:63; blue:0; alpha:255),
     (red:0; green:83; blue:0; alpha:255),
     (red:0; green:103; blue:0; alpha:255),
     (red:7; green:127; blue:7; alpha:255),
     (red:7; green:147; blue:7; alpha:255),
     (red:11; green:167; blue:11; alpha:255),
     (red:15; green:187; blue:15; alpha:255),
     (red:19; green:211; blue:19; alpha:255),
     (red:27; green:231; blue:27; alpha:255),
     (red:59; green:235; blue:59; alpha:255),
     (red:91; green:239; blue:91; alpha:255),
     (red:127; green:239; blue:127; alpha:255),
     (red:159; green:243; blue:159; alpha:255),
     (red:195; green:247; blue:195; alpha:255),
     (red:231; green:251; blue:231; alpha:255),
     (red:0; green:55; blue:55; alpha:255),
     (red:0; green:71; blue:71; alpha:255),
     (red:0; green:87; blue:87; alpha:255),
     (red:7; green:103; blue:103; alpha:255),
     (red:7; green:119; blue:119; alpha:255),
     (red:11; green:135; blue:135; alpha:255),
     (red:19; green:155; blue:155; alpha:255),
     (red:23; green:171; blue:171; alpha:255),
     (red:31; green:187; blue:187; alpha:255),
     (red:35; green:203; blue:203; alpha:255),
     (red:43; green:219; blue:219; alpha:255),
     (red:51; green:235; blue:235; alpha:255),
     (red:63; green:255; blue:255; alpha:255),
     (red:127; green:255; blue:255; alpha:255),
     (red:187; green:255; blue:255; alpha:255),
     (red:255; green:255; blue:255; alpha:255),
     (red:15; green:15; blue:55; alpha:255),
     (red:19; green:19; blue:79; alpha:255),
     (red:27; green:27; blue:103; alpha:255),
     (red:31; green:31; blue:127; alpha:255),
     (red:35; green:35; blue:155; alpha:255),
     (red:39; green:39; blue:179; alpha:255),
     (red:43; green:43; blue:203; alpha:255),
     (red:47; green:47; blue:227; alpha:255),
     (red:51; green:51; blue:255; alpha:255),
     (red:71; green:71; blue:255; alpha:255),
     (red:91; green:91; blue:255; alpha:255),
     (red:111; green:111; blue:255; alpha:255),
     (red:131; green:131; blue:255; alpha:255),
     (red:151; green:151; blue:255; alpha:255),
     (red:175; green:175; blue:255; alpha:255),
     (red:195; green:195; blue:255; alpha:255),
     (red:59; green:51; blue:59; alpha:255),
     (red:79; green:63; blue:79; alpha:255),
     (red:103; green:71; blue:103; alpha:255),
     (red:123; green:75; blue:123; alpha:255),
     (red:143; green:75; blue:143; alpha:255),
     (red:167; green:71; blue:167; alpha:255),
     (red:187; green:67; blue:187; alpha:255),
     (red:211; green:55; blue:211; alpha:255),
     (red:231; green:43; blue:231; alpha:255),
     (red:255; green:27; blue:255; alpha:255),
     (red:255; green:59; blue:255; alpha:255),
     (red:255; green:91; blue:255; alpha:255),
     (red:255; green:119; blue:255; alpha:255),
     (red:255; green:151; blue:255; alpha:255),
     (red:255; green:183; blue:255; alpha:255),
     (red:255; green:215; blue:255; alpha:255),
     (red:59; green:51; blue:59; alpha:255),
     (red:71; green:59; blue:71; alpha:255),
     (red:83; green:71; blue:83; alpha:255),
     (red:95; green:83; blue:95; alpha:255),
     (red:111; green:95; blue:111; alpha:255),
     (red:123; green:103; blue:123; alpha:255),
     (red:135; green:115; blue:135; alpha:255),
     (red:147; green:127; blue:147; alpha:255),
     (red:163; green:139; blue:163; alpha:255),
     (red:175; green:151; blue:175; alpha:255),
     (red:187; green:159; blue:187; alpha:255),
     (red:203; green:171; blue:203; alpha:255),
     (red:215; green:183; blue:215; alpha:255),
     (red:227; green:191; blue:227; alpha:255),
     (red:239; green:203; blue:239; alpha:255),
     (red:255; green:215; blue:255; alpha:255),
     (red:55; green:27; blue:27; alpha:255),
     (red:71; green:35; blue:35; alpha:255),
     (red:91; green:43; blue:43; alpha:255),
     (red:107; green:55; blue:55; alpha:255),
     (red:127; green:67; blue:67; alpha:255),
     (red:143; green:75; blue:75; alpha:255),
     (red:163; green:87; blue:87; alpha:255),
     (red:179; green:99; blue:99; alpha:255),
     (red:199; green:111; blue:111; alpha:255),
     (red:203; green:127; blue:127; alpha:255),
     (red:211; green:139; blue:139; alpha:255),
     (red:219; green:159; blue:159; alpha:255),
     (red:223; green:175; blue:175; alpha:255),
     (red:231; green:191; blue:191; alpha:255),
     (red:239; green:211; blue:211; alpha:255),
     (red:247; green:231; blue:231; alpha:255),
     (red:91; green:63; blue:27; alpha:255),
     (red:111; green:75; blue:31; alpha:255),
     (red:127; green:87; blue:39; alpha:255),
     (red:147; green:103; blue:43; alpha:255),
     (red:167; green:115; blue:51; alpha:255),
     (red:187; green:127; blue:55; alpha:255),
     (red:207; green:139; blue:63; alpha:255),
     (red:227; green:155; blue:67; alpha:255),
     (red:247; green:167; blue:75; alpha:255),
     (red:247; green:175; blue:95; alpha:255),
     (red:247; green:183; blue:119; alpha:255),
     (red:247; green:195; blue:139; alpha:255),
     (red:247; green:203; blue:159; alpha:255),
     (red:247; green:215; blue:183; alpha:255),
     (red:247; green:227; blue:203; alpha:255),
     (red:251; green:239; blue:227; alpha:255),
     (red:63; green:63; blue:31; alpha:255),
     (red:75; green:75; blue:35; alpha:255),
     (red:87; green:87; blue:43; alpha:255),
     (red:99; green:99; blue:51; alpha:255),
     (red:115; green:115; blue:55; alpha:255),
     (red:127; green:127; blue:63; alpha:255),
     (red:139; green:139; blue:67; alpha:255),
     (red:151; green:151; blue:75; alpha:255),
     (red:167; green:167; blue:83; alpha:255),
     (red:175; green:175; blue:95; alpha:255),
     (red:183; green:183; blue:107; alpha:255),
     (red:191; green:191; blue:123; alpha:255),
     (red:203; green:203; blue:139; alpha:255),
     (red:211; green:211; blue:159; alpha:255),
     (red:219; green:219; blue:175; alpha:255),
     (red:231; green:231; blue:195; alpha:255),
     (red:27; green:59; blue:47; alpha:255),
     (red:31; green:75; blue:59; alpha:255),
     (red:39; green:87; blue:67; alpha:255),
     (red:47; green:103; blue:79; alpha:255),
     (red:55; green:119; blue:91; alpha:255),
     (red:59; green:135; blue:99; alpha:255),
     (red:67; green:151; blue:111; alpha:255),
     (red:71; green:167; blue:119; alpha:255),
     (red:79; green:183; blue:127; alpha:255),
     (red:87; green:199; blue:139; alpha:255),
     (red:91; green:215; blue:147; alpha:255),
     (red:99; green:231; blue:155; alpha:255),
     (red:127; green:235; blue:183; alpha:255),
     (red:163; green:239; blue:211; alpha:255),
     (red:195; green:243; blue:231; alpha:255),
     (red:231; green:251; blue:247; alpha:255),
     (red:23; green:55; blue:55; alpha:255),
     (red:31; green:71; blue:71; alpha:255),
     (red:39; green:87; blue:87; alpha:255),
     (red:47; green:103; blue:103; alpha:255),
     (red:55; green:119; blue:119; alpha:255),
     (red:67; green:139; blue:139; alpha:255),
     (red:75; green:155; blue:155; alpha:255),
     (red:87; green:171; blue:171; alpha:255),
     (red:99; green:187; blue:187; alpha:255),
     (red:111; green:203; blue:203; alpha:255),
     (red:123; green:223; blue:223; alpha:255),
     (red:143; green:227; blue:227; alpha:255),
     (red:163; green:231; blue:231; alpha:255),
     (red:183; green:235; blue:235; alpha:255),
     (red:203; green:239; blue:239; alpha:255),
     (red:227; green:247; blue:247; alpha:255),
     (red:39; green:39; blue:79; alpha:255),
     (red:47; green:47; blue:91; alpha:255),
     (red:55; green:55; blue:107; alpha:255),
     (red:63; green:63; blue:123; alpha:255),
     (red:71; green:71; blue:139; alpha:255),
     (red:79; green:79; blue:151; alpha:255),
     (red:87; green:87; blue:167; alpha:255),
     (red:99; green:99; blue:183; alpha:255),
     (red:107; green:107; blue:199; alpha:255),
     (red:123; green:123; blue:203; alpha:255),
     (red:139; green:139; blue:211; alpha:255),
     (red:155; green:155; blue:219; alpha:255),
     (red:171; green:171; blue:223; alpha:255),
     (red:187; green:187; blue:231; alpha:255),
     (red:207; green:207; blue:239; alpha:255),
     (red:227; green:227; blue:247; alpha:255),
     (red:63; green:27; blue:63; alpha:255),
     (red:75; green:31; blue:75; alpha:255),
     (red:91; green:39; blue:91; alpha:255),
     (red:103; green:47; blue:103; alpha:255),
     (red:119; green:51; blue:119; alpha:255),
     (red:131; green:59; blue:131; alpha:255),
     (red:147; green:67; blue:147; alpha:255),
     (red:163; green:75; blue:163; alpha:255),
     (red:175; green:83; blue:175; alpha:255),
     (red:191; green:91; blue:191; alpha:255),
     (red:199; green:107; blue:199; alpha:255),
     (red:207; green:127; blue:207; alpha:255),
     (red:215; green:147; blue:215; alpha:255),
     (red:223; green:171; blue:223; alpha:255),
     (red:231; green:195; blue:231; alpha:255),
     (red:243; green:219; blue:243; alpha:255));

See also:


Previous: 4.51.1. ObjGfx40 Unit Constants, Variables, and Data Types To the Table of Contents Next: 4.51.1.2. OG_DATA_STATE_STR[] constant
4.51.1. ObjGfx40 Unit Constants, Variables, and Data Types Table of Contents 4.51.1.2. OG_DATA_STATE_STR[] constant

- 4.51.1.1. -