CONST.CPP (21435B)
1 // 2 // Copyright 2020 Electronic Arts Inc. 3 // 4 // TiberianDawn.DLL and RedAlert.dll and corresponding source code is free 5 // software: you can redistribute it and/or modify it under the terms of 6 // the GNU General Public License as published by the Free Software Foundation, 7 // either version 3 of the License, or (at your option) any later version. 8 9 // TiberianDawn.DLL and RedAlert.dll and corresponding source code is distributed 10 // in the hope that it will be useful, but with permitted additional restrictions 11 // under Section 7 of the GPL. See the GNU General Public License in LICENSE.TXT 12 // distributed with this program. You should have received a copy of the 13 // GNU General Public License along with permitted additional restrictions 14 // with this program. If not, see https://github.com/electronicarts/CnC_Remastered_Collection 15 16 /* $Header: F:\projects\c&c\vcs\code\const.cpv 2.17 16 Oct 1995 16:52:24 JOE_BOSTIC $ */ 17 /*********************************************************************************************** 18 *** C O N F I D E N T I A L --- W E S T W O O D S T U D I O S *** 19 *********************************************************************************************** 20 * * 21 * Project Name : Command & Conquer * 22 * * 23 * File Name : CONST.CPP * 24 * * 25 * Programmer : Joe L. Bostic * 26 * * 27 * Start Date : September 20, 1993 * 28 * * 29 * Last Update : September 20, 1993 [JLB] * 30 * * 31 *---------------------------------------------------------------------------------------------* 32 * Functions: * 33 * - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - */ 34 35 #include "function.h" 36 37 38 char const * SourceName[SOURCE_COUNT] = 39 { 40 "North", 41 "East", 42 "South", 43 "West", 44 "Shipping", 45 "Beach", 46 "Air", 47 "Visible", 48 "EnemyBase", 49 "HomeBase", 50 "Ocean", 51 }; 52 53 54 /*************************************************************************** 55 ** Relative coordinate offsets from the center of a cell for each 56 ** of the legal positions that an object in a cell may stop at. Only infantry 57 ** are allowed to stop at other than the center of the cell. 58 */ 59 COORDINATE const StoppingCoordAbs[5] = { 60 0x00800080L, // center 61 0x00400040L, // upper left 62 0x004000C0L, // upper right 63 0x00C00040L, // lower left 64 0x00C000C0L // lower right 65 }; 66 67 68 /*************************************************************************** 69 ** These are the various weapons and their characteristics. 70 ** 71 ** bullet type dmg, rof, range, sound 72 */ 73 WeaponTypeClass const Weapons[WEAPON_COUNT] = { 74 {BULLET_SNIPER, 125, 40, 0x0580, VOC_SNIPER, ANIM_NONE}, // WEAPON_RIFLE 75 {BULLET_SPREADFIRE, 25, 50, 0x0400, VOC_MINI, ANIM_GUN_N}, // WEAPON_CHAIN_GUN 76 {BULLET_BULLET, 1, 7, 0x01C0, VOC_RIFLE, ANIM_NONE}, // WEAPON_PISTOL 77 {BULLET_BULLET, 15, 20, 0x0200, VOC_MGUN2, ANIM_NONE}, // WEAPON_M16 78 {BULLET_TOW, 30, 60, 0x0400, VOC_BAZOOKA,ANIM_NONE}, // WEAPON_DRAGON 79 {BULLET_FLAME, 35, 50, 0x0200, VOC_FLAMER1,ANIM_FLAME_N}, // WEAPON_FLAMETHROWER 80 {BULLET_FLAME, 50, 50, 0x0200, VOC_FLAMER1,ANIM_FLAME_N}, // WEAPON_FLAME_TONGUE 81 {BULLET_CHEMSPRAY, 80, 70, 0x0200, VOC_FLAMER1,ANIM_CHEM_N}, // WEAPON_CHEMSPRAY 82 {BULLET_GRENADE, 50, 60, 0x0340, VOC_TOSS, ANIM_NONE}, // WEAPON_GRENADE 83 {BULLET_APDS, 25, 60, 0x0400, VOC_TANK2, ANIM_MUZZLE_FLASH}, // WEAPON_75MM 84 {BULLET_APDS, 30, 50, 0x04C0, VOC_TANK3, ANIM_MUZZLE_FLASH}, // WEAPON_105MM 85 {BULLET_APDS, 40, 80, 0x04C0, VOC_TANK4, ANIM_MUZZLE_FLASH}, // WEAPON_120MM 86 {BULLET_APDS, 40, 60, 0x0600, VOC_TANK4, ANIM_MUZZLE_FLASH}, // WEAPON_TURRET_GUN 87 {BULLET_SSM, 75, 80, 0x0500, VOC_ROCKET1,ANIM_NONE}, // WEAPON_MAMMOTH_TUSK 88 {BULLET_SSM2, 75, 80, 0x0600, VOC_ROCKET1,ANIM_NONE}, // WEAPON_MLRS 89 {BULLET_HE, 150, 65, 0x0600, VOC_TANK1, ANIM_MUZZLE_FLASH}, // WEAPON_155MM 90 {BULLET_BULLET, 15, 30, 0x0400, VOC_MGUN11, ANIM_GUN_N}, // WEAPON_M60MG 91 {BULLET_SSM, 60, 35, 0x0780, VOC_ROCKET2,ANIM_NONE}, // WEAPON_TOMAHAWK 92 {BULLET_SSM, 60, 40, 0x0680, VOC_ROCKET2,ANIM_NONE}, // WEAPON_TOW_TWO 93 {BULLET_NAPALM, 100, 20, 0x0480, VOC_NONE, ANIM_NONE}, // WEAPON_NAPALM 94 {BULLET_LASER, 200, 90, 0x0780, VOC_LASER, ANIM_NONE}, // WEAPON_OBELISK_LASER 95 {BULLET_SAM, 50, 50, 0x0780, VOC_ROCKET2,ANIM_NONE}, // WEAPON_NIKE 96 {BULLET_HONEST_JOHN, 100, 200, 0x0A00, VOC_ROCKET1,ANIM_NONE}, // WEAPON_HONEST_JOHN 97 {BULLET_HEADBUTT, 100, 30, 0x0180, VOC_DINOATK1,ANIM_NONE}, // WEAPON_STEG 98 {BULLET_TREXBITE, 155, 30, 0x0180, VOC_DINOATK1,ANIM_NONE}, // WEAPON_TREX 99 #ifdef PETROGLYPH_EXAMPLE_MOD 100 {BULLET_NUKE_LOB, 150, 130, 0x0B00, VOC_NUKE_LOB, ANIM_MUZZLE_FLASH}, // WEAPON_NUKE_LOB 101 #endif //PETROGLYPH_EXAMPLE_MOD 102 }; 103 104 105 /*************************************************************************** 106 ** These are the various warheads. 107 ** 108 ** spread factor, destroys walls, destroys wood, destroys Tiberium, {armor defense table} 109 ** -vs- {none, wood, aluminum, steel, concrete} 110 */ 111 WarheadTypeClass const Warheads[WARHEAD_COUNT] = { 112 { 2,false,false,false,{0x100, 0x80, 0x90, 0x40, 0x40}}, // WARHEAD_SA Small arms -- good against infantry. 113 { 6,true,true,true,{0xE0, 0xC0, 0x90, 0x40, 0x100}}, // WARHEAD_HE High explosive -- good against buildings & infantry. 114 { 6,true,true,false,{0x40, 0xC0, 0xC0, 0x100, 0x80}}, // WARHEAD_AP Armor piercing -- good against armor. 115 { 8,false,true,true,{0xE0, 0x100, 0xB0, 0x40, 0x80}}, // WARHEAD_FIRE Incendiary -- Good against flammables. 116 { 4,false,false,false,{0x100, 0x100, 0x100, 0x100, 0x100}},// WARHEAD_LASER Light Amplification of Stimulated Emission by Radiation. 117 { 7,true,true,true,{0x100, 0x100, 0xC0, 0xC0, 0xC0}}, // WARHEAD_PB Particle beam (neutron beam). 118 { 4,false,false,false,{0x100, 0x20, 0x20, 0x10, 0x10}}, // WARHEAD_FIST Punching in hand-to-hand combat. 119 { 4,false,false,false,{0x100, 0x20, 0x20, 0x10, 0x10}}, // WARHEAD_FOOT Kicking in hand-to-hand combat. 120 { 4,false,false,false,{0x100, 0x08, 0x08, 0x08, 0x08}}, // WARHEAD_HOLLOW_POINT Sniper bullet type. 121 {255,false,false,false,{0x100, 0x01, 0x01, 0x01, 0x01}}, // WARHEAD_SPORE 122 { 1, true,true,false,{0x100, 0xC0, 0x80, 0x20, 0x08}}, // WARHEAD_HEADBUTT 123 { 1, true,true,false,{0x100, 0xC0, 0x80, 0x20, 0x08}}, // WARHEAD_FEEDME 124 }; 125 126 127 /*************************************************************************** 128 ** Converts pixel values (cell relative) into the appropriate lepton (sub cell) 129 ** value. This is used to convert pixel (screen) coordinates into the underlying 130 ** coordinate system. 131 */ 132 unsigned char const Pixel2Lepton[24] = { 133 0x00,0x0B,0x15,0x20,0x2B,0x35,0x40,0x4B, 134 0x55,0x60,0x6B,0x75,0x80,0x8B,0x95,0xA0, 135 0xAB,0xB5,0xC0,0xCB,0xD5,0xE0,0xEB,0xF5 136 }; 137 138 139 /*************************************************************************** 140 ** This array is used to index a facing in order to retrieve a cell 141 ** offset that, when added to another cell, will achieve the adjacent cell 142 ** in the indexed direction. 143 */ 144 CELL const AdjacentCell[FACING_COUNT] = { 145 -(MAP_CELL_W), // North 146 -(MAP_CELL_W-1), // North East 147 1, // East 148 MAP_CELL_W+1, // South East 149 MAP_CELL_W, // South 150 MAP_CELL_W-1, // South West 151 -1, // West 152 -(MAP_CELL_W+1) // North West 153 }; 154 155 COORDINATE const AdjacentCoord[FACING_COUNT] = { 156 0xFF000000L, 157 0xFF000100L, 158 0x00000100L, 159 0x01000100L, 160 0x01000000L, 161 0x0100FF00L, 162 0x0000FF00L, 163 0xFF00FF00L 164 }; 165 166 167 /*************************************************************************** 168 ** This converts 0..255 facing values into either 8, 16, or 32 facing values. 169 ** Note: a simple shift won't suffice because 0..255 facing values should 170 ** be converted to the CLOSEST appropriate facing, NOT rounded down to the 171 ** nearest facing. 172 */ 173 unsigned char const Facing8[256] = { 174 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1, 175 1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2, 176 2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3, 177 3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4, 178 4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5, 179 5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6, 180 6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7, 181 7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0 182 }; 183 184 #ifdef NEVER 185 unsigned char const Facing16[256] = { 186 0,0,0,0,0,0,0,0,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,2, 187 2,2,2,2,2,2,2,2,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,4,4,4,4,4,4,4,4, 188 4,4,4,4,4,4,4,4,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,6,6,6,6,6,6,6,6, 189 6,6,6,6,6,6,6,6,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,8,8,8,8,8,8,8,8, 190 8,8,8,8,8,8,8,8,9,9,9,9,9,9,9,9,9,9,9,9,9,9,9,9,10,10,10,10,10,10,10,10, 191 10,10,10,10,10,10,10,10,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,12,12,12,12,12,12,12,12, 192 12,12,12,12,12,12,12,12,13,13,13,13,13,13,13,13,13,13,13,13,13,13,13,13,14,14,14,14,14,14,14,14, 193 14,14,14,14,14,14,14,14,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,0,0,0,0,0,0,0,0 194 }; 195 #endif 196 197 /* 198 ** This table incorporates a compensating factor for the distortion caused 199 ** by 3D-Studio when it tries to render 45% angles. 200 */ 201 unsigned char const Facing32[256] = { 202 0,0,0,0,0,1,1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,2,3,3,3,3,3,3,3,3,3,3, 203 3,4,4,4,4,4,4,5,5,5,5,5,5,5,6,6,6,6,6,6,6,7,7,7,7,7,7,7,8,8,8,8, 204 8,8,8,9,9,9,9,9,9,9,10,10,10,10,10,10,10,11,11,11,11,11,11,11,12,12,12,12,12,12,12,12, 205 13,13,13,13,13,13,13,13,14,14,14,14,14,14,14,14,14,15,15,15,15,15,15,15,15,15,16,16,16,16,16,16, 206 16,16,16,16,16,17,17,17,17,17,17,17,17,17,18,18,18,18,18,18,18,18,18,19,19,19,19,19,19,19,19,19, 207 19,20,20,20,20,20,20,21,21,21,21,21,21,21,22,22,22,22,22,22,22,23,23,23,23,23,23,23,24,24,24,24, 208 24,24,24,25,25,25,25,25,25,25,26,26,26,26,26,26,26,27,27,27,27,27,27,27,28,28,28,28,28,28,28,28, 209 29,29,29,29,29,29,29,29,30,30,30,30,30,30,30,30,30,31,31,31,31,31,31,31,31,31,0,0,0,0,0,0 210 }; 211 212 #ifdef OBSOLETE 213 unsigned char const Facing32[256] = { 214 0,0,0,0, 215 1,1,1,1,1,1,1,1, 216 2,2,2,2,2,2,2,2, 217 3,3,3,3,3,3,3,3, 218 4,4,4,4,4,4,4,4, 219 5,5,5,5,5,5,5,5, 220 6,6,6,6,6,6,6,6, 221 7,7,7,7,7,7,7,7, 222 8,8,8,8,8,8,8,8, 223 9,9,9,9,9,9,9,9, 224 10,10,10,10,10,10,10,10, 225 11,11,11,11,11,11,11,11, 226 12,12,12,12,12,12,12,12, 227 13,13,13,13,13,13,13,13, 228 14,14,14,14,14,14,14,14, 229 15,15,15,15,15,15,15,15, 230 16,16,16,16,16,16,16,16, 231 17,17,17,17,17,17,17,17, 232 18,18,18,18,18,18,18,18, 233 19,19,19,19,19,19,19,19, 234 20,20,20,20,20,20,20,20, 235 21,21,21,21,21,21,21,21, 236 22,22,22,22,22,22,22,22, 237 23,23,23,23,23,23,23,23, 238 24,24,24,24,24,24,24,24, 239 25,25,25,25,25,25,25,25, 240 26,26,26,26,26,26,26,26, 241 27,27,27,27,27,27,27,27, 242 28,28,28,28,28,28,28,28, 243 29,29,29,29,29,29,29,29, 244 30,30,30,30,30,30,30,30, 245 31,31,31,31,31,31,31,31, 246 0,0,0,0 247 }; 248 #endif 249 250 251 /*************************************************************************** 252 ** These are the movement costs (in ticks at fastest speed) to enter each 253 ** of the given terrain cells. 254 */ 255 #define S1 0x00 256 #define S2 0x40 257 #define S3 0x70 258 #define S4 0xA0 259 #define S5 0xC0 260 #define S6 0xFF 261 GroundType const Ground[LAND_COUNT] = { 262 // Foot 263 // | Tracked 264 // | | Harvester 265 // | | | Wheeled 266 // | | | | Winged 267 // | | | | | Hover 268 // | | | | | | float build 269 {66, {S3, S3, S3, S4, S6, S5, S1 }, true}, // LAND_CLEAR 270 {68, {S5, S4, S4, S4, S6, S5, S1 }, true}, // LAND_ROAD 271 {BLUE, {S1, S1, S1, S1, S6, S5, S6 }, false}, // LAND_WATER 272 {DKGREY, {S1, S1, S1, S1, S6, S1, S1 }, false}, // LAND_ROCK 273 {DKGREY, {S1, S1, S1, S1, S6, S1, S1 }, false}, // LAND_WALL 274 {143, {S3, S3, S3, S4, S6, S5, S1 }, false}, // LAND_TIBERIUM 275 {66, {S3, S3, S3, S4, S6, S5, S1 }, false}, // LAND_BEACH 276 }; 277 278 279 /*************************************************************************** 280 ** These are the names of the theaters. 281 */ 282 TheaterDataType const Theaters[THEATER_COUNT] = { 283 {"DESERT","DESERT","DES"}, 284 {"JUNGLE","JUNGLE","JUN"}, 285 {"TEMPERATE","TEMPERAT","TEM"}, 286 {"WINTER","WINTER","WIN"} 287 }; 288 289 290 /*************************************************************************** 291 ** These are the remap tables that are used to convert the units/buildings 292 ** into the other color schemes. 293 */ 294 unsigned char const RemapGold[256] = { 295 0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15, // 0..15 296 16,17,18,19,20,21,22,23,24,25,26,27,28,29,30,31, // 16..31 297 32,33,34,35,36,37,38,39,40,41,42,43,44,45,46,47, // 32..47 298 48,49,50,51,52,53,54,55,56,57,58,59,60,61,62,63, // 48..63 299 64,65,66,67,68,69,70,71,72,73,74,75,76,77,78,79, // 64..79 300 80,81,82,83,84,85,86,87,88,89,90,91,92,93,94,95, // 80..95 301 96,97,98,99,100,101,102,103,104,105,106,107,108,109,110,111, // 96..111 302 112,113,114,115,116,117,118,119,120,121,122,123,124,125,126,127, // 112..127 303 128,129,130,131,132,133,134,135,136,137,138,139,140,141,142,143, // 128..143 304 144,145,146,147,148,149,150,151,152,153,154,155,156,157,158,159, // 144..159 305 160,161,162,163,164,165,166,167,168,169,170,171,172,173,174,175, // 160..175 306 176,177,178,179,180,181,182,183,184,185,186,187,188,189,190,191, // 176..191 307 192,193,194,195,196,197,198,199,200,201,202,203,204,205,206,207, // 192..207 308 208,209,210,211,212,213,214,215,216,217,218,219,220,221,222,223, // 208..223 309 224,225,226,227,228,229,230,231,232,233,234,235,236,237,238,239, // 224..239 310 240,241,242,243,244,245,246,247,248,249,250,251,252,253,254,255 // 240..255 311 }; 312 313 unsigned char const RemapRed[256] = { 314 0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15, // 0..15 315 16,17,18,19,20,21,22,23,24,25,26,27,28,29,30,31, // 16..31 316 32,33,34,35,36,37,38,39,40,41,42,43,44,45,46,47, // 32..47 317 48,49,50,51,52,53,54,55,56,57,58,59,60,61,62,63, // 48..63 318 64,65,66,67,68,69,70,71,72,73,74,75,76,77,78,79, // 64..79 319 80,81,82,83,84,85,86,87,88,89,90,91,92,93,94,95, // 80..95 320 96,97,98,99,100,101,102,103,104,105,106,107,108,109,110,111, // 96..111 321 112,113,114,115,116,117,118,119,120,121,122,123,124,125,126,127, // 112..127 322 128,129,130,131,132,133,134,135,136,137,138,139,140,141,142,143, // 128..143 323 144,145,146,147,148,149,150,151,152,153,154,155,156,157,158,159, // 144..159 324 160,161,162,163,164,165,166,167,168,169,170,171,172,173,174,175, // 160..175 325 127,126,125,124,122,46,120,47,125,124,123,122,42,121,120,120, // 176..191 326 192,193,194,195,196,197,198,199,200,201,202,203,204,205,206,207, // 192..207 327 208,209,210,211,212,213,214,215,216,217,218,219,220,221,222,223, // 208..223 328 224,225,226,227,228,229,230,231,232,233,234,235,236,237,238,239, // 224..239 329 240,241,242,243,244,245,246,247,248,249,250,251,252,253,254,255 // 240..255 330 }; 331 332 unsigned char const RemapBlue[256] = { 333 0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15, // 0..15 334 16,17,18,19,20,21,22,23,24,25,26,27,28,29,30,31, // 16..31 335 32,33,34,35,36,37,38,39,40,41,42,43,44,45,46,47, // 32..47 336 48,49,50,51,52,53,54,55,56,57,58,59,60,61,62,63, // 48..63 337 64,65,66,67,68,69,70,71,72,73,74,75,76,77,78,79, // 64..79 338 80,81,82,83,84,85,86,87,88,89,90,91,92,93,94,95, // 80..95 339 96,97,98,99,100,101,102,103,104,105,106,107,108,109,110,111, // 96..111 340 112,113,114,115,116,117,118,119,120,121,122,123,124,125,126,127, // 112..127 341 128,129,130,131,132,133,134,135,136,137,138,139,140,141,142,143, // 128..143 342 144,145,146,147,148,149,150,151,152,153,154,155,156,157,158,159, // 144..159 343 160,161,162,163,164,165,166,167,168,169,170,171,172,173,174,175, // 160..175 344 2,119,118,135,136,138,112,12,118,135,136,137,138,139,114,112, // 176..191 345 192,193,194,195,196,197,198,199,200,201,202,203,204,205,206,207, // 192..207 346 208,209,210,211,212,213,214,215,216,217,218,219,220,221,222,223, // 208..223 347 224,225,226,227,228,229,230,231,232,233,234,235,236,237,238,239, // 224..239 348 240,241,242,243,244,245,246,247,248,249,250,251,252,253,254,255 // 240..255 349 }; 350 351 unsigned char const RemapOrange[256] = { 352 0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15, // 0..15 353 16,17,18,19,20,21,22,23,24,25,26,27,28,29,30,31, // 16..31 354 32,33,34,35,36,37,38,39,40,41,42,43,44,45,46,47, // 32..47 355 48,49,50,51,52,53,54,55,56,57,58,59,60,61,62,63, // 48..63 356 64,65,66,67,68,69,70,71,72,73,74,75,76,77,78,79, // 64..79 357 80,81,82,83,84,85,86,87,88,89,90,91,92,93,94,95, // 80..95 358 96,97,98,99,100,101,102,103,104,105,106,107,108,109,110,111, // 96..111 359 112,113,114,115,116,117,118,119,120,121,122,123,124,125,126,127, // 112..127 360 128,129,130,131,132,133,134,135,136,137,138,139,140,141,142,143, // 128..143 361 144,145,146,147,148,149,150,151,152,153,154,155,156,157,158,159, // 144..159 362 160,161,162,163,164,165,166,167,168,169,170,171,172,173,174,175, // 160..175 363 24,25,26,27,29,31,46,47,26,27,28,29,30,31,43,47, // 176..191 364 192,193,194,195,196,197,198,199,200,201,202,203,204,205,206,207, // 192..207 365 208,209,210,211,212,213,214,215,216,217,218,219,220,221,222,223, // 208..223 366 224,225,226,227,228,229,230,231,232,233,234,235,236,237,238,239, // 224..239 367 240,241,242,243,244,245,246,247,248,249,250,251,252,253,254,255 // 240..255 368 }; 369 370 unsigned char const RemapGreen[256] = { 371 0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15, // 0..15 372 16,17,18,19,20,21,22,23,24,25,26,27,28,29,30,31, // 16..31 373 32,33,34,35,36,37,38,39,40,41,42,43,44,45,46,47, // 32..47 374 48,49,50,51,52,53,54,55,56,57,58,59,60,61,62,63, // 48..63 375 64,65,66,67,68,69,70,71,72,73,74,75,76,77,78,79, // 64..79 376 80,81,82,83,84,85,86,87,88,89,90,91,92,93,94,95, // 80..95 377 96,97,98,99,100,101,102,103,104,105,106,107,108,109,110,111, // 96..111 378 112,113,114,115,116,117,118,119,120,121,122,123,124,125,126,127, // 112..127 379 128,129,130,131,132,133,134,135,136,137,138,139,140,141,142,143, // 128..143 380 144,145,146,147,148,149,150,151,152,153,154,155,156,157,158,159, // 144..159 381 160,161,162,163,164,165,166,167,168,169,170,171,172,173,174,175, // 160..175 382 5,165,166,167,159,142,140,199,166,167,157,3,159,143,142,141, // 176..191 383 192,193,194,195,196,197,198,199,200,201,202,203,204,205,206,207, // 192..207 384 208,209,210,211,212,213,214,215,216,217,218,219,220,221,222,223, // 208..223 385 224,225,226,227,228,229,230,231,232,233,234,235,236,237,238,239, // 224..239 386 240,241,242,243,244,245,246,247,248,249,250,251,252,253,254,255 // 240..255 387 }; 388 389 unsigned char const RemapLtBlue[256] = { 390 0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15, // 0..15 391 16,17,18,19,20,21,22,23,24,25,26,27,28,29,30,31, // 16..31 392 32,33,34,35,36,37,38,39,40,41,42,43,44,45,46,47, // 32..47 393 48,49,50,51,52,53,54,55,56,57,58,59,60,61,62,63, // 48..63 394 64,65,66,67,68,69,70,71,72,73,74,75,76,77,78,79, // 64..79 395 80,81,82,83,84,85,86,87,88,89,90,91,92,93,94,95, // 80..95 396 96,97,98,99,100,101,102,103,104,105,106,107,108,109,110,111, // 96..111 397 112,113,114,115,116,117,118,119,120,121,122,123,124,125,126,127, // 112..127 398 128,129,130,131,132,133,134,135,136,137,138,139,140,141,142,143, // 128..143 399 144,145,146,147,148,149,150,151,152,153,154,155,156,157,158,159, // 144..159 400 160,161,162,163,164,165,166,167,168,169,170,171,172,173,174,175, // 160..175 401 161,200,201,202,204,205,206,12,201,202,203,204,205,115,198,114, // 176..191 402 192,193,194,195,196,197,198,199,200,201,202,203,204,205,206,207, // 192..207 403 208,209,210,211,212,213,214,215,216,217,218,219,220,221,222,223, // 208..223 404 224,225,226,227,228,229,230,231,232,233,234,235,236,237,238,239, // 224..239 405 240,241,242,243,244,245,246,247,248,249,250,251,252,253,254,255 // 240..255 406 }; 407 408 unsigned char const RemapNone[256] = { 409 0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15, // 0..15 410 16,17,18,19,20,21,22,23,24,25,26,27,28,29,30,31, // 16..31 411 32,33,34,35,36,37,38,39,40,41,42,43,44,45,46,47, // 32..47 412 48,49,50,51,52,53,54,55,56,57,58,59,60,61,62,63, // 48..63 413 64,65,66,67,68,69,70,71,72,73,74,75,76,77,78,79, // 64..79 414 80,81,82,83,84,85,86,87,88,89,90,91,92,93,94,95, // 80..95 415 96,97,98,99,100,101,102,103,104,105,106,107,108,109,110,111, // 96..111 416 112,113,114,115,116,117,118,119,120,121,122,123,124,125,126,127, // 112..127 417 128,129,130,131,132,133,134,135,136,137,138,139,140,141,142,143, // 128..143 418 144,145,146,147,148,149,150,151,152,153,154,155,156,157,158,159, // 144..159 419 160,161,162,163,164,165,166,167,168,169,170,171,172,173,174,175, // 160..175 420 176,177,178,179,180,181,182,183,184,185,186,187,188,189,190,191, // 176..191 421 192,193,194,195,196,197,198,199,200,201,202,203,204,205,206,207, // 192..207 422 208,209,210,211,212,213,214,215,216,217,218,219,220,221,222,223, // 208..223 423 224,225,226,227,228,229,230,231,232,233,234,235,236,237,238,239, // 224..239 424 240,241,242,243,244,245,246,247,248,249,250,251,252,253,254,255 // 240..255 425 };