Merge branch 'develop-blair' of github.com:Malkierian/Shipwright into develop

This commit is contained in:
Malkierian
2025-06-12 17:21:23 -07:00
49 changed files with 900 additions and 763 deletions

View File

@@ -131,8 +131,14 @@ void func_808BAF40(BgTokiSwd* this, PlayState* play) {
Item_Give(play, ITEM_SWORD_MASTER);
}
play->csCtx.segment = D_808BB2F0;
// Discover adult spawn
Entrance_SetEntranceDiscovered(ENTR_HYRULE_FIELD_10, false);
} else {
play->csCtx.segment = D_808BB7A0;
// Discover child spawn
Entrance_SetEntranceDiscovered(ENTR_LINKS_HOUSE_CHILD_SPAWN, false);
}
Audio_QueueSeqCmd(SEQ_PLAYER_BGM_MAIN << 24 | NA_BGM_STOP);
Audio_QueueSeqCmd(SEQ_PLAYER_BGM_MAIN << 24 | NA_BGM_MASTER_SWORD);

View File

@@ -303,7 +303,7 @@ void EnMb_Init(Actor* thisx, PlayState* play) {
relYawFromPlayer =
this->actor.world.rot.y - Math_Vec3f_Yaw(&this->actor.world.pos, &player->actor.world.pos);
if (ABS(relYawFromPlayer) > 0x4000) {
if (ABS(relYawFromPlayer) > 0x4000 && !CVarGetInteger(CVAR_ENHANCEMENT("RandomizedEnemies"), 0)) {
this->actor.world.rot.y = thisx->world.rot.y + 0x8000;
this->actor.shape.rot.y = thisx->world.rot.y;
this->actor.world.pos.z = thisx->world.pos.z + 600.0f;

View File

@@ -507,7 +507,7 @@ void EnRr_CollisionCheck(EnRr* this, PlayState* play) {
this->collider2.base.ocFlags1 &= ~OC1_HIT;
// "catch"
osSyncPrintf(VT_FGCOL(GREEN) "キャッチ(%d)" VT_RST "\n", this->frameCount);
if (play->grabPlayer(play, player)) {
if (GameInteractor_Should(VB_LIKE_LIKE_GRAB_PLAYER, true, this) && play->grabPlayer(play, player)) {
player->actor.parent = &this->actor;
this->stopScroll = false;
EnRr_SetupGrabPlayer(this, player);

View File

@@ -706,7 +706,7 @@ void EnTorch2_Update(Actor* thisx, PlayState* play2) {
sStaggerCount = 0;
}
}
if (player->linearVelocity == -18.0f) {
if (GameInteractor_Should(VB_TORCH2_HANDLE_CLANKING, player->linearVelocity == -18.0f, this)) {
if (this->actor.xzDistToPlayer > 80.0f) {
player->linearVelocity = 1.2f;
} else if (this->actor.xzDistToPlayer < 70.0f) {

View File

@@ -4764,7 +4764,9 @@ s32 func_808382DC(Player* this, PlayState* play) {
gSaveContext.respawn[RESPAWN_MODE_DOWN].yaw = respawnInfo->yaw;
}
Play_TriggerVoidOut(play);
if (GameInteractor_Should(VB_TRIGGER_VOIDOUT, true, this)) {
Play_TriggerVoidOut(play);
}
}
Player_PlayVoiceSfx(this, NA_SE_VO_LI_TAKEN_AWAY);
@@ -5129,7 +5131,9 @@ s32 Player_HandleExitsAndVoids(PlayState* play, Player* this, CollisionPoly* pol
}
if (exitIndex == 0) {
Play_TriggerVoidOut(play);
if (GameInteractor_Should(VB_TRIGGER_VOIDOUT, true, this)) {
Play_TriggerVoidOut(play);
}
Scene_SetTransitionForNextEntrance(play);
} else {
play->nextEntranceIndex = play->setupExitList[exitIndex - 1];
@@ -5163,7 +5167,9 @@ s32 Player_HandleExitsAndVoids(PlayState* play, Player* this, CollisionPoly* pol
SurfaceType_GetSlope(&play->colCtx, poly, bgId) == 2,
play->setupExitList[exitIndex - 1])) {
gSaveContext.respawn[RESPAWN_MODE_DOWN].entranceIndex = play->nextEntranceIndex;
Play_TriggerVoidOut(play);
if (GameInteractor_Should(VB_TRIGGER_VOIDOUT, true, this)) {
Play_TriggerVoidOut(play);
}
gSaveContext.respawnFlag = -2;
}
gSaveContext.retainWeatherMode = 1;
@@ -5226,7 +5232,7 @@ s32 Player_HandleExitsAndVoids(PlayState* play, Player* this, CollisionPoly* pol
if (this->actor.bgCheckFlags & 1) {
if (this->floorProperty == 5) {
Play_TriggerRespawn(play);
} else {
} else if (GameInteractor_Should(VB_TRIGGER_VOIDOUT, true, this)) {
Play_TriggerVoidOut(play);
}
play->transitionType = TRANS_TYPE_FADE_BLACK_FAST;
@@ -9584,6 +9590,10 @@ static FallImpactInfo D_80854600[] = {
s32 func_80843E64(PlayState* play, Player* this) {
s32 sp34;
if (!GameInteractor_Should(VB_RECIEVE_FALL_DAMAGE, true, this)) {
return 0;
}
if ((sFloorType == 6) || (sFloorType == 9)) {
sp34 = 0;
} else {
@@ -14977,7 +14987,7 @@ void Player_Action_8084F88C(Player* this, PlayState* play) {
if (IS_RANDO && Randomizer_GetSettingValue(RSK_SHUFFLE_ENTRANCES)) {
Grotto_ForceRegularVoidOut();
}
} else {
} else if (GameInteractor_Should(VB_TRIGGER_VOIDOUT, true, this)) {
Play_TriggerVoidOut(play);
}

View File

@@ -26,6 +26,7 @@
#include "soh/SaveManager.h"
#include "soh/OTRGlobals.h"
#include "soh/ResourceManagerHelpers.h"
#include "soh/ShipUtils.h"
typedef struct {
s16 left;
@@ -1053,20 +1054,27 @@ void FileChoose_UpdateRandomizer() {
if (!SpoilerFileExists(CVarGetString(CVAR_GENERAL("SpoilerLog"), "")) &&
!CVarGetInteger(CVAR_RANDOMIZER_SETTING("DontGenerateSpoiler"), 0)) {
CVarSetString(CVAR_GENERAL("SpoilerLog"), "");
Randomizer_SetSpoilerLoaded(false);
}
if (CVarGetInteger(CVAR_GENERAL("RandomizerNewFileDropped"), 0) != 0 ||
!(Randomizer_IsSeedGenerated() || Randomizer_IsSpoilerLoaded()) &&
SpoilerFileExists(CVarGetString(CVAR_GENERAL("SpoilerLog"), "")) && !fileSelectSpoilerFileLoaded) {
if (CVarGetInteger(CVAR_GENERAL("RandomizerNewFileDropped"), 0) != 0) {
CVarSetString(CVAR_GENERAL("SpoilerLog"), CVarGetString(CVAR_GENERAL("RandomizerDroppedFile"), ""));
Audio_PlayFanfare(NA_BGM_HORSE_GOAL);
if (SpoilerFileExists(CVarGetString(CVAR_GENERAL("RandomizerDroppedFile"), ""))) {
CVarSetString(CVAR_GENERAL("SpoilerLog"), CVarGetString(CVAR_GENERAL("RandomizerDroppedFile"), ""));
Sfx_PlaySfxCentered(NA_SE_SY_CORRECT_CHIME);
} else {
Sfx_PlaySfxCentered(NA_SE_SY_ERROR);
}
}
const char* fileLoc = CVarGetString(CVAR_GENERAL("SpoilerLog"), "");
CVarSetInteger(CVAR_GENERAL("RandomizerNewFileDropped"), 0);
CVarSetString(CVAR_GENERAL("RandomizerDroppedFile"), "");
Randomizer_ParseSpoiler(fileLoc);
fileSelectSpoilerFileLoaded = true;
if (!Ship_IsCStringEmpty(fileLoc)) {
Randomizer_ParseSpoiler(fileLoc);
fileSelectSpoilerFileLoaded = true;
}
if (SpoilerFileExists(CVarGetString(CVAR_GENERAL("SpoilerLog"), "")) &&
CVarGetInteger(CVAR_RANDOMIZER_SETTING("DontGenerateSpoiler"), 0)) {