aboutsummaryrefslogtreecommitdiff
path: root/engines
diff options
context:
space:
mode:
Diffstat (limited to 'engines')
-rw-r--r--engines/sci/scicore/decompressor.cpp201
-rw-r--r--engines/sci/scicore/treedef.131
-rw-r--r--engines/sci/scicore/treedef.2127
-rw-r--r--engines/sci/scicore/treedef.3511
4 files changed, 192 insertions, 678 deletions
diff --git a/engines/sci/scicore/decompressor.cpp b/engines/sci/scicore/decompressor.cpp
index 6d6921c505..7245d8a622 100644
--- a/engines/sci/scicore/decompressor.cpp
+++ b/engines/sci/scicore/decompressor.cpp
@@ -589,23 +589,206 @@ void DecompressorLZW::reorderView(byte *src, byte *dest) {
// DCL decompressor for SCI1.1
//----------------------------------------------
#define HUFFMAN_LEAF 0x40000000
-#define BRANCH_SHIFT 12
-#define BRANCH_NODE(pos, left, right) ((left << BRANCH_SHIFT) | (right)),
-#define LEAF_NODE(pos, value) ((value) | HUFFMAN_LEAF),
+// Branch node
+#define BN(pos, left, right) ((left << 12) | (right)),
+// Leaf node
+#define LN(pos, value) ((value) | HUFFMAN_LEAF),
static int length_tree[] = {
-#include "treedef.1"
+ BN(0, 1, 2)
+ BN(1, 3, 4) BN(2, 5, 6)
+ BN(3, 7, 8) BN(4, 9, 10) BN(5, 11, 12) LN(6, 1)
+ BN(7, 13, 14) BN(8, 15, 16) BN(9, 17, 18) LN(10, 3) LN(11, 2) LN(12, 0)
+ BN(13, 19, 20) BN(14, 21, 22) BN(15, 23, 24) LN(16, 6) LN(17, 5) LN(18, 4)
+ BN(19, 25, 26) BN(20, 27, 28) LN(21, 10) LN(22, 9) LN(23, 8) LN(24, 7)
+ BN(25, 29, 30) LN(26, 13) LN(27, 12) LN(28, 11)
+ LN(29, 15) LN(30, 14)
0 // We need something witout a comma at the end
};
static int distance_tree[] = {
-#include "treedef.2"
+ BN(0, 1, 2)
+ BN(1, 3, 4) BN(2, 5, 6)
+ //
+ BN(3, 7, 8) BN(4, 9, 10) BN(5, 11, 12) LN(6, 0)
+ BN(7, 13, 14) BN(8, 15, 16) BN(9, 17, 18) BN(10, 19, 20)
+ BN(11, 21, 22) BN(12, 23, 24)
+ //
+ BN(13, 25, 26) BN(14, 27, 28) BN(15, 29, 30) BN(16, 31, 32)
+ BN(17, 33, 34) BN(18, 35, 36) BN(19, 37, 38) BN(20, 39, 40)
+ BN(21, 41, 42) BN(22, 43, 44) LN(23, 2) LN(24, 1)
+ //
+ BN(25, 45, 46) BN(26, 47, 48) BN(27, 49, 50) BN(28, 51, 52)
+ BN(29, 53, 54) BN(30, 55, 56) BN(31, 57, 58) BN(32, 59, 60)
+ BN(33, 61, 62) BN(34, 63, 64) BN(35, 65, 66) BN(36, 67, 68)
+ BN(37, 69, 70) BN(38, 71, 72) BN(39, 73, 74) BN(40, 75, 76)
+ LN(41, 6) LN(42, 5) LN(43, 4) LN(44, 3)
+ //
+ BN(45, 77, 78) BN(46, 79, 80) BN(47, 81, 82) BN(48, 83, 84)
+ BN(49, 85, 86) BN(50, 87, 88) BN(51, 89, 90) BN(52, 91, 92)
+ BN(53, 93, 94) BN(54, 95, 96) BN(55, 97, 98) BN(56, 99, 100)
+ BN(57, 101, 102) BN(58, 103, 104) BN(59, 105, 106) BN(60, 107, 108)
+ BN(61, 109, 110) LN(62, 21) LN(63, 20) LN(64, 19)
+ LN(65, 18) LN(66, 17) LN(67, 16) LN(68, 15)
+ LN(69, 14) LN(70, 13) LN(71, 12) LN(72, 11)
+ LN(73, 10) LN(74, 9) LN(75, 8) LN(76, 7)
+ //
+ BN(77, 111, 112) BN(78, 113, 114) BN(79, 115, 116) BN(80, 117, 118)
+ BN(81, 119, 120) BN(82, 121, 122) BN(83, 123, 124) BN(84, 125, 126)
+ LN(85, 47) LN(86, 46) LN(87, 45) LN(88, 44)
+ LN(89, 43) LN(90, 42) LN(91, 41) LN(92, 40)
+ LN(93, 39) LN(94, 38) LN(95, 37) LN(96, 36)
+ LN(97, 35) LN(98, 34) LN(99, 33) LN(100, 32)
+ LN(101, 31) LN(102, 30) LN(103, 29) LN(104, 28)
+ LN(105, 27) LN(106, 26) LN(107, 25) LN(108, 24)
+ LN(109, 23) LN(110, 22) LN(111, 63) LN(112, 62)
+ LN(113, 61) LN(114, 60) LN(115, 59) LN(116, 58)
+ LN(117, 57) LN(118, 56) LN(119, 55) LN(120, 54)
+ LN(121, 53) LN(122, 52) LN(123, 51) LN(124, 50)
+ LN(125, 49) LN(126, 48)
0 // We need something witout a comma at the end
};
static int ascii_tree[] = {
-#include "treedef.3"
- 0 // We need something witout a comma at the end
+ BN(0, 1, 2) BN(1, 3, 4) BN(2, 5, 6) BN(3, 7, 8)
+ BN(4, 9, 10) BN(5, 11, 12) BN(6, 13, 14) BN(7, 15, 16)
+ BN(8, 17, 18) BN(9, 19, 20) BN(10, 21, 22) BN(11, 23, 24)
+ BN(12, 25, 26) BN(13, 27, 28) BN(14, 29, 30) BN(15, 31, 32)
+ BN(16, 33, 34) BN(17, 35, 36) BN(18, 37, 38) BN(19, 39, 40)
+ BN(20, 41, 42) BN(21, 43, 44) BN(22, 45, 46) BN(23, 47, 48)
+ BN(24, 49, 50) BN(25, 51, 52) BN(26, 53, 54) BN(27, 55, 56)
+ BN(28, 57, 58) BN(29, 59, 60) LN(30, 32)
+ //
+ BN(31, 61, 62) BN(32, 63, 64) BN(33, 65, 66) BN(34, 67, 68)
+ BN(35, 69, 70) BN(36, 71, 72) BN(37, 73, 74) BN(38, 75, 76)
+ BN(39, 77, 78) BN(40, 79, 80) BN(41, 81, 82) BN(42, 83, 84)
+ BN(43, 85, 86) BN(44, 87, 88) BN(45, 89, 90) BN(46, 91, 92)
+ BN(47, 93, 94) BN(48, 95, 96) BN(49, 97, 98) LN(50, 117)
+ LN(51, 116) LN(52, 115) LN(53, 114) LN(54, 111)
+ LN(55, 110) LN(56, 108) LN(57, 105) LN(58, 101)
+ LN(59, 97) LN(60, 69)
+ //
+ BN(61, 99, 100) BN(62, 101, 102) BN(63, 103, 104) BN(64, 105, 106)
+ BN(65, 107, 108) BN(66, 109, 110) BN(67, 111, 112) BN(68, 113, 114)
+ BN(69, 115, 116) BN(70, 117, 118) BN(71, 119, 120) BN(72, 121, 122)
+ BN(73, 123, 124) BN(74, 125, 126) BN(75, 127, 128) BN(76, 129, 130)
+ BN(77, 131, 132) BN(78, 133, 134) LN(79, 112) LN(80, 109)
+ LN(81, 104) LN(82, 103) LN(83, 102) LN(84, 100)
+ LN(85, 99) LN(86, 98) LN(87, 84) LN(88, 83)
+ LN(89, 82) LN(90, 79) LN(91, 78) LN(92, 76)
+ LN(93, 73) LN(94, 68) LN(95, 67) LN(96, 65)
+ LN(97, 49) LN(98, 45)
+ //
+ BN(99, 135, 136) BN(100, 137, 138) BN(101, 139, 140) BN(102, 141, 142)
+ BN(103, 143, 144) BN(104, 145, 146) BN(105, 147, 148) BN(106, 149, 150)
+ BN(107, 151, 152) BN(108, 153, 154) BN(109, 155, 156) BN(110, 157, 158)
+ BN(111, 159, 160) BN(112, 161, 162) BN(113, 163, 164) LN(114, 119)
+ LN(115, 107) LN(116, 85) LN(117, 80) LN(118, 77)
+ LN(119, 70) LN(120, 66) LN(121, 61) LN(122, 56)
+ LN(123, 55) LN(124, 53) LN(125, 52) LN(126, 51)
+ LN(127, 50) LN(128, 48) LN(129, 46) LN(130, 44)
+ LN(131, 41) LN(132, 40) LN(133, 13) LN(134, 10)
+ //
+ BN(135, 165, 166) BN(136, 167, 168) BN(137, 169, 170) BN(138, 171, 172)
+ BN(139, 173, 174) BN(140, 175, 176) BN(141, 177, 178) BN(142, 179, 180)
+ BN(143, 181, 182) BN(144, 183, 184) BN(145, 185, 186) BN(146, 187, 188)
+ BN(147, 189, 190) BN(148, 191, 192) LN(149, 121) LN(150, 120)
+ LN(151, 118) LN(152, 95) LN(153, 91) LN(154, 87)
+ LN(155, 72) LN(156, 71) LN(157, 58) LN(158, 57)
+ LN(159, 54) LN(160, 47) LN(161, 42) LN(162, 39)
+ LN(163, 34) LN(164, 9)
+ //
+ BN(165, 193, 194) BN(166, 195, 196) BN(167, 197, 198) BN(168, 199, 200)
+ BN(169, 201, 202) BN(170, 203, 204) BN(171, 205, 206) BN(172, 207, 208)
+ BN(173, 209, 210) BN(174, 211, 212) BN(175, 213, 214) BN(176, 215, 216)
+ BN(177, 217, 218) BN(178, 219, 220) BN(179, 221, 222) BN(180, 223, 224)
+ BN(181, 225, 226) BN(182, 227, 228) BN(183, 229, 230) BN(184, 231, 232)
+ BN(185, 233, 234) LN(186, 93) LN(187, 89) LN(188, 88)
+ LN(189, 86) LN(190, 75) LN(191, 62) LN(192, 43)
+ //
+ BN(193, 235, 236) BN(194, 237, 238) BN(195, 239, 240) BN(196, 241, 242)
+ BN(197, 243, 244) BN(198, 245, 246) BN(199, 247, 248) BN(200, 249, 250)
+ BN(201, 251, 252) BN(202, 253, 254) BN(203, 255, 256) BN(204, 257, 258)
+ BN(205, 259, 260) BN(206, 261, 262) BN(207, 263, 264) BN(208, 265, 266)
+ BN(209, 267, 268) BN(210, 269, 270) BN(211, 271, 272) BN(212, 273, 274)
+ BN(213, 275, 276) BN(214, 277, 278) BN(215, 279, 280) BN(216, 281, 282)
+ BN(217, 283, 284) BN(218, 285, 286) BN(219, 287, 288) BN(220, 289, 290)
+ BN(221, 291, 292) BN(222, 293, 294) BN(223, 295, 296) BN(224, 297, 298)
+ BN(225, 299, 300) BN(226, 301, 302) BN(227, 303, 304) BN(228, 305, 306)
+ BN(229, 307, 308) LN(230, 122) LN(231, 113) LN(232, 38)
+ LN(233, 36) LN(234, 33)
+ //
+ BN(235, 309, 310) BN(236, 311, 312) BN(237, 313, 314) BN(238, 315, 316)
+ BN(239, 317, 318) BN(240, 319, 320) BN(241, 321, 322) BN(242, 323, 324)
+ BN(243, 325, 326) BN(244, 327, 328) BN(245, 329, 330) BN(246, 331, 332)
+ BN(247, 333, 334) BN(248, 335, 336) BN(249, 337, 338) BN(250, 339, 340)
+ BN(251, 341, 342) BN(252, 343, 344) BN(253, 345, 346) BN(254, 347, 348)
+ BN(255, 349, 350) BN(256, 351, 352) BN(257, 353, 354) BN(258, 355, 356)
+ BN(259, 357, 358) BN(260, 359, 360) BN(261, 361, 362) BN(262, 363, 364)
+ BN(263, 365, 366) BN(264, 367, 368) BN(265, 369, 370) BN(266, 371, 372)
+ BN(267, 373, 374) BN(268, 375, 376) BN(269, 377, 378) BN(270, 379, 380)
+ BN(271, 381, 382) BN(272, 383, 384) BN(273, 385, 386) BN(274, 387, 388)
+ BN(275, 389, 390) BN(276, 391, 392) BN(277, 393, 394) BN(278, 395, 396)
+ BN(279, 397, 398) BN(280, 399, 400) BN(281, 401, 402) BN(282, 403, 404)
+ BN(283, 405, 406) BN(284, 407, 408) BN(285, 409, 410) BN(286, 411, 412)
+ BN(287, 413, 414) BN(288, 415, 416) BN(289, 417, 418) BN(290, 419, 420)
+ BN(291, 421, 422) BN(292, 423, 424) BN(293, 425, 426) BN(294, 427, 428)
+ BN(295, 429, 430) BN(296, 431, 432) BN(297, 433, 434) BN(298, 435, 436)
+ LN(299, 124) LN(300, 123) LN(301, 106) LN(302, 92)
+ LN(303, 90) LN(304, 81) LN(305, 74) LN(306, 63)
+ LN(307, 60) LN(308, 0)
+ //
+ BN(309, 437, 438) BN(310, 439, 440) BN(311, 441, 442) BN(312, 443, 444)
+ BN(313, 445, 446) BN(314, 447, 448) BN(315, 449, 450) BN(316, 451, 452)
+ BN(317, 453, 454) BN(318, 455, 456) BN(319, 457, 458) BN(320, 459, 460)
+ BN(321, 461, 462) BN(322, 463, 464) BN(323, 465, 466) BN(324, 467, 468)
+ BN(325, 469, 470) BN(326, 471, 472) BN(327, 473, 474) BN(328, 475, 476)
+ BN(329, 477, 478) BN(330, 479, 480) BN(331, 481, 482) BN(332, 483, 484)
+ BN(333, 485, 486) BN(334, 487, 488) BN(335, 489, 490) BN(336, 491, 492)
+ BN(337, 493, 494) BN(338, 495, 496) BN(339, 497, 498) BN(340, 499, 500)
+ BN(341, 501, 502) BN(342, 503, 504) BN(343, 505, 506) BN(344, 507, 508)
+ BN(345, 509, 510) LN(346, 244) LN(347, 243) LN(348, 242)
+ LN(349, 238) LN(350, 233) LN(351, 229) LN(352, 225)
+ LN(353, 223) LN(354, 222) LN(355, 221) LN(356, 220)
+ LN(357, 219) LN(358, 218) LN(359, 217) LN(360, 216)
+ LN(361, 215) LN(362, 214) LN(363, 213) LN(364, 212)
+ LN(365, 211) LN(366, 210) LN(367, 209) LN(368, 208)
+ LN(369, 207) LN(370, 206) LN(371, 205) LN(372, 204)
+ LN(373, 203) LN(374, 202) LN(375, 201) LN(376, 200)
+ LN(377, 199) LN(378, 198) LN(379, 197) LN(380, 196)
+ LN(381, 195) LN(382, 194) LN(383, 193) LN(384, 192)
+ LN(385, 191) LN(386, 190) LN(387, 189) LN(388, 188)
+ LN(389, 187) LN(390, 186) LN(391, 185) LN(392, 184)
+ LN(393, 183) LN(394, 182) LN(395, 181) LN(396, 180)
+ LN(397, 179) LN(398, 178) LN(399, 177) LN(400, 176)
+ LN(401, 127) LN(402, 126) LN(403, 125) LN(404, 96)
+ LN(405, 94) LN(406, 64) LN(407, 59) LN(408, 37)
+ LN(409, 35) LN(410, 31) LN(411, 30) LN(412, 29)
+ LN(413, 28) LN(414, 27) LN(415, 25) LN(416, 24)
+ LN(417, 23) LN(418, 22) LN(419, 21) LN(420, 20)
+ LN(421, 19) LN(422, 18) LN(423, 17) LN(424, 16)
+ LN(425, 15) LN(426, 14) LN(427, 12) LN(428, 11)
+ LN(429, 8) LN(430, 7) LN(431, 6) LN(432, 5)
+ LN(433, 4) LN(434, 3) LN(435, 2) LN(436, 1)
+ LN(437, 255) LN(438, 254) LN(439, 253) LN(440, 252)
+ LN(441, 251) LN(442, 250) LN(443, 249) LN(444, 248)
+ LN(445, 247) LN(446, 246) LN(447, 245) LN(448, 241)
+ LN(449, 240) LN(450, 239) LN(451, 237) LN(452, 236)
+ LN(453, 235) LN(454, 234) LN(455, 232) LN(456, 231)
+ LN(457, 230) LN(458, 228) LN(459, 227) LN(460, 226)
+ LN(461, 224) LN(462, 175) LN(463, 174) LN(464, 173)
+ LN(465, 172) LN(466, 171) LN(467, 170) LN(468, 169)
+ LN(469, 168) LN(470, 167) LN(471, 166) LN(472, 165)
+ LN(473, 164) LN(474, 163) LN(475, 162) LN(476, 161)
+ LN(477, 160) LN(478, 159) LN(479, 158) LN(480, 157)
+ LN(481, 156) LN(482, 155) LN(483, 154) LN(484, 153)
+ LN(485, 152) LN(486, 151) LN(487, 150) LN(488, 149)
+ LN(489, 148) LN(490, 147) LN(491, 146) LN(492, 145)
+ LN(493, 144) LN(494, 143) LN(495, 142) LN(496, 141)
+ LN(497, 140) LN(498, 139) LN(499, 138) LN(500, 137)
+ LN(501, 136) LN(502, 135) LN(503, 134) LN(504, 133)
+ LN(505, 132) LN(506, 131) LN(507, 130) LN(508, 129)
+ LN(509, 128) LN(510, 26)
};
int DecompressorDCL::unpack(Common::ReadStream *src, byte *dest, uint32 nPacked,
@@ -622,7 +805,7 @@ int DecompressorDCL::huffman_lookup(int *tree) {
while (!(tree[pos] & HUFFMAN_LEAF)) {
bit = getBitsLSB(1);
debugC(kDebugLevelDclInflate, "[%d]:%d->", pos, bit);
- pos = bit ? tree[pos] & 0xFFF : tree[pos] >> BRANCH_SHIFT;
+ pos = bit ? tree[pos] & 0xFFF : tree[pos] >> 12;
}
debugC(kDebugLevelDclInflate, "=%02x\n", tree[pos] & 0xffff);
return tree[pos] & 0xFFFF;
@@ -638,7 +821,7 @@ int DecompressorDCL::unpackDCL(byte* dest) {
length_param = getByteLSB();
if (mode == DCL_ASCII_MODE) {
- warning("DCL-INFLATE: Decompressing ASCII mode (untested)");
+ //warning("DCL-INFLATE: Decompressing ASCII mode (untested)");
} else if (mode) {
warning("DCL-INFLATE: Error: Encountered mode %02x, expected 00 or 01\n", mode);
return -1;
diff --git a/engines/sci/scicore/treedef.1 b/engines/sci/scicore/treedef.1
deleted file mode 100644
index 496046bb60..0000000000
--- a/engines/sci/scicore/treedef.1
+++ /dev/null
@@ -1,31 +0,0 @@
- BRANCH_NODE(0, 1, 2)
- BRANCH_NODE(1, 3, 4)
- BRANCH_NODE(2, 5, 6)
- BRANCH_NODE(3, 7, 8)
- BRANCH_NODE(4, 9, 10)
- BRANCH_NODE(5, 11, 12)
- LEAF_NODE (6, 1)
- BRANCH_NODE(7, 13, 14)
- BRANCH_NODE(8, 15, 16)
- BRANCH_NODE(9, 17, 18)
- LEAF_NODE (10, 3)
- LEAF_NODE (11, 2)
- LEAF_NODE (12, 0)
- BRANCH_NODE(13, 19, 20)
- BRANCH_NODE(14, 21, 22)
- BRANCH_NODE(15, 23, 24)
- LEAF_NODE (16, 6)
- LEAF_NODE (17, 5)
- LEAF_NODE (18, 4)
- BRANCH_NODE(19, 25, 26)
- BRANCH_NODE(20, 27, 28)
- LEAF_NODE (21, 10)
- LEAF_NODE (22, 9)
- LEAF_NODE (23, 8)
- LEAF_NODE (24, 7)
- BRANCH_NODE(25, 29, 30)
- LEAF_NODE (26, 13)
- LEAF_NODE (27, 12)
- LEAF_NODE (28, 11)
- LEAF_NODE (29, 15)
- LEAF_NODE (30, 14)
diff --git a/engines/sci/scicore/treedef.2 b/engines/sci/scicore/treedef.2
deleted file mode 100644
index b4d71bdfed..0000000000
--- a/engines/sci/scicore/treedef.2
+++ /dev/null
@@ -1,127 +0,0 @@
- BRANCH_NODE(0, 1, 2)
- BRANCH_NODE(1, 3, 4)
- BRANCH_NODE(2, 5, 6)
- BRANCH_NODE(3, 7, 8)
- BRANCH_NODE(4, 9, 10)
- BRANCH_NODE(5, 11, 12)
- LEAF_NODE (6, 0)
- BRANCH_NODE(7, 13, 14)
- BRANCH_NODE(8, 15, 16)
- BRANCH_NODE(9, 17, 18)
- BRANCH_NODE(10, 19, 20)
- BRANCH_NODE(11, 21, 22)
- BRANCH_NODE(12, 23, 24)
- BRANCH_NODE(13, 25, 26)
- BRANCH_NODE(14, 27, 28)
- BRANCH_NODE(15, 29, 30)
- BRANCH_NODE(16, 31, 32)
- BRANCH_NODE(17, 33, 34)
- BRANCH_NODE(18, 35, 36)
- BRANCH_NODE(19, 37, 38)
- BRANCH_NODE(20, 39, 40)
- BRANCH_NODE(21, 41, 42)
- BRANCH_NODE(22, 43, 44)
- LEAF_NODE (23, 2)
- LEAF_NODE (24, 1)
- BRANCH_NODE(25, 45, 46)
- BRANCH_NODE(26, 47, 48)
- BRANCH_NODE(27, 49, 50)
- BRANCH_NODE(28, 51, 52)
- BRANCH_NODE(29, 53, 54)
- BRANCH_NODE(30, 55, 56)
- BRANCH_NODE(31, 57, 58)
- BRANCH_NODE(32, 59, 60)
- BRANCH_NODE(33, 61, 62)
- BRANCH_NODE(34, 63, 64)
- BRANCH_NODE(35, 65, 66)
- BRANCH_NODE(36, 67, 68)
- BRANCH_NODE(37, 69, 70)
- BRANCH_NODE(38, 71, 72)
- BRANCH_NODE(39, 73, 74)
- BRANCH_NODE(40, 75, 76)
- LEAF_NODE (41, 6)
- LEAF_NODE (42, 5)
- LEAF_NODE (43, 4)
- LEAF_NODE (44, 3)
- BRANCH_NODE(45, 77, 78)
- BRANCH_NODE(46, 79, 80)
- BRANCH_NODE(47, 81, 82)
- BRANCH_NODE(48, 83, 84)
- BRANCH_NODE(49, 85, 86)
- BRANCH_NODE(50, 87, 88)
- BRANCH_NODE(51, 89, 90)
- BRANCH_NODE(52, 91, 92)
- BRANCH_NODE(53, 93, 94)
- BRANCH_NODE(54, 95, 96)
- BRANCH_NODE(55, 97, 98)
- BRANCH_NODE(56, 99, 100)
- BRANCH_NODE(57, 101, 102)
- BRANCH_NODE(58, 103, 104)
- BRANCH_NODE(59, 105, 106)
- BRANCH_NODE(60, 107, 108)
- BRANCH_NODE(61, 109, 110)
- LEAF_NODE (62, 21)
- LEAF_NODE (63, 20)
- LEAF_NODE (64, 19)
- LEAF_NODE (65, 18)
- LEAF_NODE (66, 17)
- LEAF_NODE (67, 16)
- LEAF_NODE (68, 15)
- LEAF_NODE (69, 14)
- LEAF_NODE (70, 13)
- LEAF_NODE (71, 12)
- LEAF_NODE (72, 11)
- LEAF_NODE (73, 10)
- LEAF_NODE (74, 9)
- LEAF_NODE (75, 8)
- LEAF_NODE (76, 7)
- BRANCH_NODE(77, 111, 112)
- BRANCH_NODE(78, 113, 114)
- BRANCH_NODE(79, 115, 116)
- BRANCH_NODE(80, 117, 118)
- BRANCH_NODE(81, 119, 120)
- BRANCH_NODE(82, 121, 122)
- BRANCH_NODE(83, 123, 124)
- BRANCH_NODE(84, 125, 126)
- LEAF_NODE (85, 47)
- LEAF_NODE (86, 46)
- LEAF_NODE (87, 45)
- LEAF_NODE (88, 44)
- LEAF_NODE (89, 43)
- LEAF_NODE (90, 42)
- LEAF_NODE (91, 41)
- LEAF_NODE (92, 40)
- LEAF_NODE (93, 39)
- LEAF_NODE (94, 38)
- LEAF_NODE (95, 37)
- LEAF_NODE (96, 36)
- LEAF_NODE (97, 35)
- LEAF_NODE (98, 34)
- LEAF_NODE (99, 33)
- LEAF_NODE (100, 32)
- LEAF_NODE (101, 31)
- LEAF_NODE (102, 30)
- LEAF_NODE (103, 29)
- LEAF_NODE (104, 28)
- LEAF_NODE (105, 27)
- LEAF_NODE (106, 26)
- LEAF_NODE (107, 25)
- LEAF_NODE (108, 24)
- LEAF_NODE (109, 23)
- LEAF_NODE (110, 22)
- LEAF_NODE (111, 63)
- LEAF_NODE (112, 62)
- LEAF_NODE (113, 61)
- LEAF_NODE (114, 60)
- LEAF_NODE (115, 59)
- LEAF_NODE (116, 58)
- LEAF_NODE (117, 57)
- LEAF_NODE (118, 56)
- LEAF_NODE (119, 55)
- LEAF_NODE (120, 54)
- LEAF_NODE (121, 53)
- LEAF_NODE (122, 52)
- LEAF_NODE (123, 51)
- LEAF_NODE (124, 50)
- LEAF_NODE (125, 49)
- LEAF_NODE (126, 48)
diff --git a/engines/sci/scicore/treedef.3 b/engines/sci/scicore/treedef.3
deleted file mode 100644
index f75a01c1e6..0000000000
--- a/engines/sci/scicore/treedef.3
+++ /dev/null
@@ -1,511 +0,0 @@
- BRANCH_NODE(0, 1, 2)
- BRANCH_NODE(1, 3, 4)
- BRANCH_NODE(2, 5, 6)
- BRANCH_NODE(3, 7, 8)
- BRANCH_NODE(4, 9, 10)
- BRANCH_NODE(5, 11, 12)
- BRANCH_NODE(6, 13, 14)
- BRANCH_NODE(7, 15, 16)
- BRANCH_NODE(8, 17, 18)
- BRANCH_NODE(9, 19, 20)
- BRANCH_NODE(10, 21, 22)
- BRANCH_NODE(11, 23, 24)
- BRANCH_NODE(12, 25, 26)
- BRANCH_NODE(13, 27, 28)
- BRANCH_NODE(14, 29, 30)
- BRANCH_NODE(15, 31, 32)
- BRANCH_NODE(16, 33, 34)
- BRANCH_NODE(17, 35, 36)
- BRANCH_NODE(18, 37, 38)
- BRANCH_NODE(19, 39, 40)
- BRANCH_NODE(20, 41, 42)
- BRANCH_NODE(21, 43, 44)
- BRANCH_NODE(22, 45, 46)
- BRANCH_NODE(23, 47, 48)
- BRANCH_NODE(24, 49, 50)
- BRANCH_NODE(25, 51, 52)
- BRANCH_NODE(26, 53, 54)
- BRANCH_NODE(27, 55, 56)
- BRANCH_NODE(28, 57, 58)
- BRANCH_NODE(29, 59, 60)
- LEAF_NODE (30, 32)
- BRANCH_NODE(31, 61, 62)
- BRANCH_NODE(32, 63, 64)
- BRANCH_NODE(33, 65, 66)
- BRANCH_NODE(34, 67, 68)
- BRANCH_NODE(35, 69, 70)
- BRANCH_NODE(36, 71, 72)
- BRANCH_NODE(37, 73, 74)
- BRANCH_NODE(38, 75, 76)
- BRANCH_NODE(39, 77, 78)
- BRANCH_NODE(40, 79, 80)
- BRANCH_NODE(41, 81, 82)
- BRANCH_NODE(42, 83, 84)
- BRANCH_NODE(43, 85, 86)
- BRANCH_NODE(44, 87, 88)
- BRANCH_NODE(45, 89, 90)
- BRANCH_NODE(46, 91, 92)
- BRANCH_NODE(47, 93, 94)
- BRANCH_NODE(48, 95, 96)
- BRANCH_NODE(49, 97, 98)
- LEAF_NODE (50, 117)
- LEAF_NODE (51, 116)
- LEAF_NODE (52, 115)
- LEAF_NODE (53, 114)
- LEAF_NODE (54, 111)
- LEAF_NODE (55, 110)
- LEAF_NODE (56, 108)
- LEAF_NODE (57, 105)
- LEAF_NODE (58, 101)
- LEAF_NODE (59, 97)
- LEAF_NODE (60, 69)
- BRANCH_NODE(61, 99, 100)
- BRANCH_NODE(62, 101, 102)
- BRANCH_NODE(63, 103, 104)
- BRANCH_NODE(64, 105, 106)
- BRANCH_NODE(65, 107, 108)
- BRANCH_NODE(66, 109, 110)
- BRANCH_NODE(67, 111, 112)
- BRANCH_NODE(68, 113, 114)
- BRANCH_NODE(69, 115, 116)
- BRANCH_NODE(70, 117, 118)
- BRANCH_NODE(71, 119, 120)
- BRANCH_NODE(72, 121, 122)
- BRANCH_NODE(73, 123, 124)
- BRANCH_NODE(74, 125, 126)
- BRANCH_NODE(75, 127, 128)
- BRANCH_NODE(76, 129, 130)
- BRANCH_NODE(77, 131, 132)
- BRANCH_NODE(78, 133, 134)
- LEAF_NODE (79, 112)
- LEAF_NODE (80, 109)
- LEAF_NODE (81, 104)
- LEAF_NODE (82, 103)
- LEAF_NODE (83, 102)
- LEAF_NODE (84, 100)
- LEAF_NODE (85, 99)
- LEAF_NODE (86, 98)
- LEAF_NODE (87, 84)
- LEAF_NODE (88, 83)
- LEAF_NODE (89, 82)
- LEAF_NODE (90, 79)
- LEAF_NODE (91, 78)
- LEAF_NODE (92, 76)
- LEAF_NODE (93, 73)
- LEAF_NODE (94, 68)
- LEAF_NODE (95, 67)
- LEAF_NODE (96, 65)
- LEAF_NODE (97, 49)
- LEAF_NODE (98, 45)
- BRANCH_NODE(99, 135, 136)
- BRANCH_NODE(100, 137, 138)
- BRANCH_NODE(101, 139, 140)
- BRANCH_NODE(102, 141, 142)
- BRANCH_NODE(103, 143, 144)
- BRANCH_NODE(104, 145, 146)
- BRANCH_NODE(105, 147, 148)
- BRANCH_NODE(106, 149, 150)
- BRANCH_NODE(107, 151, 152)
- BRANCH_NODE(108, 153, 154)
- BRANCH_NODE(109, 155, 156)
- BRANCH_NODE(110, 157, 158)
- BRANCH_NODE(111, 159, 160)
- BRANCH_NODE(112, 161, 162)
- BRANCH_NODE(113, 163, 164)
- LEAF_NODE (114, 119)
- LEAF_NODE (115, 107)
- LEAF_NODE (116, 85)
- LEAF_NODE (117, 80)
- LEAF_NODE (118, 77)
- LEAF_NODE (119, 70)
- LEAF_NODE (120, 66)
- LEAF_NODE (121, 61)
- LEAF_NODE (122, 56)
- LEAF_NODE (123, 55)
- LEAF_NODE (124, 53)
- LEAF_NODE (125, 52)
- LEAF_NODE (126, 51)
- LEAF_NODE (127, 50)
- LEAF_NODE (128, 48)
- LEAF_NODE (129, 46)
- LEAF_NODE (130, 44)
- LEAF_NODE (131, 41)
- LEAF_NODE (132, 40)
- LEAF_NODE (133, 13)
- LEAF_NODE (134, 10)
- BRANCH_NODE(135, 165, 166)
- BRANCH_NODE(136, 167, 168)
- BRANCH_NODE(137, 169, 170)
- BRANCH_NODE(138, 171, 172)
- BRANCH_NODE(139, 173, 174)
- BRANCH_NODE(140, 175, 176)
- BRANCH_NODE(141, 177, 178)
- BRANCH_NODE(142, 179, 180)
- BRANCH_NODE(143, 181, 182)
- BRANCH_NODE(144, 183, 184)
- BRANCH_NODE(145, 185, 186)
- BRANCH_NODE(146, 187, 188)
- BRANCH_NODE(147, 189, 190)
- BRANCH_NODE(148, 191, 192)
- LEAF_NODE (149, 121)
- LEAF_NODE (150, 120)
- LEAF_NODE (151, 118)
- LEAF_NODE (152, 95)
- LEAF_NODE (153, 91)
- LEAF_NODE (154, 87)
- LEAF_NODE (155, 72)
- LEAF_NODE (156, 71)
- LEAF_NODE (157, 58)
- LEAF_NODE (158, 57)
- LEAF_NODE (159, 54)
- LEAF_NODE (160, 47)
- LEAF_NODE (161, 42)
- LEAF_NODE (162, 39)
- LEAF_NODE (163, 34)
- LEAF_NODE (164, 9)
- BRANCH_NODE(165, 193, 194)
- BRANCH_NODE(166, 195, 196)
- BRANCH_NODE(167, 197, 198)
- BRANCH_NODE(168, 199, 200)
- BRANCH_NODE(169, 201, 202)
- BRANCH_NODE(170, 203, 204)
- BRANCH_NODE(171, 205, 206)
- BRANCH_NODE(172, 207, 208)
- BRANCH_NODE(173, 209, 210)
- BRANCH_NODE(174, 211, 212)
- BRANCH_NODE(175, 213, 214)
- BRANCH_NODE(176, 215, 216)
- BRANCH_NODE(177, 217, 218)
- BRANCH_NODE(178, 219, 220)
- BRANCH_NODE(179, 221, 222)
- BRANCH_NODE(180, 223, 224)
- BRANCH_NODE(181, 225, 226)
- BRANCH_NODE(182, 227, 228)
- BRANCH_NODE(183, 229, 230)
- BRANCH_NODE(184, 231, 232)
- BRANCH_NODE(185, 233, 234)
- LEAF_NODE (186, 93)
- LEAF_NODE (187, 89)
- LEAF_NODE (188, 88)
- LEAF_NODE (189, 86)
- LEAF_NODE (190, 75)
- LEAF_NODE (191, 62)
- LEAF_NODE (192, 43)
- BRANCH_NODE(193, 235, 236)
- BRANCH_NODE(194, 237, 238)
- BRANCH_NODE(195, 239, 240)
- BRANCH_NODE(196, 241, 242)
- BRANCH_NODE(197, 243, 244)
- BRANCH_NODE(198, 245, 246)
- BRANCH_NODE(199, 247, 248)
- BRANCH_NODE(200, 249, 250)
- BRANCH_NODE(201, 251, 252)
- BRANCH_NODE(202, 253, 254)
- BRANCH_NODE(203, 255, 256)
- BRANCH_NODE(204, 257, 258)
- BRANCH_NODE(205, 259, 260)
- BRANCH_NODE(206, 261, 262)
- BRANCH_NODE(207, 263, 264)
- BRANCH_NODE(208, 265, 266)
- BRANCH_NODE(209, 267, 268)
- BRANCH_NODE(210, 269, 270)
- BRANCH_NODE(211, 271, 272)
- BRANCH_NODE(212, 273, 274)
- BRANCH_NODE(213, 275, 276)
- BRANCH_NODE(214, 277, 278)
- BRANCH_NODE(215, 279, 280)
- BRANCH_NODE(216, 281, 282)
- BRANCH_NODE(217, 283, 284)
- BRANCH_NODE(218, 285, 286)
- BRANCH_NODE(219, 287, 288)
- BRANCH_NODE(220, 289, 290)
- BRANCH_NODE(221, 291, 292)
- BRANCH_NODE(222, 293, 294)
- BRANCH_NODE(223, 295, 296)
- BRANCH_NODE(224, 297, 298)
- BRANCH_NODE(225, 299, 300)
- BRANCH_NODE(226, 301, 302)
- BRANCH_NODE(227, 303, 304)
- BRANCH_NODE(228, 305, 306)
- BRANCH_NODE(229, 307, 308)
- LEAF_NODE (230, 122)
- LEAF_NODE (231, 113)
- LEAF_NODE (232, 38)
- LEAF_NODE (233, 36)
- LEAF_NODE (234, 33)
- BRANCH_NODE(235, 309, 310)
- BRANCH_NODE(236, 311, 312)
- BRANCH_NODE(237, 313, 314)
- BRANCH_NODE(238, 315, 316)
- BRANCH_NODE(239, 317, 318)
- BRANCH_NODE(240, 319, 320)
- BRANCH_NODE(241, 321, 322)
- BRANCH_NODE(242, 323, 324)
- BRANCH_NODE(243, 325, 326)
- BRANCH_NODE(244, 327, 328)
- BRANCH_NODE(245, 329, 330)
- BRANCH_NODE(246, 331, 332)
- BRANCH_NODE(247, 333, 334)
- BRANCH_NODE(248, 335, 336)
- BRANCH_NODE(249, 337, 338)
- BRANCH_NODE(250, 339, 340)
- BRANCH_NODE(251, 341, 342)
- BRANCH_NODE(252, 343, 344)
- BRANCH_NODE(253, 345, 346)
- BRANCH_NODE(254, 347, 348)
- BRANCH_NODE(255, 349, 350)
- BRANCH_NODE(256, 351, 352)
- BRANCH_NODE(257, 353, 354)
- BRANCH_NODE(258, 355, 356)
- BRANCH_NODE(259, 357, 358)
- BRANCH_NODE(260, 359, 360)
- BRANCH_NODE(261, 361, 362)
- BRANCH_NODE(262, 363, 364)
- BRANCH_NODE(263, 365, 366)
- BRANCH_NODE(264, 367, 368)
- BRANCH_NODE(265, 369, 370)
- BRANCH_NODE(266, 371, 372)
- BRANCH_NODE(267, 373, 374)
- BRANCH_NODE(268, 375, 376)
- BRANCH_NODE(269, 377, 378)
- BRANCH_NODE(270, 379, 380)
- BRANCH_NODE(271, 381, 382)
- BRANCH_NODE(272, 383, 384)
- BRANCH_NODE(273, 385, 386)
- BRANCH_NODE(274, 387, 388)
- BRANCH_NODE(275, 389, 390)
- BRANCH_NODE(276, 391, 392)
- BRANCH_NODE(277, 393, 394)
- BRANCH_NODE(278, 395, 396)
- BRANCH_NODE(279, 397, 398)
- BRANCH_NODE(280, 399, 400)
- BRANCH_NODE(281, 401, 402)
- BRANCH_NODE(282, 403, 404)
- BRANCH_NODE(283, 405, 406)
- BRANCH_NODE(284, 407, 408)
- BRANCH_NODE(285, 409, 410)
- BRANCH_NODE(286, 411, 412)
- BRANCH_NODE(287, 413, 414)
- BRANCH_NODE(288, 415, 416)
- BRANCH_NODE(289, 417, 418)
- BRANCH_NODE(290, 419, 420)
- BRANCH_NODE(291, 421, 422)
- BRANCH_NODE(292, 423, 424)
- BRANCH_NODE(293, 425, 426)
- BRANCH_NODE(294, 427, 428)
- BRANCH_NODE(295, 429, 430)
- BRANCH_NODE(296, 431, 432)
- BRANCH_NODE(297, 433, 434)
- BRANCH_NODE(298, 435, 436)
- LEAF_NODE (299, 124)
- LEAF_NODE (300, 123)
- LEAF_NODE (301, 106)
- LEAF_NODE (302, 92)
- LEAF_NODE (303, 90)
- LEAF_NODE (304, 81)
- LEAF_NODE (305, 74)
- LEAF_NODE (306, 63)
- LEAF_NODE (307, 60)
- LEAF_NODE (308, 0)
- BRANCH_NODE(309, 437, 438)
- BRANCH_NODE(310, 439, 440)
- BRANCH_NODE(311, 441, 442)
- BRANCH_NODE(312, 443, 444)
- BRANCH_NODE(313, 445, 446)
- BRANCH_NODE(314, 447, 448)
- BRANCH_NODE(315, 449, 450)
- BRANCH_NODE(316, 451, 452)
- BRANCH_NODE(317, 453, 454)
- BRANCH_NODE(318, 455, 456)
- BRANCH_NODE(319, 457, 458)
- BRANCH_NODE(320, 459, 460)
- BRANCH_NODE(321, 461, 462)
- BRANCH_NODE(322, 463, 464)
- BRANCH_NODE(323, 465, 466)
- BRANCH_NODE(324, 467, 468)
- BRANCH_NODE(325, 469, 470)
- BRANCH_NODE(326, 471, 472)
- BRANCH_NODE(327, 473, 474)
- BRANCH_NODE(328, 475, 476)
- BRANCH_NODE(329, 477, 478)
- BRANCH_NODE(330, 479, 480)
- BRANCH_NODE(331, 481, 482)
- BRANCH_NODE(332, 483, 484)
- BRANCH_NODE(333, 485, 486)
- BRANCH_NODE(334, 487, 488)
- BRANCH_NODE(335, 489, 490)
- BRANCH_NODE(336, 491, 492)
- BRANCH_NODE(337, 493, 494)
- BRANCH_NODE(338, 495, 496)
- BRANCH_NODE(339, 497, 498)
- BRANCH_NODE(340, 499, 500)
- BRANCH_NODE(341, 501, 502)
- BRANCH_NODE(342, 503, 504)
- BRANCH_NODE(343, 505, 506)
- BRANCH_NODE(344, 507, 508)
- BRANCH_NODE(345, 509, 510)
- LEAF_NODE (346, 244)
- LEAF_NODE (347, 243)
- LEAF_NODE (348, 242)
- LEAF_NODE (349, 238)
- LEAF_NODE (350, 233)
- LEAF_NODE (351, 229)
- LEAF_NODE (352, 225)
- LEAF_NODE (353, 223)
- LEAF_NODE (354, 222)
- LEAF_NODE (355, 221)
- LEAF_NODE (356, 220)
- LEAF_NODE (357, 219)
- LEAF_NODE (358, 218)
- LEAF_NODE (359, 217)
- LEAF_NODE (360, 216)
- LEAF_NODE (361, 215)
- LEAF_NODE (362, 214)
- LEAF_NODE (363, 213)
- LEAF_NODE (364, 212)
- LEAF_NODE (365, 211)
- LEAF_NODE (366, 210)
- LEAF_NODE (367, 209)
- LEAF_NODE (368, 208)
- LEAF_NODE (369, 207)
- LEAF_NODE (370, 206)
- LEAF_NODE (371, 205)
- LEAF_NODE (372, 204)
- LEAF_NODE (373, 203)
- LEAF_NODE (374, 202)
- LEAF_NODE (375, 201)
- LEAF_NODE (376, 200)
- LEAF_NODE (377, 199)
- LEAF_NODE (378, 198)
- LEAF_NODE (379, 197)
- LEAF_NODE (380, 196)
- LEAF_NODE (381, 195)
- LEAF_NODE (382, 194)
- LEAF_NODE (383, 193)
- LEAF_NODE (384, 192)
- LEAF_NODE (385, 191)
- LEAF_NODE (386, 190)
- LEAF_NODE (387, 189)
- LEAF_NODE (388, 188)
- LEAF_NODE (389, 187)
- LEAF_NODE (390, 186)
- LEAF_NODE (391, 185)
- LEAF_NODE (392, 184)
- LEAF_NODE (393, 183)
- LEAF_NODE (394, 182)
- LEAF_NODE (395, 181)
- LEAF_NODE (396, 180)
- LEAF_NODE (397, 179)
- LEAF_NODE (398, 178)
- LEAF_NODE (399, 177)
- LEAF_NODE (400, 176)
- LEAF_NODE (401, 127)
- LEAF_NODE (402, 126)
- LEAF_NODE (403, 125)
- LEAF_NODE (404, 96)
- LEAF_NODE (405, 94)
- LEAF_NODE (406, 64)
- LEAF_NODE (407, 59)
- LEAF_NODE (408, 37)
- LEAF_NODE (409, 35)
- LEAF_NODE (410, 31)
- LEAF_NODE (411, 30)
- LEAF_NODE (412, 29)
- LEAF_NODE (413, 28)
- LEAF_NODE (414, 27)
- LEAF_NODE (415, 25)
- LEAF_NODE (416, 24)
- LEAF_NODE (417, 23)
- LEAF_NODE (418, 22)
- LEAF_NODE (419, 21)
- LEAF_NODE (420, 20)
- LEAF_NODE (421, 19)
- LEAF_NODE (422, 18)
- LEAF_NODE (423, 17)
- LEAF_NODE (424, 16)
- LEAF_NODE (425, 15)
- LEAF_NODE (426, 14)
- LEAF_NODE (427, 12)
- LEAF_NODE (428, 11)
- LEAF_NODE (429, 8)
- LEAF_NODE (430, 7)
- LEAF_NODE (431, 6)
- LEAF_NODE (432, 5)
- LEAF_NODE (433, 4)
- LEAF_NODE (434, 3)
- LEAF_NODE (435, 2)
- LEAF_NODE (436, 1)
- LEAF_NODE (437, 255)
- LEAF_NODE (438, 254)
- LEAF_NODE (439, 253)
- LEAF_NODE (440, 252)
- LEAF_NODE (441, 251)
- LEAF_NODE (442, 250)
- LEAF_NODE (443, 249)
- LEAF_NODE (444, 248)
- LEAF_NODE (445, 247)
- LEAF_NODE (446, 246)
- LEAF_NODE (447, 245)
- LEAF_NODE (448, 241)
- LEAF_NODE (449, 240)
- LEAF_NODE (450, 239)
- LEAF_NODE (451, 237)
- LEAF_NODE (452, 236)
- LEAF_NODE (453, 235)
- LEAF_NODE (454, 234)
- LEAF_NODE (455, 232)
- LEAF_NODE (456, 231)
- LEAF_NODE (457, 230)
- LEAF_NODE (458, 228)
- LEAF_NODE (459, 227)
- LEAF_NODE (460, 226)
- LEAF_NODE (461, 224)
- LEAF_NODE (462, 175)
- LEAF_NODE (463, 174)
- LEAF_NODE (464, 173)
- LEAF_NODE (465, 172)
- LEAF_NODE (466, 171)
- LEAF_NODE (467, 170)
- LEAF_NODE (468, 169)
- LEAF_NODE (469, 168)
- LEAF_NODE (470, 167)
- LEAF_NODE (471, 166)
- LEAF_NODE (472, 165)
- LEAF_NODE (473, 164)
- LEAF_NODE (474, 163)
- LEAF_NODE (475, 162)
- LEAF_NODE (476, 161)
- LEAF_NODE (477, 160)
- LEAF_NODE (478, 159)
- LEAF_NODE (479, 158)
- LEAF_NODE (480, 157)
- LEAF_NODE (481, 156)
- LEAF_NODE (482, 155)
- LEAF_NODE (483, 154)
- LEAF_NODE (484, 153)
- LEAF_NODE (485, 152)
- LEAF_NODE (486, 151)
- LEAF_NODE (487, 150)
- LEAF_NODE (488, 149)
- LEAF_NODE (489, 148)
- LEAF_NODE (490, 147)
- LEAF_NODE (491, 146)
- LEAF_NODE (492, 145)
- LEAF_NODE (493, 144)
- LEAF_NODE (494, 143)
- LEAF_NODE (495, 142)
- LEAF_NODE (496, 141)
- LEAF_NODE (497, 140)
- LEAF_NODE (498, 139)
- LEAF_NODE (499, 138)
- LEAF_NODE (500, 137)
- LEAF_NODE (501, 136)
- LEAF_NODE (502, 135)
- LEAF_NODE (503, 134)
- LEAF_NODE (504, 133)
- LEAF_NODE (505, 132)
- LEAF_NODE (506, 131)
- LEAF_NODE (507, 130)
- LEAF_NODE (508, 129)
- LEAF_NODE (509, 128)
- LEAF_NODE (510, 26)