fix problems with color cycling in iff viewer

This commit is contained in:
Irmen de Jong 2020-12-24 06:48:15 +01:00
parent e0d2b60d8b
commit 07b00bec61

View File

@ -69,12 +69,15 @@ iff_module {
if not cycle_ccrt { if not cycle_ccrt {
cycle_crng = true cycle_crng = true
diskio.f_read_exact(buffer, chunk_size_lo) diskio.f_read_exact(buffer, chunk_size_lo)
ubyte flags = buffer[5]
if flags & 1 {
cycle_rates[num_cycles] = mkword(buffer[2], buffer[3]) cycle_rates[num_cycles] = mkword(buffer[2], buffer[3])
cycle_rate_ticks[num_cycles] = 1 cycle_rate_ticks[num_cycles] = 1
cycle_lows[num_cycles] = buffer[6] cycle_lows[num_cycles] = buffer[6]
cycle_highs[num_cycles] = buffer[7] cycle_highs[num_cycles] = buffer[7]
cycle_reverseflags[num_cycles] = (buffer[5] & 2)!=0 cycle_reverseflags[num_cycles] = flags & 2 != 0
num_cycles++ num_cycles++
}
} else } else
skip_chunk() skip_chunk()
} }