// Copyright (C) 2018 Arno Ansems
// 
// This program is free software: you can redistribute it and/or modify 
// it under the terms of the GNU General Public License as published by 
// the Free Software Foundation, either version 3 of the License, or 
// (at your option) any later version. 
// 
// This program is distributed in the hope that it will be useful, 
// but WITHOUT ANY WARRANTY; without even the implied warranty of 
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the 
// GNU General Public License for more details. 
// 
// You should have received a copy of the GNU General Public License 
// along with this program.  If not, see http://www.gnu.org/licenses/ 

//
// EgaGraphAbyss
//
// Data structures required for reading the Catacomb Abyss EGA graphics repository.
// Catacomb Abyss v1.13 and v1.24 have different EGA graphics repositories.
//
#pragma once

#include "../Engine/EgaGraph.h"

const huffmanTable egaDictionaryAbyssv113 =
{
    { 45, 209 },
    { 169, 150 },
    { 172, 162 },
    { 89, 141 },
    { 53, 154 },
    { 178, 139 },
    { 164, 229 },
    { 77, 173 },
    { 210, 202 },
    { 90, 163 },
    { 166, 149 },
    { 86, 146 },
    { 177, 212 },
    { 157, 91 },
    { 133, 185 },
    { 165, 203 },
    { 73, 106 },
    { 148, 180 },
    { 75, 82 },
    { 145, 201 },
    { 94, 161 },
    { 41, 138 },
    { 218, 69 },
    { 37, 256 },
    { 147, 83 },
    { 43, 137 },
    { 92, 211 },
    { 179, 58 },
    { 81, 151 },
    { 257, 107 },
    { 52, 44 },
    { 155, 197 },
    { 258, 158 },
    { 74, 186 },
    { 93, 50 },
    { 70, 174 },
    { 181, 78 },
    { 233, 182 },
    { 205, 259 },
    { 54, 217 },
    { 167, 260 },
    { 261, 234 },
    { 189, 168 },
    { 46, 262 },
    { 213, 184 },
    { 263, 98 },
    { 153, 264 },
    { 100, 171 },
    { 57, 265 },
    { 76, 59 },
    { 61, 266 },
    { 156, 142 },
    { 267, 121 },
    { 118, 21 },
    { 268, 226 },
    { 269, 270 },
    { 271, 194 },
    { 272, 196 },
    { 273, 215 },
    { 274, 109 },
    { 275, 276 },
    { 277, 278 },
    { 228, 117 },
    { 84, 279 },
    { 188, 280 },
    { 190, 235 },
    { 122, 281 },
    { 236, 42 },
    { 282, 230 },
    { 283, 123 },
    { 284, 132 },
    { 55, 87 },
    { 38, 285 },
    { 125, 183 },
    { 51, 140 },
    { 286, 287 },
    { 36, 206 },
    { 288, 130 },
    { 35, 71 },
    { 18, 49 },
    { 29, 222 },
    { 289, 290 },
    { 25, 22 },
    { 66, 291 },
    { 72, 198 },
    { 79, 244 },
    { 292, 67 },
    { 208, 40 },
    { 39, 104 },
    { 102, 293 },
    { 245, 294 },
    { 175, 220 },
    { 237, 200 },
    { 27, 246 },
    { 295, 214 },
    { 19, 296 },
    { 33, 297 },
    { 216, 298 },
    { 134, 23 },
    { 204, 299 },
    { 300, 103 },
    { 301, 34 },
    { 302, 303 },
    { 65, 232 },
    { 304, 176 },
    { 305, 26 },
    { 306, 47 },
    { 307, 219 },
    { 308, 11 },
    { 309, 310 },
    { 187, 311 },
    { 20, 108 },
    { 312, 242 },
    { 119, 136 },
    { 144, 313 },
    { 68, 314 },
    { 88, 315 },
    { 316, 114 },
    { 317, 99 },
    { 318, 250 },
    { 221, 95 },
    { 319, 320 },
    { 321, 322 },
    { 323, 60 },
    { 324, 80 },
    { 325, 115 },
    { 326, 327 },
    { 328, 97 },
    { 124, 329 },
    { 330, 110 },
    { 331, 105 },
    { 332, 195 },
    { 30, 333 },
    { 116, 334 },
    { 9, 17 },
    { 335, 336 },
    { 62, 337 },
    { 227, 338 },
    { 339, 126 },
    { 340, 113 },
    { 152, 341 },
    { 342, 238 },
    { 343, 344 },
    { 160, 345 },
    { 346, 347 },
    { 101, 348 },
    { 131, 349 },
    { 350, 129 },
    { 351, 120 },
    { 225, 199 },
    { 352, 193 },
    { 353, 56 },
    { 354, 355 },
    { 356, 170 },
    { 357, 28 },
    { 358, 359 },
    { 360, 361 },
    { 362, 363 },
    { 241, 364 },
    { 365, 366 },
    { 367, 368 },
    { 369, 370 },
    { 371, 13 },
    { 5, 14 },
    { 372, 10 },
    { 111, 373 },
    { 243, 143 },
    { 374, 375 },
    { 376, 85 },
    { 207, 377 },
    { 378, 379 },
    { 380, 381 },
    { 382, 383 },
    { 384, 112 },
    { 385, 386 },
    { 12, 231 },
    { 387, 388 },
    { 159, 389 },
    { 390, 391 },
    { 392, 393 },
    { 24, 394 },
    { 395, 48 },
    { 396, 397 },
    { 6, 398 },
    { 399, 247 },
    { 400, 401 },
    { 402, 96 },
    { 403, 404 },
    { 405, 406 },
    { 239, 407 },
    { 408, 251 },
    { 409, 191 },
    { 410, 411 },
    { 223, 412 },
    { 413, 414 },
    { 249, 415 },
    { 416, 417 },
    { 253, 418 },
    { 419, 420 },
    { 421, 422 },
    { 135, 16 },
    { 423, 8 },
    { 424, 425 },
    { 426, 4 },
    { 427, 428 },
    { 429, 430 },
    { 431, 432 },
    { 433, 434 },
    { 435, 436 },
    { 437, 438 },
    { 439, 2 },
    { 64, 440 },
    { 441, 442 },
    { 443, 444 },
    { 445, 446 },
    { 447, 448 },
    { 449, 450 },
    { 240, 32 },
    { 451, 248 },
    { 452, 453 },
    { 454, 7 },
    { 252, 15 },
    { 455, 456 },
    { 224, 457 },
    { 3, 63 },
    { 458, 31 },
    { 459, 460 },
    { 127, 461 },
    { 192, 462 },
    { 463, 254 },
    { 464, 465 },
    { 466, 467 },
    { 468, 469 },
    { 470, 471 },
    { 128, 472 },
    { 1, 473 },
    { 474, 475 },
    { 476, 477 },
    { 478, 479 },
    { 480, 481 },
    { 482, 483 },
    { 484, 485 },
    { 486, 487 },
    { 488, 489 },
    { 490, 491 },
    { 492, 493 },
    { 494, 495 },
    { 496, 497 },
    { 498, 499 },
    { 500, 501 },
    { 502, 503 },
    { 504, 505 },
    { 506, 255 },
    { 507, 0 },
    { 508, 509 },
    { 0, 0 }
};

