Initial re-application of let-it-snow.

This commit is contained in:
Malkierian
2025-10-30 18:59:19 -07:00
committed by Malkierian
parent 3050d9484f
commit bb497e3125
543 changed files with 28226 additions and 449 deletions
+8 -8
View File
@@ -2275,17 +2275,17 @@ void Environment_FillScreen(GraphicsContext* gfxCtx, u8 red, u8 green, u8 blue,
}
Color_RGB8 sSandstormPrimColors[] = {
{ 210, 156, 85 },
{ 255, 200, 100 },
{ 225, 160, 50 },
{ 105, 90, 40 },
{ 210, 210, 210 },
{ 255, 255, 255 },
{ 225, 225, 225 },
{ 105, 105, 105 },
};
Color_RGB8 sSandstormEnvColors[] = {
{ 155, 106, 35 },
{ 200, 150, 50 },
{ 170, 110, 0 },
{ 50, 40, 0 },
{ 155, 155, 155 },
{ 200, 200, 200 },
{ 170, 170, 170 },
{ 50, 50, 50 },
};
u16 previousPatchedSandstormScreenSize = 0;
+2 -2
View File
@@ -3485,8 +3485,8 @@ void Interface_DrawMagicBar(PlayState* play) {
if (CVarGetInteger(CVAR_COSMETIC("Consumable.Magic.Changed"), 0)) {
magicbar_green = CVarGetColor24(CVAR_COSMETIC("Consumable.Magic.Value"), magicbar_green);
}
if (CVarGetInteger("gCosmetics.Consumable_MagicInfinite.Changed", 0)) {
magicbar_blue = CVarGetColor24("gCosmetics.Consumable_MagicInfinite.Value", magicbar_blue);
if (CVarGetInteger(CVAR_COSMETIC("Consumable.MagicInfinite.Changed"), 0)) {
magicbar_blue = CVarGetColor24(CVAR_COSMETIC("Consumable.MagicInfinite.Value"), magicbar_blue);
}
OPEN_DISPS(play->state.gfxCtx);
+9
View File
@@ -38,6 +38,9 @@ Input* D_8012D1F8 = NULL;
PlayState* gPlayState;
s16 firstInit = 0;
s16 gEnPartnerId;
s16 gEnSnowballId;
s16 gEnChristmasTreeId;
s16 gEnChristmasDecoId;
void Play_SpawnScene(PlayState* play, s32 sceneId, s32 spawn);
@@ -687,6 +690,12 @@ void Play_Init(GameState* thisx) {
GET_PLAYER(play)->actor.world.pos.y + Player_GetHeight(GET_PLAYER(play)) + 5.0f,
GET_PLAYER(play)->actor.world.pos.z, 0, 0, 0, 1, true);
}
if (play->sceneNum == SCENE_KAKARIKO_VILLAGE) {
Actor_Spawn(&play->actorCtx, play, gEnChristmasTreeId, -734, 0, 420, 0, 0, 0, 0, true);
}
Actor_Spawn(&play->actorCtx, play, gEnChristmasDecoId, 0, 0, 0, 0, 0, 0, 0, true);
}
void Play_Update(PlayState* play) {
+61 -3
View File
@@ -11,6 +11,7 @@
#include "soh/ResourceManagerHelpers.h"
#include <stdlib.h>
#include "soh_assets.h"
typedef struct {
/* 0x00 */ u8 flag;
@@ -1014,10 +1015,18 @@ void* sMouthTextures[] = {
};
#endif
// Original colors
// Color_RGB8 sTunicColors[] = {
// { 30, 105, 27 },
// { 100, 20, 0 },
// { 0, 60, 100 },
//};
// Overwrite to red tunic as default for Holidays in Hyrule build
Color_RGB8 sTunicColors[] = {
{ 30, 105, 27 },
{ 100, 20, 0 },
{ 0, 60, 100 },
{ 255, 0, 0 },
{ 255, 0, 0 },
{ 255, 0, 0 },
};
Color_RGB8 sGauntletColors[] = {
@@ -1788,6 +1797,55 @@ void Player_PostLimbDrawGameplay(PlayState* play, s32 limbIndex, Gfx** dList, Ve
Matrix_MultVec3f(&sZeroVec, D_80160000);
}
if (CVarGetInteger(CVAR_GENERAL("LetItSnow"), 0) && !(this->stateFlags1 & PLAYER_STATE1_FIRST_PERSON) &&
!(this->stateFlags2 & PLAYER_STATE2_CRAWLING)) {
if (limbIndex == PLAYER_LIMB_HEAD) {
OPEN_DISPS(play->state.gfxCtx);
Matrix_Push();
if (LINK_IS_ADULT) {
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 (LINK_IS_ADULT) {
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) {
MtxF sp14C;
Actor* hookedActor;
@@ -307,7 +307,7 @@ void BgSpot08Iceblock_Init(Actor* thisx, PlayState* play) {
break;
}
if (LINK_AGE_IN_YEARS == YEARS_CHILD) {
if (LINK_AGE_IN_YEARS == YEARS_CHILD && play->sceneNum == SCENE_ZORAS_FOUNTAIN) {
Actor_Kill(&this->dyna.actor);
return;
}
@@ -331,6 +331,12 @@ void BgSpot08Iceblock_Init(Actor* thisx, PlayState* play) {
this->surfaceNormal.y = 1.0f;
this->rotationAxis.x = 1.0f;
if (LINK_IS_ADULT && !Flags_GetEventChkInf(EVENTCHKINF_RAISED_LAKE_HYLIA_WATER) &&
play->sceneNum == SCENE_LAKE_HYLIA) {
BgSpot08Iceblock_SetupNoAction(this);
return;
}
switch (this->dyna.actor.params & 0xF) {
case 0:
case 1:
@@ -6,6 +6,7 @@
#include "soh/frame_interpolation.h"
#include "soh/Enhancements/game-interactor/GameInteractor_Hooks.h"
#include "soh/OTRGlobals.h"
#include "soh_assets.h"
#include "soh/ResourceManagerHelpers.h"
#include <stdlib.h> // malloc
@@ -1357,6 +1358,21 @@ void BossDodongo_PostLimbDraw(PlayState* play, s32 limbIndex, Gfx** dList, Vec3s
Matrix_MultVec3f(&D_808CA48C, &this->unk_404);
}
Collider_UpdateSpheres(limbIndex, &this->collider);
if (CVarGetInteger(CVAR_GENERAL("LetItSnow"), 0)) {
if (limbIndex == 7) {
OPEN_DISPS(play->state.gfxCtx);
Matrix_Push();
Matrix_RotateZYX(-6643, 1771, -14834, MTXMODE_APPLY);
Matrix_Translate(2000.0f, 5000.0f, 4000.0f, MTXMODE_APPLY);
Matrix_Scale(6.114f, 6.114f, 6.114f, MTXMODE_APPLY);
gDPSetEnvColor(POLY_OPA_DISP++, 255, 0, 0, 255);
gSPMatrix(POLY_OPA_DISP++, MATRIX_NEWMTX(play->state.gfxCtx), G_MTX_NOPUSH | G_MTX_LOAD | G_MTX_MODELVIEW);
gSPDisplayList(POLY_OPA_DISP++, gPaperCrownGenericDL);
Matrix_Pop();
CLOSE_DISPS(play->state.gfxCtx);
}
}
}
void BossDodongo_Draw(Actor* thisx, PlayState* play) {
@@ -9,6 +9,7 @@
#include "assets/objects/object_ganon_anime1/object_ganon_anime1.h"
#include "assets/objects/object_ganon_anime2/object_ganon_anime2.h"
#include "assets/scenes/dungeons/ganon_boss/ganon_boss_scene.h"
#include "soh_assets.h"
#include "soh/frame_interpolation.h"
#include "soh/OTRGlobals.h"
@@ -3378,6 +3379,21 @@ void BossGanon_PostLimbDraw(PlayState* play, s32 limbIndex, Gfx** dList, Vec3s*
Matrix_MultVec3f(&sp1C, &this->unk_214);
}
if (limbIndex == 14) {
OPEN_DISPS(play->state.gfxCtx);
Matrix_Push();
Matrix_RotateZYX(7749, 0, -11956, MTXMODE_APPLY);
Matrix_Translate(675.676f, -229.730f, 148.649f, MTXMODE_APPLY);
Matrix_Scale(1.014f, 1.014f, 1.014f, MTXMODE_APPLY);
gSPMatrix(POLY_OPA_DISP++, MATRIX_NEWMTX(play->state.gfxCtx), G_MTX_NOPUSH | G_MTX_LOAD | G_MTX_MODELVIEW);
Color_RGBA8 color = { 255, 0, 0, 255 };
gDPSetEnvColor(POLY_OPA_DISP++, color.r, color.g, color.b, color.a);
gSPDisplayList(POLY_OPA_DISP++, gPaperCrownGenericDL);
Matrix_Pop();
CLOSE_DISPS(play->state.gfxCtx);
}
}
void BossGanon_InitRand(s32 seedInit0, s32 seedInit1, s32 seedInit2) {
@@ -10,6 +10,7 @@
#include "soh/OTRGlobals.h"
#include "soh/ResourceManagerHelpers.h"
#include "soh/Enhancements/game-interactor/GameInteractor_Hooks.h"
#include "soh_assets.h"
#include <string.h>
@@ -2649,6 +2650,18 @@ void BossGanon2_PostLimbDraw(PlayState* play, s32 limbIndex, Gfx** dList, Vec3s*
}
}
if (CVarGetInteger("gLetItSnow", 0)) {
if (limbIndex == 16) {
Matrix_Push();
Matrix_RotateZYX(5977, 4649, 18154, MTXMODE_APPLY);
Matrix_Translate(364.865f, 67.568f, 378.378f, MTXMODE_APPLY);
Matrix_Scale(4.595f, 4.595f, 4.595f, MTXMODE_APPLY);
gSPMatrix(POLY_OPA_DISP++, MATRIX_NEWMTX(play->state.gfxCtx), G_MTX_NOPUSH | G_MTX_LOAD | G_MTX_MODELVIEW);
gSPDisplayList(POLY_OPA_DISP++, gSantaHatGenericDL);
Matrix_Pop();
}
}
CLOSE_DISPS(play->state.gfxCtx);
}
@@ -2768,6 +2781,21 @@ void BossGanon2_PostLimbDraw2(PlayState* play, s32 limbIndex, Gfx** dList, Vec3s
} else if (limbIndex == 10) {
Matrix_MultVec3f(&D_80907164, &this->unk_1B8);
}
if (CVarGetInteger(CVAR_GENERAL("LetItSnow"), 0)) {
if (limbIndex == 11) {
OPEN_DISPS(play->state.gfxCtx);
Matrix_Push();
Matrix_RotateZYX(0, 0, -15056, MTXMODE_APPLY);
Matrix_Translate(824.324f, 472.973f, 0.0f, MTXMODE_APPLY);
Matrix_Scale(0.845f, 0.845f, 0.845f, MTXMODE_APPLY);
gDPSetEnvColor(POLY_OPA_DISP++, 255, 100, 100, 255);
gSPMatrix(POLY_OPA_DISP++, MATRIX_NEWMTX(play->state.gfxCtx), G_MTX_NOPUSH | G_MTX_LOAD | G_MTX_MODELVIEW);
gSPDisplayList(POLY_OPA_DISP++, gPaperCrownGenericDL);
Matrix_Pop();
CLOSE_DISPS(play->state.gfxCtx);
}
}
}
void func_80905674(BossGanon2* this, PlayState* play) {
@@ -12,6 +12,7 @@
#include "overlays/effects/ovl_Effect_Ss_Hahen/z_eff_ss_hahen.h"
#include "overlays/actors/ovl_Door_Warp1/z_door_warp1.h"
#include "soh/OTRGlobals.h"
#include "soh_assets.h"
#include "soh/Enhancements/game-interactor/GameInteractor_Hooks.h"
#define FLAGS \
@@ -1427,6 +1428,21 @@ void BossGanondrof_PostLimbDraw(PlayState* play, s32 limbIndex, Gfx** dList, Vec
if (((this->flyMode != GND_FLY_PAINTING) || (this->actionFunc == BossGanondrof_Intro)) && (limbIndex <= 25)) {
Matrix_MultVec3f(&zeroVec, &this->bodyPartsPos[limbIndex - 1]);
}
if (CVarGetInteger(CVAR_GENERAL("LetItSnow"), 0) && this->deathState == NOT_DEAD) {
if (limbIndex == 15) {
OPEN_DISPS(play->state.gfxCtx);
Matrix_Push();
Matrix_RotateZYX(11955, 0, -15499, MTXMODE_APPLY);
Matrix_Translate(459.460f, 256.757f, -567.568f, MTXMODE_APPLY);
Matrix_Scale(0.877f, 0.877f, 0.877f, MTXMODE_APPLY);
gDPSetEnvColor(POLY_OPA_DISP++, 255, 100, 100, 255);
gSPMatrix(POLY_OPA_DISP++, MATRIX_NEWMTX(play->state.gfxCtx), G_MTX_NOPUSH | G_MTX_LOAD | G_MTX_MODELVIEW);
gSPDisplayList(POLY_OPA_DISP++, gPaperCrownGenericDL);
Matrix_Pop();
CLOSE_DISPS(play->state.gfxCtx);
}
}
}
Gfx* BossGanondrof_GetClearPixelDList(GraphicsContext* gfxCtx) {
@@ -9,6 +9,7 @@
#include "overlays/actors/ovl_En_Bom/z_en_bom.h"
#include "soh/Enhancements/game-interactor/GameInteractor_Hooks.h"
#include "soh/ResourceManagerHelpers.h"
#include "soh_assets.h"
#define FLAGS \
(ACTOR_FLAG_ATTENTION_ENABLED | ACTOR_FLAG_HOSTILE | ACTOR_FLAG_UPDATE_CULLING_DISABLED | \
@@ -952,6 +953,21 @@ void EnAm_PostLimbDraw(PlayState* play, s32 limbIndex, Gfx** dList, Vec3s* rot,
if ((limbIndex == 1) && (this->unk_264 != 0)) {
EnAm_TransformSwordHitbox(&this->dyna.actor, play);
}
if (CVarGetInteger(CVAR_GENERAL("LetItSnow"), 0)) {
if (limbIndex == 4) {
OPEN_DISPS(play->state.gfxCtx);
Matrix_Push();
Matrix_RotateZYX(0, 0, -2657, MTXMODE_APPLY);
Matrix_Translate(4000.0f, 1148.649f, 0.0f, MTXMODE_APPLY);
Matrix_Scale(1.655f, 1.655f, 1.655f, MTXMODE_APPLY);
gDPSetEnvColor(POLY_OPA_DISP++, 255, 255, 0, 255);
gSPMatrix(POLY_OPA_DISP++, MATRIX_NEWMTX(play->state.gfxCtx), G_MTX_NOPUSH | G_MTX_LOAD | G_MTX_MODELVIEW);
gSPDisplayList(POLY_OPA_DISP++, gPaperCrownGenericDL);
Matrix_Pop();
CLOSE_DISPS(play->state.gfxCtx);
}
}
}
static Vec3f sIcePosOffsets[] = {
@@ -9,6 +9,7 @@
#include "soh/OTRGlobals.h"
#include "soh/ResourceManagerHelpers.h"
#include "soh/Enhancements/game-interactor/GameInteractor_Hooks.h"
#include "soh_assets.h"
#define FLAGS (ACTOR_FLAG_ATTENTION_ENABLED | ACTOR_FLAG_FRIENDLY)
@@ -318,6 +319,21 @@ void EnAni_PostLimbDraw(PlayState* play, s32 limbIndex, Gfx** dList, Vec3s* rot,
if (limbIndex == 15) {
Matrix_MultVec3f(&sMultVec, &this->actor.focus.pos);
}
if (CVarGetInteger(CVAR_GENERAL("LetItSnow"), 0)) {
if (limbIndex == 15) {
OPEN_DISPS(play->state.gfxCtx);
Matrix_Push();
Matrix_RotateZYX(1992, 0, 2656, MTXMODE_APPLY);
Matrix_Translate(972.973f, 40.541f, 0.0f, MTXMODE_APPLY);
Matrix_Scale(0.965f, 0.965f, 0.965f, MTXMODE_APPLY);
gDPSetEnvColor(POLY_OPA_DISP++, 255, 0, 255, 255);
gSPMatrix(POLY_OPA_DISP++, MATRIX_NEWMTX(play->state.gfxCtx), G_MTX_NOPUSH | G_MTX_LOAD | G_MTX_MODELVIEW);
gSPDisplayList(POLY_OPA_DISP++, gPaperCrownGenericDL);
Matrix_Pop();
CLOSE_DISPS(play->state.gfxCtx);
}
}
}
void EnAni_Draw(Actor* thisx, PlayState* play) {
@@ -9,6 +9,7 @@
#include "objects/object_Bb/object_Bb.h"
#include "soh/Enhancements/game-interactor/GameInteractor_Hooks.h"
#include "soh/ResourceManagerHelpers.h"
#include "soh_assets.h"
#define FLAGS \
(ACTOR_FLAG_ATTENTION_ENABLED | ACTOR_FLAG_HOSTILE | ACTOR_FLAG_UPDATE_CULLING_DISABLED | \
@@ -1272,6 +1273,20 @@ void EnBb_PostLimbDraw(PlayState* play, s32 limbIndex, Gfx** dList, Vec3s* rot,
EnBb* this = (EnBb*)thisx;
BodyBreak_SetInfo(&this->bodyBreak, limbIndex, 4, 15, 15, dList, BODYBREAK_OBJECT_DEFAULT);
if (CVarGetInteger(CVAR_GENERAL("LetItSnow"), 0)) {
if (limbIndex == 15) {
OPEN_DISPS(play->state.gfxCtx);
Matrix_Push();
Matrix_RotateZYX(-13063, 0, -27454, MTXMODE_APPLY);
Matrix_Translate(418.919f, -81.081f, 0.0f, MTXMODE_APPLY);
Matrix_Scale(1.757f, 1.757f, 1.757f, MTXMODE_APPLY);
gSPMatrix(POLY_OPA_DISP++, MATRIX_NEWMTX(play->state.gfxCtx), G_MTX_NOPUSH | G_MTX_LOAD | G_MTX_MODELVIEW);
gSPDisplayList(POLY_OPA_DISP++, gSantaHatGenericDL);
Matrix_Pop();
CLOSE_DISPS(play->state.gfxCtx);
}
}
}
static Vec3f sFireIceOffsets[] = {
@@ -1,6 +1,7 @@
#include "z_en_bom_chu.h"
#include "overlays/actors/ovl_En_Bom/z_en_bom.h"
#include "objects/gameplay_keep/gameplay_keep.h"
#include "soh_assets.h"
#define FLAGS ACTOR_FLAG_UPDATE_CULLING_DISABLED
@@ -527,5 +528,15 @@ void EnBomChu_Draw(Actor* thisx, PlayState* play) {
gSPMatrix(POLY_OPA_DISP++, MATRIX_NEWMTX(play->state.gfxCtx), G_MTX_NOPUSH | G_MTX_LOAD | G_MTX_MODELVIEW);
gSPDisplayList(POLY_OPA_DISP++, gBombchuDL);
if (CVarGetInteger(CVAR_GENERAL("LetItSnow"), 0)) {
Matrix_Push();
Matrix_RotateZYX(0, -3100, 17047, MTXMODE_APPLY);
Matrix_Translate(445.946f, -27.027f, 608.108f, MTXMODE_APPLY);
Matrix_Scale(0.541f, 0.541f, 0.541f, MTXMODE_APPLY);
gSPMatrix(POLY_OPA_DISP++, MATRIX_NEWMTX(play->state.gfxCtx), G_MTX_NOPUSH | G_MTX_LOAD | G_MTX_MODELVIEW);
gSPDisplayList(POLY_OPA_DISP++, gSantaHatGenericDL);
Matrix_Pop();
}
CLOSE_DISPS(play->state.gfxCtx);
}
@@ -0,0 +1,61 @@
/*
* File: z_en_christmasdeco.c
* Overlay: ovl_En_ChristmasDeco
* Description: Custom Christmas Decorations
*/
#include "z_en_christmasdeco.h"
#include "soh_assets.h"
void EnChristmasDeco_Init(Actor* thisx, PlayState* play);
void EnChristmasDeco_Destroy(Actor* thisx, PlayState* play);
void EnChristmasDeco_Update(Actor* thisx, PlayState* play);
void EnChristmasDeco_Draw(Actor* thisx, PlayState* play);
void EnChristmasDeco_Init(Actor* thisx, PlayState* play) {
if (play->sceneNum == SCENE_TEMPLE_OF_TIME) {
EnChristmasDeco* this = (EnChristmasDeco*)thisx;
this->actor.room = -1;
}
}
void EnChristmasDeco_Destroy(Actor* thisx, PlayState* play) {
}
void EnChristmasDeco_Update(Actor* thisx, PlayState* play) {
}
void EnChristmasDeco_Draw(Actor* thisx, PlayState* play) {
float decoSize = 10.0f;
OPEN_DISPS(play->state.gfxCtx);
Gfx_SetupDL_25Opa(play->state.gfxCtx);
Matrix_Scale(decoSize, decoSize, decoSize, MTXMODE_APPLY);
gSPMatrix(POLY_OPA_DISP++, Matrix_NewMtx(play->state.gfxCtx, (char*)__FILE__, __LINE__), G_MTX_MODELVIEW | G_MTX_LOAD);
// Assertion Halt in Debug mode, switch to Release when testing.
if (play->sceneNum == SCENE_KAKARIKO_VILLAGE) {
gSPDisplayList(POLY_OPA_DISP++, (Gfx*)gKakarikoDecorDL);
if (LINK_IS_CHILD) {
gSPDisplayList(POLY_OPA_DISP++, (Gfx*)gKakarikoChildDecorDL);
} else {
gSPDisplayList(POLY_OPA_DISP++, (Gfx*)gKakarikoAdultDecorDL);
}
}
if (play->sceneNum == SCENE_TEMPLE_OF_TIME) {
gSPDisplayList(POLY_OPA_DISP++, (Gfx*)gTempleOfTimeDecorDL);
if (LINK_IS_CHILD) {
gSPDisplayList(POLY_OPA_DISP++, (Gfx*)gTempleOfTimeDecorDL);
} else {
gSPDisplayList(POLY_OPA_DISP++, (Gfx*)gTempleOfTimeDecorDL);
}
}
CLOSE_DISPS(play->state.gfxCtx);
}
@@ -0,0 +1,27 @@
#ifndef Z_EN_CHRISTMASDECO_H
#define Z_EN_CHRISTMASDECO_H
#include <libultraship/libultra.h>
#include "global.h"
struct EnChristmasDeco;
typedef void (*EnChristmasDecoActionFunc)(struct EnChristmasDeco*, PlayState*);
typedef struct EnChristmasDeco {
Actor actor;
EnChristmasDecoActionFunc actionFunc;
} EnChristmasDeco;
#ifdef __cplusplus
extern "C" {
#endif
void EnChristmasDeco_Init(Actor* thisx, PlayState* play);
void EnChristmasDeco_Destroy(Actor* thisx, PlayState* play);
void EnChristmasDeco_Update(Actor* thisx, PlayState* play);
void EnChristmasDeco_Draw(Actor* thisx, PlayState* play);
#ifdef __cplusplus
}
#endif
#endif
@@ -0,0 +1,213 @@
/*
* File: z_en_christmastree.c
* Overlay: ovl_En_ChristmasTree
* Description: Custom Christmas Tree for Ornament Hunt
*/
#include "z_en_christmastree.h"
#include "soh_assets.h"
#include "soh/Enhancements/game-interactor/GameInteractor.h"
#include "soh/OTRGlobals.h"
void EnChristmasTree_Init(Actor* thisx, PlayState* play);
void EnChristmasTree_Destroy(Actor* thisx, PlayState* play);
void EnChristmasTree_Update(Actor* thisx, PlayState* play);
void EnChristmasTree_Draw(Actor* thisx, PlayState* play);
void EnChristmasTree_Wait(EnChristmasTree* this, PlayState* play);
void EnChristmasTree_Talk(EnChristmasTree* this, PlayState* play);
void EnChristmasTree_SetupEndTitle(EnChristmasTree* this, PlayState* play);
void EnChristmasTree_HandleEndTitle(EnChristmasTree* this, PlayState* play);
static ColliderCylinderInit sCylinderInit = {
{
COLTYPE_NONE,
AT_NONE,
AC_NONE,
OC1_ON | OC1_TYPE_ALL,
OC2_TYPE_2,
COLSHAPE_CYLINDER,
},
{
ELEMTYPE_UNK0,
{ 0x00000000, 0x00, 0x00 },
{ 0x00000000, 0x00, 0x00 },
TOUCH_NONE,
BUMP_NONE,
OCELEM_ON,
},
{ 100, 330, 0, { 0, 0, 0 } },
};
static CollisionCheckInfoInit2 sColChkInfoInit = { 0, 0, 0, 0, MASS_IMMOVABLE };
void EnChristmasTree_Init(Actor* thisx, PlayState* play) {
EnChristmasTree* this = (EnChristmasTree*)thisx;
ActorShape_Init(&this->actor.shape, 0.0f, ActorShadow_DrawCircle, 160.0f);
Collider_InitCylinder(play, &this->collider);
Collider_SetCylinder(play, &this->collider, &this->actor, &sCylinderInit);
CollisionCheck_SetInfo2(&this->actor.colChkInfo, NULL, &sColChkInfoInit);
Actor_UpdateBgCheckInfo(play, &this->actor, 0.0f, 0.0f, 0.0f, 4);
this->actor.targetMode = 1;
this->actor.textId = 0x406B; // Hijacking bean seller text ID so I'm sure it doesn't clash
this->actor.shape.rot.y = -14784;
this->actionFunc = EnChristmasTree_Wait;
}
void EnChristmasTree_Destroy(Actor* thisx, PlayState* play) {
EnChristmasTree* this = (EnChristmasTree*)thisx;
Collider_DestroyCylinder(play, &this->collider);
}
void EnChristmasTree_Wait(EnChristmasTree* this, PlayState* play) {
if (Actor_ProcessTalkRequest(&this->actor, play)) { // if talk is initiated
this->actionFunc = EnChristmasTree_Talk;
} else if ((this->actor.xzDistToPlayer < 170.0f) && Randomizer_GetSettingValue(RSK_TRIFORCE_HUNT)) { // talk range
func_8002F2CC(&this->actor, play, 170.0f);
}
}
void EnChristmasTree_Talk(EnChristmasTree* this, PlayState* play) {
u8 dialogState = Message_GetState(&play->msgCtx);
if (dialogState != TEXT_STATE_CHOICE) {
if ((dialogState == TEXT_STATE_DONE) && Message_ShouldAdvance(play)) { // advanced final textbox
// Teleport to credits when goal is reached.
if (gSaveContext.triforcePiecesCollected >= Randomizer_GetSettingValue(RSK_TRIFORCE_HUNT_PIECES_REQUIRED)) {
gSaveContext.sohStats.itemTimestamp[TIMESTAMP_TRIFORCE_COMPLETED] = GAMEPLAYSTAT_TOTAL_TIME;
gSaveContext.sohStats.gameComplete = 1;
Play_PerformSave(play);
GameInteractor_SetTriforceHuntCreditsWarpActive(true);
this->actionFunc = EnChristmasTree_SetupEndTitle;
} else {
this->actionFunc = EnChristmasTree_Wait;
}
}
}
}
void EnChristmasTree_SetupEndTitle(EnChristmasTree* this, PlayState* play) {
Player* player = GET_PLAYER(play);
Actor_Spawn(&play->actorCtx, play, ACTOR_END_TITLE, 0, 0, 0, 0, 0, 0, 2, false);
player->stateFlags1 = PLAYER_STATE1_INPUT_DISABLED;
Flags_SetRandomizerInf(RAND_INF_GRANT_GANONS_BOSSKEY);
Play_PerformSave(play);
this->actionFunc = EnChristmasTree_HandleEndTitle;
}
void EnChristmasTree_HandleEndTitle(EnChristmasTree* this, PlayState* play) {
Camera* camera = Play_GetCamera(play, play->mainCamera.thisIdx);
Player* player = GET_PLAYER(play);
Vec3f camAt;
Vec3f camEye;
// Not forcing camera mode makes the camera jitter for a bit after setting position.
// Also forces letterbox bars.
Camera_ChangeMode(camera, CAM_MODE_STILL);
// Christmas Tree's position
camAt.x = -734.0f;
camAt.y = 130.0f;
camAt.z = 420.0f;
// Camera's position
camEye.x = -1237.0f;
camEye.y = 218.0f;
camEye.z = 408.0f;
// Not setting fov manually makes camera zoom in after setting the above for a little bit.
camera->fov = 60.0f;
// Set camera
Play_CameraSetAtEye(play, play->mainCamera.thisIdx, &camAt, &camEye);
// Hide player so he's not visible in the final screen. Also move him so target arrow on tree dissapears.
player->actor.scale.x = player->actor.scale.y = player->actor.scale.z = 0.00001f;
player->actor.world.pos.z = 500.0f;
// Hide HUD
Interface_ChangeAlpha(1);
}
void EnChristmasTree_Update(Actor* thisx, PlayState* play) {
EnChristmasTree* this = (EnChristmasTree*)thisx;
ColliderCylinder* collider = &this->collider;
Collider_UpdateCylinder(thisx, collider);
CollisionCheck_SetOC(play, &play->colChkCtx, (Collider*)collider);
Actor_SetFocus(&this->actor, 80.0f);
uint8_t triforceHuntActive = Randomizer_GetSettingValue(RSK_TRIFORCE_HUNT);
float percentageCompleted = (float)gSaveContext.triforcePiecesCollected /
(float)Randomizer_GetSettingValue(RSK_TRIFORCE_HUNT_PIECES_REQUIRED);
if ((percentageCompleted >= 1.0f || !triforceHuntActive) && !this->spawnedRupee) {
Actor_Spawn(&play->actorCtx, play, ACTOR_EN_WONDER_ITEM, this->actor.world.pos.x, this->actor.world.pos.y + 280,
this->actor.world.pos.z, 0, 0, LINK_IS_ADULT ? 1 : 4, 0x1ABF, false);
this->spawnedRupee = 1;
}
this->actionFunc(this, play);
}
void EnChristmasTree_Draw(Actor* thisx, PlayState* play) {
EnChristmasTree* this = (EnChristmasTree*)thisx;
float treeSize = 55.0f;
uint8_t triforceHuntActive = Randomizer_GetSettingValue(RSK_TRIFORCE_HUNT);
float percentageCompleted = (float)gSaveContext.triforcePiecesCollected /
(float)Randomizer_GetSettingValue(RSK_TRIFORCE_HUNT_PIECES_REQUIRED);
OPEN_DISPS(play->state.gfxCtx);
Gfx_SetupDL_25Opa(play->state.gfxCtx);
Matrix_Scale(treeSize, treeSize, treeSize, MTXMODE_APPLY);
gSPMatrix(POLY_OPA_DISP++, Matrix_NewMtx(play->state.gfxCtx, (char*)__FILE__, __LINE__), G_MTX_MODELVIEW | G_MTX_LOAD);
gSPDisplayList(POLY_OPA_DISP++, (Gfx*)gXmasTreeDL);
if (percentageCompleted >= 0.1f || !triforceHuntActive) {
gSPDisplayList(POLY_OPA_DISP++, (Gfx*)gXmasDecor10DL);
}
if (percentageCompleted >= 0.2f || !triforceHuntActive) {
gSPDisplayList(POLY_OPA_DISP++, (Gfx*)gXmasDecor20DL);
}
if (percentageCompleted >= 0.3f || !triforceHuntActive) {
gSPDisplayList(POLY_OPA_DISP++, (Gfx*)gXmasDecor30DL);
}
if (percentageCompleted >= 0.4f || !triforceHuntActive) {
gSPDisplayList(POLY_OPA_DISP++, (Gfx*)gXmasDecor40DL);
}
if (percentageCompleted >= 0.5f || !triforceHuntActive) {
gSPDisplayList(POLY_OPA_DISP++, (Gfx*)gXmasDecor50DL);
}
if (percentageCompleted >= 0.6f || !triforceHuntActive) {
gSPDisplayList(POLY_OPA_DISP++, (Gfx*)gXmasDecor60DL);
}
if (percentageCompleted >= 0.7f || !triforceHuntActive) {
gSPDisplayList(POLY_OPA_DISP++, (Gfx*)gXmasDecor70DL);
}
if (percentageCompleted >= 0.8f || !triforceHuntActive) {
gSPDisplayList(POLY_OPA_DISP++, (Gfx*)gXmasDecor80DL);
}
if (percentageCompleted >= 0.9f || !triforceHuntActive) {
gSPDisplayList(POLY_OPA_DISP++, (Gfx*)gXmasDecor90DL);
}
if (percentageCompleted >= 1.0f || !triforceHuntActive) {
gSPDisplayList(POLY_OPA_DISP++, (Gfx*)gXmasDecor100DL);
gSPDisplayList(POLY_OPA_DISP++, (Gfx*)gXmasStarDL);
}
CLOSE_DISPS(play->state.gfxCtx);
}
@@ -0,0 +1,29 @@
#ifndef Z_EN_CHRISTMASTREE_H
#define Z_EN_CHRISTMASTREE_H
#include <libultraship/libultra.h>
#include "global.h"
struct EnChristmasTree;
typedef void (*EnChristmasTreeActionFunc)(struct EnChristmasTree*, PlayState*);
typedef struct EnChristmasTree {
Actor actor;
ColliderCylinder collider;
EnChristmasTreeActionFunc actionFunc;
u8 spawnedRupee;
} EnChristmasTree;
#ifdef __cplusplus
extern "C" {
#endif
void EnChristmasTree_Init(Actor* thisx, PlayState* play);
void EnChristmasTree_Destroy(Actor* thisx, PlayState* play);
void EnChristmasTree_Update(Actor* thisx, PlayState* play);
void EnChristmasTree_Draw(Actor* thisx, PlayState* play);
#ifdef __cplusplus
}
#endif
#endif
@@ -2,6 +2,7 @@
#include "objects/object_cs/object_cs.h"
#include "objects/object_link_child/object_link_child.h"
#include "soh/ResourceManagerHelpers.h"
#include "soh_assets.h"
#define FLAGS (ACTOR_FLAG_ATTENTION_ENABLED | ACTOR_FLAG_FRIENDLY)
@@ -522,4 +523,19 @@ void EnCs_PostLimbDraw(PlayState* play, s32 limbIndex, Gfx** dList, Vec3s* rot,
Matrix_RotateZ(5.0 * M_PI / 9.0, MTXMODE_APPLY);
Matrix_Get(&this->spookyMaskMtx);
}
if (CVarGetInteger(CVAR_GENERAL("LetItSnow"), 0)) {
if (limbIndex == 15) {
OPEN_DISPS(play->state.gfxCtx);
Matrix_Push();
Matrix_RotateZYX(8191, -5757, -24133, MTXMODE_APPLY);
Matrix_Translate(270.27f, 297.297f, -513.514f, MTXMODE_APPLY);
Matrix_Scale(1.135f, 1.135f, 1.135f, MTXMODE_APPLY);
gDPSetEnvColor(POLY_OPA_DISP++, 255, 0, 0, 255);
gSPMatrix(POLY_OPA_DISP++, MATRIX_NEWMTX(play->state.gfxCtx), G_MTX_NOPUSH | G_MTX_LOAD | G_MTX_MODELVIEW);
gSPDisplayList(POLY_OPA_DISP++, gPaperCrownGenericDL);
Matrix_Pop();
CLOSE_DISPS(play->state.gfxCtx);
}
}
}
@@ -7,6 +7,7 @@
#include "z_en_daiku_kakariko.h"
#include "objects/object_daiku/object_daiku.h"
#include "soh/ResourceManagerHelpers.h"
#include "soh_assets.h"
#define FLAGS (ACTOR_FLAG_ATTENTION_ENABLED | ACTOR_FLAG_FRIENDLY | ACTOR_FLAG_UPDATE_CULLING_DISABLED)
@@ -538,6 +539,55 @@ void EnDaikuKakariko_PostLimbDraw(PlayState* play, s32 limbIndex, Gfx** dList, V
gSPDisplayList(POLY_OPA_DISP++, carpenterHeadDLists[this->actor.params & 3]);
}
if (CVarGetInteger(CVAR_GENERAL("LetItSnow"), 0)) {
if (limbIndex == 15) {
Matrix_Push();
switch (this->actor.params) {
case 259: {
Matrix_RotateZYX(4649, 0, -3543, MTXMODE_APPLY);
Matrix_Translate(824.324f, 324.324f, -175.676f, MTXMODE_APPLY);
Matrix_Scale(0.966f, 0.966f, 0.966f, MTXMODE_APPLY);
gDPSetEnvColor(POLY_OPA_DISP++, 255, 0, 255, 255);
gSPMatrix(POLY_OPA_DISP++, MATRIX_NEWMTX(play->state.gfxCtx),
G_MTX_NOPUSH | G_MTX_LOAD | G_MTX_MODELVIEW);
gSPDisplayList(POLY_OPA_DISP++, gPaperCrownGenericDL);
break;
}
case 513: {
Matrix_RotateZYX(0, 0, -6200, MTXMODE_APPLY);
Matrix_Translate(770.27f, 567.568f, 0.0f, MTXMODE_APPLY);
Matrix_Scale(0.899f, 0.899f, 0.899f, MTXMODE_APPLY);
gDPSetEnvColor(POLY_OPA_DISP++, 0, 255, 255, 255);
gSPMatrix(POLY_OPA_DISP++, MATRIX_NEWMTX(play->state.gfxCtx),
G_MTX_NOPUSH | G_MTX_LOAD | G_MTX_MODELVIEW);
gSPDisplayList(POLY_OPA_DISP++, gPaperCrownGenericDL);
break;
}
case 2: {
Matrix_RotateZYX(0, 0, 7970, MTXMODE_APPLY);
Matrix_Translate(1270.27f, -878.378f, 0.0f, MTXMODE_APPLY);
Matrix_Scale(1.0f, 1.0f, 1.0f, MTXMODE_APPLY);
gDPSetEnvColor(POLY_OPA_DISP++, 0, 255, 0, 255);
gSPMatrix(POLY_OPA_DISP++, MATRIX_NEWMTX(play->state.gfxCtx),
G_MTX_NOPUSH | G_MTX_LOAD | G_MTX_MODELVIEW);
gSPDisplayList(POLY_OPA_DISP++, gPaperCrownGenericDL);
break;
}
case -256:
default: {
Matrix_RotateZYX(0, 0, -8635, MTXMODE_APPLY);
Matrix_Translate(675.676f, 716.216f, 0.0f, MTXMODE_APPLY);
Matrix_Scale(0.899f, 0.899f, 0.899f, MTXMODE_APPLY);
gDPSetEnvColor(POLY_OPA_DISP++, 255, 0, 0, 255);
gSPMatrix(POLY_OPA_DISP++, MATRIX_NEWMTX(play->state.gfxCtx),
G_MTX_NOPUSH | G_MTX_LOAD | G_MTX_MODELVIEW);
gSPDisplayList(POLY_OPA_DISP++, gPaperCrownGenericDL);
}
}
Matrix_Pop();
}
}
CLOSE_DISPS(play->state.gfxCtx);
}
@@ -4,6 +4,7 @@
#include "overlays/effects/ovl_Effect_Ss_Hahen/z_eff_ss_hahen.h"
#include "soh/Enhancements/game-interactor/GameInteractor_Hooks.h"
#include "soh/ResourceManagerHelpers.h"
#include "soh_assets.h"
#define FLAGS (ACTOR_FLAG_ATTENTION_ENABLED | ACTOR_FLAG_HOSTILE)
@@ -1276,6 +1277,20 @@ void EnDekubaba_PostLimbDraw(PlayState* play, s32 limbIndex, Gfx** dList, Vec3s*
if (limbIndex == 1) {
Collider_UpdateSpheres(limbIndex, &this->collider);
}
if (CVarGetInteger(CVAR_GENERAL("LetItSnow"), 0)) {
if (limbIndex == 4) {
OPEN_DISPS(play->state.gfxCtx);
Matrix_Push();
Matrix_RotateZYX(16485, -1425, -20964, MTXMODE_APPLY);
Matrix_Translate(-149.0f, 92.0f, -587.0f, MTXMODE_APPLY);
Matrix_Scale(1.534f, 1.534f, 1.534f, MTXMODE_APPLY);
gSPMatrix(POLY_OPA_DISP++, MATRIX_NEWMTX(play->state.gfxCtx), G_MTX_NOPUSH | G_MTX_LOAD | G_MTX_MODELVIEW);
gSPDisplayList(POLY_OPA_DISP++, gSantaHatGenericDL);
Matrix_Pop();
CLOSE_DISPS(play->state.gfxCtx);
}
}
}
void EnDekubaba_Draw(Actor* thisx, PlayState* play) {
+20 -1
View File
@@ -10,6 +10,7 @@
#include "soh/Enhancements/game-interactor/GameInteractor_Hooks.h"
#include "soh/OTRGlobals.h"
#include "soh/ResourceManagerHelpers.h"
#include "soh_assets.h"
#define FLAGS (ACTOR_FLAG_ATTENTION_ENABLED | ACTOR_FLAG_FRIENDLY)
@@ -490,9 +491,27 @@ void EnDns_Update(Actor* thisx, PlayState* play) {
}
}
void EnDns_PostLimbDraw(PlayState* play, s32 limbIndex, Gfx** dList, Vec3s* rot, void* thisx) {
EnDns* this = (EnDns*)thisx;
if (CVarGetInteger(CVAR_GENERAL("LetItSnow"), 0)) {
if (limbIndex == 17) {
OPEN_DISPS(play->state.gfxCtx);
Matrix_Push();
Matrix_RotateZYX(0, 0, 17490, MTXMODE_APPLY);
Matrix_Translate(4200.0f, -472.973f, 0.0f, MTXMODE_APPLY);
Matrix_Scale(4.932f, 4.932f, 4.932f, MTXMODE_APPLY);
gSPMatrix(POLY_OPA_DISP++, MATRIX_NEWMTX(play->state.gfxCtx), G_MTX_NOPUSH | G_MTX_LOAD | G_MTX_MODELVIEW);
gSPDisplayList(POLY_OPA_DISP++, gSantaHatGenericDL);
Matrix_Pop();
CLOSE_DISPS(play->state.gfxCtx);
}
}
}
void EnDns_Draw(Actor* thisx, PlayState* play) {
EnDns* this = (EnDns*)thisx;
Gfx_SetupDL_25Opa(play->state.gfxCtx);
SkelAnime_DrawSkeletonOpa(play, &this->skelAnime, NULL, NULL, &this->actor);
SkelAnime_DrawSkeletonOpa(play, &this->skelAnime, NULL, EnDns_PostLimbDraw, &this->actor);
}
@@ -4,6 +4,7 @@
#include "objects/object_dodongo/object_dodongo.h"
#include "soh/Enhancements/game-interactor/GameInteractor_Hooks.h"
#include "soh/ResourceManagerHelpers.h"
#include "soh_assets.h"
#define FLAGS (ACTOR_FLAG_ATTENTION_ENABLED | ACTOR_FLAG_HOSTILE | ACTOR_FLAG_UPDATE_CULLING_DISABLED)
@@ -914,6 +915,21 @@ void EnDodongo_PostLimbDraw(PlayState* play, s32 limbIndex, Gfx** dList, Vec3s*
Matrix_MultVec3f(&baseOffset, &this->icePos[i]);
}
}
if (CVarGetInteger(CVAR_GENERAL("LetItSnow"), 0)) {
if (limbIndex == 7) {
OPEN_DISPS(play->state.gfxCtx);
Matrix_Push();
Matrix_RotateZYX(0, 0, -13063, MTXMODE_APPLY);
Matrix_Translate(864.865f, 756.757f, 0.0f, MTXMODE_APPLY);
Matrix_Scale(0.662f, 0.662f, 0.662f, MTXMODE_APPLY);
gDPSetEnvColor(POLY_OPA_DISP++, 255, 0, 0, 255);
gSPMatrix(POLY_OPA_DISP++, MATRIX_NEWMTX(play->state.gfxCtx), G_MTX_NOPUSH | G_MTX_LOAD | G_MTX_MODELVIEW);
gSPDisplayList(POLY_OPA_DISP++, gPaperCrownGenericDL);
Matrix_Pop();
CLOSE_DISPS(play->state.gfxCtx);
}
}
}
void EnDodongo_Draw(Actor* thisx, PlayState* play2) {
@@ -7,6 +7,7 @@
#include "z_en_dog.h"
#include "objects/object_dog/object_dog.h"
#include "soh/ResourceManagerHelpers.h"
#include "soh_assets.h"
#define FLAGS 0
@@ -496,6 +497,19 @@ s32 EnDog_OverrideLimbDraw(PlayState* play, s32 limbIndex, Gfx** dList, Vec3f* p
}
void EnDog_PostLimbDraw(PlayState* play, s32 limbIndex, Gfx** dList, Vec3s* rot, void* thisx) {
if (CVarGetInteger(CVAR_GENERAL("LetItSnow"), 0)) {
if (limbIndex == 4) {
OPEN_DISPS(play->state.gfxCtx);
Matrix_Push();
Matrix_RotateZYX(20811, -32768, 3985, MTXMODE_APPLY);
Matrix_Translate(0.0f, 0.0f, 0.0f, MTXMODE_APPLY);
Matrix_Scale(1.25f, 1.25f, 1.25f, MTXMODE_APPLY);
gSPMatrix(POLY_OPA_DISP++, MATRIX_NEWMTX(play->state.gfxCtx), G_MTX_NOPUSH | G_MTX_LOAD | G_MTX_MODELVIEW);
gSPDisplayList(POLY_OPA_DISP++, gSantaHatGenericDL);
Matrix_Pop();
CLOSE_DISPS(play->state.gfxCtx);
}
}
}
void EnDog_Draw(Actor* thisx, PlayState* play) {
@@ -9,6 +9,7 @@
#include "soh/OTRGlobals.h"
#include "soh/ResourceManagerHelpers.h"
#include "soh/Enhancements/game-interactor/GameInteractor_Hooks.h"
#include "soh_assets.h"
#define FLAGS (ACTOR_FLAG_ATTENTION_ENABLED | ACTOR_FLAG_FRIENDLY)
@@ -289,6 +290,21 @@ void EnDs_PostLimbDraw(PlayState* play, s32 limbIndex, Gfx** dList, Vec3s* rot,
if (limbIndex == 5) {
Matrix_MultVec3f(&sMultVec, &this->actor.focus.pos);
}
if (CVarGetInteger(CVAR_GENERAL("LetItSnow"), 0)) {
if (limbIndex == 5) {
OPEN_DISPS(play->state.gfxCtx);
Matrix_Push();
Matrix_RotateZYX(-1329, -3100, 0, MTXMODE_APPLY);
Matrix_Translate(1270.27f, 351.351f, -310.811f, MTXMODE_APPLY);
Matrix_Scale(0.797f, 0.797f, 0.797f, MTXMODE_APPLY);
gDPSetEnvColor(POLY_OPA_DISP++, 255, 0, 255, 255);
gSPMatrix(POLY_OPA_DISP++, MATRIX_NEWMTX(play->state.gfxCtx), G_MTX_NOPUSH | G_MTX_LOAD | G_MTX_MODELVIEW);
gSPDisplayList(POLY_OPA_DISP++, gPaperCrownGenericDL);
Matrix_Pop();
CLOSE_DISPS(play->state.gfxCtx);
}
}
}
void EnDs_Draw(Actor* thisx, PlayState* play) {
@@ -3,6 +3,7 @@
#include "scenes/overworld/spot18/spot18_scene.h"
#include "soh/OTRGlobals.h"
#include "soh/Enhancements/game-interactor/GameInteractor_Hooks.h"
#include "soh_assets.h"
#define FLAGS (ACTOR_FLAG_ATTENTION_ENABLED | ACTOR_FLAG_FRIENDLY | ACTOR_FLAG_UPDATE_DURING_OCARINA)
@@ -655,6 +656,20 @@ void EnDu_PostLimbDraw(PlayState* play, s32 limbIndex, Gfx** dList, Vec3s* rot,
if (limbIndex == 16) {
Matrix_MultVec3f(&D_809FF40C, &this->actor.focus.pos);
}
if (CVarGetInteger(CVAR_GENERAL("LetItSnow"), 0)) {
if (limbIndex == 17) {
OPEN_DISPS(play->state.gfxCtx);
Matrix_Push();
Matrix_RotateZYX(13062, -1329, -15499, MTXMODE_APPLY);
Matrix_Translate(945.946f, -297.297f, 608.108f, MTXMODE_APPLY);
Matrix_Scale(1.217f, 1.217f, 1.217f, MTXMODE_APPLY);
gSPMatrix(POLY_OPA_DISP++, MATRIX_NEWMTX(play->state.gfxCtx), G_MTX_NOPUSH | G_MTX_LOAD | G_MTX_MODELVIEW);
gSPDisplayList(POLY_OPA_DISP++, gSantaHatGenericDL);
Matrix_Pop();
CLOSE_DISPS(play->state.gfxCtx);
}
}
}
void EnDu_Draw(Actor* thisx, PlayState* play) {
@@ -9,6 +9,7 @@
#include <assert.h>
#include "soh/Enhancements/game-interactor/GameInteractor_Hooks.h"
#include "soh/ResourceManagerHelpers.h"
#include "soh_assets.h"
#define FLAGS (ACTOR_FLAG_UPDATE_CULLING_DISABLED | ACTOR_FLAG_DRAW_CULLING_DISABLED | ACTOR_FLAG_UPDATE_DURING_OCARINA)
@@ -1497,6 +1498,26 @@ s32 EnElf_OverrideLimbDraw(PlayState* play, s32 limbIndex, Gfx** dList, Vec3f* p
return false;
}
s32 EnElf_PostLimbDraw(PlayState* play, s32 limbIndex, Gfx** dList, Vec3s* rot, void* thisx) {
EnElf* this = (EnElf*)thisx;
if (CVarGetInteger(CVAR_GENERAL("LetItSnow"), 0)) {
if (limbIndex == 2) {
OPEN_DISPS(play->state.gfxCtx);
Matrix_Push();
Matrix_RotateZYX(0, 0, 17047, MTXMODE_APPLY);
Matrix_Translate(202.0f, 0.0f, 0.0f, MTXMODE_APPLY);
Matrix_Scale(0.595f, 0.595f, 0.595f, MTXMODE_APPLY);
gSPMatrix(POLY_OPA_DISP++, MATRIX_NEWMTX(play->state.gfxCtx), G_MTX_NOPUSH | G_MTX_LOAD | G_MTX_MODELVIEW);
gSPDisplayList(POLY_OPA_DISP++, gSantaHatGenericDL);
Matrix_Pop();
CLOSE_DISPS(play->state.gfxCtx);
}
}
return false;
}
void EnElf_Draw(Actor* thisx, PlayState* play) {
s32 pad;
f32 alphaScale;
@@ -9,6 +9,7 @@
#include "scenes/indoors/hakasitarelay/hakasitarelay_scene.h"
#include "soh/OTRGlobals.h"
#include "soh/ResourceManagerHelpers.h"
#include "soh_assets.h"
#define FLAGS \
(ACTOR_FLAG_ATTENTION_ENABLED | ACTOR_FLAG_FRIENDLY | ACTOR_FLAG_UPDATE_CULLING_DISABLED | \
@@ -294,6 +295,20 @@ void EnFu_PostLimbDraw(PlayState* play, s32 limbIndex, Gfx** dList, Vec3s* rot,
if (limbIndex == FU_LIMB_HEAD) {
Matrix_MultVec3f(&sMtxSrc, &this->actor.focus.pos);
}
if (CVarGetInteger(CVAR_GENERAL("LetItSnow"), 0)) {
if (limbIndex == 14) {
OPEN_DISPS(play->state.gfxCtx);
Matrix_Push();
Matrix_RotateZYX(-27454, 0, 1992, MTXMODE_APPLY);
Matrix_Translate(878.378f, -108.108f, 67.568f, MTXMODE_APPLY);
Matrix_Scale(1.135f, 1.135f, 1.135f, MTXMODE_APPLY);
gSPMatrix(POLY_OPA_DISP++, MATRIX_NEWMTX(play->state.gfxCtx), G_MTX_NOPUSH | G_MTX_LOAD | G_MTX_MODELVIEW);
gSPDisplayList(POLY_OPA_DISP++, gSantaHatGenericDL);
Matrix_Pop();
CLOSE_DISPS(play->state.gfxCtx);
}
}
}
void EnFu_Draw(Actor* thisx, PlayState* play) {
@@ -3,6 +3,7 @@
#include "vt.h"
#include "soh/OTRGlobals.h"
#include "soh/ResourceManagerHelpers.h"
#include "soh_assets.h"
#define FLAGS (ACTOR_FLAG_ATTENTION_ENABLED | ACTOR_FLAG_FRIENDLY)
@@ -417,9 +418,29 @@ s32 EnHeishi_OverrideLimbDraw(PlayState* play, s32 limbIndex, Gfx** dList, Vec3f
return false;
}
s32 EnHeishi4_PostLimbDraw(PlayState* play, s32 limbIndex, Gfx** dList, Vec3s* rot, void* thisx) {
EnHeishi4* this = (EnHeishi4*)thisx;
if (CVarGetInteger(CVAR_GENERAL("LetItSnow"), 0)) {
if (limbIndex == 16) {
OPEN_DISPS(play->state.gfxCtx);
Matrix_Push();
Matrix_RotateZYX(0, 0, 442, MTXMODE_APPLY);
Matrix_Translate(256.757f, 121.621f, 0.0f, MTXMODE_APPLY);
Matrix_Scale(1.337f, 1.337f, 1.337f, MTXMODE_APPLY);
gSPMatrix(POLY_OPA_DISP++, MATRIX_NEWMTX(play->state.gfxCtx), G_MTX_NOPUSH | G_MTX_LOAD | G_MTX_MODELVIEW);
gSPDisplayList(POLY_OPA_DISP++, gSantaHatGenericDL);
Matrix_Pop();
CLOSE_DISPS(play->state.gfxCtx);
}
}
return false;
}
void EnHeishi4_Draw(Actor* thisx, PlayState* play) {
EnHeishi4* this = (EnHeishi4*)thisx;
Gfx_SetupDL_25Opa(play->state.gfxCtx);
SkelAnime_DrawSkeletonOpa(play, &this->skelAnime, EnHeishi_OverrideLimbDraw, NULL, this);
SkelAnime_DrawSkeletonOpa(play, &this->skelAnime, EnHeishi_OverrideLimbDraw, EnHeishi4_PostLimbDraw, this);
}
@@ -8,6 +8,7 @@
#include "vt.h"
#include "objects/object_hs/object_hs.h"
#include "soh/ResourceManagerHelpers.h"
#include "soh_assets.h"
#define FLAGS (ACTOR_FLAG_ATTENTION_ENABLED | ACTOR_FLAG_FRIENDLY)
@@ -66,6 +67,13 @@ void EnHs2_Init(Actor* thisx, PlayState* play) {
this->actionFunc = func_80A6F1A4;
this->unk_2A8 = 0;
this->actor.targetMode = 6;
if (play->sceneNum == SCENE_KAKARIKO_VILLAGE && CVarGetInteger(CVAR_GENERAL("LetItSnow"), 0)) {
this->actor.world.pos.x = 756.0;
this->actor.world.pos.y = 80.0;
this->actor.world.pos.z = 1378.0;
this->actor.shape.rot.y = 32534;
}
}
void EnHs2_Destroy(Actor* thisx, PlayState* play) {
@@ -161,6 +169,21 @@ void EnHs2_PostLimbDraw(PlayState* play, s32 limbIndex, Gfx** dList, Vec3s* rot,
if (limbIndex == 9) {
Matrix_MultVec3f(&D_80A6F4CC, &this->actor.focus.pos);
}
if (CVarGetInteger(CVAR_GENERAL("LetItSnow"), 0)) {
if (limbIndex == 9) {
OPEN_DISPS(play->state.gfxCtx);
Matrix_Push();
Matrix_RotateZYX(0, 0, -6421, MTXMODE_APPLY);
Matrix_Translate(621.622f, 378.378f, 0.0f, MTXMODE_APPLY);
Matrix_Scale(0.763f, 0.763f, 0.763f, MTXMODE_APPLY);
gDPSetEnvColor(POLY_OPA_DISP++, 0, 255, 255, 255);
gSPMatrix(POLY_OPA_DISP++, MATRIX_NEWMTX(play->state.gfxCtx), G_MTX_NOPUSH | G_MTX_LOAD | G_MTX_MODELVIEW);
gSPDisplayList(POLY_OPA_DISP++, gPaperCrownGenericDL);
Matrix_Pop();
CLOSE_DISPS(play->state.gfxCtx);
}
}
}
void EnHs2_Draw(Actor* thisx, PlayState* play) {
+121
View File
@@ -17,6 +17,7 @@
#include "soh/OTRGlobals.h"
#include "soh/ResourceManagerHelpers.h"
#include "soh/Enhancements/game-interactor/GameInteractor_Hooks.h"
#include "soh_assets.h"
#define FLAGS (ACTOR_FLAG_ATTENTION_ENABLED | ACTOR_FLAG_FRIENDLY | ACTOR_FLAG_UPDATE_CULLING_DISABLED)
@@ -907,6 +908,21 @@ void EnHy_Init(Actor* thisx, PlayState* play) {
Actor_Kill(&this->actor);
}
if (play->sceneNum == SCENE_KAKARIKO_VILLAGE && CVarGetInteger(CVAR_GENERAL("LetItSnow"), 0)) {
if (this->actor.params == 1929) {
this->actor.world.pos.x = 261.826;
this->actor.world.pos.y = 240.0;
this->actor.world.pos.z = 1669.660;
this->actor.shape.rot.y = 23784;
}
if (this->actor.params == 1930) {
this->actor.world.pos.x = 262.224;
this->actor.world.pos.y = 240.0;
this->actor.world.pos.z = 1594.390;
this->actor.shape.rot.y = 7728;
}
}
this->getItemEntry = (GetItemEntry)GET_ITEM_NONE;
this->actionFunc = EnHy_InitImpl;
}
@@ -1188,6 +1204,111 @@ void EnHy_PostLimbDraw(PlayState* play, s32 limbIndex, Gfx** dList, Vec3s* rot,
Matrix_MultVec3f(&sp3C, &this->actor.focus.pos);
}
if (CVarGetInteger(CVAR_GENERAL("LetItSnow"), 0)) {
if (limbIndex == 15) {
Matrix_Push();
switch (this->actor.params) {
case 1938: {
Matrix_RotateZYX(5313, 0, -1550, MTXMODE_APPLY);
Matrix_Translate(1108.108f, 54.054f, 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++, gSantaHatGenericDL);
break;
}
case 135:
case 7: {
Matrix_RotateZYX(1328, 0, 885, MTXMODE_APPLY);
Matrix_Translate(864.865f, 229.73f, 0.0f, MTXMODE_APPLY);
Matrix_Scale(1.25f, 1.25f, 1.25f, MTXMODE_APPLY);
gSPMatrix(POLY_OPA_DISP++, MATRIX_NEWMTX(play->state.gfxCtx),
G_MTX_NOPUSH | G_MTX_LOAD | G_MTX_MODELVIEW);
gSPDisplayList(POLY_OPA_DISP++, gSantaHatGenericDL);
break;
}
case 1922: {
Matrix_RotateZYX(4206, 221, -3543, MTXMODE_APPLY);
Matrix_Translate(662.162f, 162.162f, -27.027f, 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++, gSantaHatGenericDL);
break;
}
case 1925: {
Matrix_RotateZYX(-9521, 442, -5536, MTXMODE_APPLY);
Matrix_Translate(351.351f, 256.757f, 283.784f, MTXMODE_APPLY);
Matrix_Scale(1.217f, 1.217f, 1.217f, MTXMODE_APPLY);
gSPMatrix(POLY_OPA_DISP++, MATRIX_NEWMTX(play->state.gfxCtx),
G_MTX_NOPUSH | G_MTX_LOAD | G_MTX_MODELVIEW);
gSPDisplayList(POLY_OPA_DISP++, gSantaHatGenericDL);
break;
}
case 1920: {
Matrix_RotateZYX(0, 0, 3321, MTXMODE_APPLY);
Matrix_Translate(1148.649f, 0.0f, 0.0f, MTXMODE_APPLY);
Matrix_Scale(0.73f, 0.73f, 0.73f, MTXMODE_APPLY);
gDPSetEnvColor(POLY_OPA_DISP++, 255, 0, 255, 255);
gSPMatrix(POLY_OPA_DISP++, MATRIX_NEWMTX(play->state.gfxCtx),
G_MTX_NOPUSH | G_MTX_LOAD | G_MTX_MODELVIEW);
gSPDisplayList(POLY_OPA_DISP++, gPaperCrownGenericDL);
break;
}
case 1930: {
Matrix_RotateZYX(3542, 0, 0, MTXMODE_APPLY);
Matrix_Translate(972.973f, -13.514f, 54.054f, MTXMODE_APPLY);
Matrix_Scale(0.831f, 0.831f, 0.831f, MTXMODE_APPLY);
gDPSetEnvColor(POLY_OPA_DISP++, 255, 0, 0, 255);
gSPMatrix(POLY_OPA_DISP++, MATRIX_NEWMTX(play->state.gfxCtx),
G_MTX_NOPUSH | G_MTX_LOAD | G_MTX_MODELVIEW);
gSPDisplayList(POLY_OPA_DISP++, gPaperCrownGenericDL);
break;
}
case 1929: {
Matrix_RotateZYX(3542, 0, 0, MTXMODE_APPLY);
Matrix_Translate(972.973f, -13.514f, 54.054f, MTXMODE_APPLY);
Matrix_Scale(0.831f, 0.831f, 0.831f, MTXMODE_APPLY);
gDPSetEnvColor(POLY_OPA_DISP++, 0, 0, 255, 255);
gSPMatrix(POLY_OPA_DISP++, MATRIX_NEWMTX(play->state.gfxCtx),
G_MTX_NOPUSH | G_MTX_LOAD | G_MTX_MODELVIEW);
gSPDisplayList(POLY_OPA_DISP++, gPaperCrownGenericDL);
break;
}
case 1921: {
Matrix_RotateZYX(0, 0, 664, MTXMODE_APPLY);
Matrix_Translate(1256.757f, -297.297f, -40.541f, MTXMODE_APPLY);
Matrix_Scale(1.135f, 1.135f, 1.135f, MTXMODE_APPLY);
gDPSetEnvColor(POLY_OPA_DISP++, 0, 255, 0, 255);
gSPMatrix(POLY_OPA_DISP++, MATRIX_NEWMTX(play->state.gfxCtx),
G_MTX_NOPUSH | G_MTX_LOAD | G_MTX_MODELVIEW);
gSPDisplayList(POLY_OPA_DISP++, gPaperCrownGenericDL);
break;
}
case 1939: {
Matrix_RotateZYX(2656, 1328, 1992, MTXMODE_APPLY);
Matrix_Translate(1094.594f, 94.594f, 0.0f, MTXMODE_APPLY);
Matrix_Scale(1.351f, 1.351f, 1.351f, MTXMODE_APPLY);
gSPMatrix(POLY_OPA_DISP++, MATRIX_NEWMTX(play->state.gfxCtx),
G_MTX_NOPUSH | G_MTX_LOAD | G_MTX_MODELVIEW);
gSPDisplayList(POLY_OPA_DISP++, gSantaHatGenericDL);
break;
}
default: {
Matrix_RotateZYX(0, 0, 664, MTXMODE_APPLY);
Matrix_Translate(783.784f, 94.594f, 0.0f, MTXMODE_APPLY);
Matrix_Scale(0.662f, 0.662f, 0.662f, MTXMODE_APPLY);
gDPSetEnvColor(POLY_OPA_DISP++, 255, 255, 0, 255);
gSPMatrix(POLY_OPA_DISP++, MATRIX_NEWMTX(play->state.gfxCtx),
G_MTX_NOPUSH | G_MTX_LOAD | G_MTX_MODELVIEW);
gSPDisplayList(POLY_OPA_DISP++, gPaperCrownGenericDL);
break;
}
}
Matrix_Pop();
}
}
CLOSE_DISPS(play->state.gfxCtx);
}
@@ -10,6 +10,7 @@
#include "vt.h"
#include "soh/Enhancements/game-interactor/GameInteractor_Hooks.h"
#include "soh/ResourceManagerHelpers.h"
#include "soh_assets.h"
#define FLAGS ACTOR_FLAG_UPDATE_CULLING_DISABLED
@@ -947,6 +948,19 @@ void EnIk_PostLimbDraw3(PlayState* play, s32 limbIndex, Gfx** dList, Vec3s* rot,
break;
}
if (CVarGetInteger(CVAR_GENERAL("LetItSnow"), 0)) {
if (limbIndex == 11) {
Matrix_Push();
Matrix_RotateZYX(0, 0, -15056, MTXMODE_APPLY);
Matrix_Translate(824.324f, 472.973f, 0.0f, MTXMODE_APPLY);
Matrix_Scale(0.845f, 0.845f, 0.845f, MTXMODE_APPLY);
gDPSetEnvColor(POLY_OPA_DISP++, 255, 100, 100, 255);
gSPMatrix(POLY_OPA_DISP++, MATRIX_NEWMTX(play->state.gfxCtx), G_MTX_NOPUSH | G_MTX_LOAD | G_MTX_MODELVIEW);
gSPDisplayList(POLY_OPA_DISP++, gPaperCrownGenericDL);
Matrix_Pop();
}
}
CLOSE_DISPS(play->state.gfxCtx);
}
@@ -1223,6 +1237,20 @@ void EnIk_PostLimbDraw2(PlayState* play, s32 limbIndex, Gfx** dList, Vec3s* rot,
}
} break;
}
if (CVarGetInteger(CVAR_GENERAL("LetItSnow"), 0)) {
if (limbIndex == 11) {
Matrix_Push();
Matrix_RotateZYX(0, 0, -15056, MTXMODE_APPLY);
Matrix_Translate(824.324f, 472.973f, 0.0f, MTXMODE_APPLY);
Matrix_Scale(0.845f, 0.845f, 0.845f, MTXMODE_APPLY);
gDPSetEnvColor(POLY_OPA_DISP++, 255, 100, 100, 255);
gSPMatrix(POLY_OPA_DISP++, MATRIX_NEWMTX(play->state.gfxCtx), G_MTX_NOPUSH | G_MTX_LOAD | G_MTX_MODELVIEW);
gSPDisplayList(POLY_OPA_DISP++, gPaperCrownGenericDL);
Matrix_Pop();
}
}
CLOSE_DISPS(gfxCtx);
}
@@ -1368,6 +1396,19 @@ void EnIk_PostLimbDraw1(PlayState* play, s32 limbIndex, Gfx** dList, Vec3s* rot,
break;
}
if (CVarGetInteger(CVAR_GENERAL("LetItSnow"), 0)) {
if (limbIndex == 11) {
Matrix_Push();
Matrix_RotateZYX(0, 0, -15056, MTXMODE_APPLY);
Matrix_Translate(824.324f, 472.973f, 0.0f, MTXMODE_APPLY);
Matrix_Scale(0.845f, 0.845f, 0.845f, MTXMODE_APPLY);
gDPSetEnvColor(POLY_OPA_DISP++, 255, 100, 100, 255);
gSPMatrix(POLY_OPA_DISP++, MATRIX_NEWMTX(play->state.gfxCtx), G_MTX_NOPUSH | G_MTX_LOAD | G_MTX_MODELVIEW);
gSPDisplayList(POLY_OPA_DISP++, gPaperCrownGenericDL);
Matrix_Pop();
}
}
CLOSE_DISPS(gfxCtx);
}
@@ -2,6 +2,7 @@
#include "overlays/actors/ovl_En_Horse/z_en_horse.h"
#include "objects/object_in/object_in.h"
#include "soh/ResourceManagerHelpers.h"
#include "soh_assets.h"
#define FLAGS (ACTOR_FLAG_ATTENTION_ENABLED | ACTOR_FLAG_FRIENDLY | ACTOR_FLAG_UPDATE_CULLING_DISABLED)
@@ -992,6 +993,18 @@ void EnIn_PostLimbDraw(PlayState* play, s32 limbIndex, Gfx** dList, Vec3s* rot,
gSPDisplayList(POLY_OPA_DISP++, gIngoChildEraPitchForkDL);
}
if (CVarGetInteger(CVAR_GENERAL("LetItSnow"), 0)) {
if (limbIndex == 16) {
Matrix_Push();
Matrix_RotateZYX(-8192, -222, -11513, MTXMODE_APPLY);
Matrix_Translate(770.0f, 837.0f, 878.0f, MTXMODE_APPLY);
Matrix_Scale(1.068f, 1.068f, 1.068f, MTXMODE_APPLY);
gSPMatrix(POLY_OPA_DISP++, MATRIX_NEWMTX(play->state.gfxCtx), G_MTX_NOPUSH | G_MTX_LOAD | G_MTX_MODELVIEW);
gSPDisplayList(POLY_OPA_DISP++, gSantaHatGenericDL);
Matrix_Pop();
}
}
CLOSE_DISPS(play->state.gfxCtx);
}
+22 -1
View File
@@ -8,6 +8,7 @@
#include "objects/object_jj/object_jj.h"
#include "overlays/actors/ovl_Eff_Dust/z_eff_dust.h"
#include "soh/ResourceManagerHelpers.h"
#include "soh_assets.h"
#define FLAGS (ACTOR_FLAG_UPDATE_CULLING_DISABLED | ACTOR_FLAG_DRAW_CULLING_DISABLED)
@@ -307,6 +308,26 @@ void EnJj_Update(Actor* thisx, PlayState* play) {
this->skelAnime.jointTable[10].z = this->mouthOpenAngle;
}
s32 EnJj_PostLimbDraw(PlayState* play, s32 limbIndex, Gfx** dList, Vec3s* rot, void* thisx) {
EnJj* this = (EnJj*)thisx;
if (CVarGetInteger(CVAR_GENERAL("LetItSnow"), 0)) {
if (limbIndex == 13) {
OPEN_DISPS(play->state.gfxCtx);
Matrix_Push();
Matrix_RotateZYX(4649, -8635, 15276, MTXMODE_APPLY);
Matrix_Translate(27.027f, 135.135f, -81.081f, MTXMODE_APPLY);
Matrix_Scale(0.304f, 0.304f, 0.304f, MTXMODE_APPLY);
gSPMatrix(POLY_OPA_DISP++, MATRIX_NEWMTX(play->state.gfxCtx), G_MTX_NOPUSH | G_MTX_LOAD | G_MTX_MODELVIEW);
gSPDisplayList(POLY_OPA_DISP++, gSantaHatGenericDL);
Matrix_Pop();
CLOSE_DISPS(play->state.gfxCtx);
}
}
return false;
}
void EnJj_Draw(Actor* thisx, PlayState* play2) {
static void* eyeTextures[] = { gJabuJabuEyeOpenTex, gJabuJabuEyeHalfTex, gJabuJabuEyeClosedTex };
PlayState* play = play2;
@@ -318,7 +339,7 @@ void EnJj_Draw(Actor* thisx, PlayState* play2) {
Matrix_Translate(0.0f, (cosf(this->skelAnime.curFrame * (M_PI / 41.0f)) * 10.0f) - 10.0f, 0.0f, MTXMODE_APPLY);
Matrix_Scale(10.0f, 10.0f, 10.0f, MTXMODE_APPLY);
gSPSegment(POLY_OPA_DISP++, 0x08, SEGMENTED_TO_VIRTUAL(eyeTextures[this->eyeIndex]));
SkelAnime_DrawSkeletonOpa(play, &this->skelAnime, NULL, NULL, this);
SkelAnime_DrawSkeletonOpa(play, &this->skelAnime, NULL, EnJj_PostLimbDraw, this);
CLOSE_DISPS(play->state.gfxCtx);
}
@@ -1351,6 +1351,12 @@ Gfx* EnKo_SetEnvColor(GraphicsContext* gfxCtx, u8 r, u8 g, u8 b, u8 a) {
void EnKo_Draw(Actor* thisx, PlayState* play) {
EnKo* this = (EnKo*)thisx;
Color_RGBA8 tunicColor = sModelInfo[ENKO_TYPE].tunicColor;
// Overwrite to red tunic as default for Holidays in Hyrule build
tunicColor.r = 255;
tunicColor.g = 0;
tunicColor.b = 0;
Color_RGBA8 bootsColor = sModelInfo[ENKO_TYPE].bootsColor;
if (CVarGetInteger(CVAR_COSMETIC("NPC.Kokiri.Changed"), 0)) {
@@ -270,6 +270,13 @@ void EnKusa_Init(Actor* thisx, PlayState* play) {
return;
}
if (gPlayState->sceneNum == SCENE_KAKARIKO_VILLAGE && this->actor.world.pos.z < 600.0 &&
CVAR_GENERAL("LetItSnow")) {
this->actor.world.pos.x += 1620.672;
this->actor.world.pos.y += 80;
this->actor.world.pos.z += 900.884;
}
EnKusa_SetupWaitObject(this);
}
@@ -8,6 +8,7 @@
#include "objects/object_ma1/object_ma1.h"
#include "soh/OTRGlobals.h"
#include "soh/Enhancements/game-interactor/GameInteractor_Hooks.h"
#include "soh_assets.h"
#define FLAGS \
(ACTOR_FLAG_ATTENTION_ENABLED | ACTOR_FLAG_FRIENDLY | ACTOR_FLAG_UPDATE_CULLING_DISABLED | \
@@ -467,6 +468,21 @@ void EnMa1_PostLimbDraw(PlayState* play, s32 limbIndex, Gfx** dList, Vec3s* rot,
if (limbIndex == 15) {
Matrix_MultVec3f(&vec, &this->actor.focus.pos);
}
if (CVarGetInteger(CVAR_GENERAL("LetItSnow"), 0)) {
if (limbIndex == 15) {
OPEN_DISPS(play->state.gfxCtx);
Matrix_Push();
Matrix_RotateZYX(0, 0, 0, MTXMODE_APPLY);
Matrix_Translate(756.757f, 0.0f, 0.0f, MTXMODE_APPLY);
Matrix_Scale(0.73f, 0.73f, 0.73f, MTXMODE_APPLY);
gDPSetEnvColor(POLY_OPA_DISP++, 0, 0, 255, 255);
gSPMatrix(POLY_OPA_DISP++, MATRIX_NEWMTX(play->state.gfxCtx), G_MTX_NOPUSH | G_MTX_LOAD | G_MTX_MODELVIEW);
gSPDisplayList(POLY_OPA_DISP++, gPaperCrownGenericDL);
Matrix_Pop();
CLOSE_DISPS(play->state.gfxCtx);
}
}
}
void EnMa1_Draw(Actor* thisx, PlayState* play) {
+22 -1
View File
@@ -10,6 +10,7 @@
#include "vt.h"
#include "soh/frame_interpolation.h"
#include "soh/ResourceManagerHelpers.h"
#include "soh_assets.h"
#define FLAGS (ACTOR_FLAG_UPDATE_CULLING_DISABLED | ACTOR_FLAG_THROW_ONLY)
@@ -1133,13 +1134,33 @@ s32 EnNiw_OverrideLimbDraw(PlayState* play, s32 limbIndex, Gfx** dList, Vec3f* p
return false;
}
s32 EnNiw_PostLimbDraw(PlayState* play, s32 limbIndex, Gfx** dList, Vec3s* rot, void* thisx) {
EnNiw* this = (EnNiw*)thisx;
if (CVarGetInteger(CVAR_GENERAL("LetItSnow"), 0)) {
if (limbIndex == 15) {
OPEN_DISPS(play->state.gfxCtx);
Matrix_Push();
Matrix_RotateZYX(0, 0, -19705, MTXMODE_APPLY);
Matrix_Translate(297.297f, -81.082f, 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++, gSantaHatGenericDL);
Matrix_Pop();
CLOSE_DISPS(play->state.gfxCtx);
}
}
return false;
}
void EnNiw_Draw(Actor* thisx, PlayState* play) {
EnNiw* this = (EnNiw*)thisx;
Vec3f scale = { 0.15f, 0.15f, 0.15f };
GraphicsContext* gfxCtx = play->state.gfxCtx;
Gfx_SetupDL_25Opa(play->state.gfxCtx);
SkelAnime_DrawSkeletonOpa(play, &this->skelAnime, EnNiw_OverrideLimbDraw, NULL, this);
SkelAnime_DrawSkeletonOpa(play, &this->skelAnime, EnNiw_OverrideLimbDraw, EnNiw_PostLimbDraw, this);
if (this->actionFunc == func_80AB6450) {
func_80033C30(&this->actor.world.pos, &scale, 255, play);
@@ -8,6 +8,7 @@
#include "objects/object_gr/object_gr.h"
#include "vt.h"
#include "soh/ResourceManagerHelpers.h"
#include "soh_assets.h"
#define FLAGS (ACTOR_FLAG_ATTENTION_ENABLED | ACTOR_FLAG_FRIENDLY | ACTOR_FLAG_UPDATE_CULLING_DISABLED)
@@ -247,6 +248,27 @@ s32 EnNiwGirlOverrideLimbDraw(PlayState* play, s32 limbIndex, Gfx** dList, Vec3f
static Vec3f sConstVec3f = { 0.2f, 0.2f, 0.2f };
s32 EnNiwGirl_PostLimbDraw(PlayState* play, s32 limbIndex, Gfx** dList, Vec3s* rot, void* thisx) {
EnNiwGirl* this = (EnNiwGirl*)thisx;
if (CVarGetInteger(CVAR_GENERAL("LetItSnow"), 0)) {
if (limbIndex == 4) {
OPEN_DISPS(play->state.gfxCtx);
Matrix_Push();
Matrix_RotateZYX(0, 0, 0, MTXMODE_APPLY);
Matrix_Translate(945.945f, 0.0f, 0.0f, MTXMODE_APPLY);
Matrix_Scale(0.676f, 0.676f, 0.676f, MTXMODE_APPLY);
gDPSetEnvColor(POLY_OPA_DISP++, 255, 0, 255, 255);
gSPMatrix(POLY_OPA_DISP++, MATRIX_NEWMTX(play->state.gfxCtx), G_MTX_NOPUSH | G_MTX_LOAD | G_MTX_MODELVIEW);
gSPDisplayList(POLY_OPA_DISP++, gPaperCrownGenericDL);
Matrix_Pop();
CLOSE_DISPS(play->state.gfxCtx);
}
}
return false;
}
void EnNiwGirl_Draw(Actor* thisx, PlayState* play) {
static void* eyeTextures[] = { gNiwGirlEyeOpenTex, gNiwGirlEyeHalfTex, gNiwGirlEyeClosedTex };
EnNiwGirl* this = (EnNiwGirl*)thisx;
@@ -257,7 +279,7 @@ void EnNiwGirl_Draw(Actor* thisx, PlayState* play) {
Gfx_SetupDL_25Opa(play->state.gfxCtx);
gSPSegment(POLY_OPA_DISP++, 0x08, SEGMENTED_TO_VIRTUAL(eyeTextures[this->eyeIndex]));
SkelAnime_DrawSkeletonOpa(play, &this->skelAnime, EnNiwGirlOverrideLimbDraw, NULL, this);
SkelAnime_DrawSkeletonOpa(play, &this->skelAnime, EnNiwGirlOverrideLimbDraw, EnNiwGirl_PostLimbDraw, this);
func_80033C30(&this->actor.world.pos, &sp4C, 255, play);
CLOSE_DISPS(play->state.gfxCtx);
@@ -6,6 +6,7 @@
#include "soh/OTRGlobals.h"
#include "soh/ResourceManagerHelpers.h"
#include "soh/Enhancements/game-interactor/GameInteractor_Hooks.h"
#include "soh_assets.h"
#define FLAGS (ACTOR_FLAG_ATTENTION_ENABLED | ACTOR_FLAG_FRIENDLY | ACTOR_FLAG_UPDATE_CULLING_DISABLED)
@@ -586,6 +587,27 @@ s32 EnNiwLady_OverrideLimbDraw(PlayState* play, s32 limbIndex, Gfx** dList, Vec3
return false;
}
s32 EnNiwLady_PostLimbDraw(PlayState* play, s32 limbIndex, Gfx** dList, Vec3s* rot, void* thisx) {
EnNiwLady* this = (EnNiwLady*)thisx;
if (CVarGetInteger(CVAR_GENERAL("LetItSnow"), 0)) {
if (limbIndex == 15) {
OPEN_DISPS(play->state.gfxCtx);
Matrix_Push();
Matrix_RotateZYX(-886, -3322, -5093, MTXMODE_APPLY);
Matrix_Translate(824.324f, 283.782f, -202.703f, MTXMODE_APPLY);
Matrix_Scale(0.762f, 0.762f, 0.762f, MTXMODE_APPLY);
gDPSetEnvColor(POLY_OPA_DISP++, 0, 0, 255, 255);
gSPMatrix(POLY_OPA_DISP++, MATRIX_NEWMTX(play->state.gfxCtx), G_MTX_NOPUSH | G_MTX_LOAD | G_MTX_MODELVIEW);
gSPDisplayList(POLY_OPA_DISP++, gPaperCrownGenericDL);
Matrix_Pop();
CLOSE_DISPS(play->state.gfxCtx);
}
}
return false;
}
void EnNiwLady_Draw(Actor* thisx, PlayState* play) {
static void* sEyeTextures[] = { gCuccoLadyEyeOpenTex, gCuccoLadyEyeHalfTex, gCuccoLadyEyeClosedTex };
EnNiwLady* this = (EnNiwLady*)thisx;
@@ -597,7 +619,7 @@ void EnNiwLady_Draw(Actor* thisx, PlayState* play) {
gDPSetEnvColor(POLY_OPA_DISP++, 0, 0, 0, 255);
gSPSegment(POLY_OPA_DISP++, 0x08, SEGMENTED_TO_VIRTUAL(sEyeTextures[this->faceState]));
gSPSegment(POLY_OPA_DISP++, 0x0C, func_80ABB0A0(play->state.gfxCtx));
SkelAnime_DrawSkeletonOpa(play, &this->skelAnime, EnNiwLady_OverrideLimbDraw, NULL, this);
SkelAnime_DrawSkeletonOpa(play, &this->skelAnime, EnNiwLady_OverrideLimbDraw, EnNiwLady_PostLimbDraw, this);
}
CLOSE_DISPS(play->state.gfxCtx);
}
@@ -12,6 +12,7 @@
#include "objects/object_shopnuts/object_shopnuts.h"
#include "objects/object_dns/object_dns.h"
#include "objects/object_dnk/object_dnk.h"
#include "assets/objects/gameplay_keep/gameplay_keep.h"
#define FLAGS ACTOR_FLAG_UPDATE_CULLING_DISABLED
@@ -47,7 +48,7 @@ static ColliderCylinderInit sCylinderInit = {
},
{
ELEMTYPE_UNK0,
{ 0xFFCFFFFF, 0x00, 0x08 },
{ 0xFFCFFFFF, 0x02, 0x08 },
{ 0xFFCFFFFF, 0x00, 0x00 },
TOUCH_ON | TOUCH_SFX_WOOD,
BUMP_ON,
@@ -72,6 +73,8 @@ void EnNutsball_Init(Actor* thisx, PlayState* play) {
EnNutsball* this = (EnNutsball*)thisx;
s32 pad;
this->collider.info.toucher.effect = 2;
ActorShape_Init(&this->actor.shape, 400.0f, ActorShadow_DrawCircle, 13.0f);
Collider_InitCylinder(play, &this->collider);
Collider_SetCylinder(play, &this->collider, &this->actor, &sCylinderInit);
@@ -141,8 +144,10 @@ void func_80ABBBA8(EnNutsball* this, PlayState* play) {
sp40.y = this->actor.world.pos.y + 4;
sp40.z = this->actor.world.pos.z;
EffectSsHahen_SpawnBurst(play, &sp40, 6.0f, 0, 7, 3, 15, HAHEN_OBJECT_DEFAULT, 10, NULL);
SoundSource_PlaySfxAtFixedWorldPos(play, &this->actor.world.pos, 20, NA_SE_EN_OCTAROCK_ROCK);
/*EffectSsHahen_SpawnBurst(play, &sp40, 6.0f, 0, 7, 3, 15, HAHEN_OBJECT_DEFAULT, 10, NULL);
SoundSource_PlaySfxAtFixedWorldPos(play, &this->actor.world.pos, 20, NA_SE_EN_OCTAROCK_ROCK);*/
EffectSsIcePiece_SpawnBurst(play, &this->actor.world.pos, this->actor.scale.x / 10);
SoundSource_PlaySfxAtFixedWorldPos(play, &this->actor.world.pos, 20, NA_SE_PL_ICE_BROKEN);
Actor_Kill(&this->actor);
} else {
if (this->timer == -300) {
@@ -178,15 +183,34 @@ void EnNutsball_Draw(Actor* thisx, PlayState* play) {
OPEN_DISPS(play->state.gfxCtx);
if (CVarGetInteger(CVAR_ENHANCEMENT("NewDrops"), 0) != 0) {
//if ((CVarGetInteger(CVAR_ENHANCEMENT("NewDrops"), 0) != 0) || CVarGetInteger(CVAR_GENERAL("LetItSnow"), 0)) {
// Gfx_SetupDL_25Opa(play->state.gfxCtx);
// f32 scale = 12.0f;
// gSPSegment(POLY_OPA_DISP++, 0x08,
// Gfx_TwoTexScroll(play->state.gfxCtx, 0, 0, (0 - 1) % 128, 32, 32, 1, 0, (1 * -2) % 128, 32, 32));
// Matrix_RotateX(thisx->home.rot.z * 9.58738e-05f, MTXMODE_APPLY);
// Matrix_Translate(0.0f, -445.946f, 0.0f, MTXMODE_APPLY);
// Matrix_Scale(scale, scale, scale, MTXMODE_APPLY);
// gSPMatrix(POLY_OPA_DISP++, MATRIX_NEWMTX(play->state.gfxCtx), G_MTX_NOPUSH | G_MTX_LOAD | G_MTX_MODELVIEW);
// gDPSetEnvColor(POLY_OPA_DISP++, 0, 50, 100, 255);
// gSPDisplayList(POLY_OPA_DISP++, gEffIceFragment3DL);
if ((CVarGetInteger(CVAR_ENHANCEMENT("NewDrops"), 0) != 0) || CVarGetInteger(CVAR_GENERAL("LetItSnow"), 0)) {
Gfx_SetupDL_25Opa(play->state.gfxCtx);
f32 scale = 12.0f;
gSPSegment(POLY_OPA_DISP++, 0x08,
Gfx_TwoTexScroll(play->state.gfxCtx, 0, 1 * (play->state.frames * 6), 1 * (play->state.frames * 6),
32, 32, 1, 1 * (play->state.frames * 6), 1 * (play->state.frames * 6), 32, 32));
Matrix_Scale(25.0f, 25.0f, 25.0f, MTXMODE_APPLY);
Gfx_TwoTexScroll(play->state.gfxCtx, 0, 0, (0 - 1) % 128, 32, 32, 1, 0, (1 * -2) % 128, 32, 32));
Matrix_RotateX(thisx->home.rot.z * 9.58738e-05f, MTXMODE_APPLY);
gSPMatrix(POLY_OPA_DISP++, MATRIX_NEWMTX(play->state.gfxCtx), G_MTX_MODELVIEW | G_MTX_LOAD);
gSPDisplayList(POLY_OPA_DISP++, sDListsNew[thisx->params]);
Matrix_Translate(0.0f, -445.946f, 0.0f, MTXMODE_APPLY);
Matrix_Scale(scale, scale, scale, MTXMODE_APPLY);
gSPMatrix(POLY_OPA_DISP++, MATRIX_NEWMTX(play->state.gfxCtx), G_MTX_NOPUSH | G_MTX_LOAD | G_MTX_MODELVIEW);
gDPSetEnvColor(POLY_OPA_DISP++, 0, 50, 100, 255);
gSPDisplayList(POLY_OPA_DISP++, gEffIceFragment3DL);
} else {
Gfx_SetupDL_25Opa(play->state.gfxCtx);
Matrix_Mult(&play->billboardMtxF, MTXMODE_APPLY);
@@ -3,6 +3,7 @@
#include "objects/gameplay_field_keep/gameplay_field_keep.h"
#include "soh/Enhancements/game-interactor/GameInteractor_Hooks.h"
#include "soh/ResourceManagerHelpers.h"
#include "assets/objects/gameplay_keep/gameplay_keep.h"
#define FLAGS (ACTOR_FLAG_ATTENTION_ENABLED | ACTOR_FLAG_HOSTILE)
@@ -520,7 +521,7 @@ void EnOkuta_ProjectileFly(EnOkuta* this, PlayState* play) {
f32 temp_f20;
f32 temp_f22;
s32 i;
for (s16 i = 0; i < ARRAY_COUNT(sEffectScales); i++) {
/*for (s16 i = 0; i < ARRAY_COUNT(sEffectScales); i++) {
phi_s0 += 10000;
temp_f20 = Rand_ZeroOne() * 5.0f;
@@ -547,12 +548,14 @@ void EnOkuta_ProjectileFly(EnOkuta* this, PlayState* play) {
EffectSsKakera_Spawn(play, &pos, &velocity, &this->actor.world.pos, gravity, phi_v0, 30, 5, 0,
sEffectScales[i] / 5, 3, 0, 70, 1, OBJECT_GAMEPLAY_FIELD_KEEP,
gSilverRockFragmentsDL);
}
}*/
EffectSsIcePiece_SpawnBurst(play, &this->actor.world.pos, this->actor.scale.x / 10);
} else {
EffectSsHahen_SpawnBurst(play, &pos, 6.0f, 0, 1, 2, 15, 7, 10, gOctorokProjectileDL);
}
SoundSource_PlaySfxAtFixedWorldPos(play, &this->actor.world.pos, 20, NA_SE_EN_OCTAROCK_ROCK);
//SoundSource_PlaySfxAtFixedWorldPos(play, &this->actor.world.pos, 20, NA_SE_EN_OCTAROCK_ROCK);
SoundSource_PlaySfxAtFixedWorldPos(play, &this->actor.world.pos, 20, NA_SE_PL_ICE_BROKEN);
Actor_Kill(&this->actor);
}
} else if (this->timer == -300) {
@@ -764,16 +767,30 @@ void EnOkuta_Draw(Actor* thisx, PlayState* play) {
} else {
OPEN_DISPS(play->state.gfxCtx);
if (CVarGetInteger(CVAR_ENHANCEMENT("NewDrops"), 0) != 0) {
//if (CVarGetInteger(CVAR_ENHANCEMENT("NewDrops"), 0) != 0) {
// Gfx_SetupDL_25Opa(play->state.gfxCtx);
// gSPSegment(POLY_OPA_DISP++, 0x08,
// Gfx_TwoTexScroll(play->state.gfxCtx, 0, 1 * (play->state.frames * 6),
// 1 * (play->state.frames * 6), 32, 32, 1, 1 * (play->state.frames * 6),
// 1 * (play->state.frames * 6), 32, 32));
// Matrix_Scale(7.0f, 7.0f, 7.0f, MTXMODE_APPLY);
// Matrix_RotateX(thisx->home.rot.z * (M_PI / 0x8000), MTXMODE_APPLY);
// gSPMatrix(POLY_OPA_DISP++, MATRIX_NEWMTX(play->state.gfxCtx), G_MTX_MODELVIEW | G_MTX_LOAD);
// gSPDisplayList(POLY_OPA_DISP++, gSilverRockDL);
if ((CVarGetInteger(CVAR_ENHANCEMENT("NewDrops"), 0) != 0) || CVarGetInteger(CVAR_GENERAL("LetItSnow"), 0)) {
Gfx_SetupDL_25Opa(play->state.gfxCtx);
f32 scale = 12.0f;
gSPSegment(POLY_OPA_DISP++, 0x08,
Gfx_TwoTexScroll(play->state.gfxCtx, 0, 1 * (play->state.frames * 6),
1 * (play->state.frames * 6), 32, 32, 1, 1 * (play->state.frames * 6),
1 * (play->state.frames * 6), 32, 32));
Matrix_Scale(7.0f, 7.0f, 7.0f, MTXMODE_APPLY);
Matrix_RotateX(thisx->home.rot.z * (M_PI / 0x8000), MTXMODE_APPLY);
gSPMatrix(POLY_OPA_DISP++, MATRIX_NEWMTX(play->state.gfxCtx), G_MTX_MODELVIEW | G_MTX_LOAD);
gSPDisplayList(POLY_OPA_DISP++, gSilverRockDL);
Gfx_TwoTexScroll(play->state.gfxCtx, 0, 0, (0 - 1) % 128, 32, 32, 1, 0, (1 * -2) % 128, 32, 32));
Matrix_RotateX(thisx->home.rot.z * 9.58738e-05f, MTXMODE_APPLY);
Matrix_Translate(0.0f, -445.946f, 0.0f, MTXMODE_APPLY);
Matrix_Scale(scale, scale, scale, MTXMODE_APPLY);
gSPMatrix(POLY_OPA_DISP++, MATRIX_NEWMTX(play->state.gfxCtx), G_MTX_NOPUSH | G_MTX_LOAD | G_MTX_MODELVIEW);
gDPSetEnvColor(POLY_OPA_DISP++, 0, 50, 100, 255);
gSPDisplayList(POLY_OPA_DISP++, gEffIceFragment3DL);
} else {
Matrix_Mult(&play->billboardMtxF, MTXMODE_APPLY);
Matrix_RotateZ(this->actor.home.rot.z * (M_PI / 0x8000), MTXMODE_APPLY);
@@ -18,6 +18,7 @@
#include "soh/Enhancements/game-interactor/GameInteractor_Hooks.h"
#include <assert.h>
#include "soh/OTRGlobals.h"
#include "soh_assets.h"
#define FLAGS (ACTOR_FLAG_ATTENTION_ENABLED | ACTOR_FLAG_FRIENDLY | ACTOR_FLAG_UPDATE_CULLING_DISABLED)
@@ -2425,6 +2426,73 @@ void EnOssan_DrawStickDirectionPrompts(PlayState* play, EnOssan* this) {
CLOSE_DISPS(play->state.gfxCtx);
}
s32 EnOssan_PostLimbDraw(PlayState* play, s32 limbIndex, Gfx** dList, Vec3s* rot, void* thisx) {
EnOssan* this = (EnOssan*)thisx;
if (CVarGetInteger(CVAR_GENERAL("LetItSnow"), 0)) {
if (limbIndex == 8) {
switch (this->actor.params) {
case 4: {
OPEN_DISPS(play->state.gfxCtx);
Matrix_Push();
Matrix_RotateZYX(-11071, -443, -3986, MTXMODE_APPLY);
Matrix_Translate(878.378f, 351.351f, 540.541f, MTXMODE_APPLY);
Matrix_Scale(1.352f, 1.352f, 1.352f, MTXMODE_APPLY);
gSPMatrix(POLY_OPA_DISP++, MATRIX_NEWMTX(play->state.gfxCtx),
G_MTX_NOPUSH | G_MTX_LOAD | G_MTX_MODELVIEW);
gSPDisplayList(POLY_OPA_DISP++, gSantaHatGenericDL);
Matrix_Pop();
CLOSE_DISPS(play->state.gfxCtx);
break;
}
case 1:
case 3: {
OPEN_DISPS(play->state.gfxCtx);
Matrix_Push();
Matrix_RotateZYX(-6643, 1992, -1772, MTXMODE_APPLY);
Matrix_Translate(918.919f, 121.622f, 256.757f, MTXMODE_APPLY);
Matrix_Scale(0.73f, 0.73f, 0.73f, MTXMODE_APPLY);
gDPSetEnvColor(POLY_OPA_DISP++, 0, 255, 0, 255);
gSPMatrix(POLY_OPA_DISP++, MATRIX_NEWMTX(play->state.gfxCtx),
G_MTX_NOPUSH | G_MTX_LOAD | G_MTX_MODELVIEW);
gSPDisplayList(POLY_OPA_DISP++, gPaperCrownGenericDL);
Matrix_Pop();
CLOSE_DISPS(play->state.gfxCtx);
break;
}
case 2: {
OPEN_DISPS(play->state.gfxCtx);
Matrix_Push();
Matrix_RotateZYX(-16163, 0, 2878, MTXMODE_APPLY);
Matrix_Translate(905.406f, 0.0f, -27.027f, MTXMODE_APPLY);
Matrix_Scale(1.318f, 1.318f, 1.318f, MTXMODE_APPLY);
gSPMatrix(POLY_OPA_DISP++, MATRIX_NEWMTX(play->state.gfxCtx),
G_MTX_NOPUSH | G_MTX_LOAD | G_MTX_MODELVIEW);
gSPDisplayList(POLY_OPA_DISP++, gSantaHatGenericDL);
Matrix_Pop();
CLOSE_DISPS(play->state.gfxCtx);
break;
}
default: {
OPEN_DISPS(play->state.gfxCtx);
Matrix_Push();
Matrix_RotateZYX(-11071, -443, -3986, MTXMODE_APPLY);
Matrix_Translate(878.378f, 351.351f, 540.541f, MTXMODE_APPLY);
Matrix_Scale(1.352f, 1.352f, 1.352f, MTXMODE_APPLY);
gSPMatrix(POLY_OPA_DISP++, MATRIX_NEWMTX(play->state.gfxCtx),
G_MTX_NOPUSH | G_MTX_LOAD | G_MTX_MODELVIEW);
gSPDisplayList(POLY_OPA_DISP++, gSantaHatGenericDL);
Matrix_Pop();
CLOSE_DISPS(play->state.gfxCtx);
break;
}
}
}
}
return false;
}
void EnOssan_DrawBazaarShopkeeper(Actor* thisx, PlayState* play) {
static void* sBazaarShopkeeperEyeTextures[] = { gOssanEyeOpenTex, gOssanEyeHalfTex, gOssanEyeClosedTex };
EnOssan* this = (EnOssan*)thisx;
@@ -2434,7 +2502,8 @@ void EnOssan_DrawBazaarShopkeeper(Actor* thisx, PlayState* play) {
Gfx_SetupDL_25Opa(play->state.gfxCtx);
gSPSegment(POLY_OPA_DISP++, 0x08, SEGMENTED_TO_VIRTUAL(sBazaarShopkeeperEyeTextures[this->eyeTextureIdx]));
SkelAnime_DrawSkeletonOpa(play, &this->skelAnime, EnOssan_OverrideLimbDrawDefaultShopkeeper, NULL, this);
SkelAnime_DrawSkeletonOpa(play, &this->skelAnime, EnOssan_OverrideLimbDrawDefaultShopkeeper, EnOssan_PostLimbDraw,
this);
EnOssan_DrawCursor(play, this, this->cursorX, this->cursorY, this->cursorZ, this->drawCursor);
EnOssan_DrawStickDirectionPrompts(play, this);
@@ -2460,6 +2529,16 @@ s32 EnOssan_OverrideLimbDrawKokiriShopkeeper(PlayState* play, s32 limbIndex, Gfx
gSPSegment(POLY_OPA_DISP++, 0x0A, SEGMENTED_TO_VIRTUAL(sKokiriShopkeeperEyeTextures[this->eyeTextureIdx]));
}
if (limbIndex == 15 && CVarGetInteger(CVAR_GENERAL("LetItSnow"), 0)) {
Matrix_Push();
Matrix_RotateZYX(14169, -2215, 0, MTXMODE_APPLY);
Matrix_Translate(1810.811f, -351.351f, -94.595f, MTXMODE_APPLY);
Matrix_Scale(1.068f, 1.068f, 1.068f, MTXMODE_APPLY);
gSPMatrix(POLY_OPA_DISP++, MATRIX_NEWMTX(play->state.gfxCtx), G_MTX_NOPUSH | G_MTX_LOAD | G_MTX_MODELVIEW);
gSPDisplayList(POLY_OPA_DISP++, gSantaHatGenericDL);
Matrix_Pop();
}
CLOSE_DISPS(play->state.gfxCtx);
return 0;
@@ -2488,8 +2567,8 @@ void EnOssan_DrawKokiriShopkeeper(Actor* thisx, PlayState* play) {
Gfx_SetupDL_25Opa(play->state.gfxCtx);
gDPSetEnvColor(POLY_OPA_DISP++, 0, 0, 0, 255);
gSPSegment(POLY_OPA_DISP++, 0x08, EnOssan_SetEnvColor(play->state.gfxCtx, 0, 130, 70, 255));
gSPSegment(POLY_OPA_DISP++, 0x09, EnOssan_SetEnvColor(play->state.gfxCtx, 110, 170, 20, 255));
gSPSegment(POLY_OPA_DISP++, 0x08, EnOssan_SetEnvColor(play->state.gfxCtx, 255, 0, 0, 255));
gSPSegment(POLY_OPA_DISP++, 0x09, EnOssan_SetEnvColor(play->state.gfxCtx, 255, 0, 0, 255));
gSPSegment(POLY_OPA_DISP++, 0x0C, EnOssan_EndDList(play->state.gfxCtx));
SkelAnime_DrawSkeletonOpa(play, &this->skelAnime, EnOssan_OverrideLimbDrawKokiriShopkeeper, NULL, this);
@@ -2564,7 +2643,7 @@ void EnOssan_DrawPotionShopkeeper(Actor* thisx, PlayState* play) {
Gfx_SetupDL_25Opa(play->state.gfxCtx);
gSPSegment(POLY_OPA_DISP++, 0x08, SEGMENTED_TO_VIRTUAL(sPotionShopkeeperEyeTextures[this->eyeTextureIdx]));
SkelAnime_DrawSkeletonOpa(play, &this->skelAnime, NULL, NULL, this);
SkelAnime_DrawSkeletonOpa(play, &this->skelAnime, NULL, EnOssan_PostLimbDraw, this);
EnOssan_DrawCursor(play, this, this->cursorX, this->cursorY, this->cursorZ, this->drawCursor);
EnOssan_DrawStickDirectionPrompts(play, this);
@@ -2600,7 +2679,7 @@ void EnOssan_DrawBombchuShopkeeper(Actor* thisx, PlayState* play) {
Gfx_SetupDL_25Opa(play->state.gfxCtx);
gSPSegment(POLY_OPA_DISP++, 0x08, SEGMENTED_TO_VIRTUAL(sBombchuShopkeeperEyeTextures[this->eyeTextureIdx]));
SkelAnime_DrawSkeletonOpa(play, &this->skelAnime, NULL, NULL, this);
SkelAnime_DrawSkeletonOpa(play, &this->skelAnime, NULL, EnOssan_PostLimbDraw, this);
EnOssan_DrawCursor(play, this, this->cursorX, this->cursorY, this->cursorZ, this->drawCursor);
EnOssan_DrawStickDirectionPrompts(play, this);
@@ -10,6 +10,7 @@
#include "soh/ResourceManagerHelpers.h"
#include "soh/Enhancements/game-interactor/GameInteractor.h"
#include "soh/Enhancements/game-interactor/GameInteractor_Hooks.h"
#include "soh_assets.h"
#define FLAGS \
(ACTOR_FLAG_ATTENTION_ENABLED | ACTOR_FLAG_FRIENDLY | ACTOR_FLAG_UPDATE_CULLING_DISABLED | \
@@ -431,6 +432,18 @@ void EnPoRelay_PostLimbDraw(PlayState* play, s32 limbIndex, Gfx** dList, Vec3s*
gSPDisplayList(POLY_OPA_DISP++, gDampeHaloDL);
CLOSE_DISPS(play->state.gfxCtx);
}
if (limbIndex == 16 && CVarGetInteger(CVAR_GENERAL("LetItSnow"), 0)) {
OPEN_DISPS(play->state.gfxCtx);
Matrix_Push();
Matrix_RotateZYX(10627, 3321, -13727, MTXMODE_APPLY);
Matrix_Translate(418.919f, 40.54f, -256.757f, MTXMODE_APPLY);
Matrix_Scale(1.068f, 1.068f, 1.068f, MTXMODE_APPLY);
gSPMatrix(POLY_OPA_DISP++, MATRIX_NEWMTX(play->state.gfxCtx), G_MTX_NOPUSH | G_MTX_LOAD | G_MTX_MODELVIEW);
gSPDisplayList(POLY_OPA_DISP++, gSantaHatGenericDL);
Matrix_Pop();
CLOSE_DISPS(play->state.gfxCtx);
}
}
void EnPoRelay_Draw(Actor* thisx, PlayState* play) {
@@ -4,6 +4,7 @@
#include "soh/OTRGlobals.h"
#include "soh/ResourceManagerHelpers.h"
#include "soh/Enhancements/game-interactor/GameInteractor_Hooks.h"
#include "soh_assets.h"
#define FLAGS (ACTOR_FLAG_ATTENTION_ENABLED | ACTOR_FLAG_HOSTILE)
@@ -306,6 +307,18 @@ void EnShopnuts_PostLimbDraw(PlayState* play, s32 limbIndex, Gfx** dList, Vec3s*
gSPDisplayList(POLY_OPA_DISP++, gBusinessScrubNoseDL);
CLOSE_DISPS(play->state.gfxCtx);
}
if (limbIndex == 17 && CVarGetInteger(CVAR_GENERAL("LetItSnow"), 0)) {
OPEN_DISPS(play->state.gfxCtx);
Matrix_Push();
Matrix_RotateZYX(0, 0, 17490, MTXMODE_APPLY);
Matrix_Translate(4200.0f, -472.973f, 0.0f, MTXMODE_APPLY);
Matrix_Scale(4.932f, 4.932f, 4.932f, MTXMODE_APPLY);
gSPMatrix(POLY_OPA_DISP++, MATRIX_NEWMTX(play->state.gfxCtx), G_MTX_NOPUSH | G_MTX_LOAD | G_MTX_MODELVIEW);
gSPDisplayList(POLY_OPA_DISP++, gSantaHatGenericDL);
Matrix_Pop();
CLOSE_DISPS(play->state.gfxCtx);
}
}
void EnShopnuts_Draw(Actor* thisx, PlayState* play) {
@@ -3,6 +3,7 @@
#include "objects/object_skb/object_skb.h"
#include "soh/Enhancements/game-interactor/GameInteractor_Hooks.h"
#include "soh/ResourceManagerHelpers.h"
#include "soh_assets.h"
#define FLAGS (ACTOR_FLAG_ATTENTION_ENABLED | ACTOR_FLAG_HOSTILE | ACTOR_FLAG_UPDATE_CULLING_DISABLED)
@@ -554,6 +555,19 @@ void EnSkb_PostLimbDraw(PlayState* play, s32 limbIndex, Gfx** dList, Vec3s* rot,
} else if ((this->unk_283 ^ (this->unk_283 | 4)) == 0) {
BodyBreak_SetInfo(&this->bodyBreak, limbIndex, 0, 18, 18, dList, BODYBREAK_OBJECT_DEFAULT);
}
if (limbIndex == 11 && CVarGetInteger(CVAR_GENERAL("LetItSnow"), 0)) {
OPEN_DISPS(play->state.gfxCtx);
Matrix_Push();
Matrix_RotateZYX(0, 0, -2215, MTXMODE_APPLY);
Matrix_Translate(1324.324f, 662.162f, 0.0f, MTXMODE_APPLY);
Matrix_Scale(1.0f, 1.0f, 1.0f, MTXMODE_APPLY);
gDPSetEnvColor(POLY_OPA_DISP++, 255, 0, 0, 255);
gSPMatrix(POLY_OPA_DISP++, MATRIX_NEWMTX(play->state.gfxCtx), G_MTX_NOPUSH | G_MTX_LOAD | G_MTX_MODELVIEW);
gSPDisplayList(POLY_OPA_DISP++, gPaperCrownGenericDL);
Matrix_Pop();
CLOSE_DISPS(play->state.gfxCtx);
}
}
void EnSkb_Draw(Actor* thisx, PlayState* play) {
@@ -0,0 +1,229 @@
/*
* File: z_en_snowball.c
* Overlay: ovl_En_Snowball
* Description: Rollable Snowball
*/
#include "z_en_snowball.h"
#include "objects/gameplay_keep/gameplay_keep.h"
#include "objects/object_goroiwa/object_goroiwa.h"
#include "soh_assets.h"
#define FLAGS ACTOR_FLAG_UPDATE_WHILE_CULLED
void EnSnowball_Init(Actor* thisx, PlayState* play);
void EnSnowball_Destroy(Actor* thisx, PlayState* play);
void EnSnowball_Update(Actor* thisx, PlayState* play);
void EnSnowball_Draw(Actor* thisx, PlayState* play);
static ColliderJntSphElementInit sJntSphElementsInit[] = {
{
{
ELEMTYPE_UNK0,
{ 0x20000000, 0x00, 0x04 },
{ 0x00000000, 0x00, 0x00 },
TOUCH_ON | TOUCH_SFX_NORMAL,
BUMP_NONE,
OCELEM_ON,
},
{ 0, { { 0, 0, 0 }, 14 }, 100 },
},
};
static ColliderJntSphInit sJntSphInit = {
{
COLTYPE_NONE,
AT_ON | AT_TYPE_ENEMY,
AC_NONE,
OC1_ON | OC1_TYPE_ALL,
OC2_TYPE_2,
COLSHAPE_JNTSPH,
},
1,
sJntSphElementsInit,
};
static CollisionCheckInfoInit sColChkInfoInit = { 0, 3, 15, MASS_HEAVY };
void EnSnowball_UpdateCollider(EnSnowball* this) {
Sphere16* worldSphere = &this->collider.elements[0].dim.worldSphere;
worldSphere->center.x = this->actor.world.pos.x;
worldSphere->center.y = this->actor.world.pos.y + (this->actor.scale.x * 500.0f);
worldSphere->center.z = this->actor.world.pos.z;
worldSphere->radius = (this->actor.scale.x * 500.0f);
}
void EnSnowball_InitCollider(EnSnowball* this, PlayState* play) {
Collider_InitJntSph(play, &this->collider);
Collider_SetJntSph(play, &this->collider, &this->actor, &sJntSphInit, this->colliderItems);
EnSnowball_UpdateCollider(this);
this->collider.elements[0].dim.worldSphere.radius = (this->actor.scale.x * 500.0f);
}
static InitChainEntry sInitChain[] = {
ICHAIN_F32_DIV1000(gravity, -860, ICHAIN_CONTINUE), ICHAIN_F32_DIV1000(minVelocityY, -15000, ICHAIN_CONTINUE),
ICHAIN_VEC3F_DIV1000(scale, 5, ICHAIN_CONTINUE), ICHAIN_F32(uncullZoneForward, 1500, ICHAIN_CONTINUE),
ICHAIN_F32(uncullZoneScale, 150, ICHAIN_CONTINUE), ICHAIN_F32(uncullZoneDownward, 1500, ICHAIN_STOP),
};
void EnSnowball_Init(Actor* thisx, PlayState* play) {
EnSnowball* this = (EnSnowball*)thisx;
Actor_ProcessInitChain(&this->actor, sInitChain);
EnSnowball_InitCollider(this, play);
CollisionCheck_SetInfo(&this->actor.colChkInfo, NULL, &sColChkInfoInit);
ActorShape_Init(&this->actor.shape, 595.0f, ActorShadow_DrawCircle, 9.4f);
this->actor.shape.shadowAlpha = 200;
if (thisx->params == 1) {
this->actor.speedXZ += 5.0f;
this->actor.world.rot.y = Rand_ZeroFloat(65536.0f);
}
}
void EnSnowball_Destroy(Actor* thisx, PlayState* play) {
EnSnowball* this = (EnSnowball*)thisx;
Collider_DestroyJntSph(play, &this->collider);
}
void EnSnowball_Update(Actor* thisx, PlayState* play) {
EnSnowball* this = (EnSnowball*)thisx;
Actor* player = GET_PLAYER(play);
// Kill the actor if it falls too far
if (thisx->world.pos.y < -10000.0f) {
Actor_Kill(thisx);
return;
}
u8 meanBoulder = thisx->params == 1 && this->actor.scale.x > 0.1f;
// Check if the player is close enough to start rolling
if (this->actor.xzDistToPlayer < MAX(20.0f, this->actor.scale.x * 600.0f) && !meanBoulder) {
/// Flip the actor's rotation away from the player
thisx->world.rot.y = thisx->yawTowardsPlayer + 0x8000;
this->actor.speedXZ = MAX(5.0f, this->actor.speedXZ);
}
if (this->collider.base.atFlags & AT_HIT) {
this->collider.base.atFlags &= ~AT_HIT;
// Flip the actor's rotation away from the player
thisx->world.rot.y = thisx->yawTowardsPlayer + 0x8000;
func_8002F6D4(play, &this->actor, 2.0f, this->actor.yawTowardsPlayer, 0.0f, 0);
Player_PlaySfx(&GET_PLAYER(play)->actor, NA_SE_PL_BODY_HIT);
}
// Slow down the actor and increase it's scale
if (this->actor.speedXZ > 0.0f) {
CollisionPoly snowballPoly;
u8 goingUp = this->actor.world.pos.y - this->prevY > 0.001f;
u8 goingDown = this->actor.world.pos.y - this->prevY < -0.001f;
// friction
if (thisx->params != 1) {
this->actor.speedXZ -= 0.1f;
}
if (goingDown) {
// Increase the speed if going down hill
f32 speed = (this->prevY - this->actor.world.pos.y) * 0.15f;
this->actor.speedXZ += MIN(speed, 0.5f);
} else if (goingUp) {
// Reduce the speed if going up hill
this->actor.speedXZ -= (this->actor.world.pos.y - this->prevY) * 0.1f;
}
if (goingUp || goingDown) {
// Check if going straight, one degree right, or one degree left will result in steeper slope
// Check straight
Vec3f snowballPos = this->actor.world.pos;
snowballPos.y += 100.0f;
snowballPos.x += Math_SinS(this->actor.world.rot.y) * 1.0f;
snowballPos.z += Math_CosS(this->actor.world.rot.y) * 1.0f;
float straightSlope = BgCheck_AnyRaycastFloor1(&gPlayState->colCtx, &snowballPoly, &snowballPos);
// Check one degree right
snowballPos = this->actor.world.pos;
snowballPos.y += 100.0f;
snowballPos.x += Math_SinS(this->actor.world.rot.y + 0x100) * 1.0f;
snowballPos.z += Math_CosS(this->actor.world.rot.y + 0x100) * 1.0f;
float rightSlope = BgCheck_AnyRaycastFloor1(&gPlayState->colCtx, &snowballPoly, &snowballPos);
// Check one degree left
snowballPos = this->actor.world.pos;
snowballPos.y += 100.0f;
snowballPos.x += Math_SinS(this->actor.world.rot.y - 0x100) * 1.0f;
snowballPos.z += Math_CosS(this->actor.world.rot.y - 0x100) * 1.0f;
float leftSlope = BgCheck_AnyRaycastFloor1(&gPlayState->colCtx, &snowballPoly, &snowballPos);
if (straightSlope > rightSlope || straightSlope > leftSlope) {
if (rightSlope < leftSlope) {
this->actor.world.rot.y += 0x100;
} else {
this->actor.world.rot.y -= 0x100;
}
}
}
// Check if the actor is colliding with a wall and bounce off
if (thisx->bgCheckFlags & 8) {
if (ABS((s16)(thisx->wallYaw - thisx->world.rot.y)) > 0x4000) {
thisx->world.rot.y = ((thisx->wallYaw - thisx->world.rot.y) + thisx->wallYaw) - 0x8000;
}
if (thisx->params != 1) {
thisx->speedXZ *= 0.7f;
}
thisx->bgCheckFlags &= ~8;
if (this->actor.speedXZ > 5.0f) {
Audio_PlayActorSound2(thisx, NA_SE_EV_BOMB_BOUND);
}
}
Actor_SetScale(&this->actor, MIN(0.15f, this->actor.scale.x + (this->actor.speedXZ * 0.00001f)));
}
if (this->actor.speedXZ < 0.0f) {
this->actor.speedXZ = 0.0f;
}
// Based on speed and scale, rotate the snowball
// The larger the snowball, the slower it rotates
this->sRot += (this->actor.speedXZ * 15.0f) / this->actor.scale.x;
// record the actor's position
this->prevY = this->actor.world.pos.y;
// Process movement (moves foward based on speed and rotation)
Actor_MoveXZGravity(thisx);
// Prevent actor from going through the ground or walls
Actor_UpdateBgCheckInfo(play, &this->actor, MAX(10.0f, this->actor.scale.x * 250.0f), MAX(10.0f, this->actor.scale.x * 500.0f), 0.0f, 0xFF);
EnSnowball_UpdateCollider(this);
// Add collision checks if the actor is a mean boulder
if (meanBoulder) {
CollisionCheck_SetAT(play, &play->colChkCtx, &this->collider.base);
CollisionCheck_SetOC(play, &play->colChkCtx, &this->collider.base);
}
}
void EnSnowball_Draw(Actor* thisx, PlayState* play) {
EnSnowball* this = (EnSnowball*)thisx;
OPEN_DISPS(play->state.gfxCtx);
Gfx_SetupDL_25Opa(play->state.gfxCtx);
Matrix_RotateZYX(this->sRot, thisx->world.rot.y, 0, MTXMODE_APPLY);
Matrix_Translate(0.0f, 5.0f, 0.0f, MTXMODE_APPLY);
Matrix_Scale(0.5f, 0.5f, 0.5f, MTXMODE_APPLY);
gSPMatrix(POLY_OPA_DISP++, MATRIX_NEWMTX(play->state.gfxCtx), G_MTX_NOPUSH | G_MTX_LOAD | G_MTX_MODELVIEW);
gSPDisplayList(POLY_OPA_DISP++, gSnowballDL);
CLOSE_DISPS(play->state.gfxCtx);
}
@@ -0,0 +1,31 @@
#ifndef Z_EN_SNOWBALL_H
#define Z_EN_SNOWBALL_H
#include <libultraship/libultra.h>
#include "global.h"
struct EnSnowball;
typedef void (*EnSnowballActionFunc)(struct EnSnowball*, PlayState*);
typedef struct EnSnowball {
Actor actor;
ColliderJntSph collider;
ColliderJntSphElement colliderItems[1];
s16 sRot;
f32 prevY;
} EnSnowball;
#ifdef __cplusplus
extern "C" {
#endif
void EnSnowball_Init(Actor* thisx, PlayState* play);
void EnSnowball_Destroy(Actor* thisx, PlayState* play);
void EnSnowball_Update(Actor* thisx, PlayState* play);
void EnSnowball_Draw(Actor* thisx, PlayState* play);
#ifdef __cplusplus
}
#endif
#endif
@@ -12,6 +12,7 @@
#include "soh/Enhancements/game-interactor/GameInteractor_Hooks.h"
#include "soh/OTRGlobals.h"
#include "soh/ResourceManagerHelpers.h"
#include "soh_assets.h"
#define FLAGS (ACTOR_FLAG_ATTENTION_ENABLED | ACTOR_FLAG_FRIENDLY | ACTOR_FLAG_UPDATE_CULLING_DISABLED)
@@ -398,6 +399,19 @@ void EnSth_PostLimbDraw(PlayState* play, s32 limbIndex, Gfx** dList, Vec3s* rot,
CLOSE_DISPS(play->state.gfxCtx);
}
}
if (limbIndex == 15 && CVarGetInteger(CVAR_GENERAL("LetItSnow"), 0)) {
OPEN_DISPS(play->state.gfxCtx);
Matrix_Push();
Matrix_RotateZYX(-4207, -665, -4650, MTXMODE_APPLY);
Matrix_Translate(932.432f, 162.163f, 81.082f, MTXMODE_APPLY);
Matrix_Scale(0.73f, 0.73f, 0.73f, MTXMODE_APPLY);
gDPSetEnvColor(POLY_OPA_DISP++, 255, 255, 0, 255);
gSPMatrix(POLY_OPA_DISP++, MATRIX_NEWMTX(play->state.gfxCtx), G_MTX_NOPUSH | G_MTX_LOAD | G_MTX_MODELVIEW);
gSPDisplayList(POLY_OPA_DISP++, gPaperCrownGenericDL);
Matrix_Pop();
CLOSE_DISPS(play->state.gfxCtx);
}
}
Gfx* EnSth_AllocColorDList(GraphicsContext* play, u8 envR, u8 envG, u8 envB, u8 envA) {
@@ -7,6 +7,7 @@
#include "soh/OTRGlobals.h"
#include "soh/ResourceManagerHelpers.h"
#include "soh/Enhancements/game-interactor/GameInteractor_Hooks.h"
#include "soh_assets.h"
#define FLAGS \
(ACTOR_FLAG_ATTENTION_ENABLED | ACTOR_FLAG_FRIENDLY | ACTOR_FLAG_UPDATE_CULLING_DISABLED | \
@@ -521,12 +522,31 @@ s32 EnSyatekiMan_OverrideLimbDraw(PlayState* play, s32 limbIndex, Gfx** dList, V
return 0;
}
s32 EnSyatekiMan_PostLimbDraw(PlayState* play, s32 limbIndex, Gfx** dList, Vec3s* rot, void* thisx) {
EnSyatekiMan* this = (EnSyatekiMan*)thisx;
if (limbIndex == 8 && CVarGetInteger(CVAR_GENERAL("LetItSnow"), 0)) {
OPEN_DISPS(play->state.gfxCtx);
Matrix_Push();
Matrix_RotateZYX(2214, 3985, -7750, MTXMODE_APPLY);
Matrix_Translate(1094.594f, 1162.162f, -40.541f, MTXMODE_APPLY);
Matrix_Scale(0.864f, 0.864f, 0.864f, MTXMODE_APPLY);
gDPSetEnvColor(POLY_OPA_DISP++, 0, 255, 0, 255);
gSPMatrix(POLY_OPA_DISP++, MATRIX_NEWMTX(play->state.gfxCtx), G_MTX_NOPUSH | G_MTX_LOAD | G_MTX_MODELVIEW);
gSPDisplayList(POLY_OPA_DISP++, gPaperCrownGenericDL);
Matrix_Pop();
CLOSE_DISPS(play->state.gfxCtx);
}
return false;
}
void EnSyatekiMan_Draw(Actor* thisx, PlayState* play) {
s32 pad;
EnSyatekiMan* this = (EnSyatekiMan*)thisx;
Gfx_SetupDL_25Opa(play->state.gfxCtx);
SkelAnime_DrawSkeletonOpa(play, &this->skelAnime, EnSyatekiMan_OverrideLimbDraw, NULL, this);
SkelAnime_DrawSkeletonOpa(play, &this->skelAnime, EnSyatekiMan_OverrideLimbDraw, EnSyatekiMan_PostLimbDraw, this);
}
void EnSyatekiMan_SetBgm(void) {
@@ -10,6 +10,7 @@
#include "soh/OTRGlobals.h"
#include "soh/ResourceManagerHelpers.h"
#include "soh/Enhancements/game-interactor/GameInteractor_Hooks.h"
#include "soh_assets.h"
#define FLAGS (ACTOR_FLAG_ATTENTION_ENABLED | ACTOR_FLAG_FRIENDLY)
@@ -1215,6 +1216,18 @@ void EnTa_PostLimbDraw(PlayState* play, s32 limbIndex, Gfx** dList, Vec3s* rot,
if (limbIndex == 15) {
Matrix_MultVec3f(&D_80B16E7C, &this->actor.focus.pos);
}
if (limbIndex == 15 && CVarGetInteger(CVAR_GENERAL("LetItSnow"), 0)) {
OPEN_DISPS(play->state.gfxCtx);
Matrix_Push();
Matrix_RotateZYX(11955, -1993, 221, MTXMODE_APPLY);
Matrix_Translate(1081.081f, -108.108f, -270.270f, MTXMODE_APPLY);
Matrix_Scale(1.554f, 1.554f, 1.554f, MTXMODE_APPLY);
gSPMatrix(POLY_OPA_DISP++, MATRIX_NEWMTX(play->state.gfxCtx), G_MTX_NOPUSH | G_MTX_LOAD | G_MTX_MODELVIEW);
gSPDisplayList(POLY_OPA_DISP++, gSantaHatGenericDL);
Matrix_Pop();
CLOSE_DISPS(play->state.gfxCtx);
}
}
void EnTa_Draw(Actor* thisx, PlayState* play) {
@@ -8,6 +8,7 @@
#include "objects/object_sk2/object_sk2.h"
#include "soh/Enhancements/game-interactor/GameInteractor_Hooks.h"
#include "soh/ResourceManagerHelpers.h"
#include "soh_assets.h"
#define FLAGS (ACTOR_FLAG_ATTENTION_ENABLED | ACTOR_FLAG_HOSTILE | ACTOR_FLAG_UPDATE_CULLING_DISABLED)
@@ -1950,6 +1951,18 @@ void EnTest_PostLimbDraw(PlayState* play, s32 limbIndex, Gfx** dList, Vec3s* rot
this->bodyPartsPos[bodyPart].z = sp50.z;
}
}
if (limbIndex == 11 && CVarGetInteger(CVAR_GENERAL("LetItSnow"), 0)) {
OPEN_DISPS(play->state.gfxCtx);
Matrix_Push();
Matrix_RotateZYX(-10849, 0, -5314, MTXMODE_APPLY);
Matrix_Translate(513.514f, 283.784f, 554.054f, MTXMODE_APPLY);
Matrix_Scale(1.203f, 1.203f, 1.203f, MTXMODE_APPLY);
gSPMatrix(POLY_OPA_DISP++, MATRIX_NEWMTX(play->state.gfxCtx), G_MTX_NOPUSH | G_MTX_LOAD | G_MTX_MODELVIEW);
gSPDisplayList(POLY_OPA_DISP++, gSantaHatGenericDL);
Matrix_Pop();
CLOSE_DISPS(play->state.gfxCtx);
}
}
void EnTest_Draw(Actor* thisx, PlayState* play) {
@@ -6,6 +6,7 @@
#include "z_en_tg.h"
#include "objects/object_mu/object_mu.h"
#include "soh_assets.h"
#define FLAGS (ACTOR_FLAG_ATTENTION_ENABLED | ACTOR_FLAG_FRIENDLY)
@@ -167,6 +168,29 @@ void EnTg_PostLimbDraw(PlayState* play, s32 limbIndex, Gfx** dList, Vec3s* rot,
if (limbIndex == 9) {
// Place the target point at the guy's head instead of the center of the actor
Matrix_MultVec3f(&targetOffset, &this->actor.focus.pos);
if (CVAR_GENERAL("LetItSnow")) {
OPEN_DISPS(play->state.gfxCtx);
Matrix_Push();
Matrix_RotateZYX(-3100, 1992, 2435, MTXMODE_APPLY);
Matrix_Translate(864.865f, -121.622f, 175.676f, MTXMODE_APPLY);
Matrix_Scale(0.865f, 0.865f, 0.865f, MTXMODE_APPLY);
gDPSetEnvColor(POLY_OPA_DISP++, 255, 0, 255, 255);
gSPMatrix(POLY_OPA_DISP++, MATRIX_NEWMTX(play->state.gfxCtx), G_MTX_NOPUSH | G_MTX_LOAD | G_MTX_MODELVIEW);
gSPDisplayList(POLY_OPA_DISP++, gPaperCrownGenericDL);
Matrix_Pop();
CLOSE_DISPS(play->state.gfxCtx);
}
} else if (limbIndex == 20 && CVarGetInteger(CVAR_GENERAL("LetItSnow"), 0)) {
OPEN_DISPS(play->state.gfxCtx);
Matrix_Push();
Matrix_RotateZYX(-2657, -1550, 1549, MTXMODE_APPLY);
Matrix_Translate(594.594f, -135.135f, -54.054f, MTXMODE_APPLY);
Matrix_Scale(0.966f, 0.966f, 0.966f, MTXMODE_APPLY);
gDPSetEnvColor(POLY_OPA_DISP++, 0, 0, 255, 255);
gSPMatrix(POLY_OPA_DISP++, MATRIX_NEWMTX(play->state.gfxCtx), G_MTX_NOPUSH | G_MTX_LOAD | G_MTX_MODELVIEW);
gSPDisplayList(POLY_OPA_DISP++, gPaperCrownGenericDL);
Matrix_Pop();
CLOSE_DISPS(play->state.gfxCtx);
}
}
@@ -10,6 +10,7 @@
#include "soh/frame_interpolation.h"
#include "soh/ResourceManagerHelpers.h"
#include "soh/Enhancements/game-interactor/GameInteractor_Hooks.h"
#include "soh_assets.h"
#define FLAGS (ACTOR_FLAG_ATTENTION_ENABLED | ACTOR_FLAG_FRIENDLY)
@@ -728,6 +729,18 @@ void EnTk_PostLimbDraw(PlayState* play, s32 limbIndex, Gfx** dList, Vec3s* rot,
Matrix_MultVec3f(&sp28, &this->v3f_304);
func_80B1D200(play);
}
if (limbIndex == 16 && CVarGetInteger(CVAR_GENERAL("LetItSnow"), 0)) {
OPEN_DISPS(play->state.gfxCtx);
Matrix_Push();
Matrix_RotateZYX(10627, 3321, -13727, MTXMODE_APPLY);
Matrix_Translate(418.919f, 40.54f, -256.757f, MTXMODE_APPLY);
Matrix_Scale(1.068f, 1.068f, 1.068f, MTXMODE_APPLY);
gSPMatrix(POLY_OPA_DISP++, MATRIX_NEWMTX(play->state.gfxCtx), G_MTX_NOPUSH | G_MTX_LOAD | G_MTX_MODELVIEW);
gSPDisplayList(POLY_OPA_DISP++, gSantaHatGenericDL);
Matrix_Pop();
CLOSE_DISPS(play->state.gfxCtx);
}
}
void EnTk_Draw(Actor* thisx, PlayState* play) {
@@ -9,6 +9,7 @@
#include "soh/OTRGlobals.h"
#include "soh/ResourceManagerHelpers.h"
#include "soh/Enhancements/game-interactor/GameInteractor_Hooks.h"
#include "soh_assets.h"
#define FLAGS (ACTOR_FLAG_ATTENTION_ENABLED | ACTOR_FLAG_FRIENDLY)
@@ -107,6 +108,12 @@ void EnToryo_Init(Actor* thisx, PlayState* play) {
break;
case SCENE_KAKARIKO_VILLAGE:
if ((LINK_AGE_IN_YEARS == YEARS_CHILD) && IS_DAY) {
if (CVarGetInteger(CVAR_GENERAL("LetItSnow"), 0)) {
this->actor.world.pos.x = 756.0;
this->actor.world.pos.y = 80.0;
this->actor.world.pos.z = 1378.0;
this->actor.shape.rot.y = 32534;
}
this->stateFlags |= 2;
}
break;
@@ -415,4 +422,16 @@ void EnToryo_PostLimbDraw(PlayState* play, s32 limbIndex, Gfx** dList, Vec3s* ro
Matrix_MultVec3f(&sMultVec, &this->actor.focus.pos);
break;
}
if (limbIndex == 15 && CVarGetInteger(CVAR_GENERAL("LetItSnow"), 0)) {
OPEN_DISPS(play->state.gfxCtx);
Matrix_Push();
Matrix_RotateZYX(-23691, 664, -2879, MTXMODE_APPLY);
Matrix_Translate(810.811f, -243.243f, 270.27f, MTXMODE_APPLY);
Matrix_Scale(1.216f, 1.216f, 1.216f, MTXMODE_APPLY);
gSPMatrix(POLY_OPA_DISP++, MATRIX_NEWMTX(play->state.gfxCtx), G_MTX_NOPUSH | G_MTX_LOAD | G_MTX_MODELVIEW);
gSPDisplayList(POLY_OPA_DISP++, gSantaHatGenericDL);
Matrix_Pop();
CLOSE_DISPS(play->state.gfxCtx);
}
}
@@ -10,6 +10,7 @@
#include "objects/gameplay_keep/gameplay_keep.h"
#include "soh/Enhancements/game-interactor/GameInteractor_Hooks.h"
#include "soh/ResourceManagerHelpers.h"
#include "soh_assets.h"
#define FLAGS (ACTOR_FLAG_ATTENTION_ENABLED | ACTOR_FLAG_UPDATE_CULLING_DISABLED)
@@ -519,6 +520,18 @@ void EnVm_PostLimbDraw(PlayState* play, s32 limbIndex, Gfx** dList, Vec3s* rot,
&this->colliderQuad2.dim.quad[1], &this->colliderQuad2.dim.quad[2],
&this->colliderQuad2.dim.quad[3]);
}
if (limbIndex == 6 && CVarGetInteger(CVAR_GENERAL("LetItSnow"), 0)) {
OPEN_DISPS(play->state.gfxCtx);
Matrix_Push();
Matrix_RotateZYX(19704, -1329, 11734, MTXMODE_APPLY);
Matrix_Translate(310.811f, -108.108f, -81.081f, MTXMODE_APPLY);
Matrix_Scale(2.297f, 2.297f, 2.297f, MTXMODE_APPLY);
gSPMatrix(POLY_OPA_DISP++, MATRIX_NEWMTX(play->state.gfxCtx), G_MTX_NOPUSH | G_MTX_LOAD | G_MTX_MODELVIEW);
gSPDisplayList(POLY_OPA_DISP++, gSantaHatGenericDL);
Matrix_Pop();
CLOSE_DISPS(play->state.gfxCtx);
}
}
void EnVm_Draw(Actor* thisx, PlayState* play2) {
@@ -136,6 +136,11 @@ u8 WeatherTag_CheckEnableWeatherEffect(EnWeatherTag* this, PlayState* play, u8 a
u8 ret = false;
Player* player = GET_PLAYER(play);
if (LINK_IS_ADULT && gPlayState != NULL && gPlayState->sceneNum == SCENE_KAKARIKO_VILLAGE &&
CVAR_GENERAL("LetItSnow")) {
return ret;
}
if (Actor_WorldDistXZToActor(&player->actor, &this->actor) < WEATHER_TAG_RANGE100(this->actor.params)) {
if ((play->envCtx.indoors != 0) || !gSkyboxBlendingEnabled ||
(play->skyboxId != SKYBOX_NORMAL_SKY && play->envCtx.unk_1F == play->envCtx.unk_20)) {
@@ -10,6 +10,7 @@
#include "objects/object_wf/object_wf.h"
#include "soh/Enhancements/game-interactor/GameInteractor_Hooks.h"
#include "soh/ResourceManagerHelpers.h"
#include "soh_assets.h"
#define FLAGS (ACTOR_FLAG_ATTENTION_ENABLED | ACTOR_FLAG_HOSTILE | ACTOR_FLAG_UPDATE_CULLING_DISABLED)
@@ -1428,6 +1429,19 @@ void EnWf_PostLimbDraw(PlayState* play, s32 limbIndex, Gfx** dList, Vec3s* rot,
this->bodyPartsPos[bodyPartIndex].z = bodyPartPos.z;
}
}
if (limbIndex == 17 && CVarGetInteger(CVAR_GENERAL("LetItSnow"), 0)) {
OPEN_DISPS(play->state.gfxCtx);
Matrix_Push();
Matrix_RotateZYX(0, 0, -18377, MTXMODE_APPLY);
Matrix_Translate(729.73f, 1243.243f, 0.0f, MTXMODE_APPLY);
Matrix_Scale(0.743f, 0.743f, 0.743f, MTXMODE_APPLY);
gDPSetEnvColor(POLY_OPA_DISP++, 255, 0, 0, 255);
gSPMatrix(POLY_OPA_DISP++, MATRIX_NEWMTX(play->state.gfxCtx), G_MTX_NOPUSH | G_MTX_LOAD | G_MTX_MODELVIEW);
gSPDisplayList(POLY_OPA_DISP++, gPaperCrownGenericDL);
Matrix_Pop();
CLOSE_DISPS(play->state.gfxCtx);
}
}
static void* sWolfosNormalEyeTextures[] = { gWolfosNormalEyeOpenTex, gWolfosNormalEyeHalfTex, gWolfosNormalEyeNarrowTex,
@@ -179,6 +179,18 @@ void EnWood02_Init(Actor* thisx, PlayState* play2) {
f32 floorY;
s16 extraRot;
if (CVarGetInteger(CVAR_GENERAL("LetItSnow"), 0)) {
if (gPlayState->sceneNum == SCENE_KAKARIKO_VILLAGE && this->actor.params <= WOOD_TREE_KAKARIKO_ADULT) {
Actor_Kill(this);
}
if (gPlayState->sceneNum == SCENE_KAKARIKO_VILLAGE && this->actor.params >= 0) {
this->actor.world.pos.x = 754.051;
this->actor.world.pos.y = 80.0;
this->actor.world.pos.z = 1429.908;
}
}
// The tree in Kakariko's day scene does not have the same params to spawn the GS
// as the night scene, For the always spawn GS enhancement we apply the needed
// params to have the GS drop when bonking
@@ -446,14 +458,20 @@ void EnWood02_Draw(Actor* thisx, PlayState* play) {
if ((type == WOOD_TREE_OVAL_GREEN_SPAWNER) || (type == WOOD_TREE_OVAL_GREEN_SPAWNED) ||
(type == WOOD_TREE_OVAL_GREEN) || (type == WOOD_LEAF_GREEN)) {
red = 50;
green = 170;
blue = 70;
//red = 50;
//green = 170;
//blue = 70;
red = 255;
green = 255;
blue = 255;
} else if ((type == WOOD_TREE_OVAL_YELLOW_SPAWNER) || (type == WOOD_TREE_OVAL_YELLOW_SPAWNED) ||
(type == WOOD_LEAF_YELLOW)) {
red = 180;
green = 155;
blue = 0;
//red = 180;
//green = 155;
//blue = 0;
red = 255;
green = 255;
blue = 255;
} else {
red = green = blue = 255;
}
@@ -72,41 +72,75 @@ void EndTitle_DrawFull(Actor* thisx, PlayState* play) {
OPEN_DISPS(play->state.gfxCtx);
uint8_t isKak = play->sceneNum == SCENE_KAKARIKO_VILLAGE;
// Draw title cards on the screen
if ((frameCount > 890) && (this->endAlpha < 200)) {
if ((frameCount > 890 || isKak) && (this->endAlpha < 200)) {
this->endAlpha += 7;
}
if ((frameCount > 810) && (this->tlozAlpha < 200)) {
if ((frameCount > 810 || isKak) && (this->tlozAlpha < 200)) {
this->tlozAlpha += 15;
}
if ((frameCount > 850) && (this->ootAlpha < 200)) {
if ((frameCount > 850 || isKak) && (this->ootAlpha < 200)) {
this->ootAlpha += 15;
}
OVERLAY_DISP = Gfx_SetupDL_64(OVERLAY_DISP);
gDPSetTextureLUT(OVERLAY_DISP++, G_TT_NONE);
gDPSetEnvColor(OVERLAY_DISP++, 255, 120, 30, 0);
gDPSetRenderMode(OVERLAY_DISP++, G_RM_PASS, G_RM_XLU_SURF2);
gSPClearGeometryMode(OVERLAY_DISP++,
G_TEXTURE_ENABLE | G_CULL_BACK | G_FOG | G_LIGHTING | G_TEXTURE_GEN | G_TEXTURE_GEN_LINEAR);
gDPSetCombineLERP(OVERLAY_DISP++, PRIMITIVE, ENVIRONMENT, TEXEL0, ENVIRONMENT, TEXEL0, 0, PRIMITIVE, 0, 0, 0, 0,
COMBINED, 0, 0, 0, COMBINED);
gDPSetPrimColor(OVERLAY_DISP++, 0x00, 0x80, 0, 0, 0, this->endAlpha);
gDPLoadTextureTile(OVERLAY_DISP++, sTheEndTex, G_IM_FMT_IA, G_IM_SIZ_8b, 80, 24, 0, 0, 80 - 1, 24 - 1, 0,
G_TX_NOMIRROR | G_TX_WRAP, G_TX_NOMIRROR | G_TX_WRAP, 0, 0, 0, 0);
gSPTextureRectangle(OVERLAY_DISP++, 120 << 2, 90 << 2, 200 << 2, 113 << 2, G_TX_RENDERTILE, 0, 0, 1 << 10, 1 << 10);
gDPPipeSync(OVERLAY_DISP++);
gDPSetPrimColor(OVERLAY_DISP++, 0x00, 0x80, 0, 0, 0, this->tlozAlpha);
gDPLoadTextureTile(OVERLAY_DISP++, sTheLegendOfZeldaTex, G_IM_FMT_IA, G_IM_SIZ_8b, 120, 24, 0, 0, 120 - 1, 24 - 1,
0, G_TX_NOMIRROR | G_TX_WRAP, G_TX_NOMIRROR | G_TX_WRAP, 0, 0, 0, 0);
gSPTextureRectangle(OVERLAY_DISP++, 100 << 2, 160 << 2, 220 << 2, 183 << 2, G_TX_RENDERTILE, 0, 0, 1 << 10,
1 << 10);
gDPPipeSync(OVERLAY_DISP++);
gDPSetPrimColor(OVERLAY_DISP++, 0x00, 0x80, 0, 0, 0, this->ootAlpha);
gDPLoadTextureTile(OVERLAY_DISP++, sOcarinaOfTimeTex, G_IM_FMT_IA, G_IM_SIZ_8b, 112, 16, 0, 0, 112 - 1, 16 - 1, 0,
G_TX_NOMIRROR | G_TX_WRAP, G_TX_NOMIRROR | G_TX_WRAP, 0, 0, 0, 0);
gSPTextureRectangle(OVERLAY_DISP++, 104 << 2, 177 << 2, 216 << 2, 192 << 2, G_TX_RENDERTILE, 0, 0, 1 << 10,
1 << 10);
if (this->actor.params == 2) {
gSPGrayscale(OVERLAY_DISP++, false);
gDPSetTextureLUT(OVERLAY_DISP++, G_TT_NONE);
gDPSetEnvColor(OVERLAY_DISP++, 0, 255, 0, 0);
gDPSetRenderMode(OVERLAY_DISP++, G_RM_PASS, G_RM_XLU_SURF2);
gSPClearGeometryMode(OVERLAY_DISP++, G_TEXTURE_ENABLE | G_CULL_BACK | G_FOG | G_LIGHTING | G_TEXTURE_GEN | G_TEXTURE_GEN_LINEAR);
gDPSetCombineLERP(OVERLAY_DISP++, PRIMITIVE, ENVIRONMENT, TEXEL0, ENVIRONMENT, TEXEL0, 0, PRIMITIVE, 0, 0, 0, 0, COMBINED, 0, 0, 0, COMBINED);
gDPSetPrimColor(OVERLAY_DISP++, 0x00, 0x80, 0, 0, 0, this->endAlpha);
gDPLoadTextureTile(OVERLAY_DISP++, sTheEndTex, G_IM_FMT_IA, G_IM_SIZ_8b, 80, 24, 0, 0, 80 - 1, 24 - 1, 0, G_TX_NOMIRROR | G_TX_WRAP, G_TX_NOMIRROR | G_TX_WRAP, 0, 0, 0, 0);
gSPTextureRectangle(OVERLAY_DISP++, 120 << 2, 90 << 2, 200 << 2, 113 << 2, G_TX_RENDERTILE, 0, 0, 1 << 10, 1 << 10);
gDPPipeSync(OVERLAY_DISP++);
gDPSetPrimColor(OVERLAY_DISP++, 0x00, 0x80, 0, 0, 0, this->tlozAlpha);
gDPLoadTextureTile(OVERLAY_DISP++, sTheLegendOfZeldaTex, G_IM_FMT_IA, G_IM_SIZ_8b, 120, 24, 0, 0, 120 - 1, 24 - 1, 0, G_TX_NOMIRROR | G_TX_WRAP, G_TX_NOMIRROR | G_TX_WRAP, 0, 0, 0, 0);
gSPTextureRectangle(OVERLAY_DISP++, 100 << 2, 160 << 2, 220 << 2, 183 << 2, G_TX_RENDERTILE, 0, 0, 1 << 10, 1 << 10);
gDPPipeSync(OVERLAY_DISP++);
gDPSetPrimColor(OVERLAY_DISP++, 0x00, 0x80, 0, 0, 0, this->ootAlpha);
gDPLoadTextureTile(OVERLAY_DISP++, sOcarinaOfTimeTex, G_IM_FMT_IA, G_IM_SIZ_8b, 112, 16, 0, 0, 112 - 1, 16 - 1, 0, G_TX_NOMIRROR | G_TX_WRAP, G_TX_NOMIRROR | G_TX_WRAP, 0, 0, 0, 0);
gSPTextureRectangle(OVERLAY_DISP++, 104 << 2, 177 << 2, 216 << 2, 192 << 2, G_TX_RENDERTILE, 0, 0, 1 << 10, 1 << 10);
gVisMonoColor.a = 0;
//D_801614B0.r = 205;
//D_801614B0.g = 168;
//D_801614B0.b = 130;
//gSPGrayscale(OVERLAY_DISP++, true);
} else if (gVisMonoColor.a > 0) {
gSPGrayscale(OVERLAY_DISP++, false);
gDPSetTextureLUT(OVERLAY_DISP++, G_TT_NONE);
gDPSetEnvColor(OVERLAY_DISP++, 255, 120, 30, 0);
gDPSetRenderMode(OVERLAY_DISP++, G_RM_PASS, G_RM_XLU_SURF2);
gSPClearGeometryMode(OVERLAY_DISP++, G_TEXTURE_ENABLE | G_CULL_BACK | G_FOG | G_LIGHTING | G_TEXTURE_GEN |
G_TEXTURE_GEN_LINEAR);
gDPSetCombineLERP(OVERLAY_DISP++, PRIMITIVE, ENVIRONMENT, TEXEL0, ENVIRONMENT, TEXEL0, 0, PRIMITIVE, 0, 0, 0, 0,
COMBINED, 0, 0, 0, COMBINED);
gDPSetPrimColor(OVERLAY_DISP++, 0x00, 0x80, 0, 0, 0, this->endAlpha);
gDPLoadTextureTile(OVERLAY_DISP++, sTheEndTex, G_IM_FMT_IA, G_IM_SIZ_8b, 80, 24, 0, 0, 80 - 1, 24 - 1, 0,
G_TX_NOMIRROR | G_TX_WRAP, G_TX_NOMIRROR | G_TX_WRAP, 0, 0, 0, 0);
gSPTextureRectangle(OVERLAY_DISP++, 120 << 2, 90 << 2, 200 << 2, 113 << 2, G_TX_RENDERTILE, 0, 0, 1 << 10,
1 << 10);
gDPPipeSync(OVERLAY_DISP++);
gDPSetPrimColor(OVERLAY_DISP++, 0x00, 0x80, 0, 0, 0, this->tlozAlpha);
gDPLoadTextureTile(OVERLAY_DISP++, sTheLegendOfZeldaTex, G_IM_FMT_IA, G_IM_SIZ_8b, 120, 24, 0, 0, 120 - 1,
24 - 1, 0, G_TX_NOMIRROR | G_TX_WRAP, G_TX_NOMIRROR | G_TX_WRAP, 0, 0, 0, 0);
gSPTextureRectangle(OVERLAY_DISP++, 100 << 2, 160 << 2, 220 << 2, 183 << 2, G_TX_RENDERTILE, 0, 0, 1 << 10,
1 << 10);
gDPPipeSync(OVERLAY_DISP++);
gDPSetPrimColor(OVERLAY_DISP++, 0x00, 0x80, 0, 0, 0, this->ootAlpha);
gDPLoadTextureTile(OVERLAY_DISP++, sOcarinaOfTimeTex, G_IM_FMT_IA, G_IM_SIZ_8b, 112, 16, 0, 0, 112 - 1, 16 - 1,
0, G_TX_NOMIRROR | G_TX_WRAP, G_TX_NOMIRROR | G_TX_WRAP, 0, 0, 0, 0);
gSPTextureRectangle(OVERLAY_DISP++, 104 << 2, 177 << 2, 216 << 2, 192 << 2, G_TX_RENDERTILE, 0, 0, 1 << 10,
1 << 10);
if (gVisMonoColor.a > 0)
gSPGrayscale(OVERLAY_DISP++, true);
}
CLOSE_DISPS(play->state.gfxCtx);
}
@@ -178,19 +178,18 @@ void EffectSsBomb2_Update(PlayState* play, u32 index, EffectSs* this) {
divisor = this->life - 13;
this->rPrimColorR = func_80027DD4(this->rPrimColorR, 255, divisor);
this->rPrimColorG = func_80027DD4(this->rPrimColorG, 255, divisor);
this->rPrimColorB = func_80027DD4(this->rPrimColorB, 150, divisor);
this->rPrimColorB = func_80027DD4(this->rPrimColorB, 255, divisor);
this->rPrimColorA = func_80027DD4(this->rPrimColorA, 255, divisor);
this->rEnvColorR = func_80027DD4(this->rEnvColorR, 150, divisor);
this->rEnvColorG = func_80027DD4(this->rEnvColorG, 0, divisor);
this->rEnvColorB = func_80027DD4(this->rEnvColorB, 0, divisor);
this->rEnvColorR = func_80027DD4(this->rEnvColorR, 255, divisor);
this->rEnvColorG = func_80027DD4(this->rEnvColorG, 255, divisor);
this->rEnvColorB = func_80027DD4(this->rEnvColorB, 255, divisor);
} else if ((this->life < 14) && (this->life > -1)) {
divisor = this->life + 1;
this->rPrimColorR = func_80027DD4(this->rPrimColorR, 50, divisor);
this->rPrimColorG = func_80027DD4(this->rPrimColorG, 50, divisor);
this->rPrimColorB = func_80027DD4(this->rPrimColorB, 50, divisor);
this->rPrimColorA = func_80027DD4(this->rPrimColorA, 150, divisor);
this->rEnvColorR = func_80027DD4(this->rEnvColorR, 10, divisor);
this->rEnvColorG = func_80027DD4(this->rEnvColorG, 10, divisor);
this->rEnvColorB = func_80027DD4(this->rEnvColorB, 10, divisor);
this->rPrimColorR = func_80027DD4(this->rPrimColorR, 255, divisor);
this->rPrimColorG = func_80027DD4(this->rPrimColorG, 255, divisor);
this->rPrimColorB = func_80027DD4(this->rPrimColorB, 255, divisor);
this->rPrimColorA = func_80027DD4(this->rPrimColorA, 255, divisor);
this->rEnvColorR = func_80027DD4(this->rEnvColorR, 255, divisor);
this->rEnvColorG = func_80027DD4(this->rEnvColorG, 255, divisor);
this->rEnvColorB = func_80027DD4(this->rEnvColorB, 255, divisor);
}
}