Skip to content

Commit

Permalink
-Release 1.0.2-
Browse files Browse the repository at this point in the history
- Add a few tests
  • Loading branch information
Jaklyy committed Nov 30, 2023
1 parent 8b41cff commit a82ac14
Show file tree
Hide file tree
Showing 4 changed files with 43 additions and 14 deletions.
Binary file modified data/rastertest.data
Binary file not shown.
2 changes: 1 addition & 1 deletion readme.txt
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
=======================================================
Welcome to the Jakly Polygon Rasterization Suite v1.0.1
Welcome to the Jakly Polygon Rasterization Suite v1.0.2
Or uh, polyrastertest as I like to call it.
...Just call it polyrastertest.

Expand Down
4 changes: 2 additions & 2 deletions source/main.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -661,7 +661,7 @@ int main()
showresults = (mode >= 2);
bool errorfound;

showresults |= errorfound = test((!(Tests[iteration].PolyAttr & Opaque) || (Tests[iteration].ExtendedTestData > 0)), Tests[iteration].ColorMode);
showresults |= errorfound = test(((!(Tests[iteration].PolyAttr & Opaque)) || (Tests[iteration].ExtendedTestData > 0)), Tests[iteration].ColorMode);

if (!TestCompletionTracker[iteration])
{
Expand Down Expand Up @@ -701,7 +701,7 @@ int main()
printf("Ver. ");
printf(Version);

record(dat, (!(Tests[iteration].PolyAttr & Opaque) || (Tests[iteration].ExtendedTestData > 0)), Tests[iteration].ColorMode);
record(dat, ((!(Tests[iteration].PolyAttr & Opaque)) || (Tests[iteration].ExtendedTestData > 0)), Tests[iteration].ColorMode);
iteration++;
}
}
Expand Down
51 changes: 40 additions & 11 deletions source/main.h
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
// Misc
constexpr u8 NumVerts = 4;
constexpr u8 NumAxis = 3;
constexpr char Version[] = "1.0.1";
constexpr char Version[] = "1.0.2";

// Poly Attributes
constexpr u32 Opaque = (31 << 16);
Expand All @@ -30,7 +30,7 @@ constexpr u16 ColorWrongTex = 0b111110000000000; // blue
constexpr u16 ColorVoid = 0b000000000000000; // black

// only increment if the actual tests change, (only do on releases?)
constexpr u16 DataVersion = 1;
constexpr u16 DataVersion = 2;

struct TestData
{
Expand Down Expand Up @@ -182,37 +182,49 @@ constexpr TestData Tests[] =

// Sub Cat: The Curse of Edge Marking ---------------------

// Edge Marking + overlapping edges? - I-- what?
// Edge Marking + overlapping edges - I-- what?
{.Vertices = {{-32, -32}, {32, -32}, {32, 16}, {-512}},
.PolyAttr = Opaque | POLY_CULL_NONE | PolyID(1),
.Disp3DCnt = GL_OUTLINE,
.OutlineColors = {0b000001111100000},
.ColorMode = 2,
.ExtendedTestData = 1},
// Uhhh ok does it still happen with different poly IDs? - Yes.
{.Vertices = {{-32, -32}, {32, -32}, {32, 16}, {-512}},
.PolyAttr = Opaque | POLY_CULL_NONE | PolyID(1),
// Mirrored horizontally? -
{.Vertices = {{32, -32}, {-32, -32}, {-32, 16}, {-512}},
.Disp3DCnt = GL_OUTLINE,
.OutlineColors = {0b000001111100000},
.ColorMode = 2,
.ExtendedTestData = 1},
// oook, what if the fill rules are swapped? -
.ExtendedTestData = 5},
// oook, what if the fill rules are swapped? - No
{.Vertices = {{-32, 32}, {32, 32}, {32, -16}, {-512}},
.Disp3DCnt = GL_OUTLINE,
.OutlineColors = {0b000001111100000},
.ColorMode = 2,
.ExtendedTestData = 2},
// what if they're both supposed to fill? -
// what if they're both supposed to fill? - No
{.Vertices = {{-32, 32}, {32, 32}, {32, -16}, {-512}},
.Disp3DCnt = GL_OUTLINE,
.OutlineColors = {0b000001111100000},
.ColorMode = 2,
.ExtendedTestData = 3},
// what about neither? -
// what about neither? - No
{.Vertices = {{-32, -32}, {32, -32}, {32, 16}, {-512}},
.Disp3DCnt = GL_OUTLINE,
.OutlineColors = {0b000001111100000},
.ColorMode = 2,
.ExtendedTestData = 4},
// Bottom? - Yes
{.Vertices = {{-32, -32}, {32, -32}, {32, -64}, {-32, -64}},
.Disp3DCnt = GL_OUTLINE,
.OutlineColors = {0b000001111100000},
.ColorMode = 2,
.ExtendedTestData = 6},
// Top? - No...?
{.Vertices = {{-32, 32}, {32, 32}, {32, 64}, {-32, 64}},
.Disp3DCnt = GL_OUTLINE,
.OutlineColors = {0b000001111100000},
.ColorMode = 2,
.ExtendedTestData = 6},

// Category: Vertical Right Edge Shift =======================

Expand Down Expand Up @@ -284,6 +296,11 @@ constexpr TestData Tests[] =
.Disp3DCnt = GL_OUTLINE,
.OutlineColors = {0b000000000011111},
.ColorMode = 2},
// Basic Triangle
{.Vertices = {{-32, -32}, {32, -32}, {0, 16}, {-512}},
.Disp3DCnt = GL_OUTLINE,
.OutlineColors = {0b000000000011111},
.ColorMode = 2},

// Category: Fog =============================================

Expand Down Expand Up @@ -381,7 +398,19 @@ constexpr ExtTestData ExtendedTests[] =
.VertexColors{ColorMissing, ColorMissing, ColorMissing, ColorMissing}}}},
// ext 4
{.NumPolygons = 1,
.Polygons = {{.Vertices = {{-32, -30, -16}, {-32, -32, -16}, {32, 32, -16}, {32, 34, -16}},
.Polygons = {{.Vertices = {{-31, -30, -16}, {-31, -32, -16}, {33, 32, -16}, {33, 34, -16}},
.VertexColors{ColorMissing, ColorMissing, ColorMissing, ColorMissing}}}},
// ext 5
{.NumPolygons = 1,
.Polygons = {{.Vertices = {{32, -30, -16}, {32, -32, -16}, {-32, 16, -16}, {-32, 18, -16}},
.VertexColors{ColorMissing, ColorMissing, ColorMissing, ColorMissing}}}},
// ext 6
{.NumPolygons = 1,
.Polygons = {{.Vertices = {{-32, -34, -16}, {32, -32, -16}, {32, 32, -16}, {-32, 34, -16}},
.VertexColors{ColorMissing, ColorMissing, ColorMissing, ColorMissing}}}},
// ext 7
{.NumPolygons = 1,
.Polygons = {{.Vertices = {{-32, -32, -16}, {32, -32, -16}, {32, 32, -16}, {-32, 32, -16}},
.VertexColors{ColorMissing, ColorMissing, ColorMissing, ColorMissing}}}},
};

Expand Down

0 comments on commit a82ac14

Please sign in to comment.