Remove PIXEL_SAFE_MODE define

The ability to compile drawPixel() to not check for
drawing pixels off screen has been removed.
This commit is contained in:
Scott Allen 2020-08-27 20:03:37 -04:00
parent 86169a0027
commit aaf4159274
2 changed files with 0 additions and 8 deletions

View File

@ -287,12 +287,10 @@ void Arduboy2Base::clear()
void Arduboy2Base::drawPixel(int16_t x, int16_t y, uint8_t color)
{
#ifdef PIXEL_SAFE_MODE
if (x < 0 || x > (WIDTH-1) || y < 0 || y > (HEIGHT-1))
{
return;
}
#endif
uint16_t row_offset;
uint8_t bit;
@ -331,12 +329,10 @@ void Arduboy2Base::drawPixel(int16_t x, int16_t y, uint8_t color)
// For reference, this is the C++ equivalent
void Arduboy2Base::drawPixel(int16_t x, int16_t y, uint8_t color)
{
#ifdef PIXEL_SAFE_MODE
if (x < 0 || x > (WIDTH-1) || y < 0 || y > (HEIGHT-1))
{
return;
}
#endif
uint16_t row_offset;
uint8_t bit;

View File

@ -74,10 +74,6 @@
*/
#define EEPROM_STORAGE_SPACE_START 16
// If defined, it is safe to draw outside of the screen boundaries.
// Pixels that would exceed the display limits will be ignored.
#define PIXEL_SAFE_MODE
// pixel colors
#define BLACK 0 /**< Color value for an unlit pixel for draw functions. */
#define WHITE 1 /**< Color value for a lit pixel for draw functions. */