mirror of
https://github.com/HarbourMasters/Shipwright.git
synced 2025-08-22 22:33:43 -07:00
Merge pull request #27 from MelonSpeedruns/melon-randomizer
lh sun check done
This commit is contained in:
commit
9c82eaf422
4 changed files with 59 additions and 7 deletions
|
@ -1242,6 +1242,8 @@ GetItemID Randomizer::GetItemFromGet(RandomizerGet randoGet, GetItemID ogItemId)
|
|||
return GI_BOMBCHUS_5;
|
||||
case BOMBCHUS_20:
|
||||
return GI_BOMBCHUS_20;
|
||||
case POCKET_EGG:
|
||||
return GI_POCKET_EGG;
|
||||
case ICE_TRAP:
|
||||
return GI_ICE_TRAP;
|
||||
case PIECE_OF_HEART:
|
||||
|
@ -1538,6 +1540,8 @@ RandomizerCheck Randomizer::GetCheckFromActor(s16 sceneNum, s16 actorId, s16 act
|
|||
} else {
|
||||
return KAK_ANJU_AS_CHILD;
|
||||
}
|
||||
case 359:
|
||||
return KAK_MAN_ON_ROOF;
|
||||
}
|
||||
case 17:
|
||||
switch (actorId) {
|
||||
|
@ -2046,6 +2050,14 @@ RandomizerCheck Randomizer::GetCheckFromActor(s16 sceneNum, s16 actorId, s16 act
|
|||
return GANONS_TOWER_BOSS_KEY_CHEST;
|
||||
}
|
||||
case 87:
|
||||
switch (actorId) {
|
||||
case 271:
|
||||
if (LINK_IS_ADULT) {
|
||||
return LH_SUN;
|
||||
} else {
|
||||
return LH_UNDERWATER_ITEM;
|
||||
}
|
||||
}
|
||||
switch(actorParams) {
|
||||
case 7686:
|
||||
return LH_FREESTANDING_POH;
|
||||
|
|
|
@ -126,7 +126,13 @@ void func_809B0558(EnAni* this, GlobalContext* globalCtx) {
|
|||
}
|
||||
gSaveContext.itemGetInf[1] |= 0x20;
|
||||
} else {
|
||||
func_8002F434(&this->actor, globalCtx, GI_HEART_PIECE, 10000.0f, 200.0f);
|
||||
if (gSaveContext.n64ddFlag) {
|
||||
s32 getItemId =
|
||||
GetRandomizedItemId(GI_HEART_PIECE, this->actor.id, this->actor.params, globalCtx->sceneNum);
|
||||
func_8002F434(&this->actor, globalCtx, getItemId, 10000.0f, 200.0f);
|
||||
} else {
|
||||
func_8002F434(&this->actor, globalCtx, GI_HEART_PIECE, 10000.0f, 200.0f);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -134,7 +140,13 @@ void func_809B05F0(EnAni* this, GlobalContext* globalCtx) {
|
|||
if (Actor_TextboxIsClosing(&this->actor, globalCtx)) {
|
||||
EnAni_SetupAction(this, func_809B0558);
|
||||
}
|
||||
func_8002F434(&this->actor, globalCtx, GI_HEART_PIECE, 10000.0f, 200.0f);
|
||||
|
||||
if (gSaveContext.n64ddFlag) {
|
||||
s32 getItemId = GetRandomizedItemId(GI_HEART_PIECE, this->actor.id, this->actor.params, globalCtx->sceneNum);
|
||||
func_8002F434(&this->actor, globalCtx, getItemId, 10000.0f, 200.0f);
|
||||
} else {
|
||||
func_8002F434(&this->actor, globalCtx, GI_HEART_PIECE, 10000.0f, 200.0f);
|
||||
}
|
||||
}
|
||||
|
||||
void func_809B064C(EnAni* this, GlobalContext* globalCtx) {
|
||||
|
|
|
@ -82,7 +82,8 @@ void ItemEtcetera_Init(Actor* thisx, GlobalContext* globalCtx) {
|
|||
case ITEM_ETC_LETTER:
|
||||
Actor_SetScale(&this->actor, 0.5f);
|
||||
this->futureActionFunc = func_80B858B4;
|
||||
if (gSaveContext.eventChkInf[3] & 2) {
|
||||
if ((gSaveContext.eventChkInf[3] & 2 && !gSaveContext.n64ddFlag) ||
|
||||
(gSaveContext.n64ddFlag && Flags_GetTreasure(globalCtx, 0x1F))) {
|
||||
Actor_Kill(&this->actor);
|
||||
}
|
||||
break;
|
||||
|
@ -122,10 +123,19 @@ void func_80B85824(ItemEtcetera* this, GlobalContext* globalCtx) {
|
|||
if ((this->actor.params & 0xFF) == 1) {
|
||||
gSaveContext.eventChkInf[3] |= 2;
|
||||
Flags_SetSwitch(globalCtx, 0xB);
|
||||
|
||||
if (gSaveContext.n64ddFlag) {
|
||||
Flags_SetTreasure(globalCtx, 0x1E);
|
||||
}
|
||||
}
|
||||
Actor_Kill(&this->actor);
|
||||
} else {
|
||||
func_8002F434(&this->actor, globalCtx, this->getItemId, 30.0f, 50.0f);
|
||||
if (gSaveContext.n64ddFlag) {
|
||||
s32 getItemId = GetRandomizedItemId(GI_ARROW_FIRE, this->actor.id, this->actor.params, globalCtx->sceneNum);
|
||||
func_8002F434(&this->actor, globalCtx, getItemId, 30.0f, 50.0f);
|
||||
} else {
|
||||
func_8002F434(&this->actor, globalCtx, this->getItemId, 30.0f, 50.0f);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -134,11 +144,22 @@ void func_80B858B4(ItemEtcetera* this, GlobalContext* globalCtx) {
|
|||
if ((this->actor.params & 0xFF) == 1) {
|
||||
gSaveContext.eventChkInf[3] |= 2;
|
||||
Flags_SetSwitch(globalCtx, 0xB);
|
||||
|
||||
if (gSaveContext.n64ddFlag) {
|
||||
Flags_SetTreasure(globalCtx, 0x1F);
|
||||
}
|
||||
}
|
||||
Actor_Kill(&this->actor);
|
||||
} else {
|
||||
if (0) {} // Necessary to match
|
||||
func_8002F434(&this->actor, globalCtx, this->getItemId, 30.0f, 50.0f);
|
||||
|
||||
if (gSaveContext.n64ddFlag) {
|
||||
s32 getItemId = GetRandomizedItemId(GI_LETTER_RUTO, this->actor.id, this->actor.params, globalCtx->sceneNum);
|
||||
func_8002F434(&this->actor, globalCtx, getItemId, 30.0f, 50.0f);
|
||||
} else {
|
||||
func_8002F434(&this->actor, globalCtx, this->getItemId, 30.0f, 50.0f);
|
||||
}
|
||||
|
||||
if ((globalCtx->gameplayFrames & 0xD) == 0) {
|
||||
EffectSsBubble_Spawn(globalCtx, &this->actor.world.pos, 0.0f, 0.0f, 10.0f, 0.13f);
|
||||
}
|
||||
|
@ -211,8 +232,14 @@ void ItemEtcetera_DrawThroughLens(Actor* thisx, GlobalContext* globalCtx) {
|
|||
|
||||
void ItemEtcetera_Draw(Actor* thisx, GlobalContext* globalCtx) {
|
||||
ItemEtcetera* this = (ItemEtcetera*)thisx;
|
||||
s32 type = this->actor.params & 0xFF;
|
||||
|
||||
if (gSaveContext.n64ddFlag && (type == ITEM_ETC_ARROW_FIRE || type == ITEM_ETC_LETTER)) {
|
||||
this->giDrawId = GetItemModelFromId(
|
||||
GetRandomizedItemId(this->getItemId, this->actor.id, this->actor.params, globalCtx->sceneNum));
|
||||
}
|
||||
|
||||
func_8002EBCC(&this->actor, globalCtx, 0);
|
||||
func_8002ED80(&this->actor, globalCtx, 0);
|
||||
GetItem_Draw(globalCtx, this->giDrawId);
|
||||
}
|
||||
}
|
|
@ -162,7 +162,8 @@ void ShotSun_UpdateHyliaSun(ShotSun* this, GlobalContext* globalCtx) {
|
|||
if (this->collider.base.acFlags & AC_HIT) {
|
||||
func_80078884(NA_SE_SY_CORRECT_CHIME);
|
||||
osSyncPrintf(VT_FGCOL(CYAN) "SHOT_SUN HIT!!!!!!!\n" VT_RST);
|
||||
if (INV_CONTENT(ITEM_ARROW_FIRE) == ITEM_NONE) {
|
||||
if ((INV_CONTENT(ITEM_ARROW_FIRE) == ITEM_NONE && !gSaveContext.n64ddFlag) ||
|
||||
!Flags_GetTreasure(globalCtx, 0x1F)) {
|
||||
Actor_Spawn(&globalCtx->actorCtx, globalCtx, ACTOR_ITEM_ETCETERA, 700.0f, -800.0f, 7261.0f, 0, 0, 0, 7);
|
||||
globalCtx->csCtx.segment = SEGMENTED_TO_VIRTUAL(gLakeHyliaFireArrowsCS);
|
||||
if (1) {}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue