mirror of https://github.com/MLXXXp/Arduboy2.git
Fix offset wraparound issue for high sprites
This commit is contained in:
parent
87a66fca82
commit
f0721034aa
|
@ -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;
|
||||
|
|
Loading…
Reference in New Issue