mirror of
https://github.com/HarbourMasters/Shipwright.git
synced 2024-12-26 10:08:51 -05:00
Introduce some new methods and migrate most actors to them
This commit is contained in:
parent
06b1074e2a
commit
170b297a7a
@ -452,7 +452,9 @@ u32 Actor_TextboxIsClosing(Actor* actor, GlobalContext* globalCtx);
|
||||
s8 func_8002F368(GlobalContext* globalCtx);
|
||||
void Actor_GetScreenPos(GlobalContext* globalCtx, Actor* actor, s16* x, s16* y);
|
||||
u32 Actor_HasParent(Actor* actor, GlobalContext* globalCtx);
|
||||
s32 GiveItemWithoutActor(GlobalContext* globalCtx, s32 getItemId);
|
||||
s32 GiveItemEntryWithoutActor(GlobalContext* globalCtx, GetItemEntry getItemEntry);
|
||||
s32 GiveItemEntryFromActor(Actor* actor, GlobalContext* globalCtx, GetItemEntry getItemEntry, f32 xzRange, f32 yRange);
|
||||
void GiveItemEntryFromActorWithFixedRange(Actor* actor, GlobalContext* globalCtx, GetItemEntry getItemEntry);
|
||||
s32 func_8002F434(Actor* actor, GlobalContext* globalCtx, s32 getItemId, f32 xzRange, f32 yRange);
|
||||
void func_8002F554(Actor* actor, GlobalContext* globalCtx, s32 getItemId);
|
||||
void func_8002F580(Actor* actor, GlobalContext* globalCtx);
|
||||
|
@ -1955,15 +1955,16 @@ u32 Actor_HasParent(Actor* actor, GlobalContext* globalCtx) {
|
||||
}
|
||||
}
|
||||
|
||||
s32 GiveItemWithoutActor(GlobalContext* globalCtx, s32 getItemId) {
|
||||
s32 GiveItemEntryWithoutActor(GlobalContext* globalCtx, GetItemEntry getItemEntry) {
|
||||
Player* player = GET_PLAYER(globalCtx);
|
||||
|
||||
if (!(player->stateFlags1 & 0x3C7080) && Player_GetExplosiveHeld(player) < 0) {
|
||||
if (((player->heldActor != NULL) && ((getItemId > GI_NONE) && (getItemId < GI_MAX)) ||
|
||||
(gSaveContext.n64ddFlag && (getItemId > RG_NONE) && (getItemId < RG_MAX))) ||
|
||||
if (((player->heldActor != NULL) && ((getItemEntry.getItemId > GI_NONE) && (getItemEntry.getItemId < GI_MAX)) ||
|
||||
(gSaveContext.n64ddFlag && (getItemEntry.getItemId > RG_NONE) && (getItemEntry.getItemId < RG_MAX))) ||
|
||||
(!(player->stateFlags1 & 0x20000800))) {
|
||||
if ((getItemId != GI_NONE)) {
|
||||
player->getItemId = getItemId;
|
||||
if ((getItemEntry.getItemId != GI_NONE)) {
|
||||
player->getItemEntry = getItemEntry;
|
||||
player->getItemId = getItemEntry.getItemId;
|
||||
player->interactRangeActor = &player->actor;
|
||||
player->getItemDirection = player->actor.shape.rot.y;
|
||||
return true;
|
||||
@ -1974,6 +1975,37 @@ s32 GiveItemWithoutActor(GlobalContext* globalCtx, s32 getItemId) {
|
||||
return false;
|
||||
}
|
||||
|
||||
s32 GiveItemEntryFromActor(Actor* actor, GlobalContext* globalCtx, GetItemEntry getItemEntry, f32 xzRange, f32 yRange) {
|
||||
Player* player = GET_PLAYER(globalCtx);
|
||||
|
||||
if (!(player->stateFlags1 & 0x3C7080) && Player_GetExplosiveHeld(player) < 0) {
|
||||
if ((((player->heldActor != NULL) || (actor == player->targetActor)) &&
|
||||
((!gSaveContext.n64ddFlag && ((getItemEntry.getItemId > GI_NONE) && (getItemEntry.getItemId < GI_MAX))) || (gSaveContext.n64ddFlag && ((getItemEntry.getItemId > RG_NONE) && (getItemEntry.getItemId < RG_MAX))))) ||
|
||||
(!(player->stateFlags1 & 0x20000800))) {
|
||||
if ((actor->xzDistToPlayer < xzRange) && (fabsf(actor->yDistToPlayer) < yRange)) {
|
||||
s16 yawDiff = actor->yawTowardsPlayer - player->actor.shape.rot.y;
|
||||
s32 absYawDiff = ABS(yawDiff);
|
||||
|
||||
if ((getItemEntry.getItemId != GI_NONE) || (player->getItemDirection < absYawDiff)) {
|
||||
player->getItemEntry = getItemEntry;
|
||||
player->getItemId = getItemEntry.getItemId;
|
||||
player->interactRangeActor = actor;
|
||||
player->getItemDirection = absYawDiff;
|
||||
return true;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
return false;
|
||||
}
|
||||
|
||||
void GiveItemEntryFromActorWithFixedRange(Actor* actor, GlobalContext* globalCtx, GetItemEntry getItemEntry) {
|
||||
GiveItemEntryFromActor(actor, globalCtx, getItemEntry, 50.0f, 10.0f);
|
||||
}
|
||||
|
||||
// TODO: Rename to GiveItemIdFromActor or similar
|
||||
// If you're doing something for randomizer, you're probably looking for GiveItemEntryFromActor
|
||||
s32 func_8002F434(Actor* actor, GlobalContext* globalCtx, s32 getItemId, f32 xzRange, f32 yRange) {
|
||||
Player* player = GET_PLAYER(globalCtx);
|
||||
|
||||
@ -1998,6 +2030,8 @@ s32 func_8002F434(Actor* actor, GlobalContext* globalCtx, s32 getItemId, f32 xzR
|
||||
return false;
|
||||
}
|
||||
|
||||
// TODO: Rename to GiveItemIdFromActorWithFixedRange or similar
|
||||
// If you're doing something for randomizer, you're probably looking for GiveItemEntryFromActorWithFixedRange
|
||||
void func_8002F554(Actor* actor, GlobalContext* globalCtx, s32 getItemId) {
|
||||
func_8002F434(actor, globalCtx, getItemId, 50.0f, 10.0f);
|
||||
}
|
||||
|
@ -202,7 +202,7 @@ void GivePlayerRandoRewardSongOfTime(GlobalContext* globalCtx, RandomizerCheck c
|
||||
if (gSaveContext.entranceIndex == 0x050F && player != NULL && !Player_InBlockingCsMode(globalCtx, player) &&
|
||||
!Flags_GetTreasure(globalCtx, 0x1F) && gSaveContext.nextTransition == 0xFF) {
|
||||
GetItemEntry getItemEntry = Randomizer_GetItemFromKnownCheck(check, RG_SONG_OF_TIME);
|
||||
GiveItemWithoutActor(globalCtx, getItemEntry.getItemId);
|
||||
GiveItemEntryWithoutActor(globalCtx, getItemEntry);
|
||||
player->pendingFlag.flagID = 0x1F;
|
||||
player->pendingFlag.flagType = FLAG_SCENE_TREASURE;
|
||||
}
|
||||
@ -217,7 +217,7 @@ void GivePlayerRandoRewardNocturne(GlobalContext* globalCtx, RandomizerCheck che
|
||||
CHECK_QUEST_ITEM(QUEST_MEDALLION_FIRE) && CHECK_QUEST_ITEM(QUEST_MEDALLION_WATER) && player != NULL &&
|
||||
!Player_InBlockingCsMode(globalCtx, player) && !Flags_GetEventChkInf(0xAA)) {
|
||||
GetItemEntry getItemEntry = Randomizer_GetItemFromKnownCheck(check, RG_NOCTURNE_OF_SHADOW);
|
||||
GiveItemWithoutActor(globalCtx, getItemEntry.getItemId);
|
||||
GiveItemEntryWithoutActor(globalCtx, getItemEntry);
|
||||
Flags_SetEventChkInf(0xAA);
|
||||
}
|
||||
}
|
||||
@ -229,7 +229,7 @@ void GivePlayerRandoRewardRequiem(GlobalContext* globalCtx, RandomizerCheck chec
|
||||
if ((gSaveContext.entranceIndex == 0x01E1) && !Flags_GetEventChkInf(0xAC) && player != NULL &&
|
||||
!Player_InBlockingCsMode(globalCtx, player)) {
|
||||
GetItemEntry getItemEntry = Randomizer_GetItemFromKnownCheck(check, RG_SONG_OF_TIME);
|
||||
GiveItemWithoutActor(globalCtx, getItemEntry.getItemId);
|
||||
GiveItemEntryWithoutActor(globalCtx, getItemEntry);
|
||||
Flags_SetEventChkInf(0xAC);
|
||||
}
|
||||
}
|
||||
@ -243,8 +243,7 @@ void GivePlayerRandoRewardZeldaLightArrowsGift(GlobalContext* globalCtx, Randomi
|
||||
!Flags_GetTreasure(globalCtx, 0x1E) && player != NULL && !Player_InBlockingCsMode(globalCtx, player) &&
|
||||
globalCtx->sceneLoadFlag == 0) {
|
||||
GetItemEntry getItem = Randomizer_GetItemFromKnownCheck(check, GI_ARROW_LIGHT);
|
||||
if (player->pendingFlag.flagType == FLAG_NONE && GiveItemWithoutActor(globalCtx, getItem.getItemId)) {
|
||||
player->getItemEntry = getItem;
|
||||
if (player->pendingFlag.flagType == FLAG_NONE && GiveItemEntryWithoutActor(globalCtx, getItem)) {
|
||||
player->pendingFlag.flagID = 0x1E;
|
||||
player->pendingFlag.flagType = FLAG_SCENE_TREASURE;
|
||||
}
|
||||
@ -258,7 +257,7 @@ void GivePlayerRandoRewardSariaGift(GlobalContext* globalCtx, RandomizerCheck ch
|
||||
|
||||
if ((!Flags_GetEventChkInf(0xC1) || (player->getItemId == getItemEntry.getItemId && getItemEntry.getItemId != GI_ICE_TRAP)) &&
|
||||
player != NULL && !Player_InBlockingCsMode(globalCtx, player)) {
|
||||
GiveItemWithoutActor(globalCtx, getItemEntry.getItemId);
|
||||
GiveItemEntryWithoutActor(globalCtx, getItemEntry);
|
||||
Flags_SetEventChkInf(0xC1);
|
||||
}
|
||||
}
|
||||
|
@ -77,7 +77,7 @@ void GivePlayerRandoRewardGreatFairy(BgDyYoseizo* this, GlobalContext* globalCtx
|
||||
Flags_SetTreasure(globalCtx, this->fountainType + 1);
|
||||
Actor_Kill(&this->actor);
|
||||
} else if (!Flags_GetTreasure(globalCtx, this->fountainType + 1)) {
|
||||
func_8002F434(&this->actor, globalCtx, getItemEntry.getItemId, 10000.0f, 100.0f);
|
||||
GiveItemEntryFromActor(&this->actor, globalCtx, getItemEntry, 10000.0f, 100.0f);
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -905,7 +905,7 @@ void GivePlayerRandoRewardImpa(Actor* impa, GlobalContext* globalCtx, Randomizer
|
||||
!Flags_GetTreasure(globalCtx, 0x1F)) {
|
||||
Flags_SetTreasure(globalCtx, 0x1F);
|
||||
} else if (!Flags_GetTreasure(globalCtx, 0x1F) && !Randomizer_GetSettingValue(RSK_SKIP_CHILD_ZELDA)) {
|
||||
func_8002F434(impa, globalCtx, getItemEntry.getItemId, 75.0f, 50.0f);
|
||||
GiveItemEntryFromActor(impa, globalCtx, getItemEntry, 75.0f, 50.0f);
|
||||
} else if (!Player_InBlockingCsMode(globalCtx, GET_PLAYER(globalCtx))) {
|
||||
gSaveContext.eventChkInf[5] |= 0x200;
|
||||
globalCtx->sceneLoadFlag = 0x14;
|
||||
|
@ -468,7 +468,7 @@ void GivePlayerRandoReward(DoorWarp1* this, Player* player, GlobalContext* globa
|
||||
!Flags_GetTreasure(globalCtx, 0x1F)) {
|
||||
Flags_SetTreasure(globalCtx, 0x1F);
|
||||
} else if (!Flags_GetTreasure(globalCtx, 0x1F)) {
|
||||
func_8002F434(&this->actor, globalCtx, getItemEntry.getItemId, 10000.0f, 100.0f);
|
||||
GiveItemEntryFromActor(&this->actor, globalCtx, getItemEntry, 10000.0f, 100.0f);
|
||||
} else if (!Player_InBlockingCsMode(globalCtx, GET_PLAYER(globalCtx))) {
|
||||
if (adult) {
|
||||
OnePointCutscene_Init(globalCtx, 0x25E8, 999, &this->actor, MAIN_CAM);
|
||||
|
@ -126,11 +126,11 @@ void func_809B0558(EnAni* this, GlobalContext* globalCtx) {
|
||||
}
|
||||
gSaveContext.itemGetInf[1] |= 0x20;
|
||||
} else {
|
||||
if (gSaveContext.n64ddFlag) {
|
||||
GetItemEntry getItemEntry = Randomizer_GetItemFromKnownCheck(RC_KAK_MAN_ON_ROOF, GI_HEART_PIECE);
|
||||
func_8002F434(&this->actor, globalCtx, getItemEntry.getItemId, 10000.0f, 200.0f);
|
||||
} else {
|
||||
if (!gSaveContext.n64ddFlag) {
|
||||
func_8002F434(&this->actor, globalCtx, GI_HEART_PIECE, 10000.0f, 200.0f);
|
||||
} else {
|
||||
GetItemEntry getItemEntry = Randomizer_GetItemFromKnownCheck(RC_KAK_MAN_ON_ROOF, GI_HEART_PIECE);
|
||||
GiveItemEntryFromActor(&this->actor, globalCtx, getItemEntry, 10000.0f, 200.0f);
|
||||
}
|
||||
}
|
||||
}
|
||||
@ -140,11 +140,11 @@ void func_809B05F0(EnAni* this, GlobalContext* globalCtx) {
|
||||
EnAni_SetupAction(this, func_809B0558);
|
||||
}
|
||||
|
||||
if (gSaveContext.n64ddFlag) {
|
||||
GetItemEntry getItemEntry = Randomizer_GetItemFromKnownCheck(RC_KAK_MAN_ON_ROOF, GI_HEART_PIECE);
|
||||
func_8002F434(&this->actor, globalCtx, getItemEntry.getItemId, 10000.0f, 200.0f);
|
||||
} else {
|
||||
if (!gSaveContext.n64ddFlag) {
|
||||
func_8002F434(&this->actor, globalCtx, GI_HEART_PIECE, 10000.0f, 200.0f);
|
||||
} else {
|
||||
GetItemEntry getItemEntry = Randomizer_GetItemFromKnownCheck(RC_KAK_MAN_ON_ROOF, GI_HEART_PIECE);
|
||||
GiveItemEntryFromActor(&this->actor, globalCtx, getItemEntry, 10000.0f, 200.0f);
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -457,7 +457,7 @@ void func_809EEA00(EnDivingGame* this, GlobalContext* globalCtx) {
|
||||
func_8002F434(&this->actor, globalCtx, GI_SCALE_SILVER, 90.0f, 10.0f);
|
||||
} else {
|
||||
GetItemEntry getItemEntry = Randomizer_GetItemFromKnownCheck(RC_ZD_DIVING_MINIGAME, GI_SCALE_SILVER);
|
||||
func_8002F434(&this->actor, globalCtx, getItemEntry.getItemId, 90.0f, 10.0f);
|
||||
GiveItemEntryFromActor(&this->actor, globalCtx, getItemEntry, 90.0f, 10.0f);
|
||||
}
|
||||
this->actionFunc = func_809EEA90;
|
||||
}
|
||||
@ -472,7 +472,7 @@ void func_809EEA90(EnDivingGame* this, GlobalContext* globalCtx) {
|
||||
func_8002F434(&this->actor, globalCtx, GI_SCALE_SILVER, 90.0f, 10.0f);
|
||||
} else {
|
||||
GetItemEntry getItemEntry = Randomizer_GetItemFromKnownCheck(RC_ZD_DIVING_MINIGAME, GI_SCALE_SILVER);
|
||||
func_8002F434(&this->actor, globalCtx, getItemEntry.getItemId, 90.0f, 10.0f);
|
||||
GiveItemEntryFromActor(&this->actor, globalCtx, getItemEntry, 90.0f, 10.0f);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -372,7 +372,7 @@ void func_809EFDD0(EnDns* this, GlobalContext* globalCtx) {
|
||||
if (this->actor.params == 0x9) {
|
||||
if (gSaveContext.n64ddFlag) {
|
||||
GetItemEntry getItemEntry = Randomizer_GetRandomizedItem(GI_STICK_UPGRADE_30, this->actor.id, this->actor.params, globalCtx->sceneNum);
|
||||
func_8002F434(&this->actor, globalCtx, getItemEntry.getItemId, 130.0f, 100.0f);
|
||||
GiveItemEntryFromActor(&this->actor, globalCtx, getItemEntry, 130.0f, 100.0f);
|
||||
} else if (CUR_UPG_VALUE(UPG_STICKS) < 2) {
|
||||
func_8002F434(&this->actor, globalCtx, GI_STICK_UPGRADE_20, 130.0f, 100.0f);
|
||||
} else {
|
||||
@ -381,7 +381,7 @@ void func_809EFDD0(EnDns* this, GlobalContext* globalCtx) {
|
||||
} else if (this->actor.params == 0xA) {
|
||||
if (gSaveContext.n64ddFlag) {
|
||||
GetItemEntry getItemEntry = Randomizer_GetRandomizedItem(GI_NUT_UPGRADE_40, this->actor.id, this->actor.params, globalCtx->sceneNum);
|
||||
func_8002F434(&this->actor, globalCtx, getItemEntry.getItemId, 130.0f, 100.0f);
|
||||
GiveItemEntryFromActor(&this->actor, globalCtx, getItemEntry, 130.0f, 100.0f);
|
||||
} else if (CUR_UPG_VALUE(UPG_NUTS) < 2) {
|
||||
func_8002F434(&this->actor, globalCtx, GI_NUT_UPGRADE_30, 130.0f, 100.0f);
|
||||
} else {
|
||||
@ -392,7 +392,7 @@ void func_809EFDD0(EnDns* this, GlobalContext* globalCtx) {
|
||||
func_8002F434(&this->actor, globalCtx, this->dnsItemEntry->getItemId, 130.0f, 100.0f);
|
||||
} else {
|
||||
GetItemEntry getItemEntry = Randomizer_GetRandomizedItem(this->dnsItemEntry->getItemId, this->actor.id, this->actor.params, globalCtx->sceneNum);
|
||||
func_8002F434(&this->actor, globalCtx, getItemEntry.getItemId, 130.0f, 100.0f);
|
||||
GiveItemEntryFromActor(&this->actor, globalCtx, getItemEntry, 130.0f, 100.0f);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -140,14 +140,14 @@ void EnDntDemo_Judge(EnDntDemo* this, GlobalContext* globalCtx) {
|
||||
case PLAYER_MASK_SKULL:
|
||||
if (!Flags_GetTreasure(globalCtx, 0x1F)) {
|
||||
GetItemEntry getItemEntry = Randomizer_GetItemFromKnownCheck(RC_DEKU_THEATER_SKULL_MASK, GI_STICK_UPGRADE_30);
|
||||
GiveItemWithoutActor(globalCtx, getItemEntry.getItemId);
|
||||
GiveItemEntryWithoutActor(globalCtx, getItemEntry);
|
||||
Flags_SetTreasure(globalCtx, 0x1F);
|
||||
}
|
||||
break;
|
||||
case PLAYER_MASK_TRUTH:
|
||||
if (!Flags_GetTreasure(globalCtx, 0x1E)) {
|
||||
GetItemEntry getItemEntry = Randomizer_GetItemFromKnownCheck(RC_DEKU_THEATER_MASK_OF_TRUTH, GI_NUT_UPGRADE_40);
|
||||
GiveItemWithoutActor(globalCtx, getItemEntry.getItemId);
|
||||
GiveItemEntryWithoutActor(globalCtx, getItemEntry);
|
||||
Flags_SetTreasure(globalCtx, 0x1E);
|
||||
}
|
||||
break;
|
||||
|
@ -552,7 +552,7 @@ void func_809FEC70(EnDu* this, GlobalContext* globalCtx) {
|
||||
func_8002F434(&this->actor, globalCtx, GI_BRACELET, xzRange, fabsf(this->actor.yDistToPlayer) + 1.0f);
|
||||
} else {
|
||||
GetItemEntry getItemEntry = Randomizer_GetItemFromKnownCheck(RC_GC_DARUNIAS_JOY, GI_BRACELET);
|
||||
func_8002F434(&this->actor, globalCtx, getItemEntry.getItemId, xzRange, fabsf(this->actor.yDistToPlayer) + 1.0f);
|
||||
GiveItemEntryFromActor(&this->actor, globalCtx, getItemEntry, xzRange, fabsf(this->actor.yDistToPlayer) + 1.0f);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -155,7 +155,7 @@ void GivePlayerRandoRewardSongOfStorms(EnFu* windmillGuy, GlobalContext* globalC
|
||||
windmillGuy->actionFunc = func_80A1DBD4;
|
||||
} else if (!Flags_GetTreasure(globalCtx, 0x1F)) {
|
||||
GetItemEntry getItemEntry = Randomizer_GetItemFromKnownCheck(check, RG_SONG_OF_STORMS);
|
||||
func_8002F434(&windmillGuy->actor, globalCtx, getItemEntry.getItemId, 10000.0f, 100.0f);
|
||||
GiveItemEntryFromActor(&windmillGuy->actor, globalCtx, getItemEntry, 10000.0f, 100.0f);
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -357,7 +357,7 @@ void func_80A2FB40(EnGb* this, GlobalContext* globalCtx) {
|
||||
func_8002F434(&this->dyna.actor, globalCtx, GI_BOTTLE, 100.0f, 10.0f);
|
||||
} else {
|
||||
GetItemEntry getItemEntry = Randomizer_GetItemFromKnownCheck(RC_MARKET_10_BIG_POES, GI_BOTTLE);
|
||||
func_8002F434(&this->dyna.actor, globalCtx, getItemEntry.getItemId, 100.0f, 10.0f);
|
||||
GiveItemEntryFromActor(&this->dyna.actor, globalCtx, getItemEntry, 100.0f, 10.0f);
|
||||
}
|
||||
this->actionFunc = func_80A2FBB0;
|
||||
}
|
||||
@ -372,7 +372,7 @@ void func_80A2FBB0(EnGb* this, GlobalContext* globalCtx) {
|
||||
func_8002F434(&this->dyna.actor, globalCtx, GI_BOTTLE, 100.0f, 10.0f);
|
||||
} else {
|
||||
GetItemEntry getItemEntry = Randomizer_GetItemFromKnownCheck(RC_MARKET_10_BIG_POES, GI_BOTTLE);
|
||||
func_8002F434(&this->dyna.actor, globalCtx, getItemEntry.getItemId, 100.0f, 10.0f);
|
||||
GiveItemEntryFromActor(&this->dyna.actor, globalCtx, getItemEntry, 100.0f, 10.0f);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -502,6 +502,7 @@ void EnGe1_SetupWait_Archery(EnGe1* this, GlobalContext* globalCtx) {
|
||||
}
|
||||
|
||||
void EnGe1_WaitTillItemGiven_Archery(EnGe1* this, GlobalContext* globalCtx) {
|
||||
GetItemEntry getItemEntry;
|
||||
s32 getItemId;
|
||||
|
||||
if (Actor_HasParent(&this->actor, globalCtx)) {
|
||||
@ -533,20 +534,28 @@ void EnGe1_WaitTillItemGiven_Archery(EnGe1* this, GlobalContext* globalCtx) {
|
||||
break;
|
||||
}
|
||||
} else {
|
||||
getItemId = Randomizer_GetItemFromKnownCheck(RC_GF_HBA_1500_POINTS, CUR_UPG_VALUE(UPG_QUIVER) == 1 ? GI_QUIVER_40 : GI_QUIVER_50).getItemId;
|
||||
getItemEntry = Randomizer_GetItemFromKnownCheck(RC_GF_HBA_1500_POINTS, CUR_UPG_VALUE(UPG_QUIVER) == 1 ? GI_QUIVER_40 : GI_QUIVER_50);
|
||||
getItemId = getItemEntry.getItemId;
|
||||
}
|
||||
} else {
|
||||
if (!gSaveContext.n64ddFlag) {
|
||||
getItemId = GI_HEART_PIECE;
|
||||
} else {
|
||||
getItemId = Randomizer_GetItemFromKnownCheck(RC_GF_HBA_1000_POINTS, GI_HEART_PIECE).getItemId;
|
||||
getItemEntry = Randomizer_GetItemFromKnownCheck(RC_GF_HBA_1000_POINTS, GI_HEART_PIECE);
|
||||
getItemId = getItemEntry.getItemId;
|
||||
}
|
||||
}
|
||||
|
||||
if (!gSaveContext.n64ddFlag) {
|
||||
func_8002F434(&this->actor, globalCtx, getItemId, 10000.0f, 50.0f);
|
||||
} else {
|
||||
GiveItemEntryFromActor(&this->actor, globalCtx, getItemEntry, 10000.0f, 50.0f);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
void EnGe1_BeginGiveItem_Archery(EnGe1* this, GlobalContext* globalCtx) {
|
||||
GetItemEntry getItemEntry;
|
||||
s32 getItemId;
|
||||
|
||||
if (Actor_TextboxIsClosing(&this->actor, globalCtx)) {
|
||||
@ -566,17 +575,23 @@ void EnGe1_BeginGiveItem_Archery(EnGe1* this, GlobalContext* globalCtx) {
|
||||
break;
|
||||
}
|
||||
} else {
|
||||
getItemId = Randomizer_GetItemFromKnownCheck(RC_GF_HBA_1500_POINTS, CUR_UPG_VALUE(UPG_QUIVER) == 1 ? GI_QUIVER_40 : GI_QUIVER_50).getItemId;
|
||||
getItemEntry = Randomizer_GetItemFromKnownCheck(RC_GF_HBA_1500_POINTS, CUR_UPG_VALUE(UPG_QUIVER) == 1 ? GI_QUIVER_40 : GI_QUIVER_50);
|
||||
getItemId = getItemEntry.getItemId;
|
||||
}
|
||||
} else {
|
||||
if (!gSaveContext.n64ddFlag) {
|
||||
getItemId = GI_HEART_PIECE;
|
||||
} else {
|
||||
getItemId = Randomizer_GetItemFromKnownCheck(RC_GF_HBA_1000_POINTS, GI_HEART_PIECE).getItemId;
|
||||
getItemEntry = Randomizer_GetItemFromKnownCheck(RC_GF_HBA_1000_POINTS, GI_HEART_PIECE);
|
||||
getItemId = getItemEntry.getItemId;
|
||||
}
|
||||
}
|
||||
|
||||
if (!gSaveContext.n64ddFlag) {
|
||||
func_8002F434(&this->actor, globalCtx, getItemId, 10000.0f, 50.0f);
|
||||
} else {
|
||||
GiveItemEntryFromActor(&this->actor, globalCtx, getItemEntry, 10000.0f, 50.0f);
|
||||
}
|
||||
}
|
||||
|
||||
void EnGe1_TalkWinPrize_Archery(EnGe1* this, GlobalContext* globalCtx) {
|
||||
|
@ -461,7 +461,7 @@ void EnGe2_WaitTillCardGiven(EnGe2* this, GlobalContext* globalCtx) {
|
||||
func_8002F434(&this->actor, globalCtx, GI_GERUDO_CARD, 10000.0f, 50.0f);
|
||||
} else {
|
||||
GetItemEntry getItemEntry = Randomizer_GetItemFromKnownCheck(RC_GF_GERUDO_MEMBERSHIP_CARD, GI_GERUDO_CARD);
|
||||
func_8002F434(&this->actor, globalCtx, getItemEntry.getItemId, 10000.0f, 50.0f);
|
||||
GiveItemEntryFromActor(&this->actor, globalCtx, getItemEntry, 10000.0f, 50.0f);
|
||||
}
|
||||
}
|
||||
}
|
||||
@ -475,7 +475,7 @@ void EnGe2_GiveCard(EnGe2* this, GlobalContext* globalCtx) {
|
||||
func_8002F434(&this->actor, globalCtx, GI_GERUDO_CARD, 10000.0f, 50.0f);
|
||||
} else {
|
||||
GetItemEntry getItemEntry = Randomizer_GetItemFromKnownCheck(RC_GF_GERUDO_MEMBERSHIP_CARD, GI_GERUDO_CARD);
|
||||
func_8002F434(&this->actor, globalCtx, getItemEntry.getItemId, 10000.0f, 50.0f);
|
||||
GiveItemEntryFromActor(&this->actor, globalCtx, getItemEntry, 10000.0f, 50.0f);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -146,7 +146,7 @@ void EnGe3_WaitTillCardGiven(EnGe3* this, GlobalContext* globalCtx) {
|
||||
func_8002F434(&this->actor, globalCtx, GI_GERUDO_CARD, 10000.0f, 50.0f);
|
||||
} else {
|
||||
GetItemEntry getItemEntry = Randomizer_GetItemFromKnownCheck(RC_GF_GERUDO_MEMBERSHIP_CARD, GI_GERUDO_CARD);
|
||||
func_8002F434(&this->actor, globalCtx, getItemEntry.getItemId, 10000.0f, 50.0f);
|
||||
GiveItemEntryFromActor(&this->actor, globalCtx, getItemEntry, 10000.0f, 50.0f);
|
||||
}
|
||||
}
|
||||
}
|
||||
@ -160,7 +160,7 @@ void EnGe3_GiveCard(EnGe3* this, GlobalContext* globalCtx) {
|
||||
func_8002F434(&this->actor, globalCtx, GI_GERUDO_CARD, 10000.0f, 50.0f);
|
||||
} else {
|
||||
GetItemEntry getItemEntry = Randomizer_GetItemFromKnownCheck(RC_GF_GERUDO_MEMBERSHIP_CARD, GI_GERUDO_CARD);
|
||||
func_8002F434(&this->actor, globalCtx, getItemEntry.getItemId, 10000.0f, 50.0f);
|
||||
GiveItemEntryFromActor(&this->actor, globalCtx, getItemEntry, 10000.0f, 50.0f);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -946,6 +946,7 @@ void func_80A40B1C(EnGo* this, GlobalContext* globalCtx) {
|
||||
void EnGo_GetItem(EnGo* this, GlobalContext* globalCtx) {
|
||||
f32 xzDist;
|
||||
f32 yDist;
|
||||
GetItemEntry getItemEntry;
|
||||
s32 getItemId;
|
||||
|
||||
if (Actor_HasParent(&this->actor, globalCtx)) {
|
||||
@ -956,7 +957,12 @@ void EnGo_GetItem(EnGo* this, GlobalContext* globalCtx) {
|
||||
this->unk_20C = 0;
|
||||
if ((this->actor.params & 0xF0) == 0x90) {
|
||||
if (INV_CONTENT(ITEM_TRADE_ADULT) == ITEM_CLAIM_CHECK) {
|
||||
getItemId = gSaveContext.n64ddFlag ? Randomizer_GetItemFromKnownCheck(RC_DMT_TRADE_CLAIM_CHECK, GI_SWORD_BGS).getItemId : GI_SWORD_BGS;
|
||||
if (!gSaveContext.n64ddFlag) {
|
||||
getItemId = GI_SWORD_BGS;
|
||||
} else {
|
||||
getItemEntry = Randomizer_GetItemFromKnownCheck(RC_DMT_TRADE_CLAIM_CHECK, GI_SWORD_BGS);
|
||||
getItemId = getItemEntry.getItemId;
|
||||
}
|
||||
this->unk_20C = 1;
|
||||
}
|
||||
if (INV_CONTENT(ITEM_TRADE_ADULT) == ITEM_EYEDROPS) {
|
||||
@ -973,7 +979,11 @@ void EnGo_GetItem(EnGo* this, GlobalContext* globalCtx) {
|
||||
|
||||
yDist = fabsf(this->actor.yDistToPlayer) + 1.0f;
|
||||
xzDist = this->actor.xzDistToPlayer + 1.0f;
|
||||
if (!gSaveContext.n64ddFlag) {
|
||||
func_8002F434(&this->actor, globalCtx, getItemId, xzDist, yDist);
|
||||
} else {
|
||||
GiveItemEntryFromActor(&this->actor, globalCtx, getItemEntry, xzDist, yDist);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -666,7 +666,8 @@ s16 func_80A70058(GlobalContext* globalCtx, Actor* thisx) {
|
||||
func_80A6F7CC(this, globalCtx, GI_HEART_PIECE);
|
||||
} else {
|
||||
GetItemEntry getItemEntry = Randomizer_GetItemFromKnownCheck(RC_MARKET_LOST_DOG, GI_HEART_PIECE);
|
||||
func_80A6F7CC(this, globalCtx, getItemEntry.getItemId);
|
||||
this->unkGetItemId = getItemEntry.getItemId;
|
||||
GiveItemEntryFromActor(&this->actor, globalCtx, getItemEntry, this->actor.xzDistToPlayer + 1.0f, fabsf(this->actor.yDistToPlayer) + 1.0f);
|
||||
}
|
||||
}
|
||||
this->actionFunc = func_80A714C4;
|
||||
|
@ -453,6 +453,7 @@ void EnKz_Wait(EnKz* this, GlobalContext* globalCtx) {
|
||||
}
|
||||
|
||||
void EnKz_SetupGetItem(EnKz* this, GlobalContext* globalCtx) {
|
||||
GetItemEntry getItemEntry;
|
||||
s32 getItemId;
|
||||
f32 xzRange;
|
||||
f32 yRange;
|
||||
@ -464,17 +465,23 @@ void EnKz_SetupGetItem(EnKz* this, GlobalContext* globalCtx) {
|
||||
} else {
|
||||
if (gSaveContext.n64ddFlag) {
|
||||
if (this->isTrading) {
|
||||
getItemId = Randomizer_GetItemFromKnownCheck(RC_ZD_TRADE_PRESCRIPTION, GI_FROG).getItemId;
|
||||
getItemEntry = Randomizer_GetItemFromKnownCheck(RC_ZD_TRADE_PRESCRIPTION, GI_FROG);
|
||||
getItemId = getItemEntry.getItemId;
|
||||
Flags_SetTreasure(globalCtx, 0x1F);
|
||||
} else {
|
||||
getItemId = Randomizer_GetItemFromKnownCheck(RC_ZD_KING_ZORA_THAWED, GI_TUNIC_ZORA).getItemId;
|
||||
getItemEntry = Randomizer_GetItemFromKnownCheck(RC_ZD_KING_ZORA_THAWED, GI_TUNIC_ZORA);
|
||||
getItemId = getItemEntry.getItemId;
|
||||
}
|
||||
} else {
|
||||
getItemId = this->isTrading ? GI_FROG : GI_TUNIC_ZORA;
|
||||
}
|
||||
yRange = fabsf(this->actor.yDistToPlayer) + 1.0f;
|
||||
xzRange = this->actor.xzDistToPlayer + 1.0f;
|
||||
if (!gSaveContext.n64ddFlag) {
|
||||
func_8002F434(&this->actor, globalCtx, getItemId, xzRange, yRange);
|
||||
} else {
|
||||
GiveItemEntryFromActor(&this->actor, globalCtx, getItemEntry, xzRange, yRange);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -338,11 +338,11 @@ void func_80AA0EA0(EnMa1* this, GlobalContext* globalCtx) {
|
||||
this->actor.parent = NULL;
|
||||
this->actionFunc = func_80AA0EFC;
|
||||
} else {
|
||||
if (gSaveContext.n64ddFlag) {
|
||||
GetItemEntry getItemEntry = Randomizer_GetItemFromKnownCheck(RC_HC_MALON_EGG, GI_WEIRD_EGG);
|
||||
func_8002F434(&this->actor, globalCtx, getItemEntry.getItemId, 120.0f, 10.0f);
|
||||
} else {
|
||||
if (!gSaveContext.n64ddFlag) {
|
||||
func_8002F434(&this->actor, globalCtx, GI_WEIRD_EGG, 120.0f, 10.0f);
|
||||
} else {
|
||||
GetItemEntry getItemEntry = Randomizer_GetItemFromKnownCheck(RC_HC_MALON_EGG, GI_WEIRD_EGG);
|
||||
GiveItemEntryFromActor(&this->actor, globalCtx, getItemEntry, 120.0f, 10.0f);
|
||||
}
|
||||
}
|
||||
}
|
||||
@ -367,7 +367,7 @@ void GivePlayerRandoRewardMalon(EnMa1* malon, GlobalContext* globalCtx, Randomiz
|
||||
// (confirmed via breakpoints in a vanilla save).
|
||||
malon->actionFunc = func_80AA0D88;
|
||||
} else if (!Flags_GetTreasure(globalCtx, 0x1F)) {
|
||||
func_8002F434(&malon->actor, globalCtx, getItemEntry.getItemId, 10000.0f, 100.0f);
|
||||
GiveItemEntryFromActor(&malon->actor, globalCtx, getItemEntry, 10000.0f, 100.0f);
|
||||
}
|
||||
// make malon sing again after giving the item.
|
||||
malon->unk_1E8.unk_00 = 0;
|
||||
|
@ -202,7 +202,7 @@ void func_80AACFA0(EnMk* this, GlobalContext* globalCtx) {
|
||||
func_8002F434(&this->actor, globalCtx, GI_HEART_PIECE, 10000.0f, 50.0f);
|
||||
} else {
|
||||
GetItemEntry getItemEntry = Randomizer_GetItemFromKnownCheck(RC_LH_LAB_DIVE, GI_HEART_PIECE);
|
||||
func_8002F434(&this->actor, globalCtx, getItemEntry.getItemId, 10000.0f, 50.0f);
|
||||
GiveItemEntryFromActor(&this->actor, globalCtx, getItemEntry, 10000.0f, 50.0f);
|
||||
}
|
||||
}
|
||||
}
|
||||
@ -214,7 +214,7 @@ void func_80AAD014(EnMk* this, GlobalContext* globalCtx) {
|
||||
func_8002F434(&this->actor, globalCtx, GI_HEART_PIECE, 10000.0f, 50.0f);
|
||||
} else {
|
||||
GetItemEntry getItemEntry = Randomizer_GetItemFromKnownCheck(RC_LH_LAB_DIVE, GI_HEART_PIECE);
|
||||
func_8002F434(&this->actor, globalCtx, getItemEntry.getItemId, 10000.0f, 50.0f);
|
||||
GiveItemEntryFromActor(&this->actor, globalCtx, getItemEntry, 10000.0f, 50.0f);
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -328,7 +328,7 @@ void GivePlayerRandoRewardSunSong(EnOkarinaTag* song, GlobalContext* globalCtx,
|
||||
Flags_SetTreasure(globalCtx, 0x1F);
|
||||
} else if (!Flags_GetTreasure(globalCtx, 0x1F)) {
|
||||
GetItemEntry getItemEntry = Randomizer_GetItemFromKnownCheck(check, GI_LETTER_ZELDA);
|
||||
func_8002F434(&song->actor, globalCtx, getItemEntry.getItemId, 10000.0f, 100.0f);
|
||||
GiveItemEntryFromActor(&song->actor, globalCtx, getItemEntry, 10000.0f, 100.0f);
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -623,7 +623,7 @@ void GivePlayerRandoRewardSaria(EnSa* saria, GlobalContext* globalCtx, Randomize
|
||||
!Flags_GetTreasure(globalCtx, 0x1F)) {
|
||||
Flags_SetTreasure(globalCtx, 0x1F);
|
||||
} else if (!Flags_GetTreasure(globalCtx, 0x1F)) {
|
||||
func_8002F434(&saria->actor, globalCtx, getItemEntry.getItemId, 10000.0f, 100.0f);
|
||||
GiveItemEntryFromActor(&saria->actor, globalCtx, getItemEntry, 10000.0f, 100.0f);
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -239,27 +239,29 @@ void EnSth_ParentRewardObtainedWait(EnSth* this, GlobalContext* globalCtx) {
|
||||
|
||||
void EnSth_GivePlayerItem(EnSth* this, GlobalContext* globalCtx) {
|
||||
u16 getItemId = sGetItemIds[this->actor.params];
|
||||
GetItemEntry getItemEntry;
|
||||
|
||||
if (gSaveContext.n64ddFlag) {
|
||||
switch (getItemId) {
|
||||
case GI_RUPEE_GOLD:
|
||||
break;
|
||||
case GI_WALLET_ADULT:
|
||||
getItemId = Randomizer_GetItemFromKnownCheck(RC_KAK_10_GOLD_SKULLTULA_REWARD, GI_WALLET_ADULT).getItemId;
|
||||
getItemEntry = Randomizer_GetItemFromKnownCheck(RC_KAK_10_GOLD_SKULLTULA_REWARD, GI_WALLET_ADULT);
|
||||
break;
|
||||
case GI_STONE_OF_AGONY:
|
||||
getItemId = Randomizer_GetItemFromKnownCheck(RC_KAK_20_GOLD_SKULLTULA_REWARD, GI_STONE_OF_AGONY).getItemId;
|
||||
getItemEntry = Randomizer_GetItemFromKnownCheck(RC_KAK_20_GOLD_SKULLTULA_REWARD, GI_STONE_OF_AGONY);
|
||||
break;
|
||||
case GI_WALLET_GIANT:
|
||||
getItemId = Randomizer_GetItemFromKnownCheck(RC_KAK_30_GOLD_SKULLTULA_REWARD, GI_WALLET_GIANT).getItemId;
|
||||
getItemEntry = Randomizer_GetItemFromKnownCheck(RC_KAK_30_GOLD_SKULLTULA_REWARD, GI_WALLET_GIANT);
|
||||
break;
|
||||
case GI_BOMBCHUS_10:
|
||||
getItemId = Randomizer_GetItemFromKnownCheck(RC_KAK_40_GOLD_SKULLTULA_REWARD, GI_BOMBCHUS_10).getItemId;
|
||||
getItemEntry = Randomizer_GetItemFromKnownCheck(RC_KAK_40_GOLD_SKULLTULA_REWARD, GI_BOMBCHUS_10);
|
||||
break;
|
||||
case GI_HEART_PIECE:
|
||||
getItemId = Randomizer_GetItemFromKnownCheck(RC_KAK_50_GOLD_SKULLTULA_REWARD, GI_HEART_PIECE).getItemId;
|
||||
getItemEntry = Randomizer_GetItemFromKnownCheck(RC_KAK_50_GOLD_SKULLTULA_REWARD, GI_HEART_PIECE);
|
||||
break;
|
||||
}
|
||||
getItemId = getItemEntry.getItemId;
|
||||
} else {
|
||||
switch (this->actor.params) {
|
||||
case 1:
|
||||
@ -277,7 +279,11 @@ void EnSth_GivePlayerItem(EnSth* this, GlobalContext* globalCtx) {
|
||||
}
|
||||
}
|
||||
|
||||
if (!gSaveContext.n64ddFlag) {
|
||||
func_8002F434(&this->actor, globalCtx, getItemId, 10000.0f, 50.0f);
|
||||
} else {
|
||||
GiveItemEntryFromActor(&this->actor, globalCtx, getItemEntry, 10000.0f, 50.0f);
|
||||
}
|
||||
}
|
||||
|
||||
void EnSth_GiveReward(EnSth* this, GlobalContext* globalCtx) {
|
||||
|
@ -336,7 +336,8 @@ void EnSyatekiMan_EndGame(EnSyatekiMan* this, GlobalContext* globalCtx) {
|
||||
this->actor.parent = NULL;
|
||||
if (!LINK_IS_ADULT) {
|
||||
if(gSaveContext.n64ddFlag && !Flags_GetTreasure(globalCtx, 0x1E)) {
|
||||
this->getItemId = Randomizer_GetItemFromKnownCheck(RC_MARKET_SHOOTING_GALLERY_REWARD, GI_BULLET_BAG_50).getItemId;
|
||||
this->getItemEntry = Randomizer_GetItemFromKnownCheck(RC_MARKET_SHOOTING_GALLERY_REWARD, GI_BULLET_BAG_50);
|
||||
this->getItemId = this->getItemEntry.getItemId;
|
||||
Flags_SetTreasure(globalCtx, 0x1E);
|
||||
} else if (!gSaveContext.n64ddFlag && !(gSaveContext.itemGetInf[0] & 0x2000)) {
|
||||
osSyncPrintf(VT_FGCOL(GREEN) "☆☆☆☆☆ Equip_Pachinko ☆☆☆☆☆ %d\n" VT_RST,
|
||||
@ -351,7 +352,8 @@ void EnSyatekiMan_EndGame(EnSyatekiMan* this, GlobalContext* globalCtx) {
|
||||
}
|
||||
} else {
|
||||
if(gSaveContext.n64ddFlag && !Flags_GetTreasure(globalCtx, 0x1F)) {
|
||||
this->getItemId = Randomizer_GetItemFromKnownCheck(RC_KAK_SHOOTING_GALLERY_REWARD, GI_QUIVER_50).getItemId;
|
||||
this->getItemEntry = Randomizer_GetItemFromKnownCheck(RC_KAK_SHOOTING_GALLERY_REWARD, GI_QUIVER_50);
|
||||
this->getItemId = this->getItemEntry.getItemId;
|
||||
Flags_SetTreasure(globalCtx, 0x1F);
|
||||
} else if (!gSaveContext.n64ddFlag && !(gSaveContext.itemGetInf[0] & 0x4000)) {
|
||||
osSyncPrintf(VT_FGCOL(GREEN) "☆☆☆☆☆ Equip_Bow ☆☆☆☆☆ %d\n" VT_RST,
|
||||
@ -371,7 +373,11 @@ void EnSyatekiMan_EndGame(EnSyatekiMan* this, GlobalContext* globalCtx) {
|
||||
this->getItemId = GI_RUPEE_PURPLE;
|
||||
}
|
||||
}
|
||||
if (!gSaveContext.n64ddFlag) {
|
||||
func_8002F434(&this->actor, globalCtx, this->getItemId, 2000.0f, 1000.0f);
|
||||
} else {
|
||||
GiveItemEntryFromActor(&this->actor, globalCtx, this->getItemEntry, 2000.0f, 1000.0f);
|
||||
}
|
||||
this->actionFunc = EnSyatekiMan_GivePrize;
|
||||
break;
|
||||
case SYATEKI_RESULT_ALMOST:
|
||||
@ -400,7 +406,11 @@ void EnSyatekiMan_GivePrize(EnSyatekiMan* this, GlobalContext* globalCtx) {
|
||||
if (Actor_HasParent(&this->actor, globalCtx)) {
|
||||
this->actionFunc = EnSyatekiMan_FinishPrize;
|
||||
} else {
|
||||
if (!gSaveContext.n64ddFlag) {
|
||||
func_8002F434(&this->actor, globalCtx, this->getItemId, 2000.0f, 1000.0f);
|
||||
} else {
|
||||
GiveItemEntryFromActor(&this->actor, globalCtx, this->getItemEntry, 2000.0f, 1000.0f);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -28,6 +28,7 @@ typedef struct EnSyatekiMan {
|
||||
/* 0x0220 */ Actor* tempGallery;
|
||||
/* 0x0224 */ EnSyatekiManOtherFunc blinkFunc; // Seems to be part of a blink system with unk_20C and unk_20E, but it's unused.
|
||||
/* 0x0228 */ s16 csCam;
|
||||
/* */ GetItemEntry getItemEntry;
|
||||
} EnSyatekiMan; // size = 0x022C
|
||||
|
||||
#endif
|
||||
|
@ -890,7 +890,7 @@ void func_80B15F54(EnTa* this, GlobalContext* globalCtx) {
|
||||
func_8002F434(&this->actor, globalCtx, GI_MILK_BOTTLE, 10000.0f, 50.0f);
|
||||
} else {
|
||||
GetItemEntry getItemEntry = Randomizer_GetItemFromKnownCheck(RC_LLR_TALONS_CHICKENS, GI_MILK_BOTTLE);
|
||||
func_8002F434(&this->actor, globalCtx, getItemEntry.getItemId, 10000.0f, 50.0f);
|
||||
GiveItemEntryFromActor(&this->actor, globalCtx, getItemEntry, 10000.0f, 50.0f);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -292,14 +292,12 @@ void GivePlayerRandoRewardSheikSong(EnXc* sheik, GlobalContext* globalCtx, Rando
|
||||
if (!(gSaveContext.eventChkInf[5] & sheikType)) {
|
||||
GetItemEntry getItemEntry = Randomizer_GetItemFromKnownCheck(check, ogSongId);
|
||||
if (check == RC_SHEIK_AT_TEMPLE && !Flags_GetTreasure(globalCtx, 0x1F)) {
|
||||
if (func_8002F434(&sheik->actor, globalCtx, getItemEntry.getItemId, 10000.0f, 100.0f)) {
|
||||
player->getItemEntry = getItemEntry;
|
||||
if (GiveItemEntryFromActor(&sheik->actor, globalCtx, getItemEntry, 10000.0f, 100.0f)) {
|
||||
player->pendingFlag.flagID = 0x1F;
|
||||
player->pendingFlag.flagType = FLAG_SCENE_TREASURE;
|
||||
}
|
||||
} else if (check != RC_SHEIK_AT_TEMPLE) {
|
||||
if (func_8002F434(&sheik->actor, globalCtx, getItemEntry.getItemId, 10000.0f, 100.0f)) {
|
||||
player->getItemEntry = getItemEntry;
|
||||
if (GiveItemEntryFromActor(&sheik->actor, globalCtx, getItemEntry, 10000.0f, 100.0f)) {
|
||||
player->pendingFlag.flagID = 0x55;
|
||||
player->pendingFlag.flagType = FLAG_EVENT_CHECK_INF;
|
||||
}
|
||||
|
@ -234,7 +234,7 @@ void GivePlayerRandoRewardZeldaChild(EnZl4* zelda, GlobalContext* globalCtx, Ran
|
||||
} else if (!Flags_GetTreasure(globalCtx, 0x1E) && !Randomizer_GetSettingValue(RSK_SKIP_CHILD_ZELDA) && Actor_TextboxIsClosing(&zelda->actor, globalCtx) &&
|
||||
(globalCtx->msgCtx.textId == 0x703C || globalCtx->msgCtx.textId == 0x703D)) {
|
||||
GetItemEntry getItemEntry = Randomizer_GetItemFromKnownCheck(check, GI_LETTER_ZELDA);
|
||||
func_8002F434(&zelda->actor, globalCtx, getItemEntry.getItemId, 10000.0f, 100.0f);
|
||||
GiveItemEntryFromActor(&zelda->actor, globalCtx, getItemEntry, 10000.0f, 100.0f);
|
||||
} else if (Flags_GetTreasure(globalCtx, 0x1E) && !Player_InBlockingCsMode(globalCtx, GET_PLAYER(globalCtx))) {
|
||||
gSaveContext.unk_13EE = 0x32;
|
||||
gSaveContext.eventChkInf[4] |= 1;
|
||||
|
@ -5002,6 +5002,7 @@ void Fishing_HandleOwnerDialog(Fishing* this, GlobalContext* globalCtx) {
|
||||
(Message_GetState(&globalCtx->msgCtx) == TEXT_STATE_NONE)) &&
|
||||
Message_ShouldAdvance(globalCtx)) {
|
||||
s32 getItemId;
|
||||
GetItemEntry getItemEntry;
|
||||
|
||||
Message_CloseTextbox(globalCtx);
|
||||
|
||||
@ -5059,7 +5060,8 @@ void Fishing_HandleOwnerDialog(Fishing* this, GlobalContext* globalCtx) {
|
||||
if (!gSaveContext.n64ddFlag) {
|
||||
getItemId = GI_HEART_PIECE;
|
||||
} else {
|
||||
getItemId = Randomizer_GetItemFromKnownCheck(RC_LH_CHILD_FISHING, GI_HEART_PIECE).getItemId;
|
||||
getItemEntry = Randomizer_GetItemFromKnownCheck(RC_LH_CHILD_FISHING, GI_HEART_PIECE);
|
||||
getItemId = getItemEntry.getItemId;
|
||||
}
|
||||
}
|
||||
}
|
||||
@ -5071,7 +5073,8 @@ void Fishing_HandleOwnerDialog(Fishing* this, GlobalContext* globalCtx) {
|
||||
if (!gSaveContext.n64ddFlag) {
|
||||
getItemId = GI_SCALE_GOLD;
|
||||
} else {
|
||||
getItemId = Randomizer_GetItemFromKnownCheck(RC_LH_ADULT_FISHING, GI_SCALE_GOLD).getItemId;
|
||||
getItemEntry = Randomizer_GetItemFromKnownCheck(RC_LH_ADULT_FISHING, GI_SCALE_GOLD);
|
||||
getItemId = getItemEntry.getItemId;
|
||||
}
|
||||
}
|
||||
}
|
||||
@ -5082,7 +5085,11 @@ void Fishing_HandleOwnerDialog(Fishing* this, GlobalContext* globalCtx) {
|
||||
}
|
||||
|
||||
this->actor.parent = NULL;
|
||||
if (!gSaveContext.n64ddFlag) {
|
||||
func_8002F434(&this->actor, globalCtx, getItemId, 2000.0f, 1000.0f);
|
||||
} else {
|
||||
GiveItemEntryFromActor(&this->actor, globalCtx, getItemEntry, 2000.0f, 1000.0f);
|
||||
}
|
||||
this->unk_15C = 23;
|
||||
}
|
||||
break;
|
||||
@ -5147,7 +5154,7 @@ void Fishing_HandleOwnerDialog(Fishing* this, GlobalContext* globalCtx) {
|
||||
func_8002F434(&this->actor, globalCtx, GI_SCALE_GOLD, 2000.0f, 1000.0f);
|
||||
} else {
|
||||
GetItemEntry getItemEntry = Randomizer_GetItemFromKnownCheck(RC_LH_ADULT_FISHING, GI_SCALE_GOLD);
|
||||
func_8002F434(&this->actor, globalCtx, getItemEntry.getItemId, 2000.0f, 1000.0f);
|
||||
GiveItemEntryFromActor(&this->actor, globalCtx, getItemEntry, 2000.0f, 1000.0f);
|
||||
}
|
||||
}
|
||||
break;
|
||||
|
@ -63,7 +63,7 @@ void ItemBHeart_Update(Actor* thisx, GlobalContext* globalCtx) {
|
||||
func_8002F434(&this->actor, globalCtx, GI_HEART_CONTAINER_2, 30.0f, 40.0f);
|
||||
} else {
|
||||
GetItemEntry getItemEntry = Randomizer_GetRandomizedItem(GI_HEART_CONTAINER_2, this->actor.id, this->actor.params, globalCtx->sceneNum);
|
||||
func_8002F434(&this->actor, globalCtx, getItemEntry.getItemId, 30.0f, 40.0f);
|
||||
GiveItemEntryFromActor(&this->actor, globalCtx, getItemEntry, 30.0f, 40.0f);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -137,7 +137,7 @@ void func_80B85824(ItemEtcetera* this, GlobalContext* globalCtx) {
|
||||
func_8002F434(&this->actor, globalCtx, this->getItemId, 30.0f, 50.0f);
|
||||
} else {
|
||||
GetItemEntry getItemEntry = Randomizer_GetItemFromKnownCheck(RC_LH_SUN, GI_ARROW_FIRE);
|
||||
func_8002F434(&this->actor, globalCtx, getItemEntry.getItemId, 30.0f, 50.0f);
|
||||
GiveItemEntryFromActor(&this->actor, globalCtx, getItemEntry, 30.0f, 50.0f);
|
||||
}
|
||||
}
|
||||
}
|
||||
@ -160,7 +160,7 @@ void func_80B858B4(ItemEtcetera* this, GlobalContext* globalCtx) {
|
||||
func_8002F434(&this->actor, globalCtx, this->getItemId, 30.0f, 50.0f);
|
||||
} else {
|
||||
GetItemEntry getItemEntry = Randomizer_GetItemFromKnownCheck(RC_LH_UNDERWATER_ITEM, GI_LETTER_RUTO);
|
||||
func_8002F434(&this->actor, globalCtx, getItemEntry.getItemId, 30.0f, 50.0f);
|
||||
GiveItemEntryFromActor(&this->actor, globalCtx, getItemEntry, 30.0f, 50.0f);
|
||||
}
|
||||
|
||||
if ((globalCtx->gameplayFrames & 0xD) == 0) {
|
||||
|
@ -194,7 +194,7 @@ void ItemOcarina_WaitInWater(ItemOcarina* this, GlobalContext* globalCtx) {
|
||||
func_8002F434(&this->actor, globalCtx, GI_OCARINA_OOT, 30.0f, 50.0f);
|
||||
} else {
|
||||
GetItemEntry getItemEntry = Randomizer_GetItemFromKnownCheck(RC_HF_OCARINA_OF_TIME_ITEM, GI_OCARINA_OOT);
|
||||
func_8002F434(&this->actor, globalCtx, getItemEntry.getItemId, 30.0f, 50.0f);
|
||||
GiveItemEntryFromActor(&this->actor, globalCtx, getItemEntry, 30.0f, 50.0f);
|
||||
}
|
||||
|
||||
if ((globalCtx->gameplayFrames & 13) == 0) {
|
||||
|
Loading…
Reference in New Issue
Block a user