const huffmanTable egaDictionaryAbyssv124 =
{
    { 45, 209 },
    { 169, 150 },
    { 172, 162 },
    { 89, 75 },
    { 141, 53 },
    { 154, 178 },
    { 139, 77 },
    { 164, 229 },
    { 173, 210 },
    { 90, 202 },
    { 78, 163 },
    { 166, 86 },
    { 149, 146 },
    { 177, 157 },
    { 91, 212 },
    { 133, 185 },
    { 165, 203 },
    { 73, 148 },
    { 82, 106 },
    { 69, 180 },
    { 145, 201 },
    { 94, 161 },
    { 138, 41 },
    { 218, 83 },
    { 37, 147 },
    { 256, 43 },
    { 137, 92 },
    { 211, 58 },
    { 179, 81 },
    { 151, 257 },
    { 107, 52 },
    { 44, 155 },
    { 197, 258 },
    { 158, 74 },
    { 186, 93 },
    { 70, 50 },
    { 174, 181 },
    { 259, 233 },
    { 205, 182 },
    { 54, 217 },
    { 260, 167 },
    { 261, 234 },
    { 262, 168 },
    { 189, 46 },
    { 263, 213 },
    { 184, 153 },
    { 98, 264 },
    { 100, 171 },
    { 76, 265 },
    { 57, 59 },
    { 266, 121 },
    { 61, 267 },
    { 156, 118 },
    { 142, 268 },
    { 21, 269 },
    { 226, 270 },
    { 271, 272 },
    { 194, 273 },
    { 274, 196 },
    { 215, 275 },
    { 109, 276 },
    { 277, 278 },
    { 117, 113 },
    { 228, 279 },
    { 84, 280 },
    { 123, 188 },
    { 190, 235 },
    { 281, 42 },
    { 282, 236 },
    { 283, 230 },
    { 284, 87 },
    { 132, 55 },
    { 285, 38 },
    { 125, 286 },
    { 183, 140 },
    { 287, 51 },
    { 36, 288 },
    { 206, 130 },
    { 35, 71 },
    { 289, 18 },
    { 29, 222 },
    { 49, 290 },
    { 25, 22 },
    { 66, 291 },
    { 72, 79 },
    { 198, 104 },
    { 244, 292 },
    { 67, 208 },
    { 39, 40 },
    { 293, 102 },
    { 245, 294 },
    { 175, 220 },
    { 237, 200 },
    { 27, 295 },
    { 246, 214 },
    { 19, 296 },
    { 33, 297 },
    { 216, 23 },
    { 298, 134 },
    { 299, 204 },
    { 103, 300 },
    { 301, 302 },
    { 34, 65 },
    { 303, 304 },
    { 232, 305 },
    { 176, 306 },
    { 26, 307 },
    { 47, 308 },
    { 219, 309 },
    { 11, 310 },
    { 108, 311 },
    { 187, 20 },
    { 119, 312 },
    { 242, 136 },
    { 144, 313 },
    { 68, 314 },
    { 315, 88 },
    { 316, 114 },
    { 317, 99 },
    { 318, 250 },
    { 319, 221 },
    { 95, 320 },
    { 321, 322 },
    { 323, 324 },
    { 60, 115 },
    { 325, 80 },
    { 326, 97 },
    { 327, 328 },
    { 110, 124 },
    { 329, 330 },
    { 116, 331 },
    { 105, 332 },
    { 195, 30 },
    { 333, 334 },
    { 9, 335 },
    { 17, 336 },
    { 126, 120 },
    { 62, 337 },
    { 227, 338 },
    { 339, 340 },
    { 341, 152 },
    { 342, 343 },
    { 238, 101 },
    { 344, 345 },
    { 160, 346 },
    { 347, 131 },
    { 348, 349 },
    { 350, 129 },
    { 351, 122 },
    { 225, 199 },
    { 352, 193 },
    { 353, 56 },
    { 354, 355 },
    { 356, 170 },
    { 357, 28 },
    { 358, 359 },
    { 360, 361 },
    { 362, 363 },
    { 364, 241 },
    { 365, 366 },
    { 367, 368 },
    { 369, 370 },
    { 371, 13 },
    { 5, 372 },
    { 111, 14 },
    { 10, 373 },
    { 243, 374 },
    { 143, 375 },
    { 376, 85 },
    { 377, 207 },
    { 378, 379 },
    { 380, 381 },
    { 382, 383 },
    { 384, 385 },
    { 386, 12 },
    { 387, 231 },
    { 388, 159 },
    { 389, 390 },
    { 391, 392 },
    { 393, 394 },
    { 24, 395 },
    { 48, 396 },
    { 397, 6 },
    { 398, 399 },
    { 400, 247 },
    { 112, 401 },
    { 402, 96 },
    { 403, 404 },
    { 405, 406 },
    { 239, 407 },
    { 408, 251 },
    { 409, 191 },
    { 410, 411 },
    { 223, 412 },
    { 413, 414 },
    { 249, 415 },
    { 416, 417 },
    { 253, 418 },
    { 419, 420 },
    { 421, 422 },
    { 135, 16 },
    { 423, 8 },
    { 424, 425 },
    { 426, 4 },
    { 427, 428 },
    { 429, 430 },
    { 431, 432 },
    { 433, 434 },
    { 435, 436 },
    { 437, 438 },
    { 439, 2 },
    { 64, 440 },
    { 441, 442 },
    { 443, 444 },
    { 445, 446 },
    { 447, 448 },
    { 449, 450 },
    { 240, 451 },
    { 248, 452 },
    { 32, 453 },
    { 454, 7 },
    { 252, 455 },
    { 15, 456 },
    { 224, 457 },
    { 3, 63 },
    { 458, 31 },
    { 459, 460 },
    { 127, 461 },
    { 192, 462 },
    { 463, 254 },
    { 464, 465 },
    { 466, 467 },
    { 468, 469 },
    { 470, 471 },
    { 128, 472 },
    { 1, 473 },
    { 474, 475 },
    { 476, 477 },
    { 478, 479 },
    { 480, 481 },
    { 482, 483 },
    { 484, 485 },
    { 486, 487 },
    { 488, 489 },
    { 490, 491 },
    { 492, 493 },
    { 494, 495 },
    { 496, 497 },
    { 498, 499 },
    { 500, 501 },
    { 502, 503 },
    { 504, 505 },
    { 506, 255 },
    { 507, 0 },
    { 508, 509 },
    { 0, 0 }
};

