Merge branch 'develop' of github.com:HarbourMasters/Shipwright into aManchipelago

This commit is contained in:
Garrett
2025-11-16 08:12:13 -06:00
110 changed files with 4961 additions and 1115 deletions
+26 -8
View File
@@ -1256,10 +1256,16 @@ void Actor_Init(Actor* actor, PlayState* play) {
ActorShape_Init(&actor->shape, 0.0f, NULL, 0.0f);
if (Object_IsLoaded(&play->objectCtx, actor->objBankIndex)) {
Actor_SetObjectDependency(play, actor);
actor->init(actor, play);
actor->init = NULL;
GameInteractor_ExecuteOnActorInit(actor);
if (GameInteractor_ShouldActorInit(actor)) {
actor->init(actor, play);
actor->init = NULL;
GameInteractor_ExecuteOnActorInit(actor);
} else {
actor->init = NULL;
Actor_Kill(actor);
}
}
}
@@ -2244,6 +2250,10 @@ void Player_PlaySfx(Actor* actor, u16 sfxId) {
Audio_PlaySoundGeneral(sfxId, &actor->projectedPos, 4, &freqMultiplier, &gSfxDefaultFreqAndVolScale,
&gSfxDefaultReverb);
}
if (actor->id == ACTOR_PLAYER) {
GameInteractor_ExecuteOnPlayerSfx(sfxId);
}
}
void Audio_PlayActorSound2(Actor* actor, u16 sfxId) {
@@ -2624,10 +2634,16 @@ void Actor_UpdateAll(PlayState* play, ActorContext* actorCtx) {
if (actor->init != NULL) {
if (Object_IsLoaded(&play->objectCtx, actor->objBankIndex)) {
Actor_SetObjectDependency(play, actor);
actor->init(actor, play);
actor->init = NULL;
GameInteractor_ExecuteOnActorInit(actor);
if (GameInteractor_ShouldActorInit(actor)) {
actor->init(actor, play);
actor->init = NULL;
GameInteractor_ExecuteOnActorInit(actor);
} else {
actor->init = NULL;
Actor_Kill(actor);
}
}
actor = actor->next;
} else if (!Object_IsLoaded(&play->objectCtx, actor->objBankIndex)) {
@@ -2670,8 +2686,10 @@ void Actor_UpdateAll(PlayState* play, ActorContext* actorCtx) {
if (actor->colorFilterTimer != 0) {
actor->colorFilterTimer--;
}
actor->update(actor, play);
GameInteractor_ExecuteOnActorUpdate(actor);
if (GameInteractor_ShouldActorUpdate(actor)) {
actor->update(actor, play);
GameInteractor_ExecuteOnActorUpdate(actor);
}
func_8003F8EC(play, &play->colCtx.dyna, actor);
}
+3 -12
View File
@@ -1,4 +1,5 @@
#include "global.h"
#include "soh/Enhancements/game-interactor/GameInteractor_Hooks.h"
#include "textures/icon_item_static/icon_item_static.h"
#include "textures/icon_item_24_static/icon_item_24_static.h"
#include "textures/parameter_static/parameter_static.h"
@@ -204,20 +205,10 @@ u8 Inventory_DeleteEquipment(PlayState* play, s16 equipment) {
if (equipment == EQUIP_TYPE_TUNIC) {
gSaveContext.equips.equipment |= EQUIP_VALUE_TUNIC_KOKIRI << (EQUIP_TYPE_TUNIC * 4);
// non-vanilla: remove goron and zora tunics from item buttons if assignable tunics is on
if (CVarGetInteger(CVAR_ENHANCEMENT("AssignableTunicsAndBoots"), 0) &&
equipValue != EQUIP_VALUE_TUNIC_KOKIRI) {
ItemID item = (equipValue == EQUIP_VALUE_TUNIC_GORON ? ITEM_TUNIC_GORON : ITEM_TUNIC_ZORA);
for (int i = 1; i < ARRAY_COUNT(gSaveContext.equips.buttonItems); i++) {
if (gSaveContext.equips.buttonItems[i] == item) {
gSaveContext.equips.buttonItems[i] = ITEM_NONE;
gSaveContext.equips.cButtonSlots[i - 1] = SLOT_NONE;
}
}
}
// end non-vanilla
}
GameInteractor_ExecuteOnEquipmentDelete(equipment, equipValue);
if (equipment == EQUIP_TYPE_SWORD) {
gSaveContext.equips.buttonItems[0] = ITEM_NONE;
gSaveContext.infTable[29] = 1;