Added system to check if color tunics is turned on.

This commit is contained in:
Baoulettes 2022-04-28 06:21:06 +02:00 committed by GitHub
parent 663610d5bd
commit 4282b1c89e
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 19 additions and 16 deletions

View File

@ -743,25 +743,28 @@ void func_8008F470(GlobalContext* globalCtx, void** skeleton, Vec3s* jointTable,
#else
gSPSegment(POLY_OPA_DISP++, 0x09, SEGMENTED_TO_VIRTUAL(sMouthTextures[eyeIndex]));
#endif
if (tunic == PLAYER_TUNIC_KOKIRI) {
Color_RGB8 sTemp = { CVar_GetS32("gTunic_Kokiri_R", &sTunicColors[PLAYER_TUNIC_KOKIRI].r),
CVar_GetS32("gTunic_Kokiri_G", &sTunicColors[PLAYER_TUNIC_KOKIRI].g),
CVar_GetS32("gTunic_Kokiri_B", &sTunicColors[PLAYER_TUNIC_KOKIRI].b) };
if (CVar_GetS32("gUseTunicsCol",0) != 1) { //Mod is not on bring back original colors.
color = &sTunicColors[tunic];
}
if (tunic == PLAYER_TUNIC_KOKIRI && CVar_GetS32("gUseTunicsCol",0) ==1 ) {
Color_RGB8 sTemp = { CVar_GetS32("gTunic_Kokiri_R", sTunicColors[PLAYER_TUNIC_KOKIRI].r),
CVar_GetS32("gTunic_Kokiri_G", sTunicColors[PLAYER_TUNIC_KOKIRI].g),
CVar_GetS32("gTunic_Kokiri_B", sTunicColors[PLAYER_TUNIC_KOKIRI].b) };
color = &sTemp;
} else if (tunic == PLAYER_TUNIC_GORON) {
Color_RGB8 sTemp = { CVar_GetS32("gTunic_Goron_R", &sTunicColors[PLAYER_TUNIC_GORON].r),
CVar_GetS32("gTunic_Goron_G", &sTunicColors[PLAYER_TUNIC_GORON].g),
CVar_GetS32("gTunic_Goron_B", &sTunicColors[PLAYER_TUNIC_GORON].b) };
} else if (tunic == PLAYER_TUNIC_GORON && CVar_GetS32("gUseTunicsCol",0) ==1 ) {
Color_RGB8 sTemp = { CVar_GetS32("gTunic_Goron_R", sTunicColors[PLAYER_TUNIC_GORON].r),
CVar_GetS32("gTunic_Goron_G", sTunicColors[PLAYER_TUNIC_GORON].g),
CVar_GetS32("gTunic_Goron_B", sTunicColors[PLAYER_TUNIC_GORON].b) };
color = &sTemp;
} else if (tunic == PLAYER_TUNIC_ZORA) {
Color_RGB8 sTemp = { CVar_GetS32("gTunic_Zora_R", &sTunicColors[PLAYER_TUNIC_ZORA].r),
CVar_GetS32("gTunic_Zora_G", &sTunicColors[PLAYER_TUNIC_ZORA].g),
CVar_GetS32("gTunic_Zora_B", &sTunicColors[PLAYER_TUNIC_ZORA].b) };
} else if (tunic == PLAYER_TUNIC_ZORA && CVar_GetS32("gUseTunicsCol",0) ==1 ) {
Color_RGB8 sTemp = { CVar_GetS32("gTunic_Zora_R", sTunicColors[PLAYER_TUNIC_ZORA].r),
CVar_GetS32("gTunic_Zora_G", sTunicColors[PLAYER_TUNIC_ZORA].g),
CVar_GetS32("gTunic_Zora_B", sTunicColors[PLAYER_TUNIC_ZORA].b) };
color = &sTemp;
} else {
Color_RGB8 sTemp = { CVar_GetS32("gTunic_Kokiri_R", &sTunicColors[PLAYER_TUNIC_KOKIRI].r),
CVar_GetS32("gTunic_Kokiri_G", &sTunicColors[PLAYER_TUNIC_KOKIRI].g),
CVar_GetS32("gTunic_Kokiri_B", &sTunicColors[PLAYER_TUNIC_KOKIRI].b) };
} else if (CVar_GetS32("gUseTunicsCol",0) == 1) {
Color_RGB8 sTemp = { CVar_GetS32("gTunic_Kokiri_R", sTunicColors[PLAYER_TUNIC_KOKIRI].r),
CVar_GetS32("gTunic_Kokiri_G", sTunicColors[PLAYER_TUNIC_KOKIRI].g),
CVar_GetS32("gTunic_Kokiri_B", sTunicColors[PLAYER_TUNIC_KOKIRI].b) };
color = &sTemp;
}
gDPSetEnvColor(POLY_OPA_DISP++, color->r, color->g, color->b, 0);