mirror of
https://github.com/AxioDL/metaforce.git
synced 2025-05-13 07:51:21 +00:00
CGX: Fix sVtxDescList size
This commit is contained in:
parent
671539d7eb
commit
e4715a2df6
@ -4,7 +4,7 @@
|
|||||||
|
|
||||||
namespace metaforce::CGX {
|
namespace metaforce::CGX {
|
||||||
SGXState sGXState{};
|
SGXState sGXState{};
|
||||||
std::array<GX::VtxDescList, 11> sVtxDescList{};
|
std::array<GX::VtxDescList, 12> sVtxDescList{};
|
||||||
|
|
||||||
void ResetGXStates() noexcept {
|
void ResetGXStates() noexcept {
|
||||||
sGXState.x48_descList = 0;
|
sGXState.x48_descList = 0;
|
||||||
|
@ -53,7 +53,7 @@ struct SGXState {
|
|||||||
GXColor x25c_fogColor;
|
GXColor x25c_fogColor;
|
||||||
};
|
};
|
||||||
extern SGXState sGXState;
|
extern SGXState sGXState;
|
||||||
extern std::array<GX::VtxDescList, 11> sVtxDescList;
|
extern std::array<GX::VtxDescList, 12> sVtxDescList;
|
||||||
|
|
||||||
static inline void update_fog(u32 value) noexcept {
|
static inline void update_fog(u32 value) noexcept {
|
||||||
if (sGXState.x53_fogType == GX::FOG_NONE || (sGXState.x56_blendMode & 0xE0) == (value & 0xE0)) {
|
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 {
|
static inline void SetVtxDescv_Compressed(u32 descList) noexcept {
|
||||||
u32 currentDescList = sGXState.x48_descList;
|
u32 currentDescList = sGXState.x48_descList;
|
||||||
if (descList != currentDescList) {
|
if (descList != currentDescList) {
|
||||||
size_t remain = sVtxDescList.size();
|
size_t remain = sVtxDescList.size() - 1;
|
||||||
u32 shift = 0;
|
u32 shift = 0;
|
||||||
u32 attrIdx = 0;
|
u32 attrIdx = 0;
|
||||||
do {
|
do {
|
||||||
|
Loading…
x
Reference in New Issue
Block a user