|
@@ -10,7 +10,7 @@
|
|
#include <display.h>
|
|
#include <display.h>
|
|
#include <triangle.h>
|
|
#include <triangle.h>
|
|
|
|
|
|
-void drawTriangle(int32_t x0, int32_t y0, int32_t x1, int32_t y1, int32_t x2, int32_t y2, uint32_t colour)
|
|
|
|
|
|
+void drawTriangle(int32_t x0, int32_t y0, int32_t x1, int32_t y1, int32_t x2, int32_t y2, colour_t colour)
|
|
{
|
|
{
|
|
drawLine(x0, y0, x1, y1, colour);
|
|
drawLine(x0, y0, x1, y1, colour);
|
|
drawLine(x1, y1, x2, y2, colour);
|
|
drawLine(x1, y1, x2, y2, colour);
|
|
@@ -18,7 +18,7 @@ void drawTriangle(int32_t x0, int32_t y0, int32_t x1, int32_t y1, int32_t x2, in
|
|
}
|
|
}
|
|
|
|
|
|
/* This function expect Point 0 to be the top, 1 to be the bottom left, 2 to be the bottom right */
|
|
/* This function expect Point 0 to be the top, 1 to be the bottom left, 2 to be the bottom right */
|
|
-static void drawFillBottomFlatTriangle(int32_t x0, int32_t y0, int32_t x1, int32_t y1, int32_t x2, int32_t y2, uint32_t colour)
|
|
|
|
|
|
+static void drawFillBottomFlatTriangle(int32_t x0, int32_t y0, int32_t x1, int32_t y1, int32_t x2, int32_t y2, colour_t colour)
|
|
{
|
|
{
|
|
int i;
|
|
int i;
|
|
int32_t deltaXL = x1 - x0;
|
|
int32_t deltaXL = x1 - x0;
|
|
@@ -44,7 +44,7 @@ static void drawFillBottomFlatTriangle(int32_t x0, int32_t y0, int32_t x1, int32
|
|
}
|
|
}
|
|
|
|
|
|
/* This function expect Point 2 to be the bottom, 0 to be the top left, 1 to be the top right */
|
|
/* This function expect Point 2 to be the bottom, 0 to be the top left, 1 to be the top right */
|
|
-static void drawFillTopFlatTriangle(int32_t x0, int32_t y0, int32_t x1, int32_t y1, int32_t x2, int32_t y2, uint32_t colour)
|
|
|
|
|
|
+static void drawFillTopFlatTriangle(int32_t x0, int32_t y0, int32_t x1, int32_t y1, int32_t x2, int32_t y2, colour_t colour)
|
|
{
|
|
{
|
|
int i;
|
|
int i;
|
|
int32_t deltaXL = x0 - x2;
|
|
int32_t deltaXL = x0 - x2;
|
|
@@ -74,7 +74,7 @@ static void drawFillTopFlatTriangle(int32_t x0, int32_t y0, int32_t x1, int32_t
|
|
}
|
|
}
|
|
}
|
|
}
|
|
|
|
|
|
-void drawFilledTriangle(int32_t x0, int32_t y0, int32_t x1, int32_t y1, int32_t x2, int32_t y2, uint32_t colour)
|
|
|
|
|
|
+void drawFilledTriangle(int32_t x0, int32_t y0, int32_t x1, int32_t y1, int32_t x2, int32_t y2, colour_t colour)
|
|
{
|
|
{
|
|
int32_t My, Mx;
|
|
int32_t My, Mx;
|
|
if (y0 > y1)
|
|
if (y0 > y1)
|