From 7d5f3e1714dff2f0beed0f10bcce01be8204f377 Mon Sep 17 00:00:00 2001 From: Max Horn Date: Tue, 26 May 2009 11:30:21 +0000 Subject: Turned some static tables into static const tables; added some FIXME comments to global static vars that should be removed (many more exist in SCI, Tinsel, and some other engines) svn-id: r40908 --- engines/sci/decompressor.cpp | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'engines/sci/decompressor.cpp') diff --git a/engines/sci/decompressor.cpp b/engines/sci/decompressor.cpp index 6ed43e248e..239c6cae03 100644 --- a/engines/sci/decompressor.cpp +++ b/engines/sci/decompressor.cpp @@ -594,7 +594,7 @@ void DecompressorLZW::reorderView(byte *src, byte *dest) { // Leaf node #define LN(pos, value) ((value) | HUFFMAN_LEAF), -static int length_tree[] = { +static const int length_tree[] = { 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) @@ -606,7 +606,7 @@ static int length_tree[] = { 0 // We need something witout a comma at the end }; -static int distance_tree[] = { +static const int distance_tree[] = { BN(0, 1, 2) BN(1, 3, 4) BN(2, 5, 6) // @@ -649,7 +649,7 @@ static int distance_tree[] = { 0 // We need something witout a comma at the end }; -static int ascii_tree[] = { +static const int ascii_tree[] = { 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) @@ -798,7 +798,7 @@ int DecompressorDCL::unpack(Common::ReadStream *src, byte *dest, uint32 nPacked, } -int DecompressorDCL::huffman_lookup(int *tree) { +int DecompressorDCL::huffman_lookup(const int *tree) { int pos = 0; int bit; -- cgit v1.2.3