Fix offset wraparound issue for high sprites

This commit is contained in:
Delio Brignoli 2018-03-12 21:12:27 +01:00
parent 87a66fca82
commit f0721034aa
1 changed files with 1 additions and 1 deletions

View File

@ -131,7 +131,7 @@ void Sprites::drawBitmap(int16_t x, int16_t y,
const uint8_t ofs_step = draw_mode == SPRITE_PLUS_MASK ? 2 : 1;
const uint8_t ofs_stride = (w - rendered_width)*ofs_step;
const uint8_t initial_bofs = ((start_h * w) + xOffset)*ofs_step;
const uint16_t initial_bofs = ((start_h * w) + xOffset)*ofs_step;
const uint8_t *bofs = bitmap + initial_bofs;
const uint8_t *mask_ofs = !mask ? bitmap : mask;