mirror of https://github.com/MLXXXp/Arduboy2.git
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:
parent
86169a0027
commit
aaf4159274
|
@ -287,12 +287,10 @@ void Arduboy2Base::clear()
|
||||||
|
|
||||||
void Arduboy2Base::drawPixel(int16_t x, int16_t y, uint8_t color)
|
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))
|
if (x < 0 || x > (WIDTH-1) || y < 0 || y > (HEIGHT-1))
|
||||||
{
|
{
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
#endif
|
|
||||||
|
|
||||||
uint16_t row_offset;
|
uint16_t row_offset;
|
||||||
uint8_t bit;
|
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
|
// For reference, this is the C++ equivalent
|
||||||
void Arduboy2Base::drawPixel(int16_t x, int16_t y, uint8_t color)
|
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))
|
if (x < 0 || x > (WIDTH-1) || y < 0 || y > (HEIGHT-1))
|
||||||
{
|
{
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
#endif
|
|
||||||
|
|
||||||
uint16_t row_offset;
|
uint16_t row_offset;
|
||||||
uint8_t bit;
|
uint8_t bit;
|
||||||
|
|
|
@ -74,10 +74,6 @@
|
||||||
*/
|
*/
|
||||||
#define EEPROM_STORAGE_SPACE_START 16
|
#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
|
// pixel colors
|
||||||
#define BLACK 0 /**< Color value for an unlit pixel for draw functions. */
|
#define BLACK 0 /**< Color value for an unlit pixel for draw functions. */
|
||||||
#define WHITE 1 /**< Color value for a lit pixel for draw functions. */
|
#define WHITE 1 /**< Color value for a lit pixel for draw functions. */
|
||||||
|
|
Loading…
Reference in New Issue