Skip to content

Commit

Permalink
Move bunny hood coloring to patch
Browse files Browse the repository at this point in the history
  • Loading branch information
garrettjoecox committed Oct 4, 2023
1 parent 0feb539 commit ffa9fa5
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 9 deletions.
10 changes: 10 additions & 0 deletions soh/soh/Enhancements/cosmetics/CosmeticsEditor.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -926,6 +926,16 @@ void ApplyOrResetCustomGfxPatches(bool manualChange) {
PATCH_GFX(gGiBunnyHoodDL, "Equipment_BunnyHood2", equipmentBunnyHood.changedCvar, 6, gsDPSetEnvColor(color.r / 3, color.g / 3, color.b / 3, 255));
PATCH_GFX(gGiBunnyHoodDL, "Equipment_BunnyHood3", equipmentBunnyHood.changedCvar, 83, gsDPSetPrimColor(0, 0, color.r, color.g, color.b, 255));
PATCH_GFX(gGiBunnyHoodDL, "Equipment_BunnyHood4", equipmentBunnyHood.changedCvar, 84, gsDPSetEnvColor(color.r / 3, color.g / 3, color.b / 3, 255));
PATCH_GFX(gLinkChildBunnyHoodDL, "Equipment_BunnyHood5", equipmentBunnyHood.changedCvar, 4, gsDPSetGrayscaleColor(color.r, color.g, color.b, 255));

if (manualChange) {
PATCH_GFX(gLinkChildBunnyHoodDL, "Equipment_BunnyHood6", equipmentBunnyHood.changedCvar, 13, gsSPGrayscale(true));
if (CVarGetInteger(equipmentBunnyHood.changedCvar, 0)) {
ResourceMgr_PatchGfxByName(gLinkChildBunnyHoodDL, "Equipment_BunnyHood7", 125, gsSPBranchListOTRFilePath(gEndGrayscaleAndEndDlistDL));
} else {
ResourceMgr_UnpatchGfxByName(gLinkChildBunnyHoodDL, "Equipment_BunnyHood7");
}
}
}

static CosmeticOption& consumableGreenRupee = cosmeticOptions.at("Consumable_GreenRupee");
Expand Down
9 changes: 0 additions & 9 deletions soh/src/overlays/actors/ovl_player_actor/z_player.c
Original file line number Diff line number Diff line change
Expand Up @@ -11172,19 +11172,10 @@ void Player_DrawGameplay(PlayState* play, Player* this, s32 lod, Gfx* cullDList,
}


if ((this->currentMask == PLAYER_MASK_BUNNY) && CVarGetInteger("gCosmetics.Equipment_BunnyHood.Changed", 0)) {
gSPGrayscale(POLY_OPA_DISP++, true);
Color_RGBA8 hoodColor = CVarGetColor("gCosmetics.Equipment_BunnyHood.Value", (Color_RGBA8){ 255, 255, 255, 255 });
gDPSetGrayscaleColor(POLY_OPA_DISP++, hoodColor.r, hoodColor.g, hoodColor.b, 255);
}
if (this->currentMask != PLAYER_MASK_BUNNY || !CVarGetInteger("gHideBunnyHood", 0)) {
gSPDisplayList(POLY_OPA_DISP++, sMaskDlists[this->currentMask - 1]);
}

if ((this->currentMask == PLAYER_MASK_BUNNY) && CVarGetInteger("gCosmetics.Equipment_BunnyHood.Changed", 0)) {
gSPGrayscale(POLY_OPA_DISP++, false);
}

if (CVarGetInteger("gFixIceTrapWithBunnyHood", 1)) Matrix_Pop();
}

Expand Down

0 comments on commit ffa9fa5

Please sign in to comment.