const std::vector<int32_t> egaGraphOffsetsAbyssv113 =
{
    0,
    719,
    727,
    744,
    2006,
    13123,
    19612,
    20601,
    21932,
    24070,
    26241,
    28244,
    30511,
    32941,
    34898,
    37026,
    38900,
    39541,
    39554,
    40305,
    41068,
    41820,
    42487,
    43114,
    43515,
    43574,
    43629,
    43681,
    43733,
    43785,
    43798,
    44694,
    45585,
    46477,
    47394,
    48282,
    49088,
    49932,
    50919,
    51959,
    52648,
    53399,
    54111,
    54800,
    55498,
    56170,
    56931,
    57612,
    58220,
    58843,
    59520,
    59832,
    60319,
    61106,
    62025,
    63153,
    64011,
    64872,
    65692,
    66560,
    67608,
    68813,
    70116,
    71059,
    72040,
    72804,
    73283,
    74436,
    75648,
    76850,
    78105,
    78991,
    79881,
    80776,
    81572,
    82236,
    83013,
    83642,
    84167,
    84453,
    84726,
    85260,
    85874,
    86579,
    87382,
    88159,
    88939,
    89725,
    90491,
    91200,
    91942,
    92858,
    93570,
    94151,
    94752,
    95347,
    95944,
    96466,
    97019,
    97581,
    98072,
    98502,
    98909,
    99711,
    100487,
    101254,
    102045,
    102858,
    103850,
    104871,
    105824,
    106712,
    107404,
    108043,
    108341,
    108638,
    108932,
    109227,
    109529,
    109823,
    110685,
    111108,
    111531,
    112175,
    112848,
    113213,
    113470,
    113738,
    113995,
    114263,
    114484,
    114706,
    114929,
    115154,
    115377,
    115601,
    115834,
    116066,
    116295,
    116524,
    116856,
    117589,
    117912,
    118085,
    118258,
    118641,
    119133,
    119589,
    120663,
    121677,
    122732,
    123752,
    124878,
    126142,
    127230,
    128321,
    129551,
    130462,
    131155,
    132043,
    132919,
    133805,
    134682,
    135652,
    136719,
    137650,
    138605,
    139635,
    140441,
    141130,
    141928,
    142719,
    143225,
    143858,
    144282,
    144696,
    145113,
    145563,
    145982,
    146404,
    146813,
    147167,
    148241,
    149315,
    150063,
    150833,
    151523,
    152069,
    152636,
    153223,
    153785,
    154263,
    154599,
    154615,
    155439,
    156369,
    157344,
    158297,
    159320,
    160304,
    161719,
    163031,
    164449,
    165757,
    166926,
    167918,
    168835,
    170077,
    171162,
    172482,
    173689,
    174905,
    175940,
    177387,
    178747,
    180143,
    181217,
    182472,
    183518,
    184726,
    186312,
    188151,
    189432,
    190785,
    192449,
    194374,
    195867,
    197009,
    198112,
    199358,
    200577,
    202049,
    203458,
    204972,
    206440,
    207805,
    208945,
    209849,
    210668,
    212014,
    213277,
    214622,
    215785,
    217229,
    218611,
    220249,
    221620,
    223023,
    224383,
    225758,
    226928,
    228021,
    228969,
    230031,
    230962,
    232140,
    233146,
    234676,
    236111,
    237088,
    237976,
    238977,
    239867,
    241359,
    242576,
    243673,
    244902,
    246003,
    247605,
    249214,
    250690,
    252187,
    253582,
    254838,
    256205,
    257494,
    258837,
    260247,
    261608,
    262830,
    264049,
    265177,
    266247,
    267631,
    268826,
    269790,
    270579,
    271535,
    272322,
    273215,
    274351,
    275516,
    276692,
    277808,
    278920,
    280161,
    281157,
    282381,
    283370,
    284513,
    285499,
    286608,
    287781,
    288858,
    290032,
    291113,
    292300,
    293430,
    294508,
    295790,
    296929,
    298016,
    299054,
    299074,
    300698,
    300730,
    302228,
    302552,
    302585,
    302712,
    302834,
    302941,
    303053,
    303151,
    303227,
    303327,
    303427,
    303526,
    303629,
    303729,
    303847,
    303924,
    304001,
    304077,
    304153,
    304231,
    304317,
    304421,
    304492,
    304591,
    304665,
    304765,
    304872,
    304978,
    305093,
    305198,
    305326,
    305414,
    305503,
    305580,
    305702,
    305822,
    305946,
    306060,
    306163,
    306294,
    306391,
    306480,
    306572,
    306684,
    306809,
    306930,
    307058,
    307142,
    307238,
    307355,
    307462,
    307564,
    307637,
    307738,
    307840,
    307959,
    308063,
    308180,
    308292,
    308364,
    308441,
    308513,
    308629,
    308727,
    308830,
    308934,
    309039,
    309147,
    309258,
    309364,
    309457,
    -1,
    -1,
    -1,
    -1,
    -1,
    309562,
    -1,
    -1,
    -1,
    -1,
    -1,
    -1,
    -1,
    -1,
    -1,
    -1,
    -1,
    -1,
    -1,
    -1,
    -1,
    -1,
    -1,
    -1,
    -1,
    -1,
    -1,
    -1,
    -1,
    -1,
    -1,
    -1,
    -1,
    -1,
    -1,
    -1,
    -1,
    -1,
    -1,
    -1,
    -1,
    -1,
    -1,
    -1,
    -1,
    -1,
    -1,
    -1,
    -1,
    -1,
    -1,
    -1,
    -1,
    -1,
    -1,
    -1,
    -1,
    -1,
    -1,
    -1,
    -1,
    -1,
    -1,
    -1,
    -1,
    -1,
    -1,
    -1,
    -1,
    -1,
    -1,
    -1,
    -1,
    -1,
    -1,
    -1,
    -1,
    -1,
    -1,
    -1,
    -1,
    -1,
    -1,
    -1,
    -1,
    -1,
    -1,
    -1,
    -1,
    -1,
    -1,
    -1,
    -1,
    -1,
    -1,
    -1,
    -1,
    -1,
    -1,
    -1,
    -1,
    -1,
    -1,
    -1,
    -1,
    -1,
    -1,
    -1,
    -1,
    -1,
    309627,
    309682,
    309764,
    309847,
    309922,
    310010,
    310084,
    310158,
    310238,
    310329,
    310410,
    310485,
    310574,
    310646,
    310737,
    310828,
    310918,
    310998,
    311083,
    311165,
    311239,
    311307,
    311391,
    311474,
    311565,
    311654,
    311731,
    311804,
    311859,
    311914,
    311969,
    312024,
    312079,
    312134,
    312189,
    -1,
    -1,
    312248,
    312385,
    312507,
    312642,
    312773,
    312887,
    313001,
    313112,
    313214,
    313321,
    313420,
    313526,
    313665,
    313800,
    313938,
    314077,
    314210,
    314348,
    314481,
    314621,
    314718,
    314820,
    314927,
    315026,
    315131,
    315189,
    315303,
    315392,
    315514,
    315634,
    315739,
    315877,
    316011,
    316143,
    316280,
    316412,
    316522,
    316625,
    316697,
    316818,
    316917,
    317028,
    317132,
    317204,
    317325,
    317425,
    317542,
    317666,
    317779,
    317870,
    317971,
    318072,
    318180,
    318292,
    318392,
    318505,
    318626,
    318715,
    318836,
    318954,
    319076,
    319209,
    319339,
    319449,
    319561,
    319678,
    319795,
    319919,
    320043,
    320149,
    320267,
    320384,
    321041,
    321628,
    322190,
    322810,
    323434,
    323874,
    324433,
    325024,
    325601,
    326140,
    326730,
    327310,
    327855,
    328501,
    329103,
    329557,
    330367,
    330836,
    331311,
    331859,
    336143
};

