let-it-snow: Snow Golems (Skeleton override) (#4695)

* Add Snow Golems (Skeleton override)

* update snowball to use new snowball DL
This commit is contained in:
Archez
2024-12-15 23:01:00 -05:00
committed by Malkierian
parent 045de62c95
commit 06aefb30f7
69 changed files with 971 additions and 496 deletions
+2 -1
View File
@@ -3352,7 +3352,8 @@ Actor* Actor_Spawn(ActorContext* actorCtx, PlayState* play, s16 actorId, f32 pos
objBankIndex = Object_GetIndex(&gPlayState->objectCtx, dbEntry->objectId);
if (objBankIndex < 0 && (!gMapLoading || CVarGetInteger(CVAR_ENHANCEMENT("RandomizedEnemies"), 0) || CVarGetInteger("gHoliday.Caladius.Blitz.Enabled", 0))) {
if (objBankIndex < 0 && (!gMapLoading || CVarGetInteger(CVAR_ENHANCEMENT("RandomizedEnemies"), 0) ||
CVarGetInteger("gHoliday.Caladius.Blitz.Enabled", 0))) {
objBankIndex = 0;
}
+19 -16
View File
@@ -1879,13 +1879,9 @@ u8 Item_Give(PlayState* play, u8 item) {
return ITEM_NONE;
}
//prevents getting sticks without the bag in case something got missed
if (
IS_RANDO &&
(item == ITEM_STICK || item == ITEM_STICKS_5 || item == ITEM_STICKS_10) &&
Randomizer_GetSettingValue(RSK_SHUFFLE_DEKU_STICK_BAG) &&
CUR_UPG_VALUE(UPG_STICKS) == 0
) {
// prevents getting sticks without the bag in case something got missed
if (IS_RANDO && (item == ITEM_STICK || item == ITEM_STICKS_5 || item == ITEM_STICKS_10) &&
Randomizer_GetSettingValue(RSK_SHUFFLE_DEKU_STICK_BAG) && CUR_UPG_VALUE(UPG_STICKS) == 0) {
return item;
}
@@ -4957,8 +4953,8 @@ void Interface_DrawAmmoCount(PlayState* play, s16 button, s16 alpha) {
ammo = AMMO(i);
if (CVarGetInteger("gHoliday.lilDavid.BombArrows.Active", 0) &&
gSaveContext.equips.buttonItems[button] == ITEM_BOW &&
AMMO(ITEM_BOMB) != 0 && AMMO(ITEM_BOMB) < AMMO(ITEM_BOW)) {
gSaveContext.equips.buttonItems[button] == ITEM_BOW && AMMO(ITEM_BOMB) != 0 &&
AMMO(ITEM_BOMB) < AMMO(ITEM_BOW)) {
ammo = AMMO(ITEM_BOMB);
}
@@ -5597,7 +5593,8 @@ void Interface_Draw(PlayState* play) {
if (gSaveContext.equips.buttonItems[1] < 0xF0) {
gDPSetPrimColor(OVERLAY_DISP++, 0, 0, 255, 255, 255, interfaceCtx->cLeftAlpha);
gDPSetCombineMode(OVERLAY_DISP++, G_CC_MODULATERGBA_PRIM, G_CC_MODULATERGBA_PRIM);
if (gSaveContext.equips.buttonItems[1] == ITEM_BOW && CVarGetInteger("gHoliday.lilDavid.BombArrows.Active", 0)) {
if (gSaveContext.equips.buttonItems[1] == ITEM_BOW &&
CVarGetInteger("gHoliday.lilDavid.BombArrows.Active", 0)) {
Interface_DrawItemIconTexture(play, gItemIcons[ITEM_BOMB], 1);
}
Interface_DrawItemIconTexture(play, gItemIcons[gSaveContext.equips.buttonItems[1]], 1);
@@ -5613,7 +5610,8 @@ void Interface_Draw(PlayState* play) {
if (gSaveContext.equips.buttonItems[2] < 0xF0) {
gDPSetPrimColor(OVERLAY_DISP++, 0, 0, 255, 255, 255, interfaceCtx->cDownAlpha);
gDPSetCombineMode(OVERLAY_DISP++, G_CC_MODULATERGBA_PRIM, G_CC_MODULATERGBA_PRIM);
if (gSaveContext.equips.buttonItems[2] == ITEM_BOW && CVarGetInteger("gHoliday.lilDavid.BombArrows.Active", 0)) {
if (gSaveContext.equips.buttonItems[2] == ITEM_BOW &&
CVarGetInteger("gHoliday.lilDavid.BombArrows.Active", 0)) {
Interface_DrawItemIconTexture(play, gItemIcons[ITEM_BOMB], 2);
}
Interface_DrawItemIconTexture(play, gItemIcons[gSaveContext.equips.buttonItems[2]], 2);
@@ -5629,7 +5627,8 @@ void Interface_Draw(PlayState* play) {
if (gSaveContext.equips.buttonItems[3] < 0xF0) {
gDPSetPrimColor(OVERLAY_DISP++, 0, 0, 255, 255, 255, interfaceCtx->cRightAlpha);
gDPSetCombineMode(OVERLAY_DISP++, G_CC_MODULATERGBA_PRIM, G_CC_MODULATERGBA_PRIM);
if (gSaveContext.equips.buttonItems[3] == ITEM_BOW && CVarGetInteger("gHoliday.lilDavid.BombArrows.Active", 0)) {
if (gSaveContext.equips.buttonItems[3] == ITEM_BOW &&
CVarGetInteger("gHoliday.lilDavid.BombArrows.Active", 0)) {
Interface_DrawItemIconTexture(play, gItemIcons[ITEM_BOMB], 3);
}
Interface_DrawItemIconTexture(play, gItemIcons[gSaveContext.equips.buttonItems[3]], 3);
@@ -5698,7 +5697,8 @@ void Interface_Draw(PlayState* play) {
if (gSaveContext.equips.buttonItems[4] < 0xF0) {
gDPSetPrimColor(OVERLAY_DISP++, 0, 0, 255, 255, 255, interfaceCtx->dpadUpAlpha);
gDPSetCombineMode(OVERLAY_DISP++, G_CC_MODULATERGBA_PRIM, G_CC_MODULATERGBA_PRIM);
if (gSaveContext.equips.buttonItems[4] == ITEM_BOW && CVarGetInteger("gHoliday.lilDavid.BombArrows.Active", 0)) {
if (gSaveContext.equips.buttonItems[4] == ITEM_BOW &&
CVarGetInteger("gHoliday.lilDavid.BombArrows.Active", 0)) {
Interface_DrawItemIconTexture(play, gItemIcons[ITEM_BOMB], 4);
}
Interface_DrawItemIconTexture(play, gItemIcons[gSaveContext.equips.buttonItems[4]], 4);
@@ -5712,7 +5712,8 @@ void Interface_Draw(PlayState* play) {
if (gSaveContext.equips.buttonItems[5] < 0xF0) {
gDPSetPrimColor(OVERLAY_DISP++, 0, 0, 255, 255, 255, interfaceCtx->dpadDownAlpha);
gDPSetCombineMode(OVERLAY_DISP++, G_CC_MODULATERGBA_PRIM, G_CC_MODULATERGBA_PRIM);
if (gSaveContext.equips.buttonItems[5] == ITEM_BOW && CVarGetInteger("gHoliday.lilDavid.BombArrows.Active", 0)) {
if (gSaveContext.equips.buttonItems[5] == ITEM_BOW &&
CVarGetInteger("gHoliday.lilDavid.BombArrows.Active", 0)) {
Interface_DrawItemIconTexture(play, gItemIcons[ITEM_BOMB], 5);
}
Interface_DrawItemIconTexture(play, gItemIcons[gSaveContext.equips.buttonItems[5]], 5);
@@ -5726,7 +5727,8 @@ void Interface_Draw(PlayState* play) {
if (gSaveContext.equips.buttonItems[6] < 0xF0) {
gDPSetPrimColor(OVERLAY_DISP++, 0, 0, 255, 255, 255, interfaceCtx->dpadLeftAlpha);
gDPSetCombineMode(OVERLAY_DISP++, G_CC_MODULATERGBA_PRIM, G_CC_MODULATERGBA_PRIM);
if (gSaveContext.equips.buttonItems[6] == ITEM_BOW && CVarGetInteger("gHoliday.lilDavid.BombArrows.Active", 0)) {
if (gSaveContext.equips.buttonItems[6] == ITEM_BOW &&
CVarGetInteger("gHoliday.lilDavid.BombArrows.Active", 0)) {
Interface_DrawItemIconTexture(play, gItemIcons[ITEM_BOMB], 6);
}
Interface_DrawItemIconTexture(play, gItemIcons[gSaveContext.equips.buttonItems[6]], 6);
@@ -5740,7 +5742,8 @@ void Interface_Draw(PlayState* play) {
if (gSaveContext.equips.buttonItems[7] < 0xF0) {
gDPSetPrimColor(OVERLAY_DISP++, 0, 0, 255, 255, 255, interfaceCtx->dpadRightAlpha);
gDPSetCombineMode(OVERLAY_DISP++, G_CC_MODULATERGBA_PRIM, G_CC_MODULATERGBA_PRIM);
if (gSaveContext.equips.buttonItems[7] == ITEM_BOW && CVarGetInteger("gHoliday.lilDavid.BombArrows.Active", 0)) {
if (gSaveContext.equips.buttonItems[7] == ITEM_BOW &&
CVarGetInteger("gHoliday.lilDavid.BombArrows.Active", 0)) {
Interface_DrawItemIconTexture(play, gItemIcons[ITEM_BOMB], 7);
}
Interface_DrawItemIconTexture(play, gItemIcons[gSaveContext.equips.buttonItems[7]], 7);
+13
View File
@@ -12,6 +12,7 @@
#include <stdlib.h>
#include "soh_assets.h"
#include "soh/Enhancements/Holiday/Archez.h"
typedef struct {
/* 0x00 */ u8 flag;
@@ -1391,6 +1392,10 @@ s32 Player_OverrideLimbDrawGameplayDefault(PlayState* play, s32 limbIndex, Gfx**
sLeftHandType = PLAYER_MODELTYPE_LH_CLOSED;
}
if (sLeftHandType != PLAYER_MODELTYPE_LH_OPEN && sLeftHandType != PLAYER_MODELTYPE_LH_CLOSED) {
SkipOverrideNextLimb();
}
*dList = ResourceMgr_LoadGfxByName(dLists[sDListsLodOffset]);
} else if (limbIndex == PLAYER_LIMB_R_HAND) {
Gfx** dLists = this->rightHandDLists;
@@ -1403,8 +1408,13 @@ s32 Player_OverrideLimbDrawGameplayDefault(PlayState* play, s32 limbIndex, Gfx**
sRightHandType = PLAYER_MODELTYPE_RH_CLOSED;
}
if (sRightHandType != PLAYER_MODELTYPE_RH_OPEN && sRightHandType != PLAYER_MODELTYPE_RH_CLOSED) {
SkipOverrideNextLimb();
}
*dList = ResourceMgr_LoadGfxByName(dLists[sDListsLodOffset]);
} else if (limbIndex == PLAYER_LIMB_SHEATH) {
SkipOverrideNextLimb();
Gfx** dLists = this->sheathDLists;
if ((this->sheathType == PLAYER_MODELTYPE_SHEATH_18) || (this->sheathType == PLAYER_MODELTYPE_SHEATH_19)) {
@@ -1468,10 +1478,13 @@ s32 Player_OverrideLimbDrawGameplayFirstPerson(PlayState* play, s32 limbIndex, G
}
*dList = sFirstPersonLeftHandDLs[handOutDlIndex];
} else if (limbIndex == PLAYER_LIMB_R_SHOULDER) {
SkipOverrideNextLimb();
*dList = sFirstPersonRightShoulderDLs[gSaveContext.linkAge];
} else if (limbIndex == PLAYER_LIMB_R_FOREARM) {
SkipOverrideNextLimb();
*dList = sFirstPersonForearmDLs[gSaveContext.linkAge];
} else if (limbIndex == PLAYER_LIMB_R_HAND) {
SkipOverrideNextLimb();
s32 firstPersonWeaponIndex = gSaveContext.linkAge;
if (CVarGetInteger(CVAR_ENHANCEMENT("BowSlingshotAmmoFix"), 0) ||
CVarGetInteger(CVAR_ENHANCEMENT("EquipmentAlwaysVisible"), 0)) {
+43 -18
View File
@@ -5,6 +5,7 @@
#include <assert.h>
#include "soh/ResourceManagerHelpers.h"
#include "soh/Enhancements/game-interactor/GameInteractor_Hooks.h"
#include "soh/Enhancements/Holiday/Archez.h"
#define ANIM_INTERP 1
@@ -45,7 +46,7 @@ void SkelAnime_DrawLimbLod(PlayState* play, s32 limbIndex, void** skeleton, Vec3
if ((overrideLimbDraw == NULL) || !overrideLimbDraw(play, limbIndex, &dList, &pos, &rot, arg)) {
Matrix_TranslateRotateZYX(&pos, &rot);
if (dList != NULL) {
if (GameInteractor_Should(VB_DRAW_SKEL_LIMB, dList != NULL, &POLY_OPA_DISP, dList)) {
gSPMatrix(POLY_OPA_DISP++, MATRIX_NEWMTX(play->state.gfxCtx), G_MTX_LOAD);
gSPDisplayList(POLY_OPA_DISP++, dList);
}
@@ -105,7 +106,7 @@ void SkelAnime_DrawLod(PlayState* play, void** skeleton, Vec3s* jointTable, Over
if ((overrideLimbDraw == NULL) || !overrideLimbDraw(play, 1, &dList, &pos, &rot, arg)) {
Matrix_TranslateRotateZYX(&pos, &rot);
if (dList != NULL) {
if (GameInteractor_Should(VB_DRAW_SKEL_LIMB, dList != NULL, &POLY_OPA_DISP, dList)) {
gSPMatrix(POLY_OPA_DISP++, MATRIX_NEWMTX(play->state.gfxCtx), G_MTX_LOAD);
gSPDisplayList(POLY_OPA_DISP++, dList);
}
@@ -121,6 +122,8 @@ void SkelAnime_DrawLod(PlayState* play, void** skeleton, Vec3s* jointTable, Over
Matrix_Pop();
CLOSE_DISPS(play->state.gfxCtx);
ClearOverrideSkips();
}
/**
@@ -157,8 +160,10 @@ void SkelAnime_DrawFlexLimbLod(PlayState* play, s32 limbIndex, void** skeleton,
MATRIX_TOMTX(*mtx);
{
OPEN_DISPS(play->state.gfxCtx);
gSPMatrix(POLY_OPA_DISP++, *mtx, G_MTX_LOAD);
gSPDisplayList(POLY_OPA_DISP++, newDList);
if (GameInteractor_Should(VB_DRAW_SKEL_LIMB, true, &POLY_OPA_DISP, newDList, *mtx)) {
gSPMatrix(POLY_OPA_DISP++, *mtx, G_MTX_LOAD);
gSPDisplayList(POLY_OPA_DISP++, newDList);
}
CLOSE_DISPS(play->state.gfxCtx);
}
(*mtx)++;
@@ -230,8 +235,10 @@ void SkelAnime_DrawFlexLod(PlayState* play, void** skeleton, Vec3s* jointTable,
if (newDList != NULL) {
MATRIX_TOMTX(mtx);
gDPNoOpString(POLY_OPA_DISP++, "T5ST", 0);
gSPMatrix(POLY_OPA_DISP++, mtx, G_MTX_LOAD);
gSPDisplayList(POLY_OPA_DISP++, newDList);
if (GameInteractor_Should(VB_DRAW_SKEL_LIMB, true, &POLY_OPA_DISP, newDList, *mtx)) {
gSPMatrix(POLY_OPA_DISP++, mtx, G_MTX_LOAD);
gSPDisplayList(POLY_OPA_DISP++, newDList);
}
mtx++;
} else if (limbDList != NULL) {
MATRIX_TOMTX(mtx);
@@ -250,6 +257,8 @@ void SkelAnime_DrawFlexLod(PlayState* play, void** skeleton, Vec3s* jointTable,
Matrix_Pop();
CLOSE_DISPS(play->state.gfxCtx);
ClearOverrideSkips();
}
/**
@@ -275,7 +284,7 @@ void SkelAnime_DrawLimbOpa(PlayState* play, s32 limbIndex, void** skeleton, Vec3
if ((overrideLimbDraw == NULL) || !overrideLimbDraw(play, limbIndex, &dList, &pos, &rot, arg)) {
Matrix_TranslateRotateZYX(&pos, &rot);
if (dList != NULL) {
if (GameInteractor_Should(VB_DRAW_SKEL_LIMB, dList != NULL, &POLY_OPA_DISP, dList)) {
gSPMatrix(POLY_OPA_DISP++, MATRIX_NEWMTX(play->state.gfxCtx), G_MTX_LOAD);
gSPDisplayList(POLY_OPA_DISP++, dList);
}
@@ -356,7 +365,7 @@ void SkelAnime_DrawOpa(PlayState* play, void** skeleton, Vec3s* jointTable, Over
if ((overrideLimbDraw == NULL) || !overrideLimbDraw(play, 1, &dList, &pos, &rot, arg)) {
Matrix_TranslateRotateZYX(&pos, &rot);
if (dList != NULL) {
if (GameInteractor_Should(VB_DRAW_SKEL_LIMB, dList != NULL, &POLY_OPA_DISP, dList)) {
gSPMatrix(POLY_OPA_DISP++, MATRIX_NEWMTX(play->state.gfxCtx), G_MTX_LOAD);
gSPDisplayList(POLY_OPA_DISP++, dList);
}
@@ -373,6 +382,8 @@ void SkelAnime_DrawOpa(PlayState* play, void** skeleton, Vec3s* jointTable, Over
Matrix_Pop();
CLOSE_DISPS(play->state.gfxCtx);
ClearOverrideSkips();
}
/**
@@ -407,8 +418,10 @@ void SkelAnime_DrawFlexLimbOpa(PlayState* play, s32 limbIndex, void** skeleton,
Matrix_TranslateRotateZYX(&pos, &rot);
if (newDList != NULL) {
MATRIX_TOMTX(*limbMatricies);
gSPMatrix(POLY_OPA_DISP++, *limbMatricies, G_MTX_LOAD);
gSPDisplayList(POLY_OPA_DISP++, newDList);
if (GameInteractor_Should(VB_DRAW_SKEL_LIMB, true, &POLY_OPA_DISP, newDList, *limbMatricies)) {
gSPMatrix(POLY_OPA_DISP++, *limbMatricies, G_MTX_LOAD);
gSPDisplayList(POLY_OPA_DISP++, newDList);
}
(*limbMatricies)++;
} else if (limbDList != NULL) {
MATRIX_TOMTX(*limbMatricies);
@@ -476,8 +489,10 @@ void SkelAnime_DrawFlexOpa(PlayState* play, void** skeleton, Vec3s* jointTable,
Matrix_TranslateRotateZYX(&pos, &rot);
if (newDList != NULL) {
MATRIX_TOMTX(mtx);
gSPMatrix(POLY_OPA_DISP++, mtx, G_MTX_LOAD);
gSPDisplayList(POLY_OPA_DISP++, newDList);
if (GameInteractor_Should(VB_DRAW_SKEL_LIMB, true, &POLY_OPA_DISP, newDList, *mtx)) {
gSPMatrix(POLY_OPA_DISP++, mtx, G_MTX_LOAD);
gSPDisplayList(POLY_OPA_DISP++, newDList);
}
mtx++;
} else if (limbDList != NULL) {
MATRIX_TOMTX(mtx);
@@ -496,6 +511,8 @@ void SkelAnime_DrawFlexOpa(PlayState* play, void** skeleton, Vec3s* jointTable,
Matrix_Pop();
CLOSE_DISPS(play->state.gfxCtx);
ClearOverrideSkips();
}
/**
@@ -574,7 +591,7 @@ Gfx* SkelAnime_DrawLimb(PlayState* play, s32 limbIndex, void** skeleton, Vec3s*
if ((overrideLimbDraw == NULL) || !overrideLimbDraw(play, limbIndex, &dList, &pos, &rot, arg, &gfx)) {
Matrix_TranslateRotateZYX(&pos, &rot);
if (dList != NULL) {
if (GameInteractor_Should(VB_DRAW_SKEL_LIMB, dList != NULL, &gfx, dList)) {
gSPMatrix(gfx++, MATRIX_NEWMTX(play->state.gfxCtx), G_MTX_LOAD);
gSPDisplayList(gfx++, dList);
}
@@ -630,7 +647,7 @@ Gfx* SkelAnime_Draw(PlayState* play, void** skeleton, Vec3s* jointTable, Overrid
if ((overrideLimbDraw == NULL) || !overrideLimbDraw(play, 1, &dList, &pos, &rot, arg, &gfx)) {
Matrix_TranslateRotateZYX(&pos, &rot);
if (dList != NULL) {
if (GameInteractor_Should(VB_DRAW_SKEL_LIMB, dList != NULL, &gfx, dList)) {
gSPMatrix(gfx++, MATRIX_NEWMTX(play->state.gfxCtx), G_MTX_LOAD);
gSPDisplayList(gfx++, dList);
}
@@ -646,6 +663,8 @@ Gfx* SkelAnime_Draw(PlayState* play, void** skeleton, Vec3s* jointTable, Overrid
Matrix_Pop();
ClearOverrideSkips();
return gfx;
}
@@ -676,8 +695,10 @@ Gfx* SkelAnime_DrawFlexLimb(PlayState* play, s32 limbIndex, void** skeleton, Vec
Matrix_TranslateRotateZYX(&pos, &rot);
if (newDList != NULL) {
MATRIX_TOMTX(*mtx);
gSPMatrix(gfx++, *mtx, G_MTX_LOAD);
gSPDisplayList(gfx++, newDList);
if (GameInteractor_Should(VB_DRAW_SKEL_LIMB, true, &gfx, newDList, *mtx)) {
gSPMatrix(gfx++, *mtx, G_MTX_LOAD);
gSPDisplayList(gfx++, newDList);
}
(*mtx)++;
} else if (limbDList != NULL) {
MATRIX_TOMTX(*mtx);
@@ -741,8 +762,10 @@ Gfx* SkelAnime_DrawFlex(PlayState* play, void** skeleton, Vec3s* jointTable, s32
Matrix_TranslateRotateZYX(&pos, &rot);
if (newDList != NULL) {
MATRIX_TOMTX(mtx);
gSPMatrix(gfx++, mtx, G_MTX_LOAD);
gSPDisplayList(gfx++, newDList);
if (GameInteractor_Should(VB_DRAW_SKEL_LIMB, true, &gfx, newDList, *mtx)) {
gSPMatrix(gfx++, mtx, G_MTX_LOAD);
gSPDisplayList(gfx++, newDList);
}
mtx++;
} else if (limbDList != NULL) {
MATRIX_TOMTX(mtx);
@@ -759,6 +782,8 @@ Gfx* SkelAnime_DrawFlex(PlayState* play, void** skeleton, Vec3s* jointTable, s32
Matrix_Pop();
ClearOverrideSkips();
return gfx;
}