diff options
author | Oliver Kiehl | 2003-03-05 19:23:35 +0000 |
---|---|---|
committer | Oliver Kiehl | 2003-03-05 19:23:35 +0000 |
commit | 5fe5a5a4afa9a800a18859509897a5095e960b38 (patch) | |
tree | 8081b1e6e09263c0b386f33610d5fd0c533f8cc6 /sky/rnc_deco.cpp | |
parent | f3d6fcdf0480ac50b56a65c5da84d38f5b8fa660 (diff) | |
download | scummvm-rg350-5fe5a5a4afa9a800a18859509897a5095e960b38.tar.gz scummvm-rg350-5fe5a5a4afa9a800a18859509897a5095e960b38.tar.bz2 scummvm-rg350-5fe5a5a4afa9a800a18859509897a5095e960b38.zip |
cleanup
svn-id: r6694
Diffstat (limited to 'sky/rnc_deco.cpp')
-rw-r--r-- | sky/rnc_deco.cpp | 26 |
1 files changed, 2 insertions, 24 deletions
diff --git a/sky/rnc_deco.cpp b/sky/rnc_deco.cpp index 975f3736da..fbfd1d3caa 100644 --- a/sky/rnc_deco.cpp +++ b/sky/rnc_deco.cpp @@ -138,23 +138,6 @@ uint16 input_bits(uint8 amount) } -// RCL/RCR functions..operate on 16 bit ints only -uint16 rcl(uint16 reg, uint16 *cflag) -{ - uint16 lsb = *cflag; - *cflag = reg >> 15; - return (reg << 1) | lsb; -} - -uint16 rcr(uint16 reg, uint16 *cflag) -{ - uint16 msb = *cflag << 15; - *cflag = reg & 1; - return (reg >> 1) | msb; -} - - - void make_huftable(uint16 *table) { uint16 bitLength, i, j; @@ -176,13 +159,9 @@ void make_huftable(uint16 *table) uint16 b = huffCode >> (16 - bitLength); uint16 a = 0; - uint16 carry = 0; - for (j = 0; j < bitLength; j++) { - b = rcr(b, &carry); - a = rcl(a, &carry); - - } + for (j = 0; j < bitLength; j++) + a |= ((b >> j) & 1) << (bitLength - j - 1); *table++ = a; *(table+0x1e) = (huffLength[i]<<8)|(i & 0x00FF); @@ -192,7 +171,6 @@ void make_huftable(uint16 *table) } } - uint16 input_value(uint16 *table) { uint16 valOne, valTwo, value = bit_buffl; |