const std::vector<int32_t> egaGraphOffsetsAbyssv124 =
{
    0,
    719,
    727,
    744,
    2007,
    13128,
    19644,
    20631,
    21962,
    24105,
    26280,
    28285,
    30556,
    32992,
    34950,
    37082,
    38959,
    39600,
    39613,
    40364,
    41127,
    41879,
    42546,
    43173,
    43576,
    43635,
    43690,
    43741,
    43793,
    43845,
    43858,
    44754,
    45647,
    46540,
    47458,
    48346,
    49152,
    49996,
    50982,
    52024,
    52714,
    53465,
    54177,
    54866,
    55564,
    56235,
    56997,
    57678,
    58283,
    58907,
    59584,
    59896,
    60383,
    61170,
    62088,
    63215,
    64071,
    64929,
    65748,
    66614,
    67659,
    68864,
    70167,
    71110,
    72090,
    72854,
    73333,
    74489,
    75703,
    76905,
    78162,
    79047,
    79936,
    80829,
    81624,
    82286,
    83061,
    83689,
    84213,
    84499,
    84772,
    85305,
    85919,
    86624,
    87428,
    88204,
    88984,
    89770,
    90534,
    91243,
    91983,
    92898,
    93610,
    94190,
    94791,
    95386,
    95982,
    96503,
    97055,
    97615,
    98105,
    98534,
    98940,
    99739,
    100509,
    101274,
    102064,
    102876,
    103862,
    104882,
    105833,
    106718,
    107408,
    108047,
    108345,
    108642,
    108936,
    109232,
    109534,
    109828,
    110691,
    111116,
    111541,
    112185,
    112857,
    113222,
    113480,
    113749,
    114007,
    114275,
    114496,
    114719,
    114941,
    115165,
    115388,
    115612,
    115845,
    116077,
    116306,
    116536,
    116868,
    117600,
    117923,
    118096,
    118268,
    118651,
    119143,
    119598,
    120667,
    121680,
    122733,
    123748,
    124872,
    126135,
    127221,
    128308,
    129535,
    130449,
    131142,
    132028,
    132904,
    133790,
    134664,
    135632,
    136698,
    137628,
    138580,
    139609,
    140417,
    141107,
    141905,
    142696,
    143202,
    143834,
    144258,
    144672,
    145089,
    145539,
    145958,
    146380,
    146790,
    147145,
    148219,
    149293,
    150041,
    150810,
    151500,
    152045,
    152611,
    153197,
    153758,
    154236,
    154572,
    154588,
    155411,
    156340,
    157314,
    158268,
    159292,
    160277,
    161684,
    162990,
    164402,
    165707,
    166872,
    167863,
    168779,
    170022,
    171107,
    172429,
    173637,
    174854,
    175889,
    177335,
    178692,
    180090,
    181164,
    182419,
    183467,
    184677,
    186266,
    188109,
    189393,
    190746,
    192414,
    194345,
    195841,
    196982,
    198083,
    199325,
    200540,
    202009,
    203416,
    204932,
    206403,
    207766,
    208905,
    209804,
    210620,
    211966,
    213229,
    214572,
    215733,
    217177,
    218559,
    220191,
    221558,
    222964,
    224326,
    225695,
    226861,
    227952,
    228899,
    229960,
    230890,
    232068,
    233074,
    234594,
    236022,
    236996,
    237880,
    238878,
    239765,
    241258,
    242471,
    243566,
    244791,
    245890,
    247493,
    249104,
    250580,
    252077,
    253470,
    254725,
    256090,
    257376,
    258726,
    260139,
    261503,
    262723,
    263941,
    265069,
    266137,
    267522,
    268716,
    269679,
    270467,
    271423,
    272210,
    273103,
    274240,
    275402,
    276575,
    277689,
    278800,
    280042,
    281037,
    282259,
    283247,
    284389,
    285375,
    286482,
    287654,
    288730,
    289906,
    290987,
    292174,
    293300,
    294374,
    295656,
    296791,
    297875,
    298910,
    298930,
    300553,
    300585,
    302089,
    302414,
    302447,
    302574,
    302696,
    302803,
    302916,
    303014,
    303089,
    303189,
    303289,
    303388,
    303490,
    303590,
    303708,
    303785,
    303862,
    303938,
    304014,
    304092,
    304178,
    304282,
    304353,
    304452,
    304526,
    304626,
    304733,
    304839,
    304954,
    305060,
    305188,
    305275,
    305364,
    305441,
    305563,
    305684,
    305808,
    305924,
    306027,
    306158,
    306255,
    306344,
    306436,
    306549,
    306673,
    306795,
    306924,
    307009,
    307105,
    307223,
    307330,
    307432,
    307505,
    307606,
    307708,
    307828,
    307932,
    308049,
    308161,
    308234,
    308311,
    308383,
    308499,
    308597,
    308699,
    308803,
    308908,
    309016,
    309127,
    309233,
    309326,
    -1,
    -1,
    -1,
    -1,
    -1,
    309431,
    -1,
    -1,
    -1,
    -1,
    -1,
    -1,
    -1,
    -1,
    -1,
    -1,
    -1,
    -1,
    -1,
    -1,
    -1,
    -1,
    -1,
    -1,
    -1,
    -1,
    -1,
    -1,
    -1,
    -1,
    -1,
    -1,
    -1,
    -1,
    -1,
    -1,
    -1,
    -1,
    -1,
    -1,
    -1,
    -1,
    -1,
    -1,
    -1,
    -1,
    -1,
    -1,
    -1,
    -1,
    -1,
    -1,
    -1,
    -1,
    -1,
    -1,
    -1,
    -1,
    -1,
    -1,
    -1,
    -1,
    -1,
    -1,
    -1,
    -1,
    -1,
    -1,
    -1,
    -1,
    -1,
    -1,
    -1,
    -1,
    -1,
    -1,
    -1,
    -1,
    -1,
    -1,
    -1,
    -1,
    -1,
    -1,
    -1,
    -1,
    -1,
    -1,
    -1,
    -1,
    -1,
    -1,
    -1,
    -1,
    -1,
    -1,
    -1,
    -1,
    -1,
    -1,
    -1,
    -1,
    -1,
    -1,
    -1,
    -1,
    -1,
    -1,
    -1,
    -1,
    309496,
    309551,
    309633,
    309716,
    309791,
    309879,
    309953,
    310027,
    310107,
    310198,
    310279,
    310354,
    310443,
    310515,
    310606,
    310697,
    310787,
    310867,
    310952,
    311033,
    311107,
    311175,
    311259,
    311342,
    311433,
    311522,
    311599,
    311672,
    311727,
    311782,
    311837,
    311892,
    311947,
    312002,
    312057,
    -1,
    -1,
    312116,
    312254,
    312376,
    312512,
    312643,
    312757,
    312871,
    312982,
    313084,
    313190,
    313289,
    313394,
    313532,
    313665,
    313801,
    313937,
    314068,
    314205,
    314335,
    314473,
    314570,
    314672,
    314779,
    314878,
    314982,
    315040,
    315154,
    315242,
    315364,
    315484,
    315589,
    315727,
    315861,
    315993,
    316130,
    316262,
    316373,
    316477,
    316549,
    316670,
    316769,
    316880,
    316984,
    317056,
    317177,
    317276,
    317393,
    317516,
    317629,
    317720,
    317821,
    317922,
    318030,
    318142,
    318242,
    318355,
    318476,
    318565,
    318685,
    318802,
    318922,
    319053,
    319182,
    319292,
    319404,
    319521,
    319637,
    319760,
    319883,
    319989,
    320107,
    320224,
    320890,
    321489,
    322061,
    322694,
    323329,
    323779,
    324349,
    324950,
    325538,
    326086,
    326688,
    327278,
    327833,
    328487,
    329099,
    329562,
    330385,
    330865,
    331349,
    331906,
    335994
};

