mirror of
https://github.com/HarbourMasters/Shipwright
synced 2026-08-20 14:34:50 -04:00
Merge remote-tracking branch 'upstream/rando-next' into bombchu-logic
This commit is contained in:
@@ -1290,6 +1290,7 @@ void EnItem00_CustomItemsParticles(Actor* Parent, GlobalContext* globalCtx, GetI
|
||||
switch (giEntry.itemId) {
|
||||
case RG_MAGIC_SINGLE:
|
||||
case RG_MAGIC_DOUBLE:
|
||||
case RG_MAGIC_BEAN_PACK:
|
||||
color_slot = 0;
|
||||
break;
|
||||
case RG_DOUBLE_DEFENSE:
|
||||
|
||||
@@ -1642,12 +1642,16 @@ u8 Item_Give(GlobalContext* globalCtx, u8 item) {
|
||||
} else if ((item >= ITEM_SWORD_KOKIRI) && (item <= ITEM_SWORD_BGS)) {
|
||||
gSaveContext.inventory.equipment |= gBitFlags[item - ITEM_SWORD_KOKIRI] << gEquipShifts[EQUIP_SWORD];
|
||||
|
||||
// Both Giant's Knife and Biggoron Sword have the same Item ID, so this part handles both of them
|
||||
if (item == ITEM_SWORD_BGS) {
|
||||
gSaveContext.swordHealth = 8;
|
||||
|
||||
if (ALL_EQUIP_VALUE(EQUIP_SWORD) == 0xF
|
||||
||(gSaveContext.n64ddFlag && ALL_EQUIP_VALUE(EQUIP_SWORD) == 0xE)) { // In rando, when buying Giant's Knife, also check
|
||||
gSaveContext.inventory.equipment ^= 8 << gEquipShifts[EQUIP_SWORD]; // for 0xE in case we don't have Kokiri Sword
|
||||
// In rando, when buying Giant's Knife, also check
|
||||
// for 0xE in case we don't have Kokiri Sword
|
||||
if (ALL_EQUIP_VALUE(EQUIP_SWORD) == 0xF || (gSaveContext.n64ddFlag && ALL_EQUIP_VALUE(EQUIP_SWORD) == 0xE)) {
|
||||
|
||||
gSaveContext.inventory.equipment ^= 8 << gEquipShifts[EQUIP_SWORD];
|
||||
|
||||
if (gSaveContext.equips.buttonItems[0] == ITEM_SWORD_KNIFE) {
|
||||
gSaveContext.equips.buttonItems[0] = ITEM_SWORD_BGS;
|
||||
Interface_LoadItemIcon1(globalCtx, 0);
|
||||
@@ -1686,6 +1690,28 @@ u8 Item_Give(GlobalContext* globalCtx, u8 item) {
|
||||
}
|
||||
return ITEM_NONE;
|
||||
} else if (item == ITEM_KEY_SMALL) {
|
||||
// Small key exceptions for rando with keysanity off.
|
||||
if (gSaveContext.n64ddFlag) {
|
||||
if (globalCtx->sceneNum == 10) { // ganon's tower -> ganon's castle
|
||||
if (gSaveContext.inventory.dungeonKeys[13] < 0) {
|
||||
gSaveContext.inventory.dungeonKeys[13] = 1;
|
||||
return ITEM_NONE;
|
||||
} else {
|
||||
gSaveContext.inventory.dungeonKeys[13]++;
|
||||
return ITEM_NONE;
|
||||
}
|
||||
}
|
||||
|
||||
if (globalCtx->sceneNum == 92) { // Desert Colossus -> Spirit Temple.
|
||||
if (gSaveContext.inventory.dungeonKeys[6] < 0) {
|
||||
gSaveContext.inventory.dungeonKeys[6] = 1;
|
||||
return ITEM_NONE;
|
||||
} else {
|
||||
gSaveContext.inventory.dungeonKeys[6]++;
|
||||
return ITEM_NONE;
|
||||
}
|
||||
}
|
||||
}
|
||||
if (gSaveContext.inventory.dungeonKeys[gSaveContext.mapIndex] < 0) {
|
||||
gSaveContext.inventory.dungeonKeys[gSaveContext.mapIndex] = 1;
|
||||
return ITEM_NONE;
|
||||
@@ -2177,6 +2203,14 @@ u16 Randomizer_Item_Give(GlobalContext* globalCtx, GetItemEntry giEntry) {
|
||||
return RG_NONE;
|
||||
}
|
||||
|
||||
if (item == RG_MAGIC_BEAN_PACK) {
|
||||
if (INV_CONTENT(ITEM_BEAN) == ITEM_NONE) {
|
||||
INV_CONTENT(ITEM_BEAN) = ITEM_BEAN;
|
||||
AMMO(ITEM_BEAN) = 10;
|
||||
}
|
||||
return RG_NONE;
|
||||
}
|
||||
|
||||
if (item == RG_DOUBLE_DEFENSE) {
|
||||
gSaveContext.doubleDefense = true;
|
||||
gSaveContext.inventory.defenseHearts = 20;
|
||||
@@ -2223,9 +2257,9 @@ u16 Randomizer_Item_Give(GlobalContext* globalCtx, GetItemEntry giEntry) {
|
||||
}
|
||||
}
|
||||
} else if ((item >= RG_FOREST_TEMPLE_SMALL_KEY && item <= RG_GANONS_CASTLE_SMALL_KEY) ||
|
||||
(item >= RG_FOREST_TEMPLE_BOSS_KEY && item <= RG_GANONS_CASTLE_BOSS_KEY) ||
|
||||
(item >= RG_DEKU_TREE_MAP && item <= RG_ICE_CAVERN_MAP) ||
|
||||
(item >= RG_DEKU_TREE_COMPASS && item <= RG_ICE_CAVERN_COMPASS)) {
|
||||
(item >= RG_FOREST_TEMPLE_BOSS_KEY && item <= RG_GANONS_CASTLE_BOSS_KEY) ||
|
||||
(item >= RG_DEKU_TREE_MAP && item <= RG_ICE_CAVERN_MAP) ||
|
||||
(item >= RG_DEKU_TREE_COMPASS && item <= RG_ICE_CAVERN_COMPASS)) {
|
||||
int mapIndex = gSaveContext.mapIndex;
|
||||
switch (item) {
|
||||
case RG_DEKU_TREE_MAP:
|
||||
@@ -2323,7 +2357,6 @@ u16 Randomizer_Item_Give(GlobalContext* globalCtx, GetItemEntry giEntry) {
|
||||
return temp;
|
||||
}
|
||||
|
||||
|
||||
u8 Item_CheckObtainability(u8 item) {
|
||||
s16 i;
|
||||
s16 slot = SLOT(item);
|
||||
|
||||
@@ -255,10 +255,10 @@ void GivePlayerRandoRewardSariaGift(GlobalContext* globalCtx, RandomizerCheck ch
|
||||
if (gSaveContext.entranceIndex == 0x05E0) {
|
||||
GetItemEntry getItemEntry = Randomizer_GetItemFromKnownCheck(check, RG_ZELDAS_LULLABY);
|
||||
|
||||
if ((!Flags_GetEventChkInf(0xC1) || (player->getItemId == getItemEntry.getItemId && getItemEntry.getItemId != GI_ICE_TRAP)) &&
|
||||
player != NULL && !Player_InBlockingCsMode(globalCtx, player)) {
|
||||
if (!Flags_GetEventChkInf(0xC1) && player != NULL && !Player_InBlockingCsMode(globalCtx, player)) {
|
||||
GiveItemEntryWithoutActor(globalCtx, getItemEntry);
|
||||
Flags_SetEventChkInf(0xC1);
|
||||
player->pendingFlag.flagType = FLAG_EVENT_CHECK_INF;
|
||||
player->pendingFlag.flagID = 0xC1;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
+73
-7
@@ -4,10 +4,11 @@
|
||||
#include <string.h>
|
||||
#include <soh/Enhancements/randomizer/randomizerTypes.h>
|
||||
#include <soh/Enhancements/randomizer/randomizer_inf.h>
|
||||
#include "soh/Enhancements/randomizer/adult_trade_shuffle.h"
|
||||
|
||||
#define NUM_DUNGEONS 8
|
||||
#define NUM_TRIALS 6
|
||||
#define NUM_COWS 10
|
||||
#define NUM_SCRUBS 35
|
||||
|
||||
/**
|
||||
* Initialize new save.
|
||||
@@ -308,6 +309,11 @@ void GiveLinkDekuNutUpgrade(GetItemID giid) {
|
||||
}
|
||||
}
|
||||
|
||||
void GiveLinkSkullToken() {
|
||||
gSaveContext.inventory.questItems |= gBitFlags[QUEST_SKULL_TOKEN];
|
||||
gSaveContext.inventory.gsTokens++;
|
||||
}
|
||||
|
||||
void GiveLinkMagic(GetItemID giid) {
|
||||
if (giid == RG_MAGIC_SINGLE) {
|
||||
gSaveContext.magicLevel = 1;
|
||||
@@ -507,6 +513,53 @@ void GiveLinkDungeonItem(GetItemID getItemId) {
|
||||
}
|
||||
}
|
||||
|
||||
void GiveLinkAdultTradeItem(GetItemID giid) {
|
||||
ItemID item;
|
||||
switch (giid) {
|
||||
case GI_POCKET_EGG:
|
||||
item = ITEM_POCKET_EGG;
|
||||
break;
|
||||
case GI_POCKET_CUCCO:
|
||||
item = ITEM_POCKET_CUCCO;
|
||||
break;
|
||||
case GI_COJIRO:
|
||||
item = ITEM_COJIRO;
|
||||
break;
|
||||
case GI_ODD_MUSHROOM:
|
||||
item = ITEM_ODD_MUSHROOM;
|
||||
break;
|
||||
case GI_ODD_POTION:
|
||||
item = ITEM_ODD_POTION;
|
||||
break;
|
||||
case GI_SAW:
|
||||
item = ITEM_SAW;
|
||||
break;
|
||||
case GI_SWORD_BROKEN:
|
||||
item = ITEM_SWORD_BROKEN;
|
||||
break;
|
||||
case GI_PRESCRIPTION:
|
||||
item = ITEM_PRESCRIPTION;
|
||||
break;
|
||||
case GI_FROG:
|
||||
item = ITEM_FROG;
|
||||
break;
|
||||
case GI_EYEDROPS:
|
||||
item = ITEM_EYEDROPS;
|
||||
break;
|
||||
case GI_CLAIM_CHECK:
|
||||
item = ITEM_CLAIM_CHECK;
|
||||
break;
|
||||
}
|
||||
if ((item == ITEM_SAW) && CVar_GetS32("gDekuNutUpgradeFix", 0) == 0) {
|
||||
gSaveContext.itemGetInf[1] |= 0x8000;
|
||||
}
|
||||
|
||||
if (item >= ITEM_POCKET_EGG) {
|
||||
gSaveContext.adultTradeItems |= ADULT_TRADE_FLAG(item);
|
||||
}
|
||||
INV_CONTENT(ITEM_TRADE_ADULT) = item;
|
||||
}
|
||||
|
||||
void GiveLinksPocketMedallion() {
|
||||
GetItemEntry getItemEntry = Randomizer_GetItemFromKnownCheck(RC_LINKS_POCKET, RG_NONE);
|
||||
|
||||
@@ -708,6 +761,15 @@ void Sram_InitSave(FileChooseContext* fileChooseCtx) {
|
||||
gSaveContext.randomizerInf[i] = 0;
|
||||
}
|
||||
|
||||
// Set all trials to cleared if trial count is random or anything other than 6
|
||||
if (Randomizer_GetSettingValue(RSK_RANDOM_TRIALS) || (Randomizer_GetSettingValue(RSK_TRIAL_COUNT) != 6)) {
|
||||
for (u16 i = RAND_INF_TRIALS_DONE_LIGHT_TRIAL; i <= RAND_INF_TRIALS_DONE_SHADOW_TRIAL; i++) {
|
||||
if (!Randomizer_IsTrialRequired(i)) {
|
||||
Flags_SetRandomizerInf(i);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
// Set Cutscene flags to skip them
|
||||
gSaveContext.eventChkInf[0xC] |= 0x10; // returned to tot with medallions
|
||||
gSaveContext.eventChkInf[0xC] |= 0x20; //sheik at tot pedestal
|
||||
@@ -734,6 +796,11 @@ void Sram_InitSave(FileChooseContext* fileChooseCtx) {
|
||||
gSaveContext.eventChkInf[3] |= 0x800;
|
||||
gSaveContext.eventChkInf[12] |= 1;
|
||||
|
||||
// shuffle adult trade quest
|
||||
if (Randomizer_GetSettingValue(RSK_SHUFFLE_ADULT_TRADE)) {
|
||||
gSaveContext.adultTradeItems = 0;
|
||||
}
|
||||
|
||||
// Give Link's pocket item
|
||||
GiveLinksPocketMedallion();
|
||||
|
||||
@@ -791,7 +858,7 @@ void Sram_InitSave(FileChooseContext* fileChooseCtx) {
|
||||
s32 giid = getItem.getItemId;
|
||||
|
||||
if (getItem.modIndex == MOD_NONE) {
|
||||
if(getItem.itemId >= ITEM_KOKIRI_EMERALD && getItem.itemId <= ITEM_MEDALLION_LIGHT) {
|
||||
if (getItem.itemId >= ITEM_MEDALLION_FOREST && getItem.itemId <= ITEM_ZORA_SAPPHIRE) {
|
||||
GiveLinkDungeonReward(getItem.getItemId);
|
||||
} else if (giid == GI_RUPEE_GREEN || giid == GI_RUPEE_BLUE || giid == GI_RUPEE_RED ||
|
||||
giid == GI_RUPEE_PURPLE || giid == GI_RUPEE_GOLD) {
|
||||
@@ -848,6 +915,10 @@ void Sram_InitSave(FileChooseContext* fileChooseCtx) {
|
||||
GiveLinkDekuStickUpgrade(giid);
|
||||
} else if (giid == GI_NUT_UPGRADE_30 || giid == GI_NUT_UPGRADE_40) {
|
||||
GiveLinkDekuNutUpgrade(giid);
|
||||
} else if (giid == GI_SKULL_TOKEN) {
|
||||
GiveLinkSkullToken();
|
||||
} else if (giid >= GI_POCKET_EGG && giid <= GI_CLAIM_CHECK || giid == GI_COJIRO) {
|
||||
GiveLinkAdultTradeItem(giid);
|
||||
} else {
|
||||
s32 iid = getItem.itemId;
|
||||
if (iid != -1) INV_CONTENT(iid) = iid;
|
||||
@@ -964,11 +1035,6 @@ void Sram_InitSave(FileChooseContext* fileChooseCtx) {
|
||||
}
|
||||
}
|
||||
|
||||
// shuffle adult trade quest
|
||||
if (Randomizer_GetSettingValue(RSK_SHUFFLE_ADULT_TRADE)) {
|
||||
gSaveContext.adultTradeItems = 0;
|
||||
}
|
||||
|
||||
// complete mask quest
|
||||
if (Randomizer_GetSettingValue(RSK_COMPLETE_MASK_QUEST)) {
|
||||
gSaveContext.itemGetInf[3] |= 0x100; // Sold Keaton Mask
|
||||
|
||||
@@ -64,12 +64,33 @@ static u8 sEnergyColors[] = {
|
||||
/* Forest prim */ 255, 255, 170, /* env */ 0, 200, 0,
|
||||
};
|
||||
|
||||
// Translates from the barrier's actor params to their corresponding randInf flags.
|
||||
RandomizerInf trialParamToRandInf(u16 params) {
|
||||
switch (params) {
|
||||
case KEKKAI_LIGHT:
|
||||
return RAND_INF_TRIALS_DONE_LIGHT_TRIAL;
|
||||
case KEKKAI_FOREST:
|
||||
return RAND_INF_TRIALS_DONE_FOREST_TRIAL;
|
||||
case KEKKAI_FIRE:
|
||||
return RAND_INF_TRIALS_DONE_FIRE_TRIAL;
|
||||
case KEKKAI_WATER:
|
||||
return RAND_INF_TRIALS_DONE_WATER_TRIAL;
|
||||
case KEKKAI_SPIRIT:
|
||||
return RAND_INF_TRIALS_DONE_SPIRIT_TRIAL;
|
||||
case KEKKAI_SHADOW:
|
||||
return RAND_INF_TRIALS_DONE_SHADOW_TRIAL;
|
||||
}
|
||||
}
|
||||
|
||||
s32 DemoKekkai_CheckEventFlag(s32 params) {
|
||||
static s32 eventFlags[] = { 0xC3, 0xBC, 0xBF, 0xBE, 0xBD, 0xAD, 0xBB };
|
||||
|
||||
if ((params < KEKKAI_TOWER) || (params > KEKKAI_FOREST)) {
|
||||
return true;
|
||||
}
|
||||
if (gSaveContext.n64ddFlag) {
|
||||
return Flags_GetRandomizerInf(trialParamToRandInf(params));
|
||||
}
|
||||
return Flags_GetEventChkInf(eventFlags[params]);
|
||||
}
|
||||
|
||||
@@ -128,8 +149,7 @@ void DemoKekkai_Init(Actor* thisx, GlobalContext* globalCtx) {
|
||||
this->collider2.dim.yShift = 300;
|
||||
|
||||
if (gSaveContext.n64ddFlag) {
|
||||
int trialsToComplete = Randomizer_GetSettingValue(RSK_TRIAL_COUNT);
|
||||
if (trialsToComplete <= TrialsDoneCount()) {
|
||||
if (TrialsDoneCount() == NUM_TRIALS) {
|
||||
Actor_Kill(thisx);
|
||||
return;
|
||||
}
|
||||
@@ -141,6 +161,10 @@ void DemoKekkai_Init(Actor* thisx, GlobalContext* globalCtx) {
|
||||
case KEKKAI_SHADOW:
|
||||
case KEKKAI_SPIRIT:
|
||||
case KEKKAI_FOREST:
|
||||
if (gSaveContext.n64ddFlag && Flags_GetRandomizerInf(trialParamToRandInf(thisx->params))) {
|
||||
Actor_Kill(thisx);
|
||||
return;
|
||||
}
|
||||
this->energyAlpha = 1.0f;
|
||||
this->orbScale = 1.0f;
|
||||
Actor_SetScale(thisx, 0.1f);
|
||||
@@ -247,27 +271,10 @@ void DemoKekkai_TrialBarrierDispel(Actor* thisx, GlobalContext* globalCtx) {
|
||||
DemoKekkai* this = (DemoKekkai*)thisx;
|
||||
|
||||
if (gSaveContext.n64ddFlag) {
|
||||
switch (thisx->params) {
|
||||
case KEKKAI_WATER:
|
||||
Flags_SetRandomizerInf(RAND_INF_TRIALS_DONE_WATER_TRIAL);
|
||||
break;
|
||||
case KEKKAI_LIGHT:
|
||||
Flags_SetRandomizerInf(RAND_INF_TRIALS_DONE_LIGHT_TRIAL);
|
||||
break;
|
||||
case KEKKAI_FIRE:
|
||||
Flags_SetRandomizerInf(RAND_INF_TRIALS_DONE_FIRE_TRIAL);
|
||||
break;
|
||||
case KEKKAI_SHADOW:
|
||||
Flags_SetRandomizerInf(RAND_INF_TRIALS_DONE_SHADOW_TRIAL);
|
||||
break;
|
||||
case KEKKAI_SPIRIT:
|
||||
Flags_SetRandomizerInf(RAND_INF_TRIALS_DONE_SPIRIT_TRIAL);
|
||||
break;
|
||||
case KEKKAI_FOREST:
|
||||
Flags_SetRandomizerInf(RAND_INF_TRIALS_DONE_FOREST_TRIAL);
|
||||
break;
|
||||
}
|
||||
Flags_SetEventChkInf(eventFlags[thisx->params]);
|
||||
Flags_SetRandomizerInf(trialParamToRandInf(thisx->params));
|
||||
// May or may not be needed. Not sure if needed for anything
|
||||
// that randoInf isn't already covering. Leaving it for safety.
|
||||
Flags_SetEventChkInf(eventFlags[thisx->params]);
|
||||
}
|
||||
|
||||
if (globalCtx->csCtx.frames == csFrames[this->actor.params]) {
|
||||
|
||||
@@ -15,6 +15,7 @@ void EnDns_Destroy(Actor* thisx, GlobalContext* globalCtx);
|
||||
void EnDns_Update(Actor* thisx, GlobalContext* globalCtx);
|
||||
void EnDns_Draw(Actor* thisx, GlobalContext* globalCtx);
|
||||
|
||||
u32 EnDns_RandomizerPurchaseableCheck(EnDns* this);
|
||||
u32 func_809EF5A4(EnDns* this);
|
||||
u32 func_809EF658(EnDns* this);
|
||||
u32 func_809EF70C(EnDns* this);
|
||||
@@ -24,6 +25,7 @@ u32 func_809EF854(EnDns* this);
|
||||
u32 func_809EF8F4(EnDns* this);
|
||||
u32 func_809EF9A4(EnDns* this);
|
||||
|
||||
void EnDns_RandomizerPurchase(EnDns* this);
|
||||
void func_809EF9F8(EnDns* this);
|
||||
void func_809EFA28(EnDns* this);
|
||||
void func_809EFA58(EnDns* this);
|
||||
@@ -155,7 +157,6 @@ void EnDns_Init(Actor* thisx, GlobalContext* globalCtx) {
|
||||
Collider_InitCylinder(globalCtx, &this->collider);
|
||||
Collider_SetCylinderType1(globalCtx, &this->collider, &this->actor, &sCylinderInit);
|
||||
ActorShape_Init(&this->actor.shape, 0.0f, ActorShadow_DrawCircle, 35.0f);
|
||||
this->actor.textId = D_809F040C[this->actor.params];
|
||||
Actor_SetScale(&this->actor, 0.01f);
|
||||
this->actor.colChkInfo.mass = MASS_IMMOVABLE;
|
||||
this->maintainCollider = 1;
|
||||
@@ -164,7 +165,27 @@ void EnDns_Init(Actor* thisx, GlobalContext* globalCtx) {
|
||||
this->actor.speedXZ = 0.0f;
|
||||
this->actor.velocity.y = 0.0f;
|
||||
this->actor.gravity = -1.0f;
|
||||
this->actor.textId = D_809F040C[this->actor.params];
|
||||
this->dnsItemEntry = sItemEntries[this->actor.params];
|
||||
if (gSaveContext.n64ddFlag) {
|
||||
// Ugly, but the best way we can identify which grotto we are in, same method 3DRando uses, but we'll need to account for entrance rando
|
||||
s16 respawnData = gSaveContext.respawn[RESPAWN_MODE_RETURN].data & ((1 << 8) - 1);
|
||||
this->scrubIdentity = Randomizer_IdentifyScrub(globalCtx->sceneNum, this->actor.params, respawnData);
|
||||
|
||||
if (Randomizer_GetSettingValue(RSK_SHUFFLE_SCRUBS) == 1 || Randomizer_GetSettingValue(RSK_SHUFFLE_SCRUBS) == 3 && this->scrubIdentity.itemPrice != -1) {
|
||||
this->dnsItemEntry->itemPrice = this->scrubIdentity.itemPrice;
|
||||
}
|
||||
|
||||
if (this->scrubIdentity.isShuffled) {
|
||||
this->dnsItemEntry->getItemId = this->scrubIdentity.getItemId;
|
||||
this->dnsItemEntry->purchaseableCheck = EnDns_RandomizerPurchaseableCheck;
|
||||
this->dnsItemEntry->setRupeesAndFlags = EnDns_RandomizerPurchase;
|
||||
this->dnsItemEntry->itemAmount = 1;
|
||||
// Currently the textID is simply identified by the item price since that is the only thing
|
||||
// unique to it, later on this will change to identifying by scrubIdentity.randomizerInf
|
||||
this->actor.textId = 0x9000 + this->dnsItemEntry->itemPrice;
|
||||
}
|
||||
}
|
||||
this->actionFunc = EnDns_SetupWait;
|
||||
}
|
||||
|
||||
@@ -185,6 +206,13 @@ void EnDns_ChangeAnim(EnDns* this, u8 index) {
|
||||
|
||||
/* Item give checking functions */
|
||||
|
||||
u32 EnDns_RandomizerPurchaseableCheck(EnDns* this) {
|
||||
if (gSaveContext.rupees < this->dnsItemEntry->itemPrice || Flags_GetRandomizerInf(this->scrubIdentity.randomizerInf)) {
|
||||
return 0;
|
||||
}
|
||||
return 4;
|
||||
}
|
||||
|
||||
u32 func_809EF5A4(EnDns* this) {
|
||||
if ((CUR_CAPACITY(UPG_NUTS) != 0) && (AMMO(ITEM_NUT) >= CUR_CAPACITY(UPG_NUTS))) {
|
||||
return 1;
|
||||
@@ -281,6 +309,10 @@ u32 func_809EF9A4(EnDns* this) {
|
||||
}
|
||||
|
||||
/* Paying and flagging functions */
|
||||
void EnDns_RandomizerPurchase(EnDns* this) {
|
||||
Rupees_ChangeBy(-this->dnsItemEntry->itemPrice);
|
||||
Flags_SetRandomizerInf(this->scrubIdentity.randomizerInf);
|
||||
}
|
||||
|
||||
void func_809EF9F8(EnDns* this) {
|
||||
Rupees_ChangeBy(-this->dnsItemEntry->itemPrice);
|
||||
@@ -369,31 +401,25 @@ void EnDns_Talk(EnDns* this, GlobalContext* globalCtx) {
|
||||
}
|
||||
|
||||
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);
|
||||
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);
|
||||
if (!gSaveContext.n64ddFlag || !this->scrubIdentity.isShuffled) {
|
||||
if (this->actor.params == 0x9) {
|
||||
if (CUR_UPG_VALUE(UPG_STICKS) < 2) {
|
||||
func_8002F434(&this->actor, globalCtx, GI_STICK_UPGRADE_20, 130.0f, 100.0f);
|
||||
} else {
|
||||
func_8002F434(&this->actor, globalCtx, GI_STICK_UPGRADE_30, 130.0f, 100.0f);
|
||||
}
|
||||
} else if (this->actor.params == 0xA) {
|
||||
if (CUR_UPG_VALUE(UPG_NUTS) < 2) {
|
||||
func_8002F434(&this->actor, globalCtx, GI_NUT_UPGRADE_30, 130.0f, 100.0f);
|
||||
} else {
|
||||
func_8002F434(&this->actor, globalCtx, GI_NUT_UPGRADE_40, 130.0f, 100.0f);
|
||||
}
|
||||
} else {
|
||||
func_8002F434(&this->actor, globalCtx, GI_STICK_UPGRADE_30, 130.0f, 100.0f);
|
||||
}
|
||||
} 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);
|
||||
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 {
|
||||
func_8002F434(&this->actor, globalCtx, GI_NUT_UPGRADE_40, 130.0f, 100.0f);
|
||||
func_8002F434(&this->actor, globalCtx, this->dnsItemEntry->getItemId, 130.0f, 100.0f);
|
||||
}
|
||||
} else {
|
||||
if (!gSaveContext.n64ddFlag) {
|
||||
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);
|
||||
GiveItemEntryFromActor(&this->actor, globalCtx, getItemEntry, 130.0f, 100.0f);
|
||||
}
|
||||
GetItemEntry itemEntry = Randomizer_GetItemFromKnownCheck(this->scrubIdentity.randomizerCheck, this->scrubIdentity.getItemId);
|
||||
GiveItemEntryFromActor(&this->actor, globalCtx, itemEntry, 130.0f, 100.0f);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -489,6 +515,11 @@ void EnDns_Update(Actor* thisx, GlobalContext* globalCtx) {
|
||||
|
||||
this->dustTimer++;
|
||||
this->actor.textId = D_809F040C[this->actor.params];
|
||||
if (gSaveContext.n64ddFlag && this->scrubIdentity.isShuffled) {
|
||||
// Currently the textID is simply identified by the item price since that is the only thing
|
||||
// unique to it, later on this will change to identifying by scrubIdentity.randomizerInf
|
||||
this->actor.textId = 0x9000 + this->dnsItemEntry->itemPrice;
|
||||
}
|
||||
Actor_SetFocus(&this->actor, 60.0f);
|
||||
Actor_SetScale(&this->actor, 0.01f);
|
||||
SkelAnime_Update(&this->skelAnime);
|
||||
|
||||
@@ -32,6 +32,7 @@ typedef struct EnDns {
|
||||
/* 0x02BD */ u8 dropCollectible;
|
||||
/* 0x02C0 */ DnsItemEntry* dnsItemEntry;
|
||||
/* 0x02C4 */ f32 yInitPos;
|
||||
/* */ ScrubIdentity scrubIdentity;
|
||||
} EnDns; // size = 0x02C8
|
||||
|
||||
#endif
|
||||
|
||||
@@ -90,7 +90,16 @@ static void* sEyeTextures[] = {
|
||||
gMalonChildEyeClosedTex,
|
||||
};
|
||||
|
||||
bool Randomizer_ObtainedMalonHCReward() {
|
||||
return Flags_GetEventChkInf(0x12);
|
||||
}
|
||||
|
||||
u16 EnMa1_GetText(GlobalContext* globalCtx, Actor* thisx) {
|
||||
// Special case for Malon Hyrule Castle Text. Placing it here at the beginning
|
||||
// has the added benefit of circumventing mask text if wearing bunny hood.
|
||||
if (gSaveContext.n64ddFlag && globalCtx->sceneNum == SCENE_SPOT15) {
|
||||
return Randomizer_ObtainedMalonHCReward() ? 0x2044 : 0x2043;
|
||||
}
|
||||
u16 faceReaction = Text_GetFaceReaction(globalCtx, 0x17);
|
||||
|
||||
if (faceReaction != 0) {
|
||||
@@ -191,25 +200,34 @@ s32 func_80AA08C4(EnMa1* this, GlobalContext* globalCtx) {
|
||||
if (!LINK_IS_CHILD) {
|
||||
return 0;
|
||||
}
|
||||
// Causes Malon to appear in the market if you haven't met her yet.
|
||||
if (((globalCtx->sceneNum == SCENE_MARKET_NIGHT) || (globalCtx->sceneNum == SCENE_MARKET_DAY)) &&
|
||||
!(gSaveContext.eventChkInf[1] & 0x10) && !(gSaveContext.infTable[8] & 0x800)) {
|
||||
return 1;
|
||||
}
|
||||
if ((globalCtx->sceneNum == SCENE_SPOT15) && !(gSaveContext.eventChkInf[1] & 0x10)) {
|
||||
if (gSaveContext.infTable[8] & 0x800) {
|
||||
return 1;
|
||||
} else {
|
||||
gSaveContext.infTable[8] |= 0x800;
|
||||
return 0;
|
||||
if ((globalCtx->sceneNum == SCENE_SPOT15) && // if we're at hyrule castle
|
||||
(!(gSaveContext.eventChkInf[1] & 0x10) || // and talon hasn't left
|
||||
(gSaveContext.n64ddFlag &&
|
||||
!Randomizer_ObtainedMalonHCReward()))) { // or we're rando'd and haven't gotten malon's HC check
|
||||
if (gSaveContext.infTable[8] & 0x800) { // if we've met malon
|
||||
return 1; // make her appear at the castle
|
||||
} else { // if we haven't met malon
|
||||
gSaveContext.infTable[8] |= 0x800; // set the flag for meeting malon
|
||||
return 0; // don't make her appear at the castle
|
||||
}
|
||||
}
|
||||
// Malon asleep in her bed if Talon has left Hyrule Castle and it is nighttime.
|
||||
if ((globalCtx->sceneNum == SCENE_SOUKO) && IS_NIGHT && (gSaveContext.eventChkInf[1] & 0x10)) {
|
||||
return 1;
|
||||
}
|
||||
// Don't spawn Malon if none of the above are true and we are not in Lon Lon Ranch.
|
||||
if (globalCtx->sceneNum != SCENE_SPOT20) {
|
||||
return 0;
|
||||
}
|
||||
if ((this->actor.shape.rot.z == 3) && IS_DAY && (gSaveContext.eventChkInf[1] & 0x10)) {
|
||||
// If we've gotten this far, we're in Lon Lon Ranch. Spawn Malon if it is daytime, Talon has left Hyrule Castle, and
|
||||
// either we are not randomized, or we are and we have received Malon's item at Hyrule Castle.
|
||||
if ((this->actor.shape.rot.z == 3) && IS_DAY && (gSaveContext.eventChkInf[1] & 0x10) &&
|
||||
((gSaveContext.n64ddFlag && Randomizer_ObtainedMalonHCReward()) || !gSaveContext.n64ddFlag)) {
|
||||
return 1;
|
||||
}
|
||||
return 0;
|
||||
@@ -290,10 +308,16 @@ void EnMa1_Init(Actor* thisx, GlobalContext* globalCtx) {
|
||||
this->actor.targetMode = 6;
|
||||
this->unk_1E8.unk_00 = 0;
|
||||
|
||||
if (!(gSaveContext.eventChkInf[1] & 0x10) || (CHECK_QUEST_ITEM(QUEST_SONG_EPONA) && !gSaveContext.n64ddFlag) ||
|
||||
// To avoid missing a check, we want Malon to have the actionFunc for singing, but not reacting to Ocarina, if any of
|
||||
// the following are true.
|
||||
// 1. Talon has not left Hyrule Castle.
|
||||
// 2. We are Randomized and have not obtained Malon's Weird Egg Check.
|
||||
// 3. We are not Randomized and have obtained Epona's Song
|
||||
if (!(gSaveContext.eventChkInf[1] & 0x10) || (gSaveContext.n64ddFlag && !Randomizer_ObtainedMalonHCReward()) || (CHECK_QUEST_ITEM(QUEST_SONG_EPONA) && !gSaveContext.n64ddFlag) ||
|
||||
(gSaveContext.n64ddFlag && Flags_GetTreasure(globalCtx, 0x1F))) {
|
||||
this->actionFunc = func_80AA0D88;
|
||||
EnMa1_ChangeAnim(this, ENMA1_ANIM_2);
|
||||
// If none of the above conditions were true, set Malon up to teach Epona's Song.
|
||||
} else {
|
||||
if (gSaveContext.n64ddFlag) { // Skip straight to "let's sing it together" textbox in the ranch
|
||||
gSaveContext.eventChkInf[1] |= 0x40;
|
||||
@@ -322,9 +346,16 @@ void func_80AA0D88(EnMa1* this, GlobalContext* globalCtx) {
|
||||
}
|
||||
}
|
||||
|
||||
if ((globalCtx->sceneNum == SCENE_SPOT15) && (gSaveContext.eventChkInf[1] & 0x10)) {
|
||||
// We want to Kill Malon's Actor outside of randomizer when Talon is freed. In Randomizer we don't kill Malon's
|
||||
// Actor here, otherwise if we wake up Talon first and then get her check she will spontaneously
|
||||
// disappear.
|
||||
if ((globalCtx->sceneNum == SCENE_SPOT15) && (!gSaveContext.n64ddFlag && gSaveContext.eventChkInf[1] & 0x10)) {
|
||||
Actor_Kill(&this->actor);
|
||||
} else if (!(gSaveContext.eventChkInf[1] & 0x10) || (CHECK_QUEST_ITEM(QUEST_SONG_EPONA) && !gSaveContext.n64ddFlag)) {
|
||||
// We want Malon to give the Weird Egg Check (see function below) in the following situations:
|
||||
// 1. Talon as not left Hyrule Castle (Vanilla) OR
|
||||
// 2. We haven't obtained Malon's Weird Egg Check (Randomizer only) OR
|
||||
// 3. We have Epona's Song? (Vanilla only, not sure why it's here but I didn't write that one)
|
||||
} else if ((!(gSaveContext.eventChkInf[1] & 0x10) || (gSaveContext.n64ddFlag && !Randomizer_ObtainedMalonHCReward())) || (CHECK_QUEST_ITEM(QUEST_SONG_EPONA) && !gSaveContext.n64ddFlag)) {
|
||||
if (this->unk_1E8.unk_00 == 2) {
|
||||
this->actionFunc = func_80AA0EA0;
|
||||
globalCtx->msgCtx.stateTimer = 4;
|
||||
|
||||
@@ -125,11 +125,19 @@ void EnMs_Talk(EnMs* this, GlobalContext* globalCtx) {
|
||||
} else if (Message_ShouldAdvance(globalCtx)) {
|
||||
switch (globalCtx->msgCtx.choiceIndex) {
|
||||
case 0: // yes
|
||||
if (gSaveContext.rupees < sPrices[BEANS_BOUGHT]) {
|
||||
if (gSaveContext.rupees <
|
||||
((gSaveContext.n64ddFlag && Randomizer_GetSettingValue(RSK_SHUFFLE_MAGIC_BEANS))
|
||||
? 60
|
||||
: sPrices[BEANS_BOUGHT])) {
|
||||
Message_ContinueTextbox(globalCtx, 0x4069); // not enough rupees text
|
||||
return;
|
||||
}
|
||||
func_8002F434(&this->actor, globalCtx, GI_BEAN, 90.0f, 10.0f);
|
||||
if (gSaveContext.n64ddFlag && Randomizer_GetSettingValue(RSK_SHUFFLE_MAGIC_BEANS)) {
|
||||
GiveItemEntryFromActor(&this->actor, globalCtx,
|
||||
Randomizer_GetItemFromKnownCheck(RC_ZR_MAGIC_BEAN_SALESMAN, GI_BEAN), 90.0f, 10.0f);
|
||||
} else {
|
||||
func_8002F434(&this->actor, globalCtx, GI_BEAN, 90.0f, 10.0f);
|
||||
}
|
||||
this->actionFunc = EnMs_Sell;
|
||||
return;
|
||||
case 1: // no
|
||||
@@ -142,11 +150,18 @@ void EnMs_Talk(EnMs* this, GlobalContext* globalCtx) {
|
||||
|
||||
void EnMs_Sell(EnMs* this, GlobalContext* globalCtx) {
|
||||
if (Actor_HasParent(&this->actor, globalCtx)) {
|
||||
Rupees_ChangeBy(-sPrices[BEANS_BOUGHT]);
|
||||
Rupees_ChangeBy((gSaveContext.n64ddFlag && Randomizer_GetSettingValue(RSK_SHUFFLE_MAGIC_BEANS)) ? -60 : -sPrices[BEANS_BOUGHT]);
|
||||
this->actor.parent = NULL;
|
||||
this->actionFunc = EnMs_TalkAfterPurchase;
|
||||
this->actionFunc =
|
||||
(gSaveContext.n64ddFlag && Randomizer_GetSettingValue(RSK_SHUFFLE_MAGIC_BEANS)) ? EnMs_Wait : EnMs_TalkAfterPurchase;
|
||||
} else {
|
||||
func_8002F434(&this->actor, globalCtx, GI_BEAN, 90.0f, 10.0f);
|
||||
if (gSaveContext.n64ddFlag && Randomizer_GetSettingValue(RSK_SHUFFLE_MAGIC_BEANS)) {
|
||||
GiveItemEntryFromActor(&this->actor, globalCtx,
|
||||
Randomizer_GetItemFromKnownCheck(RC_ZR_MAGIC_BEAN_SALESMAN, GI_BEAN), 90.0f, 10.0f);
|
||||
BEANS_BOUGHT = 10;
|
||||
} else {
|
||||
func_8002F434(&this->actor, globalCtx, GI_BEAN, 90.0f, 10.0f);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -69,6 +69,15 @@ void EnShopnuts_Init(Actor* thisx, GlobalContext* globalCtx) {
|
||||
CollisionCheck_SetInfo(&this->actor.colChkInfo, NULL, &sColChkInfoInit);
|
||||
Collider_UpdateCylinder(&this->actor, &this->collider);
|
||||
|
||||
if (gSaveContext.n64ddFlag) {
|
||||
s16 respawnData = gSaveContext.respawn[RESPAWN_MODE_RETURN].data & ((1 << 8) - 1);
|
||||
ScrubIdentity scrubIdentity = Randomizer_IdentifyScrub(globalCtx->sceneNum, this->actor.params, respawnData);
|
||||
|
||||
if (scrubIdentity.isShuffled && Flags_GetRandomizerInf(scrubIdentity.randomizerInf)) {
|
||||
Actor_Kill(&this->actor);
|
||||
}
|
||||
}
|
||||
|
||||
if (((this->actor.params == 0x0002) && (gSaveContext.itemGetInf[0] & 0x800)) ||
|
||||
((this->actor.params == 0x0009) && (gSaveContext.infTable[25] & 4)) ||
|
||||
((this->actor.params == 0x000A) && (gSaveContext.infTable[25] & 8))) {
|
||||
|
||||
@@ -17,7 +17,8 @@ s32 func_80AFB748(EnSi* this, GlobalContext* globalCtx);
|
||||
void func_80AFB768(EnSi* this, GlobalContext* globalCtx);
|
||||
void func_80AFB89C(EnSi* this, GlobalContext* globalCtx);
|
||||
void func_80AFB950(EnSi* this, GlobalContext* globalCtx);
|
||||
void Randomizer_GrantSkullReward(EnSi* this, GlobalContext* globalCtx);
|
||||
void Randomizer_UpdateSkullReward(EnSi* this, GlobalContext* globalCtx);
|
||||
void Randomizer_GiveSkullReward(EnSi* this, GlobalContext* globalCtx);
|
||||
|
||||
s32 textId = 0xB4;
|
||||
s32 giveItemId = ITEM_SKULL_TOKEN;
|
||||
@@ -99,21 +100,25 @@ void func_80AFB768(EnSi* this, GlobalContext* globalCtx) {
|
||||
|
||||
if (this->collider.base.ocFlags2 & OC2_HIT_PLAYER) {
|
||||
this->collider.base.ocFlags2 &= ~OC2_HIT_PLAYER;
|
||||
|
||||
if (gSaveContext.n64ddFlag) {
|
||||
Randomizer_GrantSkullReward(this, globalCtx);
|
||||
Randomizer_UpdateSkullReward(this, globalCtx);
|
||||
} else {
|
||||
Item_Give(globalCtx, giveItemId);
|
||||
}
|
||||
if ((CVar_GetS32("gSkulltulaFreeze", 0) != 1 || giveItemId != ITEM_SKULL_TOKEN) && getItemId != RG_ICE_TRAP) {
|
||||
player->actor.freezeTimer = 20;
|
||||
}
|
||||
|
||||
Message_StartTextbox(globalCtx, textId, NULL);
|
||||
|
||||
if (gSaveContext.n64ddFlag && getItemId != RG_ICE_TRAP) {
|
||||
Randomizer_GiveSkullReward(this, globalCtx);
|
||||
Audio_PlayFanfare_Rando(getItem);
|
||||
} else {
|
||||
Audio_PlayFanfare(NA_BGM_SMALL_ITEM_GET);
|
||||
}
|
||||
|
||||
player->getItemEntry = (GetItemEntry)GET_ITEM_NONE;
|
||||
this->actionFunc = func_80AFB950;
|
||||
} else {
|
||||
@@ -133,16 +138,20 @@ void func_80AFB89C(EnSi* this, GlobalContext* globalCtx) {
|
||||
|
||||
if (!CHECK_FLAG_ALL(this->actor.flags, ACTOR_FLAG_13)) {
|
||||
if (gSaveContext.n64ddFlag) {
|
||||
Randomizer_GrantSkullReward(this, globalCtx);
|
||||
Randomizer_UpdateSkullReward(this, globalCtx);
|
||||
} else {
|
||||
Item_Give(globalCtx, giveItemId);
|
||||
}
|
||||
|
||||
Message_StartTextbox(globalCtx, textId, NULL);
|
||||
|
||||
if (gSaveContext.n64ddFlag && getItemId != RG_ICE_TRAP) {
|
||||
Randomizer_GiveSkullReward(this, globalCtx);
|
||||
Audio_PlayFanfare_Rando(getItem);
|
||||
} else {
|
||||
Audio_PlayFanfare(NA_BGM_SMALL_ITEM_GET);
|
||||
}
|
||||
|
||||
player->getItemEntry = (GetItemEntry)GET_ITEM_NONE;
|
||||
this->actionFunc = func_80AFB950;
|
||||
}
|
||||
@@ -190,7 +199,7 @@ void EnSi_Draw(Actor* thisx, GlobalContext* globalCtx) {
|
||||
}
|
||||
}
|
||||
|
||||
void Randomizer_GrantSkullReward(EnSi* this, GlobalContext* globalCtx) {
|
||||
void Randomizer_UpdateSkullReward(EnSi* this, GlobalContext* globalCtx) {
|
||||
Player* player = GET_PLAYER(globalCtx);
|
||||
|
||||
getItem = Randomizer_GetRandomizedItem(GI_SKULL_TOKEN, this->actor.id, this->actor.params, globalCtx->sceneNum);
|
||||
@@ -201,12 +210,20 @@ void Randomizer_GrantSkullReward(EnSi* this, GlobalContext* globalCtx) {
|
||||
} else {
|
||||
textId = getItem.textId;
|
||||
giveItemId = getItem.itemId;
|
||||
if (getItem.modIndex == MOD_NONE) {
|
||||
Item_Give(globalCtx, giveItemId);
|
||||
} else if (getItem.modIndex == MOD_RANDOMIZER) {
|
||||
Randomizer_Item_Give(globalCtx, getItem);
|
||||
}
|
||||
}
|
||||
// player->getItemId = getItemId;
|
||||
player->getItemEntry = getItem;
|
||||
}
|
||||
|
||||
void Randomizer_GiveSkullReward(EnSi* this, GlobalContext* globalCtx) {
|
||||
Player* player = GET_PLAYER(globalCtx);
|
||||
|
||||
if (getItem.modIndex == MOD_NONE) {
|
||||
Item_Give(globalCtx, giveItemId);
|
||||
} else if (getItem.modIndex == MOD_RANDOMIZER) {
|
||||
Randomizer_Item_Give(globalCtx, getItem);
|
||||
}
|
||||
// RANDOTOD: Move this into Item_Give() or some other more central location
|
||||
if (getItem.getItemId == GI_SWORD_BGS) {
|
||||
gSaveContext.bgsFlag = true;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -135,6 +135,27 @@ void ObjectKankyo_Init(Actor* thisx, GlobalContext* globalCtx) {
|
||||
this->effects[5].size = 0.0f;
|
||||
}
|
||||
|
||||
if (gSaveContext.n64ddFlag) {
|
||||
if (Flags_GetRandomizerInf(RAND_INF_TRIALS_DONE_FOREST_TRIAL)) {
|
||||
this->effects[0].size = 0.0f;
|
||||
}
|
||||
if (Flags_GetRandomizerInf(RAND_INF_TRIALS_DONE_WATER_TRIAL)) {
|
||||
this->effects[1].size = 0.0f;
|
||||
}
|
||||
if (Flags_GetRandomizerInf(RAND_INF_TRIALS_DONE_SHADOW_TRIAL)) {
|
||||
this->effects[2].size = 0.0f;
|
||||
}
|
||||
if (Flags_GetRandomizerInf(RAND_INF_TRIALS_DONE_FIRE_TRIAL)) {
|
||||
this->effects[3].size = 0.0f;
|
||||
}
|
||||
if (Flags_GetRandomizerInf(RAND_INF_TRIALS_DONE_LIGHT_TRIAL)) {
|
||||
this->effects[4].size = 0.0f;
|
||||
}
|
||||
if (Flags_GetRandomizerInf(RAND_INF_TRIALS_DONE_SPIRIT_TRIAL)) {
|
||||
this->effects[5].size = 0.0f;
|
||||
}
|
||||
}
|
||||
|
||||
if (gSaveContext.cutsceneTrigger != 0) {
|
||||
if (gSaveContext.entranceIndex == 0x0538) {
|
||||
this->effects[0].size = 0.1f;
|
||||
|
||||
@@ -6108,7 +6108,7 @@ s32 func_8083E5A8(Player* this, GlobalContext* globalCtx) {
|
||||
}
|
||||
|
||||
GetItemEntry giEntry;
|
||||
if (this->getItemEntry.objectId == OBJECT_INVALID) {
|
||||
if (this->getItemEntry.objectId == OBJECT_INVALID || (this->getItemId != this->getItemEntry.getItemId)) {
|
||||
giEntry = ItemTable_Retrieve(this->getItemId);
|
||||
} else {
|
||||
giEntry = this->getItemEntry;
|
||||
@@ -6165,7 +6165,7 @@ s32 func_8083E5A8(Player* this, GlobalContext* globalCtx) {
|
||||
}
|
||||
} else if (CHECK_BTN_ALL(sControlInput->press.button, BTN_A) && !(this->stateFlags1 & PLAYER_STATE1_11) &&
|
||||
!(this->stateFlags2 & PLAYER_STATE2_10)) {
|
||||
if (this->getItemId != GI_NONE && this->getItemEntry.objectId != OBJECT_INVALID) {
|
||||
if (this->getItemId != GI_NONE) {
|
||||
GetItemEntry giEntry;
|
||||
if (this->getItemEntry.objectId == OBJECT_INVALID) {
|
||||
giEntry = ItemTable_Retrieve(-this->getItemId);
|
||||
@@ -9687,8 +9687,8 @@ void func_808473D4(GlobalContext* globalCtx, Player* this) {
|
||||
else if ((!(this->stateFlags1 & PLAYER_STATE1_11) || (heldActor == NULL)) &&
|
||||
(interactRangeActor != NULL) &&
|
||||
((!sp1C && (this->getItemId == GI_NONE)) ||
|
||||
((this->getItemId < 0 && this->getItemEntry.getItemId < 0) && !(this->stateFlags1 & PLAYER_STATE1_27)))) {
|
||||
if (this->getItemId < 0 && this->getItemEntry.getItemId < 0) {
|
||||
(this->getItemId < 0 && !(this->stateFlags1 & PLAYER_STATE1_27)))) {
|
||||
if (this->getItemId < 0) {
|
||||
doAction = DO_ACTION_OPEN;
|
||||
} else if ((interactRangeActor->id == ACTOR_BG_TOKI_SWD) && LINK_IS_ADULT) {
|
||||
doAction = DO_ACTION_DROP;
|
||||
|
||||
@@ -433,6 +433,7 @@ void FileChoose_UpdateMainMenu(GameState* thisx) {
|
||||
const char* fileLoc = CVar_GetString("gSpoilerLog", "");
|
||||
Randomizer_LoadSettings(fileLoc);
|
||||
Randomizer_LoadHintLocations(fileLoc);
|
||||
Randomizer_LoadRequiredTrials(fileLoc);
|
||||
Randomizer_LoadItemLocations(fileLoc, silent);
|
||||
fileSelectSpoilerFileLoaded = true;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user