From f6f5a52cba858f28fefdb4334ae1906c9ef6e95f Mon Sep 17 00:00:00 2001 From: poevoid <65972401+poevoid@users.noreply.github.com> Date: Wed, 28 Jul 2021 13:51:37 -0700 Subject: [PATCH] Update Arduboy2.cpp added one line to make certain sprites visible with some games. Obono's Evasion for example would have only the top half of the score displayed, the bottom of the sprite was cut off. adding "if (h % 8 != 0) rows++;" after rows is instantiated, we have normal behavior. --- board-package-source/libraries/Arduboy2/src/Arduboy2.cpp | 1 + 1 file changed, 1 insertion(+) diff --git a/board-package-source/libraries/Arduboy2/src/Arduboy2.cpp b/board-package-source/libraries/Arduboy2/src/Arduboy2.cpp index f1b98bb..c436a0c 100644 --- a/board-package-source/libraries/Arduboy2/src/Arduboy2.cpp +++ b/board-package-source/libraries/Arduboy2/src/Arduboy2.cpp @@ -839,6 +839,7 @@ void Arduboy2Base::drawBitmap int8_t yOffset = y & 7; int8_t sRow = y >> 3; uint8_t rows = h >> 3; + if (h % 8 != 0) rows++; for (int a = 0; a < rows; a++) { int bRow = sRow + a; if (bRow > (HEIGHT/8)-1) break;