Fix flashing text array
MegaMech opened this issue · 0 comments
MegaMech commented
D_02007BB8
array doesn't match as one whole array in this function:
D_02007CD8
matches but &D_02007BB8[18]
does not.
Probably need to make D_02007BB8
a 3D array. But didn't do that for now.
This issue maybe depends on GCC PR merged first.
Gfx *func_800959F8(Gfx *displayListHead, Vtx *arg1) {
s32 index;
if ((s32) gTextColor < TEXT_BLUE_GREEN_RED_CYCLE_1) {
index = gTextColor;
} else {
index = ((gTextColor * 2) + ((s32) gGlobalTimer % 2)) - 4;
}
#ifdef AVOID_UB
if (arg1 == D_02007BB8) {
gSPDisplayList(displayListHead++, D_800E84CC[index]);
} else if (arg1 == &D_02007BB8[18]) {
gSPDisplayList(displayListHead++, D_800E84EC[index]);
} else if (arg1 == &D_02007BB8[36]) {
gSPDisplayList(displayListHead++, D_800E850C[index]);
}
#else
if (arg1 == D_02007BB8) {
gSPDisplayList(displayListHead++, D_800E84CC[index]);
} else if (arg1 == D_02007CD8) {
gSPDisplayList(displayListHead++, D_800E84EC[index]);
} else if (arg1 == D_02007DF8) {
gSPDisplayList(displayListHead++, D_800E850C[index]);
}
#endif
return displayListHead;
}