Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
14 changes: 14 additions & 0 deletions soh/soh/Enhancements/cosmetics/CosmeticsEditor.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1962,8 +1962,15 @@ void DrawSillyTab() {
.Step(10.0f)
.Size(ImVec2(300.0f, 0.0f))
.Color(THEME_COLOR));
ImGui::SameLine();
ImGui::SetCursorPosY(ImGui::GetCursorPosY() + ImGui::CalcTextSize("g").y * 2);
Reset_Option_Single("Reset##BunnyHood_EarLength", CVAR_COSMETIC("BunnyHood.EarLength"));

UIWidgets::CVarCheckbox("Growing Ears", CVAR_COSMETIC("BunnyHood.GrowingEars"),
UIWidgets::CheckboxOptions()
.Tooltip("Ears grow continuously while worn. Resets on scene change.")
.Color(THEME_COLOR));

UIWidgets::Separator(true, true, 2.0f, 2.0f);

UIWidgets::CVarSliderFloat("Bunny Hood Spread", CVAR_COSMETIC("BunnyHood.EarSpread"),
Expand All @@ -1980,8 +1987,15 @@ void DrawSillyTab() {
UIWidgets::Separator(true, true, 2.0f, 2.0f);

SohGui::mSohMenu->MenuDrawItem(goronNeck, ImGui::GetContentRegionAvail().x, THEME_COLOR);
ImGui::SameLine();
ImGui::SetCursorPosY(ImGui::GetCursorPosY() + ImGui::CalcTextSize("g").y * 2);
Reset_Option_Single("Reset##Goron_NeckLength", CVAR_COSMETIC("Goron.NeckLength"));

UIWidgets::CVarCheckbox("Growing Neck", CVAR_COSMETIC("Goron.GrowingNeck"),
UIWidgets::CheckboxOptions()
.Tooltip("Goron necks grow continuously. Resets on scene change.")
.Color(THEME_COLOR));

UIWidgets::Separator(true, true, 2.0f, 2.0f);

UIWidgets::CVarCheckbox("Unfix Goron Spin", CVAR_COSMETIC("UnfixGoronSpin"),
Expand Down
20 changes: 19 additions & 1 deletion soh/src/overlays/actors/ovl_En_Du/z_en_du.c
Original file line number Diff line number Diff line change
Expand Up @@ -633,7 +633,25 @@ s32 EnDu_OverrideLimbDraw(PlayState* play, s32 limbIndex, Gfx** dList, Vec3f* po
Vec3s sp1C;

if (limbIndex == 16) {
Matrix_Translate(2400.0f, 0.0f, 0.0f, MTXMODE_APPLY);
// #region SOH [Enhancement] - Goron Neck Length
static f32 growNeck = 0.0f;
static s16 lastScene = -1;

if (CVarGetInteger(CVAR_COSMETIC("Goron.GrowingNeck"), 0)) {
if (play->sceneNum != lastScene) {
growNeck = 0.0f;
lastScene = play->sceneNum;
}

growNeck += 5.0f;
} else {
growNeck = 0.0f;
lastScene = play->sceneNum;
}

Matrix_Translate(2400.0f + CVarGetFloat(CVAR_COSMETIC("Goron.NeckLength"), 0.0f) + growNeck, 0.0f, 0.0f,
MTXMODE_APPLY);
// #endregion
sp1C = this->interactInfo.headRot;
Matrix_RotateX(BINANG_TO_RAD(sp1C.y), MTXMODE_APPLY);
Matrix_RotateZ(BINANG_TO_RAD(sp1C.x), MTXMODE_APPLY);
Expand Down
22 changes: 21 additions & 1 deletion soh/src/overlays/actors/ovl_En_Go/z_en_go.c
Original file line number Diff line number Diff line change
Expand Up @@ -1087,8 +1087,28 @@ s32 EnGo_OverrideLimbDraw(PlayState* play, s32 limb, Gfx** dList, Vec3f* pos, Ve
Vec3s limbRot;
f32 float1;



if (limb == 17) {
Matrix_Translate(2800.0f, 0.0f, 0.0f, MTXMODE_APPLY);
// #region SOH [Enhancement] - Goron Neck Length
static f32 growNeck = 0.0f;
static s16 lastScene = -1;

if (CVarGetInteger(CVAR_COSMETIC("Goron.GrowingNeck"), 0)) {
if (play->sceneNum != lastScene) {
growNeck = 0.0f;
lastScene = play->sceneNum;
}

growNeck += 5.0f;
} else {
growNeck = 0.0f;
lastScene = play->sceneNum;
}

Matrix_Translate(2800.0f + CVarGetFloat(CVAR_COSMETIC("Goron.NeckLength"), 0.0f) + growNeck, 0.0f, 0.0f,
MTXMODE_APPLY);
// #endregion
limbRot = this->interactInfo.headRot;
float1 = (limbRot.y / (f32)0x8000) * M_PI;
Matrix_RotateX(float1, MTXMODE_APPLY);
Expand Down
20 changes: 19 additions & 1 deletion soh/src/overlays/actors/ovl_En_Go2/z_en_go2.c
Original file line number Diff line number Diff line change
Expand Up @@ -2059,7 +2059,25 @@ s32 EnGo2_OverrideLimbDraw(PlayState* play, s32 limb, Gfx** dList, Vec3f* pos, V
f32 float1;

if (limb == 17) {
Matrix_Translate(2800.0f + CVarGetFloat(CVAR_COSMETIC("Goron.NeckLength"), 0.0f), 0.0f, 0.0f, MTXMODE_APPLY);
// #region SOH [Enhancement] - Goron Neck Length
static f32 growNeck = 0.0f;
static s16 lastScene = -1;

if (CVarGetInteger(CVAR_COSMETIC("Goron.GrowingNeck"), 0)) {
if (play->sceneNum != lastScene) {
growNeck = 0.0f;
lastScene = play->sceneNum;
}

growNeck += 5.0f;
} else {
growNeck = 0.0f;
lastScene = play->sceneNum;
}

Matrix_Translate(2800.0f + CVarGetFloat(CVAR_COSMETIC("Goron.NeckLength"), 0.0f) + growNeck, 0.0f, 0.0f,
MTXMODE_APPLY);
// #endregion
vec1 = this->interactInfo.headRot;
float1 = (vec1.y / (f32)0x8000) * M_PI;
Matrix_RotateX(float1, MTXMODE_APPLY);
Expand Down
17 changes: 17 additions & 0 deletions soh/src/overlays/actors/ovl_En_Ossan/z_en_ossan.c
Original file line number Diff line number Diff line change
Expand Up @@ -2503,7 +2503,24 @@ s32 EnGo2_OverrideLimbDrawGoronShopkeeper(PlayState* play, s32 limb, Gfx** dList
EnOssan* this = (EnOssan*)thisx;

if (limb == 17) {
// #region SOH [Enhancement] - Goron Neck Length
static f32 growNeck = 0.0f;
static s16 lastScene = -1;

if (CVarGetInteger(CVAR_COSMETIC("Goron.GrowingNeck"), 0)) {
if (play->sceneNum != lastScene) {
growNeck = 0.0f;
lastScene = play->sceneNum;
}

growNeck += 5.0f;
} else {
growNeck = 0.0f;
lastScene = play->sceneNum;
}

Matrix_Translate(CVarGetFloat(CVAR_COSMETIC("Goron.NeckLength"), 0.0f), 0.0f, 0.0f, MTXMODE_APPLY);
// #endregion
}
return 0;
}
Expand Down
49 changes: 39 additions & 10 deletions soh/src/overlays/actors/ovl_player_actor/z_player.c
Original file line number Diff line number Diff line change
Expand Up @@ -12436,17 +12436,46 @@ void Player_DrawGameplay(PlayState* play, Player* this, s32 lod, Gfx* cullDList,
earRot.x = sBunnyEarKinematics.rot.y + 0x3E2;
earRot.y = sBunnyEarKinematics.rot.z + 0xDBE;
earRot.z = sBunnyEarKinematics.rot.x - 0x348A;
Matrix_SetTranslateRotateYXZ(97.0f, -1203.0f - CVarGetFloat(CVAR_COSMETIC("BunnyHood.EarLength"), 0.0f),
-240.0f - CVarGetFloat(CVAR_COSMETIC("BunnyHood.EarSpread"), 0.0f), &earRot);
MATRIX_TOMTX(bunnyEarMtx++);

// Left ear
earRot.x = sBunnyEarKinematics.rot.y - 0x3E2;
earRot.y = -0xDBE - sBunnyEarKinematics.rot.z;
earRot.z = sBunnyEarKinematics.rot.x - 0x348A;
Matrix_SetTranslateRotateYXZ(97.0f, -1203.0f - CVarGetFloat(CVAR_COSMETIC("BunnyHood.EarLength"), 0.0f),
240.0f + CVarGetFloat(CVAR_COSMETIC("BunnyHood.EarSpread"), 0.0f), &earRot);
MATRIX_TOMTX(bunnyEarMtx);
// #region SOH [Enhancement] - Bunny Hood Length
{
static f32 growEarLength = 0.0f;
static f32 growEarSpread = 0.0f;
static s16 lastScene = -1;

if (CVarGetInteger(CVAR_COSMETIC("BunnyHood.GrowingEars"), 0)) {
if (play->sceneNum != lastScene) {
growEarLength = 0.0f;
growEarSpread = 0.0f;
lastScene = play->sceneNum;
}

growEarLength += 2.0f;
growEarSpread += 0.5f;
} else {
growEarLength = 0.0f;
growEarSpread = 0.0f;
lastScene = play->sceneNum;
}

const f32 earLength = CVarGetFloat(CVAR_COSMETIC("BunnyHood.EarLength"), 0.0f) + growEarLength;
// #endregion

// #region SOH [Enhancement] - Bunny Hood Spread
const f32 earSpread = CVarGetFloat(CVAR_COSMETIC("BunnyHood.EarSpread"), 0.0f) + growEarSpread;
Matrix_SetTranslateRotateYXZ(97.0f, -1203.0f - earLength, -240.0f - earSpread, &earRot);
// #endregion
MATRIX_TOMTX(bunnyEarMtx++);

// Left ear
earRot.x = sBunnyEarKinematics.rot.y - 0x3E2;
earRot.y = -0xDBE - sBunnyEarKinematics.rot.z;
earRot.z = sBunnyEarKinematics.rot.x - 0x348A;
// #region SOH [Enhancement] - Bunny Hood Spread
Matrix_SetTranslateRotateYXZ(97.0f, -1203.0f - earLength, 240.0f + earSpread, &earRot);
// #endregion
MATRIX_TOMTX(bunnyEarMtx);
}
}

if (this->currentMask != PLAYER_MASK_BUNNY || !CVarGetInteger(CVAR_ENHANCEMENT("HideBunnyHood"), 0)) {
Expand Down