Skip to content

Commit

Permalink
Anchor + Let It Snow 1
Browse files Browse the repository at this point in the history
  • Loading branch information
garrettjoecox committed Dec 5, 2023
1 parent 4102f49 commit 05a802c
Show file tree
Hide file tree
Showing 2 changed files with 48 additions and 1 deletion.
2 changes: 1 addition & 1 deletion soh/soh/Enhancements/mods.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -667,7 +667,7 @@ void RegisterGrantGanonsBossKey() {
Player* player = GET_PLAYER(gPlayState);
// Triforce Hunt needs the check if the player isn't being teleported to the credits scene.
if (!GameInteractor::IsGameplayPaused() && IS_RANDO && Flags_GetRandomizerInf(RAND_INF_GRANT_GANONS_BOSSKEY) &&
gPlayState->sceneLoadFlag != 0x14 &&
gPlayState->transitionTrigger != 0x14 &&
(1 << 0 & gSaveContext.inventory.dungeonItems[SCENE_GANONS_TOWER]) == 0 && player->stateFlags1 !=
PLAYER_STATE1_INPUT_DISABLED) {
GetItemEntry getItemEntry =
Expand Down
47 changes: 47 additions & 0 deletions soh/src/overlays/actors/ovl_Link_Puppet/z_link_puppet.c
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@
#include "soh/Enhancements/game-interactor/GameInteractor_Anchor.h"
#include <string.h>
#include <objects/object_link_child/object_link_child.h>
#include "soh_assets.h"

#define FLAGS (ACTOR_FLAG_TARGETABLE | ACTOR_FLAG_UPDATE_WHILE_CULLED | ACTOR_FLAG_DRAW_WHILE_CULLED)

Expand Down Expand Up @@ -183,6 +184,52 @@ void Puppet_PostLimbDraw(PlayState* play, s32 limbIndex, Gfx** dList, Vec3s* rot
Vec3f* vec = &FEET_POS[((void)0, playerData.playerAge)];
Actor_SetFeetPos(&this->actor, limbIndex, PLAYER_LIMB_L_FOOT, vec, PLAYER_LIMB_R_FOOT, vec);

if (CVarGetInteger("gLetItSnow", 0)) {
if (limbIndex == PLAYER_LIMB_HEAD) {
OPEN_DISPS(play->state.gfxCtx);

Matrix_Push();
if (!playerData.playerAge) {
Matrix_RotateZYX(24000, -16000, -7000, MTXMODE_APPLY);
Matrix_Translate(32.0f, 0.0f, 0.0f, MTXMODE_APPLY);
Matrix_Scale(1.0f, 1.0f, 1.0f, MTXMODE_APPLY);
gSPMatrix(POLY_OPA_DISP++, MATRIX_NEWMTX(play->state.gfxCtx), G_MTX_NOPUSH | G_MTX_LOAD | G_MTX_MODELVIEW);
gSPDisplayList(POLY_OPA_DISP++, gLinkAdultHatTrimDL);
} else {
Matrix_RotateZYX(24000, -16000, -7000, MTXMODE_APPLY);
Matrix_Translate(32.0f, 0.0f, 0.0f, MTXMODE_APPLY);
Matrix_Scale(1.0f, 1.0f, 1.0f, MTXMODE_APPLY);
gSPMatrix(POLY_OPA_DISP++, MATRIX_NEWMTX(play->state.gfxCtx), G_MTX_NOPUSH | G_MTX_LOAD | G_MTX_MODELVIEW);
gSPDisplayList(POLY_OPA_DISP++, gLinkChildHatTrimDL);
}

Matrix_Pop();

CLOSE_DISPS(play->state.gfxCtx);
}

if (limbIndex == PLAYER_LIMB_HAT) {
OPEN_DISPS(play->state.gfxCtx);

Matrix_Push();
if (!playerData.playerAge) {
Matrix_RotateZYX(0, 0, 17500, MTXMODE_APPLY);
Matrix_Translate(-195.0f, 1500.0f, -95.0f, MTXMODE_APPLY);
Matrix_Scale(2.0f, 2.0f, 2.0f, MTXMODE_APPLY);
} else {
Matrix_RotateZYX(0, 0, 27000, MTXMODE_APPLY);
Matrix_Translate(-950.0f, 2600.0f, -75.0f, MTXMODE_APPLY);
Matrix_Scale(2.0f, 2.0f, 2.0f, MTXMODE_APPLY);
}

gSPMatrix(POLY_OPA_DISP++, MATRIX_NEWMTX(play->state.gfxCtx), G_MTX_NOPUSH | G_MTX_LOAD | G_MTX_MODELVIEW);
gSPDisplayList(POLY_OPA_DISP++, gLinkAdultPompomDL);
Matrix_Pop();

CLOSE_DISPS(play->state.gfxCtx);
}
}

if (limbIndex == PLAYER_LIMB_L_HAND && playerData.itemAction == PLAYER_IA_DEKU_STICK) {
OPEN_DISPS(play->state.gfxCtx);

Expand Down

0 comments on commit 05a802c

Please sign in to comment.