Apply Goron Neck Length to Goron City Shopkeeper (#3289)

* Add limb override for Goron shopkeep

* Remove extra line breaks

* Fix bug with goron neck length

---------

Co-authored-by: Garrett Cox <garrettjcox@gmail.com>
This commit is contained in:
Eric Hoey 2023-10-26 20:39:18 -04:00 committed by GitHub
parent a6de59e09f
commit 7d120a021f
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
3 changed files with 12 additions and 3 deletions

View File

@ -1535,7 +1535,7 @@ void DrawSillyTab() {
CVarClear("gCosmetics.BunnyHood_EarSpread"); CVarClear("gCosmetics.BunnyHood_EarSpread");
LUS::Context::GetInstance()->GetWindow()->GetGui()->SaveConsoleVariablesOnNextTick(); LUS::Context::GetInstance()->GetWindow()->GetGui()->SaveConsoleVariablesOnNextTick();
} }
UIWidgets::EnhancementSliderFloat("Goron Neck Length: %f", "##Goron_NeckLength", "gCosmetics.Goron_NeckLength", 0.0f, 1000.0f, "", 0.0f, false); UIWidgets::EnhancementSliderFloat("Goron Neck Length: %f", "##Goron_NeckLength", "gCosmetics.Goron_NeckLength", 0.0f, 5000.0f, "", 0.0f, false);
ImGui::SameLine(); ImGui::SameLine();
if (ImGui::Button("Reset##Goron_NeckLength")) { if (ImGui::Button("Reset##Goron_NeckLength")) {
CVarClear("gCosmetics.Goron_NeckLength"); CVarClear("gCosmetics.Goron_NeckLength");

View File

@ -2140,7 +2140,7 @@ s32 EnGo2_OverrideLimbDraw(PlayState* play, s32 limb, Gfx** dList, Vec3f* pos, V
Matrix_RotateX(float1, MTXMODE_APPLY); Matrix_RotateX(float1, MTXMODE_APPLY);
float1 = (vec1.x / (f32)0x8000) * M_PI; float1 = (vec1.x / (f32)0x8000) * M_PI;
Matrix_RotateZ(float1, MTXMODE_APPLY); Matrix_RotateZ(float1, MTXMODE_APPLY);
Matrix_Translate(-2800.0f + CVarGetFloat("gCosmetics.Goron_NeckLength", 0.0f), 0.0f, 0.0f, MTXMODE_APPLY); Matrix_Translate(-2800.0f, 0.0f, 0.0f, MTXMODE_APPLY);
} }
if (limb == 10) { if (limb == 10) {
vec1 = this->interactInfo.torsoRot; vec1 = this->interactInfo.torsoRot;

View File

@ -2531,6 +2531,15 @@ void EnOssan_DrawKokiriShopkeeper(Actor* thisx, PlayState* play) {
CLOSE_DISPS(play->state.gfxCtx); CLOSE_DISPS(play->state.gfxCtx);
} }
s32 EnGo2_OverrideLimbDrawGoronShopkeeper (PlayState* play, s32 limb, Gfx** dList, Vec3f* pos, Vec3s* rot, void* thisx) {
EnOssan* this = (EnOssan*)thisx;
if (limb == 17) {
Matrix_Translate(CVarGetFloat("gCosmetics.Goron_NeckLength", 0.0f), 0.0f, 0.0f, MTXMODE_APPLY);
}
return 0;
}
void EnOssan_DrawGoronShopkeeper(Actor* thisx, PlayState* play) { void EnOssan_DrawGoronShopkeeper(Actor* thisx, PlayState* play) {
static void* sGoronShopkeeperEyeTextures[] = { gGoronCsEyeOpenTex, gGoronCsEyeHalfTex, gGoronCsEyeClosedTex }; static void* sGoronShopkeeperEyeTextures[] = { gGoronCsEyeOpenTex, gGoronCsEyeHalfTex, gGoronCsEyeClosedTex };
EnOssan* this = (EnOssan*)thisx; EnOssan* this = (EnOssan*)thisx;
@ -2541,7 +2550,7 @@ void EnOssan_DrawGoronShopkeeper(Actor* thisx, PlayState* play) {
Gfx_SetupDL_25Opa(play->state.gfxCtx); Gfx_SetupDL_25Opa(play->state.gfxCtx);
gSPSegment(POLY_OPA_DISP++, 0x08, SEGMENTED_TO_VIRTUAL(sGoronShopkeeperEyeTextures[this->eyeTextureIdx])); gSPSegment(POLY_OPA_DISP++, 0x08, SEGMENTED_TO_VIRTUAL(sGoronShopkeeperEyeTextures[this->eyeTextureIdx]));
gSPSegment(POLY_OPA_DISP++, 0x09, SEGMENTED_TO_VIRTUAL(gGoronCsMouthNeutralTex)); gSPSegment(POLY_OPA_DISP++, 0x09, SEGMENTED_TO_VIRTUAL(gGoronCsMouthNeutralTex));
SkelAnime_DrawSkeletonOpa(play, &this->skelAnime, NULL, NULL, this); SkelAnime_DrawSkeletonOpa(play, &this->skelAnime, EnGo2_OverrideLimbDrawGoronShopkeeper, NULL, this);
EnOssan_DrawCursor(play, this, this->cursorX, this->cursorY, this->cursorZ, this->drawCursor); EnOssan_DrawCursor(play, this, this->cursorX, this->cursorY, this->cursorZ, this->drawCursor);
EnOssan_DrawStickDirectionPrompts(play, this); EnOssan_DrawStickDirectionPrompts(play, this);