aboutsummaryrefslogtreecommitdiff
path: root/engines/sci/decompressor.cpp
diff options
context:
space:
mode:
authorMax Horn2009-05-26 11:30:21 +0000
committerMax Horn2009-05-26 11:30:21 +0000
commit7d5f3e1714dff2f0beed0f10bcce01be8204f377 (patch)
tree7a361b49a88617531c9b983c3e07fc73069b2207 /engines/sci/decompressor.cpp
parent94dfc8f6386ebf0f4a13094e68eaec289a974347 (diff)
downloadscummvm-rg350-7d5f3e1714dff2f0beed0f10bcce01be8204f377.tar.gz
scummvm-rg350-7d5f3e1714dff2f0beed0f10bcce01be8204f377.tar.bz2
scummvm-rg350-7d5f3e1714dff2f0beed0f10bcce01be8204f377.zip
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
Diffstat (limited to 'engines/sci/decompressor.cpp')
-rw-r--r--engines/sci/decompressor.cpp8
1 files changed, 4 insertions, 4 deletions
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;