From 5825d77e3746a9d11b940e9b0345eb53a60ea2bd Mon Sep 17 00:00:00 2001 From: Robert Göffringmann Date: Sat, 12 Jul 2003 15:21:34 +0000 Subject: added khalek's huffman tree for 0.0109 svn-id: r8945 --- sky/hufftext.cpp | 170 +++++++++++++++++++++++++++++++++++++++++++++++++++++++ sky/text.cpp | 3 + sky/text.h | 3 +- 3 files changed, 175 insertions(+), 1 deletion(-) diff --git a/sky/hufftext.cpp b/sky/hufftext.cpp index 8172391daa..acb027e6d9 100644 --- a/sky/hufftext.cpp +++ b/sky/hufftext.cpp @@ -21,6 +21,176 @@ #include "text.h" +const HuffTree SkyText::_huffTree_00109[] = { + { 1, 22, 0 }, + { 2, 9, 0 }, + { 3, 6, 0 }, + { 4, 5, 0 }, + { 0, 0, 0x20 }, + { 0, 0, 0x65 }, + { 7, 8, 0 }, + { 0, 0, 0x74 }, + { 0, 0, 0x6F }, + { 10, 17, 0 }, + { 11, 14, 0 }, + { 12, 13, 0 }, + { 0, 0, 0x2E }, + { 0, 0, 0x61 }, + { 15, 16, 0 }, + { 0, 0, 0x00 }, + { 0, 0, 0x73 }, + { 18, 21, 0 }, + { 19, 20, 0 }, + { 0, 0, 0x6E }, + { 0, 0, 0x68 }, + { 0, 0, 0x69 }, + { 23, 46, 0 }, + { 24, 35, 0 }, + { 25, 30, 0 }, + { 26, 29, 0 }, + { 27, 28, 0 }, + { 0, 0, 0x45 }, + { 0, 0, 0x49 }, + { 0, 0, 0x72 }, + { 31, 34, 0 }, + { 32, 33, 0 }, + { 0, 0, 0x54 }, + { 0, 0, 0x75 }, + { 0, 0, 0x6D }, + { 36, 41, 0 }, + { 37, 40, 0 }, + { 38, 39, 0 }, + { 0, 0, 0x6C }, + { 0, 0, 0x79 }, + { 0, 0, 0x4F }, + { 42, 45, 0 }, + { 43, 44, 0 }, + { 0, 0, 0x41 }, + { 0, 0, 0x53 }, + { 0, 0, 0x4E }, + { 47, 66, 0 }, + { 48, 57, 0 }, + { 49, 54, 0 }, + { 50, 53, 0 }, + { 51, 52, 0 }, + { 0, 0, 0x52 }, + { 0, 0, 0x64 }, + { 0, 0, 0x27 }, + { 55, 56, 0 }, + { 0, 0, 0x44 }, + { 0, 0, 0x4C }, + { 58, 63, 0 }, + { 59, 62, 0 }, + { 60, 61, 0 }, + { 0, 0, 0x67 }, + { 0, 0, 0x43 }, + { 0, 0, 0x63 }, + { 64, 65, 0 }, + { 0, 0, 0x48 }, + { 0, 0, 0x21 }, + { 67, 84, 0 }, + { 68, 77, 0 }, + { 69, 74, 0 }, + { 70, 73, 0 }, + { 71, 72, 0 }, + { 0, 0, 0x55 }, + { 0, 0, 0x77 }, + { 0, 0, 0x66 }, + { 75, 76, 0 }, + { 0, 0, 0x50 }, + { 0, 0, 0x4D }, + { 78, 81, 0 }, + { 79, 80, 0 }, + { 0, 0, 0x62 }, + { 0, 0, 0x57 }, + { 82, 83, 0 }, + { 0, 0, 0x3F }, + { 0, 0, 0x47 }, + { 85, 94, 0 }, + { 86, 91, 0 }, + { 87, 90, 0 }, + { 88, 89, 0 }, + { 0, 0, 0x59 }, + { 0, 0, 0x2C }, + { 0, 0, 0x70 }, + { 92, 93, 0 }, + { 0, 0, 0x42 }, + { 0, 0, 0x6B }, + { 95, 100, 0 }, + { 96, 99, 0 }, + { 97, 98, 0 }, + { 0, 0, 0x76 }, + { 0, 0, 0x46 }, + { 0, 0, 0x4B }, + { 101, 106, 0 }, + { 102, 105, 0 }, + { 103, 104, 0 }, + { 0, 0, 0x2D }, + { 0, 0, 0x56 }, + { 0, 0, 0x4A }, + { 107, 120, 0 }, + { 108, 113, 0 }, + { 109, 112, 0 }, + { 110, 111, 0 }, + { 0, 0, 0x3A }, + { 0, 0, 0x58 }, + { 0, 0, 0x6A }, + { 114, 117, 0 }, + { 115, 116, 0 }, + { 0, 0, 0x60 }, + { 0, 0, 0x5A }, + { 118, 119, 0 }, + { 0, 0, 0x78 }, + { 0, 0, 0x30 }, + { 121, 132, 0 }, + { 122, 127, 0 }, + { 123, 126, 0 }, + { 124, 125, 0 }, + { 0, 0, 0x32 }, + { 0, 0, 0x31 }, + { 0, 0, 0x51 }, + { 128, 131, 0 }, + { 129, 130, 0 }, + { 0, 0, 0x33 }, + { 0, 0, 0x39 }, + { 0, 0, 0x71 }, + { 133, 142, 0 }, + { 134, 137, 0 }, + { 135, 136, 0 }, + { 0, 0, 0x34 }, + { 0, 0, 0x38 }, + { 138, 141, 0 }, + { 139, 140, 0 }, + { 0, 0, 0x35 }, + { 0, 0, 0x7A }, + { 0, 0, 0x26 }, + { 143, 150, 0 }, + { 144, 147, 0 }, + { 145, 146, 0 }, + { 0, 0, 0x36 }, + { 0, 0, 0x29 }, + { 148, 149, 0 }, + { 0, 0, 0x28 }, + { 0, 0, 0x37 }, + { 151, 158, 0 }, + { 152, 155, 0 }, + { 153, 154, 0 }, + { 0, 0, 0x24 }, + { 0, 0, 0x22 }, + { 156, 157, 0 }, + { 0, 0, 0x2F }, + { 0, 0, 0x3C }, + { 159, 162, 0 }, + { 160, 161, 0 }, + { 0, 0, 0x3E }, + { 0, 0, 0x25 }, + { 163, 164, 0 }, + { 0, 0, 0x23 }, + { 165, 166, 0 }, + { 0, 0, 0x5F }, + { 0, 0, 0x7C } +}; + const HuffTree SkyText::_huffTree_00267[] = { { 1, 20, 0 }, { 2, 7, 0 }, diff --git a/sky/text.cpp b/sky/text.cpp index 586dcf7fad..dd0ae8c1be 100644 --- a/sky/text.cpp +++ b/sky/text.cpp @@ -430,6 +430,9 @@ void SkyText::changeTextSpriteColour(uint8 *sprData, uint8 newCol) { void SkyText::initHuffTree() { switch (SkyState::_systemVars.gameVersion) { + case 109: + _huffTree = _huffTree_00109; + break; case 267: _huffTree = _huffTree_00267; break; diff --git a/sky/text.h b/sky/text.h index 9cb60b8723..4e4d0b94da 100644 --- a/sky/text.h +++ b/sky/text.h @@ -86,7 +86,8 @@ protected: bool _dtCentre; //set for centre text uint32 _lowTextWidth, _mouseOfsX, _mouseOfsY; - static const HuffTree _huffTree_00267[]; // trees moved to hufftext.cpp + static const HuffTree _huffTree_00109[]; // trees moved to hufftext.cpp + static const HuffTree _huffTree_00267[]; static const HuffTree _huffTree_00288[]; static const HuffTree _huffTree_00303[]; static const HuffTree _huffTree_00331[]; -- cgit v1.2.3