summaryrefslogtreecommitdiff
path: root/Gfx.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'Gfx.cpp')
-rw-r--r--Gfx.cpp21
1 files changed, 5 insertions, 16 deletions
diff --git a/Gfx.cpp b/Gfx.cpp
index cbb7d16..7596443 100644
--- a/Gfx.cpp
+++ b/Gfx.cpp
@@ -31,7 +31,7 @@ void GfxDrawSprite(TYPE_SPRITE* ptrSprite)
return;
}
- if (GfxIsSpriteInsideScreenArea(ptrSprite) == true)
+ if (GfxIsSpriteInsideScreenArea(ptrSprite) != false)
{
int8_t orig_color = gb.display.getColor();
@@ -64,17 +64,6 @@ void GfxClearScreen(void)
bool GfxIsInsideScreenArea(int8_t x, int8_t y, uint8_t w, uint8_t h)
{
- /*char strBuffer[16];
-
- snprintf(strBuffer, 16, "%d", (int)(x + w));
- GfxPrintText(strBuffer,48,8);
-
- snprintf(strBuffer, 16, "x = %d", (int)(x));
- GfxPrintText(strBuffer,48,16);
-
- snprintf(strBuffer, 16, "w = %d", (int)(w));
- GfxPrintText(strBuffer,48,24);*/
-
if ( ( (x + w) >= 0)
&&
(x < X_SCREEN_RESOLUTION)
@@ -137,7 +126,7 @@ void GfxPrintText(const char* str, uint8_t x, uint8_t y)
void GfxDrawCircle(uint16_t x, uint16_t y, uint8_t radius, int8_t color)
{
- if (GfxIsInsideScreenArea(x, y, radius, radius) == true)
+ if (GfxIsInsideScreenArea(x, y, radius, radius) != false)
{
int8_t orig_color = gb.display.getColor();
gb.display.setColor(color);
@@ -148,7 +137,7 @@ void GfxDrawCircle(uint16_t x, uint16_t y, uint8_t radius, int8_t color)
void GfxDrawFillCircle(uint16_t x, uint16_t y, uint8_t radius, int8_t color)
{
- if (GfxIsInsideScreenArea(x, y, radius, radius) == true)
+ if (GfxIsInsideScreenArea(x, y, radius, radius) != false)
{
int8_t orig_color = gb.display.getColor();
gb.display.setColor(color);
@@ -159,7 +148,7 @@ void GfxDrawFillCircle(uint16_t x, uint16_t y, uint8_t radius, int8_t color)
void GfxDrawRectangle(uint8_t x, uint8_t y, uint8_t w, uint8_t h, int8_t color)
{
- if (GfxIsInsideScreenArea(x, y, w, h) == true)
+ if (GfxIsInsideScreenArea(x, y, w, h) != false)
{
int8_t orig_color = gb.display.getColor();
@@ -177,7 +166,7 @@ void GfxDrawLine(uint8_t x0, uint8_t x1, uint8_t y0, uint8_t y1, uint8_t color)
void GfxFillRectangle(uint8_t x, uint8_t y, uint8_t w, uint8_t h, int8_t color)
{
- if (GfxIsInsideScreenArea(x, y, w, h) == true)
+ if (GfxIsInsideScreenArea(x, y, w, h) != false)
{
int8_t orig_color = gb.display.getColor();