Codechange: Add a container to index data by zoom level.

This commit is contained in:
frosch
2025-05-03 18:35:50 +02:00
committed by frosch
parent 7055ea0aee
commit c0d4ab69d0
14 changed files with 58 additions and 37 deletions
+2 -2
View File
@@ -96,11 +96,11 @@ inline void Blitter_40bppAnim::Draw(const Blitter::BlitterParams *bp, ZoomLevel
/* src_px : each line begins with uint32_t n = 'number of bytes in this line',
* then n times is the Colour struct for this line */
const Colour *src_px = (const Colour *)(src->data + src->offset[zoom][0]);
const Colour *src_px = reinterpret_cast<const Colour *>(src->data + src->offset[0][zoom]);
/* src_n : each line begins with uint32_t n = 'number of bytes in this line',
* then interleaved stream of 'm' and 'n' channels. 'm' is remap,
* 'n' is number of bytes with the same alpha channel class */
const uint16_t *src_n = (const uint16_t *)(src->data + src->offset[zoom][1]);
const uint16_t *src_n = reinterpret_cast<const uint16_t *>(src->data + src->offset[1][zoom]);
/* skip upper lines in src_px and src_n */
for (uint i = bp->skip_top; i != 0; i--) {