vdp1/normal_sprite_animated: improve comment wording

This commit is contained in:
Zack Buhman 2023-05-04 14:31:45 -07:00
parent 5c1418c27e
commit 5b96488029

View File

@ -54,12 +54,12 @@ uint32_t character_pattern_table(const uint32_t top)
// flexible. The data is interpreted as a row-major packed array, where the // flexible. The data is interpreted as a row-major packed array, where the
// row/horizontal stride is equal to the sprite width (as configured in the // row/horizontal stride is equal to the sprite width (as configured in the
// draw command). This is identical to how the input palette index data is // draw command). This is identical to how the input palette index data is
// structured, so there is no transformation to do here, only a plain memory // structured, in that the stride of the input image data is deliberately the
// copy. // same as the stride of the vdp1 sprite.
//
// Divide `buf_size` by two because this converts (indexed color) 8 bit pixels // Divide `buf_size` by two because this is a conversion from (indexed color)
// to 4 bit pixels. Round up to the nearest 0x20 (for an 8000 pixel/8000 byte // 8 bit pixels to 4 bit pixels. Round up to the nearest 0x20 (for an 8000
// image, this rounding is a no-op). // pixel/8000 byte image, this rounding is a no-op).
const uint32_t table_size = ((buf_size / 2) + 0x20 - 1) & (-0x20); const uint32_t table_size = ((buf_size / 2) + 0x20 - 1) & (-0x20);
const uint32_t table_address = top - table_size; const uint32_t table_address = top - table_size;
uint16_t * table = &vdp1.vram.u16[(table_address / 2)]; uint16_t * table = &vdp1.vram.u16[(table_address / 2)];