diff options
author | pixel <pixel> | 2003-01-31 16:53:44 +0000 |
---|---|---|
committer | pixel <pixel> | 2003-01-31 16:53:44 +0000 |
commit | 987168daa51df301644643d61bafa716bc80113f (patch) | |
tree | 6e6542f451bfff5e3abebe8a3548bfff6a398b7d /lib | |
parent | 49df68a4cab9435d2bb6ca53625eb861e28c393f (diff) |
ToD crap...
Diffstat (limited to 'lib')
-rw-r--r-- | lib/lzss.cpp | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/lib/lzss.cpp b/lib/lzss.cpp index cc80778..36ec41d 100644 --- a/lib/lzss.cpp +++ b/lib/lzss.cpp @@ -52,7 +52,7 @@ const lzss::scheme_t lzss::schemes[] = { {"FF6 PSX", 0, 0, 0, 1, 1, 1, 0, 0, 0, 0x1f, 1, 0x00, 0, 0xe0, -4, 0xff, 4, 0x00, 0, 0x00, 0, 0x00, 0, 0x00, 0}, {"Valkyrie-1", 0, 0, 0, 1, 1, 0, 0, 0, 0, 0x00, 0, 0xf0, -4, 0xff, 0, 0x0f, 8, 0x00, 0, 0x00, 0, 0x00, 0, 0x00, 0}, {"Valkyrie-2", 0, 0, 0, 1, 1, 0, 0, 2, 0, 0x00, 0, 0xf0, -4, 0xff, 0, 0x0f, 8, 0x00, 0, 0x0f, 0, 0xff, 0, 0x00, 0}, - {"ToD", 0, 0, 0, 0, 0, 0, 0, 0, 0, 0x00, 0, 0x0f, 0, 0xff, 0, 0xf0, 4, 0x00, 0, 0x00, 0, 0x00, 0, 0x00, 0}, + {"ToD", 0, 0, 0,-1, 1, 0, 1, 0, 3, 0x00, 0, 0x0f, 0, 0xff, 0, 0xf0, 4, 0x00, 0, 0x00, 0, 0x00, 0, 0x00, 0}, {0 , 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0x00, 0, 0x00, 0, 0x00, 0, 0x00, 0} }; @@ -109,7 +109,7 @@ unsigned long lzss::lzss_decomp(Handle * f_source, Handle * f_cible, long true_l unsigned char valeur; unsigned char * text_buf; unsigned char val1, val2, val3; - int negative_error = scheme.negative_trick, overlap_error = scheme.overlap_trick; + int negative_error = scheme.negative_trick, overlap_error = scheme.overlap_trick == 1; int r = 0; int decomp_count; int decomp_length; @@ -198,12 +198,13 @@ unsigned long lzss::lzss_decomp(Handle * f_source, Handle * f_cible, long true_l decomp_offset = r - decomp_jump; break; case 1: - decomp_offset = r - lzss_maxptr - 1 + decomp_jump; + decomp_offset = r - lzss_maxptr - 1 + decomp_jump - scheme.window_start; break; case 2: decomp_offset = decomp_jump - scheme.window_start; break; } + decomp_offset += scheme.overlap_trick == -1 ? decomp_length : 0; loop_length = decomp_offset + decomp_length; if ((loop_length >= r) && (!overlap_error)) { if (!tolerate) { |