typedef enum {
    FINALEPIC=4,
    STATUSPIC,                   // 5
    SCROLLTOPPIC,                // 6
    SCROLLBOTTOMPIC,             // 7
    SCROLL1PIC,                  // 8
    SCROLL2PIC,                  // 9
    SCROLL3PIC,                  // 10
    SCROLL4PIC,                  // 11
    SCROLL5PIC,                  // 12
    SCROLL6PIC,                  // 13
    SCROLL7PIC,                  // 14
    SCROLL8PIC,                  // 15
    FACE5PIC,                    // 16
    FIRSTLATCHPIC,               // 17
    FACE1PIC,                    // 18
    FACE2PIC,                    // 19
    FACE3PIC,                    // 20
    FACE4PIC,                    // 21
    RADAR_TOPPIC,                // 22
    RADAR_BOTTOMPIC,             // 23
    RADAR_RGEMPIC,               // 24
    RADAR_GGEMPIC,               // 25
    RADAR_BGEMPIC,               // 26
    RADAR_YGEMPIC,               // 27
    RADAR_PGEMPIC,               // 28
    FIRSTSCALEPIC,               // 29
    // Lump Start
    SKELETON_1PIC,               // 30
    SKELETON_2PIC,               // 31
    SKELETON_3PIC,               // 32
    SKELETON_4PIC,               // 33
    SKELETON_ATTACK_1PIC,        // 34
    SKELETON_ATTACK_2PIC,        // 35
    SKELETON_ATTACK_3PIC,        // 36
    SKELETON_OUCHPIC,            // 37
    SKELETON_DEATH_1PIC,         // 38
    SKELETON_DEATH_2PIC,         // 39
    // Lump Start
    SPOOK1PIC,                   // 40
    SPOOK2PIC,                   // 41
    SPOOK3PIC,                   // 42
    SPOOK4PIC,                   // 43
    SPOOK_ATTACKPIC,             // 44
    SPOOKHITPIC,                 // 45
    SPOOK_INOUTPIC,              // 46
    // Lump Start
    TOMB1PIC,                    // 47
    TOMB2PIC,                    // 48
    TOMB3PIC,                    // 49
    // Lump Start
    WET_BUBBLE1PIC,              // 50
    WET_BUBBLE2PIC,              // 51
    WET_EYESPIC,                 // 52
    WET_RISE1PIC,                // 53
    WET_RISE2PIC,                // 54
    WET_WALK1PIC,                // 55
    WET_WALK2PIC,                // 56
    WET_WALK3PIC,                // 57
    WET_WALK4PIC,                // 58
    WET_ATTACK1PIC,              // 59
    WET_ATTACK2PIC,              // 60
    WET_ATTACK3PIC,              // 61
    WET_OUCHPIC,                 // 62
    WET_DIE1PIC,                 // 63
    WET_DIE2PIC,                 // 64
    WET_DIE3PIC,                 // 65
    // Lump Start
    OBJ_WARP1PIC,                // 66
    OBJ_WARP2PIC,                // 67
    OBJ_WARP3PIC,                // 68
    OBJ_WARP4PIC,                // 69
    // Lump Start
    EYE_WALK1PIC,                // 70
    EYE_WALK2PIC,                // 71
    EYE_WALK3PIC,                // 72
    EYE_OUCH1PIC,                // 73
    EYE_OUCH2PIC,                // 74
    EYE_DEATH1PIC,               // 75
    EYE_DEATH2PIC,               // 76
    EYE_DEATH3PIC,               // 77
    EYE_SHOT1PIC,                // 78
    EYE_SHOT2PIC,                // 79
    // Lump Start
    ZOMB_APPEAR1PIC,             // 80
    ZOMB_APPEAR2PIC,             // 81
    ZOMB_APPEAR3PIC,             // 82
    ZOMB_APPEAR4PIC,             // 83
    ZOMB_WALK1PIC,               // 84
    ZOMB_WALK2PIC,               // 85
    ZOMB_WALK3PIC,               // 86
    ZOMB_OUCHPIC,                // 87
    ZOMB_ATTACKPIC,              // 88
    ZOMB_DIE1PIC,                // 89
    ZOMB_DIE2PIC,                // 90
    ZOMB_DIE3PIC,                // 91
    // Lump Start
    ORC1PIC,                     // 92
    ORC2PIC,                     // 93
    ORC3PIC,                     // 94
    ORC4PIC,                     // 95
    ORCATTACK1PIC,               // 96
    ORCATTACK2PIC,               // 97
    ORCOUCHPIC,                  // 98
    ORCDIE1PIC,                  // 99
    ORCDIE2PIC,                  // 100
    ORCDIE3PIC,                  // 101
    // Lump Start
    TROLL1PIC,                   // 102
    TROLL2PIC,                   // 103
    TROLL3PIC,                   // 104
    TROLL4PIC,                   // 105
    TROLLOUCHPIC,                // 106
    TROLLATTACK1PIC,             // 107
    TROLLATTACK2PIC,             // 108
    TROLLATTACK3PIC,             // 109
    TROLLDIE1PIC,                // 110
    TROLLDIE2PIC,                // 111
    TROLLDIE3PIC,                // 112
    // Lump Start
    BOLTOBJPIC,                  // 113
    BOLT2OBJPIC,                 // 114
    BOLT3OBJPIC,                 // 115
    // Lump Start
    NUKEOBJPIC,                  // 116
    NUKE2OBJPIC,                 // 117
    NUKE3OBJPIC,                 // 118
    // Lump Start
    PITOBJPIC,                   // 119
    // Lump Start
    TIMEOBJ1PIC,                 // 120
    TIMEOBJ2PIC,                 // 121
    // Lump Start
    O_WATER_CHEST1PIC,           // 122
    O_WATER_CHEST2PIC,           // 123
    // Lump Start
    POTIONOBJPIC,                // 124
    // Lump Start
    RKEYOBJPIC,                  // 125
    // Lump Start
    YKEYOBJPIC,                  // 126
    // Lump Start
    GKEYOBJPIC,                  // 127
    // Lump Start
    BKEYOBJPIC,                  // 128
    // Lump Start
    RGEM1PIC,                    // 129
    RGEM2PIC,                    // 130
    // Lump Start
    GGEM1PIC,                    // 131
    GGEM2PIC,                    // 132
    // Lump Start
    BGEM1PIC,                    // 133
    BGEM2PIC,                    // 134
    // Lump Start
    YGEM1PIC,                    // 135
    YGEM2PIC,                    // 136
    // Lump Start
    PGEM1PIC,                    // 137
    PGEM2PIC,                    // 138
    // Lump Start
    SCROLLOBJPIC,                // 139
    // Lump Start
    CHESTOBJPIC,                 // 140
    // Lump Start
    RKEY2PIC,                    // 141
    // Lump Start
    PSHOT1PIC,                   // 142
    PSHOT2PIC,                   // 143
    PSHOT_EXP1PIC,               // 144
    PSHOT_EXP2PIC,               // 145
    PSHOT_EXP3PIC,               // 146
    // Lump Start
    DEMON1PIC,                   // 147
    DEMON2PIC,                   // 148
    DEMON3PIC,                   // 149
    DEMON4PIC,                   // 150
    DEMONATTACK1PIC,             // 151
    DEMONATTACK2PIC,             // 152
    DEMONATTACK3PIC,             // 153
    DEMONOUCHPIC,                // 154
    DEMONDIE1PIC,                // 155
    DEMONDIE2PIC,                // 156
    DEMONDIE3PIC,                // 157
    // Lump Start
    RED_DEMON1PIC,               // 158
    RED_DEMON2PIC,               // 159
    RED_DEMON3PIC,               // 160
    RED_DEMON4PIC,               // 161
    RED_DEMONATTACK1PIC,         // 162
    RED_DEMONATTACK2PIC,         // 163
    RED_DEMONATTACK3PIC,         // 164
    RED_DEMONOUCHPIC,            // 165
    RED_DEMONDIE1PIC,            // 166
    RED_DEMONDIE2PIC,            // 167
    RED_DEMONDIE3PIC,            // 168
    // Lump Start
    MAGE1PIC,                    // 169
    MAGE2PIC,                    // 170
    MAGEOUCHPIC,                 // 171
    MAGEATTACKPIC,               // 172
    MAGEDIE1PIC,                 // 173
    MAGEDIE2PIC,                 // 174
    // Lump Start
    BAT1PIC,                     // 175
    BAT2PIC,                     // 176
    BAT3PIC,                     // 177
    BAT4PIC,                     // 178
    BATDIE1PIC,                  // 179
    BATDIE2PIC,                  // 180
    // Lump Start
    GREL1PIC,                    // 181
    GREL2PIC,                    // 182
    GRELATTACKPIC,               // 183
    GRELHITPIC,                  // 184
    GRELDIE1PIC,                 // 185
    GRELDIE2PIC,                 // 186
    GRELDIE3PIC,                 // 187
    GRELDIE4PIC,                 // 188
    GRELDIE5PIC,                 // 189
    GRELDIE6PIC,                 // 190
    SKULL_SHOTPIC,               // 191
    FIRSTWALLPIC,                // 192
    // Lump Start
    EXPWALL1PIC,                 // 193
    EXPWALL2PIC,                 // 194
    EXPWALL3PIC,                 // 195
    // Lump Start
    W_WATER_EXP1PIC,             // 196
    W_WATER_EXP2PIC,             // 197
    W_WATER_EXP3PIC,             // 198
    // Lump Start
    W_NEMPICEWPIC,               // 199
    // Lump Start
    W_PENTAEWPIC,                // 200
    W_PENTANSPIC,                // 201
    // Lump Start
    W_ALTER_LFPIC,               // 202
    // Lump Start
    W_ALTER_RTPIC,               // 203
    // Lump Start
    W_SUB1EWPIC,                 // 204
    W_SUB1NSPIC,                 // 205
    // Lump Start
    W_SUB2EWPIC,                 // 206
    W_SUB2NSPIC,                 // 207
    // Lump Start
    W_SUB3EWPIC,                 // 208
    W_SUB3NSPIC,                 // 209
    // Lump Start
    WALL8LPIC,                   // 210
    WALL8DPIC,                   // 211
    // Lump Start
    WALL9LPIC,                   // 212
    WALL9DPIC,                   // 213
    // Lump Start
    WALL10LPIC,                  // 214
    WALL10DPIC,                  // 215
    // Lump Start
    WALL11LPIC,                  // 216
    WALL11DPIC,                  // 217
    // Lump Start
    WALL12LPIC,                  // 218
    WALL12DPIC,                  // 219
    // Lump Start
    WALL13LPIC,                  // 220
    WALL13DPIC,                  // 221
    // Lump Start
    WALL14LPIC,                  // 222
    WALL14DPIC,                  // 223
    // Lump Start
    WALL15LPIC,                  // 224
    WALL15DPIC,                  // 225
    // Lump Start
    WALL16LPIC,                  // 226
    WALL16DPIC,                  // 227
    // Lump Start
    WALL18LPIC,                  // 228
    WALL18DPIC,                  // 229
    // Lump Start
    WALL17LPIC,                  // 230
    WALL17DPIC,                  // 231
    // Lump Start
    WALL19LPIC,                  // 232
    WALL19DPIC,                  // 233
    // Lump Start
    WALL20LPIC,                  // 234
    WALL20DPIC,                  // 235
    // Lump Start
    WALL21LPIC,                  // 236
    WALL21DPIC,                  // 237
    // Lump Start
    WALL22LPIC,                  // 238
    WALL22DPIC,                  // 239
    // Lump Start
    WALL23LPIC,                  // 240
    WALL23DPIC,                  // 241
    // Lump Start
    WALL24LPIC,                  // 242
    WALL24DPIC,                  // 243
    // Lump Start
    WALL25LPIC,                  // 244
    WALL25DPIC,                  // 245
    // Lump Start
    WALL26LPIC,                  // 246
    WALL26DPIC,                  // 247
    // Lump Start
    WALL27LPIC,                  // 248
    WALL27DPIC,                  // 249
    // Lump Start
    WALL28LPIC,                  // 250
    WALL28DPIC,                  // 251
    // Lump Start
    WALL29LPIC,                  // 252
    WALL29DPIC,                  // 253
    // Lump Start
    WALL30LPIC,                  // 254
    WALL30DPIC,                  // 255
    // Lump Start
    WALL31LPIC,                  // 256
    WALL31DPIC,                  // 257
    // Lump Start
    W_WATER1EWPIC,               // 258
    W_WATER1NSPIC,               // 259
    // Lump Start
    W_WATER2EWPIC,               // 260
    W_WATER2NSPIC,               // 261
    // Lump Start
    W_FINALEXITPIC,              // 262
    // Lump Start
    W_DRAIN1EWPIC,               // 263
    W_DRAIN1NSPIC,               // 264
    W_DRAIN2EWPIC,               // 265
    W_DRAIN2NSPIC,               // 266
    // Lump Start
    W_WARP1EWPIC,                // 267
    W_WARP2EWPIC,                // 268
    W_WARP1NSPIC,                // 269
    W_WARP2NSPIC,                // 270
    W_WINDOWEWPIC,               // 271
    W_WINDOWNSPIC,               // 272
    W_WOOD_DOOREWPIC,            // 273
    W_WOOD_DOORNSPIC,            // 274
    W_WOODEN_DOORPIC,            // 275
    W_METAL_DOORPIC,             // 276
    W_GLOW_DOORPIC,              // 277
    // Lump Start
    W_TORCH1PIC,                 // 278
    W_TORCH2PIC,                 // 279
    // Lump Start
    W_LSUB_STONEPIC,             // 280
    W_DSUB_STONEPIC,             // 281
    // Lump Start
    W_BLOODY_LSUB_STONEPIC,      // 282
    W_BLOODY_DSUB_STONEPIC,      // 283
    // Lump Start
    W_BREATH_LWALL1PIC,          // 284
    W_BREATH_DWALL1PIC,          // 285
    W_BREATH_LWALL2PIC,          // 286
    W_BREATH_DWALL2PIC,          // 287
    // Lump Start
    W_WOOD_DOORWAYPIC,           // 288
    // Lump Start
    W_WOOD_DOORWAY_GLOWPIC,      // 289
    // Lump Start
    W_WATER_GATEEW1PIC,          // 290
    W_WATER_GATEEW2PIC,          // 291
    W_WATER_GATENS1PIC,          // 292
    W_WATER_GATENS2PIC,          // 293
    // Lump Start
    W_PRE_CHEATSPIC,             // 294
    // Lump Start
    W_CHEAT_GODPIC,              // 295
    // Lump Start
    W_CHEAT_WARPPIC,             // 296
    // Lump Start
    W_CHEAT_ITEMSPIC,            // 297
    // Lump Start
    W_CHEAT_FREEZEPIC,           // 298
    // Lump Start
    W_POST_CHEATPIC,             // 299
    // Lump Start
    W_SURFACE_PLAQPIC,           // 300
    // Lump Start
    W_BREATH_LWALL3PIC,          // 301
    W_BREATH_DWALL3PIC,          // 302
    W_BREATH_LWALL4PIC,          // 303
    W_BREATH_DWALL4PIC,          // 304
    // Lump Start
    MAGE_STATUEPIC,              // 305
    // Lump Start
    ZOMBIE_STATUEPIC,            // 306
    // Lump Start
    EYE_STATUEPIC,               // 307
    // Lump Start
    NEM_STATUEPIC,               // 308
    // Lump Start
    SKELETON_STATUEPIC,          // 309
    // Lump Start
    SPOOK_STATUEPIC,             // 310
    // Lump Start
    ORCH_STATUEPIC,              // 311
    LASTWALLPIC,                 // 312

    HAND1PICM=313,

    NORTHICONSPR=314,
    FIRSTTILESIZE8=315,
    FIRSTTILESIZE8MASKED=316,
    FIRSTTILESIZE16 = 317,
    LASTTILESIZE16 = 531,
    FIRSTTILESIZE16MASKED = 534,
    LASTTILESIZE16MASKED = 604,
    LEVEL1TEXT=605,
    LEVEL2TEXT,                  // 606
    LEVEL3TEXT,                  // 607
    LEVEL4TEXT,                  // 608
    LEVEL5TEXT,                  // 609
    LEVEL6TEXT,                  // 610
    LEVEL7TEXT,                  // 611
    LEVEL8TEXT,                  // 612
    LEVEL9TEXT,                  // 613
    LEVEL10TEXT,                 // 614
    LEVEL11TEXT,                 // 615
    LEVEL12TEXT,                 // 616
    LEVEL13TEXT,                 // 617
    LEVEL14TEXT,                 // 618
    LEVEL15TEXT,                 // 619
    LEVEL16TEXT,                 // 620
    LEVEL17TEXT,                 // 621
    LEVEL18TEXT,                 // 622
    LEVEL19TEXT,                 // 623
    LEVEL20TEXT,                 // 624
    PIRACY,                      // 625
    ENUMEND
} egaGraphicsAbyss;

