diff --git a/Runtime/Graphics/CGX.cpp b/Runtime/Graphics/CGX.cpp index eb4283efd..8569877ad 100644 --- a/Runtime/Graphics/CGX.cpp +++ b/Runtime/Graphics/CGX.cpp @@ -4,7 +4,7 @@ namespace metaforce::CGX { SGXState sGXState{}; -std::array sVtxDescList{}; +std::array sVtxDescList{}; void ResetGXStates() noexcept { sGXState.x48_descList = 0; diff --git a/Runtime/Graphics/CGX.hpp b/Runtime/Graphics/CGX.hpp index b21ef7a4e..4e8ed6b94 100644 --- a/Runtime/Graphics/CGX.hpp +++ b/Runtime/Graphics/CGX.hpp @@ -53,7 +53,7 @@ struct SGXState { GXColor x25c_fogColor; }; extern SGXState sGXState; -extern std::array sVtxDescList; +extern std::array sVtxDescList; static inline void update_fog(u32 value) noexcept { if (sGXState.x53_fogType == GX::FOG_NONE || (sGXState.x56_blendMode & 0xE0) == (value & 0xE0)) { @@ -396,7 +396,7 @@ static inline void SetTexCoordGen(GX::TexCoordID dstCoord, u32 flags) noexcept { static inline void SetVtxDescv_Compressed(u32 descList) noexcept { u32 currentDescList = sGXState.x48_descList; if (descList != currentDescList) { - size_t remain = sVtxDescList.size(); + size_t remain = sVtxDescList.size() - 1; u32 shift = 0; u32 attrIdx = 0; do {