1
0
Fork 0
mirror of https://github.com/zeldaret/oot.git synced 2025-07-03 22:44:30 +00:00

Misc Cleanup 2 (#1007)

* Cleanup `UNK_TYPE`, `UNK_PTR` usage

* Add some missing empty lines after declarations

* Remove some legacy comments from non-matching times

* Fix some grammar (mostly "it's"/"its")

* Use proper names for two symbols after ZAPD bugfix

* Cleanup `place_title_cards.xml`

* Use `NULL` to check against `D_8012D260` pointer

* Parentheses around some macro arguments

* wip proofread headers up to z64animation.h
This commit is contained in:
Dragorn421 2021-12-01 00:40:42 +01:00 committed by GitHub
parent 04a9d51e90
commit 669732abbe
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
104 changed files with 217 additions and 92 deletions

View file

@ -548,6 +548,7 @@ void PreRender_Calc(PreRender* this) {
for (y = 0; y < this->height; y++) {
for (x = 0; x < this->width; x++) {
s32 a = this->cvgSave[x + y * this->width];
a >>= 5;
a++;
if (a != 8) {

View file

@ -1276,6 +1276,7 @@ void AudioHeap_ChangeStorage(StorageChange* change, SoundFontSample* sample) {
if (sample != NULL) {
u32 start = change->oldAddr;
u32 end = change->oldAddr + change->size;
if (start <= (u32)sample->sampleAddr && (u32)sample->sampleAddr < end) {
sample->sampleAddr = sample->sampleAddr - start + change->newAddr;
sample->medium = change->newMedium;

View file

@ -360,12 +360,14 @@ u8 AudioSeq_ScriptReadU8(SeqScriptState* state) {
s16 AudioSeq_ScriptReadS16(SeqScriptState* state) {
s16 ret = *(state->pc++) << 8;
ret = *(state->pc++) | ret;
return ret;
}
u16 AudioSeq_ScriptReadCompressedU16(SeqScriptState* state) {
u16 ret = *(state->pc++);
if (ret & 0x80) {
ret = (ret << 8) & 0x7F00;
ret = *(state->pc++) | ret;
@ -477,6 +479,7 @@ s32 AudioSeq_SeqLayerProcessScriptStep2(SequenceLayer* layer) {
}
if (cmd >= 0xF2) {
u16 arg = AudioSeq_GetScriptControlFlowArgument(state, cmd);
if (AudioSeq_HandleScriptFlowControl(seqPlayer, state, cmd, arg) == 0) {
continue;
}
@ -489,6 +492,7 @@ s32 AudioSeq_SeqLayerProcessScriptStep2(SequenceLayer* layer) {
case 0xCA: // layer_setpan
{
u8 tempByte = *(state->pc++);
if (cmd == 0xC1) {
layer->velocitySquare = (f32)(tempByte * tempByte) / 16129.0f;
} else {
@ -501,6 +505,7 @@ s32 AudioSeq_SeqLayerProcessScriptStep2(SequenceLayer* layer) {
case 0xC2: // layer_transpose; set transposition in semitones
{
u8 tempByte = *(state->pc++);
if (cmd == 0xC9) {
layer->gateTime = tempByte;
} else {

View file

@ -1100,6 +1100,7 @@ void Audio_OcaPlayback(void) {
if (sDisplayedNoteValue != sPlaybackSong[sPlaybackNotePos].noteIdx) {
u8 tmp = sPlaybackSong[sPlaybackNotePos].noteIdx;
if (tmp == 0xA) {
sDisplayedNoteValue = tmp + sPlaybackSong[sPlaybackNotePos].semitone;
} else {

View file

@ -6,6 +6,7 @@ s32 gUseAtanContFrac;
f32 Math_FTanF(f32 x) {
f32 sin = sinf(x);
f32 cos = cosf(x);
return sin / cos;
}

View file

@ -61,6 +61,7 @@ u32 Rand_Next_Variable(u32* rndNum) {
*/
f32 Rand_ZeroOne_Variable(u32* rndNum) {
u32 next = (*rndNum * 1664525) + 1013904223;
// clang-format off
*rndNum = next; sRandFloat = (next >> 9) | 0x3F800000;
// clang-format on
@ -73,6 +74,7 @@ f32 Rand_ZeroOne_Variable(u32* rndNum) {
*/
f32 Rand_Centered_Variable(u32* rndNum) {
u32 next = (*rndNum * 1664525) + 1013904223;
// clang-format off
*rndNum = next; sRandFloat = (next >> 9) | 0x3F800000;
// clang-format on

View file

@ -429,6 +429,7 @@ void DbCamera_PrintPoints(const char* name, s16 count, CutsceneCameraPoint* poin
void DbCamera_PrintF32Bytes(f32 value) {
f32 b = value;
char* a = (char*)&b;
osSyncPrintf("\n@@@%d,%d,%d,%d,", a[0], a[1], a[2], a[3]);
}
@ -436,6 +437,7 @@ void DbCamera_PrintU16Bytes(u16 value) {
u16 pad;
u16 b = value;
char* a = (char*)&b;
osSyncPrintf("\n@@@%d,%d,", a[0], a[1]);
}
@ -443,6 +445,7 @@ void DbCamera_PrintS16Bytes(s16 value) {
u16 pad;
s16 b = value;
char* a = (char*)&b;
osSyncPrintf("\n@@@%d,%d,", a[0], a[1]);
}

View file

@ -124,6 +124,7 @@ void FaultDrawer_DrawChar(char c) {
((sFaultDrawerStruct.charH + cursorY - 1) <= sFaultDrawerStruct.yEnd)) {
for (y = 0; y < sFaultDrawerStruct.charH; y++) {
u32 mask = 0x10000000 << shift;
data = *dataPtr;
for (x = 0; x < sFaultDrawerStruct.charW; x++) {
if (mask & data) {
@ -151,6 +152,7 @@ s32 FaultDrawer_ColorToPrintColor(u16 color) {
void FaultDrawer_UpdatePrintColor() {
s32 idx;
if (sFaultDrawerStruct.osSyncPrintfEnabled) {
osSyncPrintf(VT_RST);
idx = FaultDrawer_ColorToPrintColor(sFaultDrawerStruct.foreColor);

View file

@ -170,7 +170,7 @@ void Graph_TaskSet00(GraphicsContext* gfxCtx) {
LogUtils_LogHexDump(gGfxSPTaskYieldBuffer, sizeof(gGfxSPTaskYieldBuffer));
SREG(6) = -1;
if (D_8012D260 != 0) {
if (D_8012D260 != NULL) {
HREG(80) = 7;
HREG(81) = 1;
HREG(83) = 2;

View file

@ -166,6 +166,7 @@ u16 JpegDecoder_ReadBits(u8 len) {
u8 data;
s32 ret;
u32 temp;
ret = 0; // this is required for some reason
for (byteCount = sJpegBitStreamBitIdx >> 3; byteCount > 0; byteCount--) {

View file

@ -5,6 +5,7 @@ void JpegUtils_ProcessQuantizationTable(u8* dqt, JpegQuantizationTable* qt, u8 c
for (i = 0; i < count; i++) {
u8 j;
dqt++;
for (j = 0; j < 64; j++) {
qt[i].table[j] = *dqt++;
@ -102,6 +103,7 @@ u32 JpegUtils_ProcessHuffmanTable(u8* dht, JpegHuffmanTable* ht, u8* codesLength
for (idx = 0; idx < count; idx++) {
u32 ac = (*dht++ >> 4);
codeCount = JpegUtils_ProcessHuffmanTableImpl(dht, &ht[idx], codesLengths, codes, ac);
if (codeCount == 0) {
return 1;

View file

@ -10,6 +10,7 @@ void MtxConv_F2L(Mtx* m1, MtxF* m2) {
for (i = 0; i < 4; i++) {
for (j = 0; j < 4; j++) {
s32 value = (m2->mf[i][j] * 0x10000);
m1->intPart[i][j] = value >> 16;
m1->fracPart[i][j] = value;
}

View file

@ -19,6 +19,7 @@
u32 UCodeDisas_TranslateAddr(UCodeDisas* this, u32 addr) {
u32 physical = this->segments[SEGMENT_NUMBER(addr)] + SEGMENT_OFFSET(addr);
return PHYSICAL_TO_VIRTUAL(physical);
}
@ -136,6 +137,7 @@ const char* UCodeDisas_ParseCombineAlpha(u32 value, u32 idx) {
void UCodeDisas_Init(UCodeDisas* this) {
u32 i;
bzero(this, sizeof(UCodeDisas));
for (i = 0; i < NUM_SEGMENTS; i++) {
this->segments[i] = gSegments[i];

View file

@ -1438,6 +1438,7 @@ f32 func_8002EFC0(Actor* actor, Player* player, s16 arg2) {
} else {
f32 ret =
actor->xyzDistToPlayerSq - actor->xyzDistToPlayerSq * 0.8f * ((0x4000 - yawTempAbs) * (1.0f / 0x8000));
return ret;
}
}
@ -2879,7 +2880,7 @@ void func_800328D4(GlobalContext* globalCtx, ActorContext* actorCtx, Player* pla
Actor* actor;
Actor* sp84;
CollisionPoly* sp80;
UNK_TYPE sp7C;
s32 sp7C;
Vec3f sp70;
actor = actorCtx->actorLists[actorCategory].head;
@ -3236,7 +3237,7 @@ Actor* Actor_GetProjectileActor(GlobalContext* globalCtx, Actor* refActor, f32 r
//! @bug The projectile actor gets unsafely casted to a hookshot to check its timer, even though
// it can also be an arrow.
// Luckily, the field at the same offset in the arrow actor is the x component of a vector
// which will rarely ever be 0. So its very unlikely for this bug to cause an issue.
// which will rarely ever be 0. So it's very unlikely for this bug to cause an issue.
if ((Math_Vec3f_DistXYZ(&refActor->world.pos, &actor->world.pos) > radius) ||
(((ArmsHook*)actor)->timer == 0)) {
actor = actor->next;
@ -3454,6 +3455,7 @@ void func_80033C30(Vec3f* arg0, Vec3f* arg1, u8 alpha, GlobalContext* globalCtx)
void func_80033DB8(GlobalContext* globalCtx, s16 arg1, s16 arg2) {
s16 var = Quake_Add(&globalCtx->mainCamera, 3);
Quake_SetSpeed(var, 20000);
Quake_SetQuakeValues(var, arg1, 0, 0, 0);
Quake_SetCountdown(var, arg2);
@ -3461,6 +3463,7 @@ void func_80033DB8(GlobalContext* globalCtx, s16 arg1, s16 arg2) {
void func_80033E1C(GlobalContext* globalCtx, s16 arg1, s16 arg2, s16 arg3) {
s16 var = Quake_Add(&globalCtx->mainCamera, 3);
Quake_SetSpeed(var, arg3);
Quake_SetQuakeValues(var, arg1, 0, 0, 0);
Quake_SetCountdown(var, arg2);

View file

@ -1139,6 +1139,7 @@ void BgCheck_GetSubdivisionMinBounds(CollisionContext* colCtx, Vec3f* pos, s32*
f32 dx = pos->x - colCtx->minBounds.x;
f32 dy = pos->y - colCtx->minBounds.y;
f32 dz = pos->z - colCtx->minBounds.z;
*sx = dx * colCtx->subdivLengthInv.x;
*sy = dy * colCtx->subdivLengthInv.y;
*sz = dz * colCtx->subdivLengthInv.z;
@ -1165,6 +1166,7 @@ void BgCheck_GetSubdivisionMaxBounds(CollisionContext* colCtx, Vec3f* pos, s32*
f32 dx = pos->x - colCtx->minBounds.x;
f32 dy = pos->y - colCtx->minBounds.y;
f32 dz = pos->z - colCtx->minBounds.z;
*sx = dx * colCtx->subdivLengthInv.x;
*sy = dy * colCtx->subdivLengthInv.y;
*sz = dz * colCtx->subdivLengthInv.z;
@ -2848,6 +2850,7 @@ void DynaPoly_ExpandSRT(GlobalContext* globalCtx, DynaCollisionContext* dyna, s3
for (i = 0; i < pbgdata->numVertices; i++) {
f32 radiusSq;
newVtx.x = dyna->vtxList[*vtxStartIndex + i].x;
newVtx.y = dyna->vtxList[*vtxStartIndex + i].y;
newVtx.z = dyna->vtxList[*vtxStartIndex + i].z;
@ -2862,6 +2865,7 @@ void DynaPoly_ExpandSRT(GlobalContext* globalCtx, DynaCollisionContext* dyna, s3
for (i = 0; i < pbgdata->numPolygons; i++) {
CollisionPoly* newPoly = &dyna->polyList[*polyStartIndex + i];
f32 newNormMagnitude;
*newPoly = pbgdata->polyList[i];
// Yeah, this is all kinds of fake, but my God, it matches.
@ -4282,6 +4286,7 @@ u16 WaterBox_GetCameraSType(CollisionContext* colCtx, WaterBox* waterBox) {
*/
u32 WaterBox_GetLightSettingIndex(CollisionContext* colCtx, WaterBox* waterBox) {
u32 prop = waterBox->properties >> 8;
return prop & 0x1F;
}

View file

@ -1973,6 +1973,7 @@ s32 Camera_Parallel1(Camera* camera) {
if (RELOAD_PARAMS) {
CameraModeValue* values = sCameraSettings[camera->setting].cameraModes[camera->mode].values;
f32 yNormal = (1.0f + PCT(OREG(46))) - (PCT(OREG(46)) * (68.0f / playerHeight));
para1->unk_00 = NEXTPCT * playerHeight * yNormal;
;
para1->distTarget = NEXTPCT * playerHeight * yNormal;
@ -2181,6 +2182,7 @@ s32 Camera_Jump1(Camera* camera) {
if (RELOAD_PARAMS) {
CameraModeValue* values = sCameraSettings[camera->setting].cameraModes[camera->mode].values;
f32 yNormal = (1.0f + PCT(R_CAM_YOFFSET_NORM)) - (PCT(R_CAM_YOFFSET_NORM) * (68.0f / playerHeight));
jump1->atYOffset = PCT(NEXTSETTING) * playerHeight * yNormal;
jump1->distMin = PCT(NEXTSETTING) * playerHeight * yNormal;
jump1->distMax = PCT(NEXTSETTING) * playerHeight * yNormal;
@ -2721,6 +2723,7 @@ s32 Camera_Battle1(Camera* camera) {
if (RELOAD_PARAMS) {
CameraModeValue* values = sCameraSettings[camera->setting].cameraModes[camera->mode].values;
f32 yNormal = (1.0f + PCT(OREG(46))) - (PCT(OREG(46)) * (68.0f / playerHeight));
batt1->yOffset = NEXTPCT * playerHeight * yNormal;
batt1->distance = NEXTSETTING;
batt1->swingYawInitial = NEXTSETTING;
@ -2954,6 +2957,7 @@ s32 Camera_Battle4(Camera* camera) {
if (RELOAD_PARAMS) {
CameraModeValue* values = sCameraSettings[camera->setting].cameraModes[camera->mode].values;
f32 yNormal = (1.0f + PCT(R_CAM_YOFFSET_NORM)) - (PCT(R_CAM_YOFFSET_NORM) * (68.0f / playerHeight));
batt4->yOffset = NEXTPCT * playerHeight * yNormal;
batt4->rTarget = NEXTPCT * playerHeight * yNormal;
batt4->pitchTarget = DEGF_TO_BINANG(NEXTSETTING);
@ -3062,6 +3066,7 @@ s32 Camera_KeepOn1(Camera* camera) {
if (RELOAD_PARAMS) {
CameraModeValue* values = sCameraSettings[camera->setting].cameraModes[camera->mode].values;
f32 yNormal = (1.0f + PCT(OREG(46))) - (PCT(OREG(46)) * (68.0f / playerHeight));
keep1->unk_00 = NEXTPCT * playerHeight * yNormal;
keep1->unk_04 = NEXTSETTING;
keep1->unk_08 = NEXTSETTING;
@ -3302,6 +3307,7 @@ s32 Camera_KeepOn3(Camera* camera) {
if (RELOAD_PARAMS) {
CameraModeValue* values = sCameraSettings[camera->setting].cameraModes[camera->mode].values;
f32 yNormal = (1.0f + PCT(OREG(46))) - (PCT(OREG(46)) * (68.0f / playerHeight));
keep3->yOffset = NEXTPCT * playerHeight * yNormal;
keep3->minDist = NEXTSETTING;
keep3->maxDist = NEXTSETTING;
@ -3494,6 +3500,7 @@ s32 Camera_KeepOn4(Camera* camera) {
if (RELOAD_PARAMS) {
CameraModeValue* values = sCameraSettings[camera->setting].cameraModes[camera->mode].values;
f32 yNormal = (1.0f + t) - ((68.0f / playerHeight) * t);
keep4->unk_00 = NEXTPCT * playerHeight * yNormal;
keep4->unk_04 = NEXTPCT * playerHeight * yNormal;
keep4->unk_08 = NEXTSETTING;
@ -4652,6 +4659,7 @@ s32 Camera_Unique3(Camera* camera) {
if (RELOAD_PARAMS) {
CameraModeValue* values = sCameraSettings[camera->setting].cameraModes[camera->mode].values;
f32 yNormal = (1.0f + PCT(R_CAM_YOFFSET_NORM)) - (PCT(R_CAM_YOFFSET_NORM) * (68.0f / playerHeight));
params->yOffset = NEXTPCT * playerHeight * yNormal;
params->fov = NEXTSETTING;
params->interfaceFlags = NEXTSETTING;
@ -6670,6 +6678,7 @@ s32 Camera_Special9(Camera* camera) {
spAC = *eye = *eyeNext;
} else {
s16 yaw;
// 0xE38 ~ 20 degrees
eyeAdjustment.pitch = 0xE38;
// 0xAAA ~ 15 degrees.
@ -7535,7 +7544,7 @@ Vec3s Camera_Update(Camera* camera) {
}
/**
* When the camera's timer is 0, change the camera to it's parent
* When the camera's timer is 0, change the camera to its parent
*/
void Camera_Finish(Camera* camera) {
Camera* mainCam = camera->globalCtx->cameraPtrs[MAIN_CAM];
@ -7992,6 +8001,7 @@ s32 Camera_ChangeDoorCam(Camera* camera, Actor* doorActor, s16 camDataIdx, f32 a
osSyncPrintf(".... change default door camera (set %d)\n", CAM_SET_DOORC);
} else {
s32 setting = Camera_GetCamDataSetting(camera, camDataIdx);
camera->unk_14A |= 0x40;
if (Camera_ChangeSetting(camera, setting) >= 0) {

View file

@ -325,6 +325,7 @@ void EffectSs_DrawAll(GlobalContext* globalCtx) {
s16 func_80027DD4(s16 arg0, s16 arg1, s32 arg2) {
s16 ret = (arg2 == 0) ? arg1 : (arg0 + (s32)((arg1 - arg0) / (f32)arg2));
return ret;
}

View file

@ -955,6 +955,7 @@ void EnItem00_Draw(Actor* thisx, GlobalContext* globalCtx) {
if (this->unk_15A < 0) {
if (this->unk_15A == -1) {
s8 bankIndex = Object_GetIndex(&globalCtx->objectCtx, OBJECT_GI_HEART);
if (Object_IsLoaded(&globalCtx->objectCtx, bankIndex)) {
this->actor.objBankIndex = bankIndex;
Actor_SetObjectDependency(globalCtx, &this->actor);

View file

@ -65,5 +65,6 @@ u16 sReactionTextIds[][PLAYER_MASK_MAX] = {
u16 Text_GetFaceReaction(GlobalContext* globalCtx, u32 reactionSet) {
u8 currentMask = Player_GetMask(globalCtx);
return sReactionTextIds[reactionSet][currentMask];
}

View file

@ -844,7 +844,7 @@ void Environment_Update(GlobalContext* globalCtx, EnvironmentContext* envCtx, Li
u16 i;
u16 j;
u16 time;
EnvLightSettings* lightSettingsList = globalCtx->envCtx.lightSettingsList; // 7C
EnvLightSettings* lightSettingsList = globalCtx->envCtx.lightSettingsList;
s32 adjustment;
if ((((void)0, gSaveContext.gameMode) != 0) && (((void)0, gSaveContext.gameMode) != 3)) {
@ -1027,7 +1027,6 @@ void Environment_Update(GlobalContext* globalCtx, EnvironmentContext* envCtx, Li
}
}
} else {
// 3200 (l 1608)
if (!envCtx->blendIndoorLights) {
for (i = 0; i < 3; i++) {
envCtx->lightSettings.ambientColor[i] = lightSettingsList[envCtx->unk_BD].ambientColor[i];
@ -1042,7 +1041,6 @@ void Environment_Update(GlobalContext* globalCtx, EnvironmentContext* envCtx, Li
envCtx->lightSettings.fogFar = lightSettingsList[envCtx->unk_BD].fogFar;
envCtx->unk_D8 = 1.0f;
} else {
// 3344 (l 1689)
u8 blendRate = (lightSettingsList[envCtx->unk_BD].fogNear >> 0xA) * 4;
if (blendRate == 0) {

View file

@ -426,6 +426,7 @@ void Gameplay_Update(GlobalContext* globalCtx) {
osSyncPrintf("RomStart RomEnd Size\n");
for (i = 0; i < gObjectTableSize; i++) {
s32 size = gObjectTable[i].vromEnd - gObjectTable[i].vromStart;
osSyncPrintf("%08x-%08x %08x(%8.3fKB)\n", gObjectTable[i].vromStart, gObjectTable[i].vromEnd, size,
size / 1024.0f);
}
@ -1627,6 +1628,7 @@ s32 Gameplay_CameraSetAtEyeUp(GlobalContext* globalCtx, s16 camId, Vec3f* at, Ve
s32 Gameplay_CameraSetFov(GlobalContext* globalCtx, s16 camId, f32 fov) {
s32 ret = Camera_SetParam(globalCtx->cameraPtrs[camId], 0x20, &fov) & 1;
if (1) {}
return ret;
}

View file

@ -66,6 +66,7 @@ s16 Quake_Callback1(QuakeRequest* req, ShakeInfo* shake) {
if (req->countdown > 0) {
f32 a = Math_SinS(req->speed * req->countdown);
Quake_UpdateShakeInfo(req, shake, a, Rand_ZeroOne() * a);
req->countdown--;
}
@ -75,6 +76,7 @@ s16 Quake_Callback1(QuakeRequest* req, ShakeInfo* shake) {
s16 Quake_Callback5(QuakeRequest* req, ShakeInfo* shake) {
if (req->countdown > 0) {
f32 a = Math_SinS(req->speed * req->countdown);
Quake_UpdateShakeInfo(req, shake, a, a);
req->countdown--;
}
@ -94,6 +96,7 @@ s16 Quake_Callback6(QuakeRequest* req, ShakeInfo* shake) {
s16 Quake_Callback3(QuakeRequest* req, ShakeInfo* shake) {
if (req->countdown > 0) {
f32 a = Math_SinS(req->speed * req->countdown) * ((f32)req->countdown / (f32)req->countdownMax);
Quake_UpdateShakeInfo(req, shake, a, a);
req->countdown--;
}
@ -103,6 +106,7 @@ s16 Quake_Callback3(QuakeRequest* req, ShakeInfo* shake) {
s16 Quake_Callback2(QuakeRequest* req, ShakeInfo* shake) {
if (req->countdown > 0) {
f32 a = Rand_ZeroOne();
Quake_UpdateShakeInfo(req, shake, a, Rand_ZeroOne() * a);
req->countdown--;
}
@ -112,6 +116,7 @@ s16 Quake_Callback2(QuakeRequest* req, ShakeInfo* shake) {
s16 Quake_Callback4(QuakeRequest* req, ShakeInfo* shake) {
if (req->countdown > 0) {
f32 a = Rand_ZeroOne() * ((f32)req->countdown / (f32)req->countdownMax);
Quake_UpdateShakeInfo(req, shake, a, Rand_ZeroOne() * a);
req->countdown--;
}

View file

@ -23,6 +23,7 @@ void Sample_Draw(SampleContext* this) {
{
Mtx* mtx = Graph_Alloc(gfxCtx, sizeof(Mtx));
guPosition(mtx, SREG(37), SREG(38), SREG(39), 1.0f, SREG(40), SREG(41), SREG(42));
gSPMatrix(POLY_OPA_DISP++, mtx, G_MTX_LOAD);
}

View file

@ -144,6 +144,7 @@ void func_800A5F60(GraphicsContext* gfxCtx, PSkinAwb* skin, s32 limbIndex, Gfx*
}
if (gfx != NULL) {
Mtx* mtx = SkinMatrix_MtxFToNewMtx(gfxCtx, &D_801600C0[limbIndex]);
if (mtx != NULL) {
gSPMatrix(POLY_OPA_DISP++, mtx, G_MTX_PUSH | G_MTX_MUL | G_MTX_MODELVIEW);
gSPDisplayList(POLY_OPA_DISP++, gfx);

View file

@ -207,6 +207,7 @@ void ViMode_Destroy(ViMode* viMode) {
void ViMode_ConfigureFeatures(ViMode* viMode, s32 viFeatures) {
u32 ctrl = viMode->customViMode.comRegs.ctrl;
if (viFeatures & OS_VI_GAMMA_ON) {
ctrl |= OS_VI_GAMMA;
}