const egaGraphStaticData egaGraphAbyss =
{
    "EGAGRAPH.ABS",
    egaGraphOffsetsAbyssv113,
    egaDictionaryAbyssv113,
    FINALEPIC,
    FIRSTSCALEPIC,
    FIRSTWALLPIC,
    HAND1PICM,
    NORTHICONSPR,
    FIRSTTILESIZE8,
    FIRSTTILESIZE8MASKED,
    FIRSTTILESIZE16,
    LASTTILESIZE16,
    FIRSTTILESIZE16MASKED,
    LASTTILESIZE16MASKED,
    LEVEL1TEXT,
    LEVEL20TEXT,
    HAND1PICM
};

const egaGraphStaticData egaGraphAbyssV124 =
{
    "EGAGRAPH.ABS",
    egaGraphOffsetsAbyssv124,
    egaDictionaryAbyssv124,
    FINALEPIC,
    FIRSTSCALEPIC,
    FIRSTWALLPIC,
    HAND1PICM,
    NORTHICONSPR,
    FIRSTTILESIZE8,
    FIRSTTILESIZE8MASKED,
    FIRSTTILESIZE16,
    LASTTILESIZE16,
    FIRSTTILESIZE16MASKED,
    LASTTILESIZE16MASKED,
    LEVEL1TEXT,
    LEVEL20TEXT,
    HAND1PICM
};
