mirror of
https://github.com/HarbourMasters/Shipwright.git
synced 2024-12-22 08:08:53 -05:00
[Cosmetic] Adds Bunny Hood to Cosmetic Editor (#3245)
* Color and Invisible Checkbox GI model crashes when talking to mask salesman * Update z_player.c Co-authored-by: Garrett Cox <garrettjcox@gmail.com> * Update z_player.c Co-authored-by: Garrett Cox <garrettjcox@gmail.com> * Move bunny hood coloring to patch --------- Co-authored-by: Garrett Cox <garrettjcox@gmail.com>
This commit is contained in:
parent
57d4d1ae20
commit
260078c871
@ -46,6 +46,7 @@ extern PlayState* gPlayState;
|
||||
#include "overlays/ovl_Boss_Ganon2/ovl_Boss_Ganon2.h"
|
||||
#include "objects/object_gjyo_objects/object_gjyo_objects.h"
|
||||
#include "textures/nintendo_rogo_static/nintendo_rogo_static.h"
|
||||
#include "objects/object_gi_rabit_mask/object_gi_rabit_mask.h"
|
||||
void ResourceMgr_PatchGfxByName(const char* path, const char* patchName, int index, Gfx instruction);
|
||||
void ResourceMgr_PatchGfxCopyCommandByName(const char* path, const char* patchName, int destinationIndex, int sourceIndex);
|
||||
void ResourceMgr_UnpatchGfxByName(const char* path, const char* patchName);
|
||||
@ -228,6 +229,7 @@ static std::map<std::string, CosmeticOption> cosmeticOptions = {
|
||||
COSMETIC_OPTION("Equipment_BowHandle", "Bow Handle", GROUP_EQUIPMENT, ImVec4( 50, 150, 255, 255), false, true, true),
|
||||
COSMETIC_OPTION("Equipment_ChuFace", "Bombchu Face", GROUP_EQUIPMENT, ImVec4( 0, 100, 150, 255), false, true, true),
|
||||
COSMETIC_OPTION("Equipment_ChuBody", "Bombchu Body", GROUP_EQUIPMENT, ImVec4(180, 130, 50, 255), false, true, true),
|
||||
COSMETIC_OPTION("Equipment_BunnyHood", "Bunny Hood", GROUP_EQUIPMENT, ImVec4(255, 235, 109, 255), false, true, true),
|
||||
|
||||
COSMETIC_OPTION("Consumable_Hearts", "Hearts", GROUP_CONSUMABLE, ImVec4(255, 70, 50, 255), false, true, false),
|
||||
COSMETIC_OPTION("Consumable_HeartBorder", "Heart Border", GROUP_CONSUMABLE, ImVec4( 50, 40, 60, 255), false, true, true),
|
||||
@ -916,6 +918,26 @@ void ApplyOrResetCustomGfxPatches(bool manualChange) {
|
||||
PATCH_GFX(gBombchuDL, "Equipment_ChuBody5", equipmentChuBody.changedCvar, 46, gsDPSetPrimColor(0, 0, color.r, color.g, color.b, 255));
|
||||
}
|
||||
|
||||
static CosmeticOption& equipmentBunnyHood = cosmeticOptions.at("Equipment_BunnyHood");
|
||||
if (manualChange || CVarGetInteger(equipmentBunnyHood.rainbowCvar, 0)) {
|
||||
static Color_RGBA8 defaultColor = {equipmentBunnyHood.defaultColor.x, equipmentBunnyHood.defaultColor.y, equipmentBunnyHood.defaultColor.z, equipmentBunnyHood.defaultColor.w};
|
||||
Color_RGBA8 color = CVarGetColor(equipmentBunnyHood.cvar, defaultColor);
|
||||
PATCH_GFX(gGiBunnyHoodDL, "Equipment_BunnyHood1", equipmentBunnyHood.changedCvar, 5, gsDPSetPrimColor(0, 0, color.r, color.g, color.b, 255));
|
||||
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");
|
||||
if (manualChange || CVarGetInteger(consumableGreenRupee.rainbowCvar, 0)) {
|
||||
static Color_RGBA8 defaultColor = {consumableGreenRupee.defaultColor.x, consumableGreenRupee.defaultColor.y, consumableGreenRupee.defaultColor.z, consumableGreenRupee.defaultColor.w};
|
||||
|
@ -897,6 +897,8 @@ void DrawEnhancementsMenu() {
|
||||
UIWidgets::Tooltip("Disables bombs always rotating to face the camera. To be used in conjunction with mods that want to replace bombs with 3D objects.");
|
||||
UIWidgets::PaddedEnhancementCheckbox("Disable Grotto Fixed Rotation", "gDisableGrottoRotation", true, false);
|
||||
UIWidgets::Tooltip("Disables grottos rotating with the camera. To be used in conjunction with mods that want to replace grottos with 3D objects.");
|
||||
UIWidgets::PaddedEnhancementCheckbox("Invisible Bunny Hood", "gHideBunnyHood", true, false);
|
||||
UIWidgets::Tooltip("Turns Bunny Hood invisible while still maintaining its effects.");
|
||||
|
||||
ImGui::EndMenu();
|
||||
}
|
||||
|
@ -11171,7 +11171,11 @@ void Player_DrawGameplay(PlayState* play, Player* this, s32 lod, Gfx* cullDList,
|
||||
MATRIX_TOMTX(sp70);
|
||||
}
|
||||
|
||||
gSPDisplayList(POLY_OPA_DISP++, sMaskDlists[this->currentMask - 1]);
|
||||
|
||||
if (this->currentMask != PLAYER_MASK_BUNNY || !CVarGetInteger("gHideBunnyHood", 0)) {
|
||||
gSPDisplayList(POLY_OPA_DISP++, sMaskDlists[this->currentMask - 1]);
|
||||
}
|
||||
|
||||
if (CVarGetInteger("gFixIceTrapWithBunnyHood", 1)) Matrix_Pop();
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user