This commit is contained in:
Jan Racek
2026-03-24 13:01:47 +01:00
parent 55c1d2c39b
commit e51c06b012
51 changed files with 8111 additions and 491 deletions

View File

@@ -5,6 +5,9 @@
namespace psxsplash {
// Sentinel value for untextured (vertex-color-only) triangles
static constexpr uint16_t UNTEXTURED_TPAGE = 0xFFFF;
class Tri final {
public:
psyqo::GTE::PackedVec3 v0, v1, v2;
@@ -18,7 +21,13 @@ namespace psxsplash {
psyqo::PrimPieces::TPageAttr tpage;
uint16_t clutX;
uint16_t clutY;
uint16_t padding;
uint16_t padding;
/// Returns true if this triangle has no texture (vertex-color only).
/// These should be rendered as POLY_G3 (GouraudTriangle) instead of POLY_GT3.
bool isUntextured() const {
return *reinterpret_cast<const uint16_t*>(&tpage) == UNTEXTURED_TPAGE;
}
};
static_assert(sizeof(Tri) == 52, "Tri is not 52 bytes");