mirror of
https://github.com/HarbourMasters/Shipwright.git
synced 2025-01-08 12:28:10 -05:00
Rando: Shuffle Child's Wallet (Rando V3) (#3794)
* Shuffle Child's Wallet * Add support for "More info in file select" * Fix build * Fix build * Update randomizer.cpp * Update locacc_hyrule_field.cpp
This commit is contained in:
parent
080038c39e
commit
ab3e9a7e54
@ -487,7 +487,7 @@ const std::vector<FlagTable> flagTables = {
|
||||
{ RAND_INF_SHOP_ITEMS_MARKET_BOMBCHU_SHOP_ITEM_6, "SHOP_ITEMS_MARKET_BOMBCHU_SHOP_ITEM_6" },
|
||||
{ RAND_INF_SHOP_ITEMS_MARKET_BOMBCHU_SHOP_ITEM_7, "SHOP_ITEMS_MARKET_BOMBCHU_SHOP_ITEM_7" },
|
||||
{ RAND_INF_SHOP_ITEMS_MARKET_BOMBCHU_SHOP_ITEM_8, "SHOP_ITEMS_MARKET_BOMBCHU_SHOP_ITEM_8" },
|
||||
|
||||
|
||||
{ RAND_INF_MERCHANTS_CARPET_SALESMAN, "RAND_INF_MERCHANTS_CARPET_SALESMAN" },
|
||||
{ RAND_INF_MERCHANTS_MEDIGORON, "RAND_INF_MERCHANTS_MEDIGORON" },
|
||||
{ RAND_INF_MERCHANTS_GRANNYS_SHOP, "RAND_INF_MERCHANTS_GRANNY_SHOP"},
|
||||
@ -523,6 +523,8 @@ const std::vector<FlagTable> flagTables = {
|
||||
{ RAND_INF_HAS_OCARINA_C_LEFT, "RAND_INF_HAS_OCARINA_C_LEFT"},
|
||||
{ RAND_INF_HAS_OCARINA_C_RIGHT, "RAND_INF_HAS_OCARINA_C_RIGHT"},
|
||||
|
||||
{ RAND_INF_HAS_WALLET, "RAND_INF_HAS_WALLET" },
|
||||
|
||||
{ RAND_INF_BEEHIVE_KF_STORMS_GROTTO_LEFT, "RAND_INF_BEEHIVE_KF_STORMS_GROTTO_LEFT" },
|
||||
{ RAND_INF_BEEHIVE_KF_STORMS_GROTTO_RIGHT, "RAND_INF_BEEHIVE_KF_STORMS_GROTTO_RIGHT" },
|
||||
{ RAND_INF_BEEHIVE_LW_NEAR_SHORTCUTS_GROTTO_LEFT, "RAND_INF_BEEHIVE_LW_NEAR_SHORTCUTS_GROTTO_LEFT" },
|
||||
|
@ -64,7 +64,7 @@ void ReloadSceneTogglingLinkAge() {
|
||||
void RegisterInfiniteMoney() {
|
||||
GameInteractor::Instance->RegisterGameHook<GameInteractor::OnGameFrameUpdate>([]() {
|
||||
if (!GameInteractor::IsSaveLoaded()) return;
|
||||
if (CVarGetInteger("gInfiniteMoney", 0) != 0) {
|
||||
if (CVarGetInteger("gInfiniteMoney", 0) != 0 && (!IS_RANDO || Flags_GetRandomizerInf(RAND_INF_HAS_WALLET))) {
|
||||
if (gSaveContext.rupees < CUR_CAPACITY(UPG_WALLET)) {
|
||||
gSaveContext.rupees = CUR_CAPACITY(UPG_WALLET);
|
||||
}
|
||||
@ -1284,6 +1284,14 @@ void RegisterToTMedallions() {
|
||||
});
|
||||
}
|
||||
|
||||
void RegisterNoWallet() {
|
||||
GameInteractor::Instance->RegisterGameHook<GameInteractor::OnGameFrameUpdate>([]() {
|
||||
if (IS_RANDO && !Flags_GetRandomizerInf(RAND_INF_HAS_WALLET)) {
|
||||
gSaveContext.rupees = 0;
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
void RegisterFishsanity() {
|
||||
static s16 fishGroupCounter = 0;
|
||||
|
||||
@ -1467,6 +1475,7 @@ void InitMods() {
|
||||
RegisterBossSouls();
|
||||
RegisterRandomizedEnemySizes();
|
||||
RegisterToTMedallions();
|
||||
RegisterNoWallet();
|
||||
RegisterFishsanity();
|
||||
NameTag_RegisterHooks();
|
||||
}
|
||||
|
@ -964,6 +964,11 @@ void GenerateItemPool() {
|
||||
}
|
||||
}
|
||||
|
||||
if (ctx->GetOption(RSK_SHUFFLE_CHILD_WALLET)) {
|
||||
AddItemToMainPool(RG_PROGRESSIVE_WALLET);
|
||||
}
|
||||
|
||||
|
||||
if (ctx->GetOption(RSK_BOMBCHUS_IN_LOGIC)) {
|
||||
AddItemToMainPool(RG_PROGRESSIVE_BOMBCHUS, 5);
|
||||
} else {
|
||||
|
@ -45,18 +45,20 @@ bool LocationAccess::ConditionsMet() const {
|
||||
|
||||
bool LocationAccess::CanBuy() const {
|
||||
auto ctx = Rando::Context::GetInstance();
|
||||
//Not a shop location, don't need to check if buyable
|
||||
if (!(Rando::StaticData::GetLocation(location)->IsCategory(Category::cShop))) {
|
||||
//Not a shop or scrub location, don't need to check if buyable
|
||||
if (!(Rando::StaticData::GetLocation(location)->IsCategory(Category::cShop)) && !(Rando::StaticData::GetLocation(location)->IsCategory(Category::cDekuScrub))) {
|
||||
return true;
|
||||
}
|
||||
|
||||
//Check if wallet is large enough to buy item
|
||||
bool SufficientWallet = true;
|
||||
if (ctx->GetItemLocation(location)->GetPrice() > 500) {
|
||||
SufficientWallet = logic->ProgressiveWallet >= 3;
|
||||
SufficientWallet = logic->ProgressiveWallet >= 4;
|
||||
} else if (ctx->GetItemLocation(location)->GetPrice() > 200) {
|
||||
SufficientWallet = logic->ProgressiveWallet >= 2;
|
||||
SufficientWallet = logic->ProgressiveWallet >= 3;
|
||||
} else if (ctx->GetItemLocation(location)->GetPrice() > 99) {
|
||||
SufficientWallet = logic->ProgressiveWallet >= 2;
|
||||
} else if (ctx->GetItemLocation(location)->GetPrice() > 0) {
|
||||
SufficientWallet = logic->ProgressiveWallet >= 1;
|
||||
}
|
||||
|
||||
|
@ -199,7 +199,7 @@ void AreaTable_Init_CastleTown() {
|
||||
|
||||
areaTable[RR_MARKET_SHOOTING_GALLERY] = Area("Market Shooting Gallery", "Market Shooting Gallery", RA_NONE, NO_DAY_NIGHT_CYCLE, {}, {
|
||||
//Locations
|
||||
LocationAccess(RC_MARKET_SHOOTING_GALLERY_REWARD, {[]{return logic->IsChild;}}),
|
||||
LocationAccess(RC_MARKET_SHOOTING_GALLERY_REWARD, {[]{return logic->IsChild && logic->ChildsWallet;}}),
|
||||
}, {
|
||||
//Exits
|
||||
Entrance(RR_THE_MARKET, {[]{return true;}}),
|
||||
@ -233,12 +233,12 @@ void AreaTable_Init_CastleTown() {
|
||||
areaTable[RR_MARKET_TREASURE_CHEST_GAME] = Area("Market Treasure Chest Game", "Market Treasure Chest Game", RA_NONE, NO_DAY_NIGHT_CYCLE, {}, {
|
||||
//Locations
|
||||
LocationAccess(RC_GREG_HINT, {[]{return true;}}),
|
||||
LocationAccess(RC_MARKET_TREASURE_CHEST_GAME_REWARD, {[]{return (logic->CanUse(RG_LENS_OF_TRUTH) && !randoCtx->GetOption(RSK_SHUFFLE_CHEST_MINIGAME)) || (randoCtx->GetOption(RSK_SHUFFLE_CHEST_MINIGAME).Is(RO_CHEST_GAME_SINGLE_KEYS) && logic->SmallKeys(RR_MARKET_TREASURE_CHEST_GAME, 6)) || (randoCtx->GetOption(RSK_SHUFFLE_CHEST_MINIGAME).Is(RO_CHEST_GAME_PACK) && logic->SmallKeys(RR_MARKET_TREASURE_CHEST_GAME, 1));}}),
|
||||
LocationAccess(RC_MARKET_TREASURE_CHEST_GAME_ITEM_1, {[]{return (randoCtx->GetOption(RSK_SHUFFLE_CHEST_MINIGAME).Is(RO_CHEST_GAME_SINGLE_KEYS) && logic->SmallKeys(RR_MARKET_TREASURE_CHEST_GAME, 1)) || (randoCtx->GetOption(RSK_SHUFFLE_CHEST_MINIGAME).Is(RO_CHEST_GAME_PACK) && logic->SmallKeys(RR_MARKET_TREASURE_CHEST_GAME, 1)) || (logic->CanUse(RG_LENS_OF_TRUTH) && !randoCtx->GetOption(RSK_SHUFFLE_CHEST_MINIGAME));}}),
|
||||
LocationAccess(RC_MARKET_TREASURE_CHEST_GAME_ITEM_2, {[]{return (randoCtx->GetOption(RSK_SHUFFLE_CHEST_MINIGAME).Is(RO_CHEST_GAME_SINGLE_KEYS) && logic->SmallKeys(RR_MARKET_TREASURE_CHEST_GAME, 2)) || (randoCtx->GetOption(RSK_SHUFFLE_CHEST_MINIGAME).Is(RO_CHEST_GAME_PACK) && logic->SmallKeys(RR_MARKET_TREASURE_CHEST_GAME, 1)) || (logic->CanUse(RG_LENS_OF_TRUTH) && !randoCtx->GetOption(RSK_SHUFFLE_CHEST_MINIGAME));}}),
|
||||
LocationAccess(RC_MARKET_TREASURE_CHEST_GAME_ITEM_3, {[]{return (randoCtx->GetOption(RSK_SHUFFLE_CHEST_MINIGAME).Is(RO_CHEST_GAME_SINGLE_KEYS) && logic->SmallKeys(RR_MARKET_TREASURE_CHEST_GAME, 3)) || (randoCtx->GetOption(RSK_SHUFFLE_CHEST_MINIGAME).Is(RO_CHEST_GAME_PACK) && logic->SmallKeys(RR_MARKET_TREASURE_CHEST_GAME, 1)) || (logic->CanUse(RG_LENS_OF_TRUTH) && !randoCtx->GetOption(RSK_SHUFFLE_CHEST_MINIGAME));}}),
|
||||
LocationAccess(RC_MARKET_TREASURE_CHEST_GAME_ITEM_4, {[]{return (randoCtx->GetOption(RSK_SHUFFLE_CHEST_MINIGAME).Is(RO_CHEST_GAME_SINGLE_KEYS) && logic->SmallKeys(RR_MARKET_TREASURE_CHEST_GAME, 4)) || (randoCtx->GetOption(RSK_SHUFFLE_CHEST_MINIGAME).Is(RO_CHEST_GAME_PACK) && logic->SmallKeys(RR_MARKET_TREASURE_CHEST_GAME, 1)) || (logic->CanUse(RG_LENS_OF_TRUTH) && !randoCtx->GetOption(RSK_SHUFFLE_CHEST_MINIGAME));}}),
|
||||
LocationAccess(RC_MARKET_TREASURE_CHEST_GAME_ITEM_5, {[]{return (randoCtx->GetOption(RSK_SHUFFLE_CHEST_MINIGAME).Is(RO_CHEST_GAME_SINGLE_KEYS) && logic->SmallKeys(RR_MARKET_TREASURE_CHEST_GAME, 5)) || (randoCtx->GetOption(RSK_SHUFFLE_CHEST_MINIGAME).Is(RO_CHEST_GAME_PACK) && logic->SmallKeys(RR_MARKET_TREASURE_CHEST_GAME, 1)) || (logic->CanUse(RG_LENS_OF_TRUTH) && !randoCtx->GetOption(RSK_SHUFFLE_CHEST_MINIGAME));}}),
|
||||
LocationAccess(RC_MARKET_TREASURE_CHEST_GAME_REWARD, {[]{return logic->ChildsWallet && ((logic->CanUse(RG_LENS_OF_TRUTH) && !randoCtx->GetOption(RSK_SHUFFLE_CHEST_MINIGAME)) || (randoCtx->GetOption(RSK_SHUFFLE_CHEST_MINIGAME).Is(RO_CHEST_GAME_SINGLE_KEYS) && logic->SmallKeys(RR_MARKET_TREASURE_CHEST_GAME, 6)) || (randoCtx->GetOption(RSK_SHUFFLE_CHEST_MINIGAME).Is(RO_CHEST_GAME_PACK) && logic->SmallKeys(RR_MARKET_TREASURE_CHEST_GAME, 1)));}}),
|
||||
LocationAccess(RC_MARKET_TREASURE_CHEST_GAME_ITEM_1, {[]{return logic->ChildsWallet && ((randoCtx->GetOption(RSK_SHUFFLE_CHEST_MINIGAME).Is(RO_CHEST_GAME_SINGLE_KEYS) && logic->SmallKeys(RR_MARKET_TREASURE_CHEST_GAME, 1)) || (randoCtx->GetOption(RSK_SHUFFLE_CHEST_MINIGAME).Is(RO_CHEST_GAME_PACK) && logic->SmallKeys(RR_MARKET_TREASURE_CHEST_GAME, 1)) || (logic->CanUse(RG_LENS_OF_TRUTH) && !randoCtx->GetOption(RSK_SHUFFLE_CHEST_MINIGAME)));}}),
|
||||
LocationAccess(RC_MARKET_TREASURE_CHEST_GAME_ITEM_2, {[]{return logic->ChildsWallet && ((randoCtx->GetOption(RSK_SHUFFLE_CHEST_MINIGAME).Is(RO_CHEST_GAME_SINGLE_KEYS) && logic->SmallKeys(RR_MARKET_TREASURE_CHEST_GAME, 2)) || (randoCtx->GetOption(RSK_SHUFFLE_CHEST_MINIGAME).Is(RO_CHEST_GAME_PACK) && logic->SmallKeys(RR_MARKET_TREASURE_CHEST_GAME, 1)) || (logic->CanUse(RG_LENS_OF_TRUTH) && !randoCtx->GetOption(RSK_SHUFFLE_CHEST_MINIGAME)));}}),
|
||||
LocationAccess(RC_MARKET_TREASURE_CHEST_GAME_ITEM_3, {[]{return logic->ChildsWallet && ((randoCtx->GetOption(RSK_SHUFFLE_CHEST_MINIGAME).Is(RO_CHEST_GAME_SINGLE_KEYS) && logic->SmallKeys(RR_MARKET_TREASURE_CHEST_GAME, 3)) || (randoCtx->GetOption(RSK_SHUFFLE_CHEST_MINIGAME).Is(RO_CHEST_GAME_PACK) && logic->SmallKeys(RR_MARKET_TREASURE_CHEST_GAME, 1)) || (logic->CanUse(RG_LENS_OF_TRUTH) && !randoCtx->GetOption(RSK_SHUFFLE_CHEST_MINIGAME)));}}),
|
||||
LocationAccess(RC_MARKET_TREASURE_CHEST_GAME_ITEM_4, {[]{return logic->ChildsWallet && ((randoCtx->GetOption(RSK_SHUFFLE_CHEST_MINIGAME).Is(RO_CHEST_GAME_SINGLE_KEYS) && logic->SmallKeys(RR_MARKET_TREASURE_CHEST_GAME, 4)) || (randoCtx->GetOption(RSK_SHUFFLE_CHEST_MINIGAME).Is(RO_CHEST_GAME_PACK) && logic->SmallKeys(RR_MARKET_TREASURE_CHEST_GAME, 1)) || (logic->CanUse(RG_LENS_OF_TRUTH) && !randoCtx->GetOption(RSK_SHUFFLE_CHEST_MINIGAME)));}}),
|
||||
LocationAccess(RC_MARKET_TREASURE_CHEST_GAME_ITEM_5, {[]{return logic->ChildsWallet && ((randoCtx->GetOption(RSK_SHUFFLE_CHEST_MINIGAME).Is(RO_CHEST_GAME_SINGLE_KEYS) && logic->SmallKeys(RR_MARKET_TREASURE_CHEST_GAME, 5)) || (randoCtx->GetOption(RSK_SHUFFLE_CHEST_MINIGAME).Is(RO_CHEST_GAME_PACK) && logic->SmallKeys(RR_MARKET_TREASURE_CHEST_GAME, 1)) || (logic->CanUse(RG_LENS_OF_TRUTH) && !randoCtx->GetOption(RSK_SHUFFLE_CHEST_MINIGAME)));}}),
|
||||
}, {
|
||||
//Exits
|
||||
Entrance(RR_THE_MARKET, {[]{return true;}}),
|
||||
|
@ -97,12 +97,12 @@ void AreaTable_Init_GerudoValley() {
|
||||
//Events
|
||||
EventAccess(&logic->CarpenterRescue, {[]{return logic->CanFinishGerudoFortress;}}),
|
||||
EventAccess(&logic->GF_GateOpen, {[]{return logic->IsAdult && logic->GerudoToken;}}),
|
||||
EventAccess(&logic->GtG_GateOpen, {[]{return logic->GtG_GateOpen || (logic->IsAdult && logic->GerudoToken);}}),
|
||||
EventAccess(&logic->GtG_GateOpen, {[]{return logic->GtG_GateOpen || (logic->IsAdult && logic->GerudoToken && logic->ChildsWallet);}}),
|
||||
}, {
|
||||
//Locations
|
||||
LocationAccess(RC_GF_CHEST, {[]{return logic->CanUse(RG_HOVER_BOOTS) || (logic->IsAdult && logic->CanUse(RG_SCARECROW)) || logic->CanUse(RG_LONGSHOT);}}),
|
||||
LocationAccess(RC_GF_HBA_1000_POINTS, {[]{return logic->GerudoToken && logic->CanRideEpona && logic->Bow && logic->AtDay;}}),
|
||||
LocationAccess(RC_GF_HBA_1500_POINTS, {[]{return logic->GerudoToken && logic->CanRideEpona && logic->Bow && logic->AtDay;}}),
|
||||
LocationAccess(RC_GF_HBA_1000_POINTS, {[]{return logic->ChildsWallet && logic->GerudoToken && logic->CanRideEpona && logic->Bow && logic->AtDay;}}),
|
||||
LocationAccess(RC_GF_HBA_1500_POINTS, {[]{return logic->ChildsWallet && logic->GerudoToken && logic->CanRideEpona && logic->Bow && logic->AtDay;}}),
|
||||
LocationAccess(RC_GF_NORTH_F1_CARPENTER, {[]{return logic->CanUse(RG_KOKIRI_SWORD) || logic->CanUse(RG_MASTER_SWORD) || logic->CanUse(RG_BIGGORON_SWORD);}}),
|
||||
LocationAccess(RC_GF_NORTH_F2_CARPENTER, {[]{return (logic->CanUse(RG_KOKIRI_SWORD) || logic->CanUse(RG_MASTER_SWORD) || logic->CanUse(RG_BIGGORON_SWORD)) && (logic->GerudoToken || logic->CanUse(RG_FAIRY_BOW) || logic->CanUse(RG_HOOKSHOT) || logic->CanUse(RG_HOVER_BOOTS) || randoCtx->GetTrickOption(RT_GF_KITCHEN));}}),
|
||||
LocationAccess(RC_GF_SOUTH_F1_CARPENTER, {[]{return logic->CanUse(RG_KOKIRI_SWORD) || logic->CanUse(RG_MASTER_SWORD) || logic->CanUse(RG_BIGGORON_SWORD);}}),
|
||||
|
@ -221,8 +221,8 @@ void AreaTable_Init_HyruleField() {
|
||||
|
||||
areaTable[RR_LON_LON_RANCH] = Area("Lon Lon Ranch", "Lon Lon Ranch", RA_LON_LON_RANCH, NO_DAY_NIGHT_CYCLE, {
|
||||
//Events
|
||||
EventAccess(&logic->Epona, {[]{return logic->Epona || (logic->CanUse(RG_EPONAS_SONG) && logic->IsAdult && logic->AtDay);}}),
|
||||
EventAccess(&logic->LinksCow, {[]{return logic->LinksCow || (logic->CanUse(RG_EPONAS_SONG) && logic->IsAdult && logic->AtDay);}}),
|
||||
EventAccess(&logic->Epona, {[]{return logic->Epona || ((logic->ChildsWallet || randoCtx->GetOption(RSK_SKIP_EPONA_RACE)) && logic->CanUse(RG_EPONAS_SONG) && logic->IsAdult && logic->AtDay);}}),
|
||||
EventAccess(&logic->LinksCow, {[]{return logic->LinksCow || (logic->ChildsWallet && logic->CanUse(RG_EPONAS_SONG) && logic->IsAdult && logic->AtDay);}}),
|
||||
}, {
|
||||
//Locations
|
||||
LocationAccess(RC_SONG_FROM_MALON, {[]{return logic->IsChild && logic->ZeldasLetter && logic->Ocarina && logic->AtDay;}}),
|
||||
@ -241,7 +241,7 @@ void AreaTable_Init_HyruleField() {
|
||||
|
||||
areaTable[RR_LLR_TALONS_HOUSE] = Area("LLR Talons House", "LLR Talons House", RA_NONE, NO_DAY_NIGHT_CYCLE, {}, {
|
||||
//Locations
|
||||
LocationAccess(RC_LLR_TALONS_CHICKENS, {[]{return logic->IsChild && logic->AtDay && logic->ZeldasLetter;}}),
|
||||
LocationAccess(RC_LLR_TALONS_CHICKENS, {[]{return logic->ChildsWallet && logic->IsChild && logic->AtDay && logic->ZeldasLetter;}}),
|
||||
}, {
|
||||
//Exits
|
||||
Entrance(RR_LON_LON_RANCH, {[]{return true;}}),
|
||||
|
@ -141,7 +141,7 @@ void AreaTable_Init_Kakariko() {
|
||||
|
||||
areaTable[RR_KAK_SHOOTING_GALLERY] = Area("Kak Shooting Gallery", "Kak Shooting Gallery", RA_NONE, NO_DAY_NIGHT_CYCLE, {}, {
|
||||
//Locations
|
||||
LocationAccess(RC_KAK_SHOOTING_GALLERY_REWARD, {[]{return logic->IsAdult && logic->Bow;}}),
|
||||
LocationAccess(RC_KAK_SHOOTING_GALLERY_REWARD, {[]{return logic->ChildsWallet && logic->IsAdult && logic->Bow;}}),
|
||||
}, {
|
||||
//Exits
|
||||
Entrance(RR_KAKARIKO_VILLAGE, {[]{return true;}}),
|
||||
@ -214,7 +214,7 @@ void AreaTable_Init_Kakariko() {
|
||||
}, {
|
||||
//Locations
|
||||
LocationAccess(RC_GRAVEYARD_FREESTANDING_POH, {[]{return (logic->IsAdult && CanPlantBean(RR_THE_GRAVEYARD)) || logic->CanUse(RG_LONGSHOT) || (randoCtx->GetTrickOption(RT_GY_POH) && logic->CanUse(RG_BOOMERANG));}}),
|
||||
LocationAccess(RC_GRAVEYARD_DAMPE_GRAVEDIGGING_TOUR, {[]{return logic->IsChild && logic->AtNight;}}), //TODO: This needs to change
|
||||
LocationAccess(RC_GRAVEYARD_DAMPE_GRAVEDIGGING_TOUR, {[]{return logic->ChildsWallet && logic->IsChild && logic->AtNight;}}), //TODO: This needs to change
|
||||
LocationAccess(RC_GRAVEYARD_GS_WALL, {[]{return logic->IsChild && logic->HookshotOrBoomerang && logic->AtNight && logic->CanGetNightTimeGS;}}),
|
||||
LocationAccess(RC_GRAVEYARD_GS_BEAN_PATCH, {[]{return logic->CanPlantBugs && logic->CanChildAttack;}}),
|
||||
}, {
|
||||
|
@ -21,7 +21,7 @@ void AreaTable_Init_ZorasDomain() {
|
||||
EventAccess(&logic->BugShrub, {[]{return logic->BugShrub || logic->CanCutShrubs;}}),
|
||||
}, {
|
||||
//Locations
|
||||
LocationAccess(RC_ZR_MAGIC_BEAN_SALESMAN, {[]{return logic->IsChild;}}),
|
||||
LocationAccess(RC_ZR_MAGIC_BEAN_SALESMAN, {[]{return logic->ChildsWallet && logic->IsChild;}}),
|
||||
LocationAccess(RC_ZR_FROGS_OCARINA_GAME, {[]{return logic->IsChild && logic->CanUse(RG_ZELDAS_LULLABY) && logic->CanUse(RG_SARIAS_SONG) && logic->CanUse(RG_SUNS_SONG) && logic->CanUse(RG_EPONAS_SONG) && logic->CanUse(RG_SONG_OF_TIME) && logic->CanUse(RG_SONG_OF_STORMS);}}),
|
||||
LocationAccess(RC_ZR_FROGS_IN_THE_RAIN, {[]{return logic->IsChild && logic->CanUse(RG_SONG_OF_STORMS);}}),
|
||||
LocationAccess(RC_ZR_FROGS_ZELDAS_LULLABY, {[]{return logic->IsChild && logic->CanUse(RG_ZELDAS_LULLABY);}}),
|
||||
@ -93,7 +93,7 @@ void AreaTable_Init_ZorasDomain() {
|
||||
EventAccess(&logic->DeliverLetter, {[]{return logic->DeliverLetter || (logic->RutosLetter && logic->IsChild && randoCtx->GetOption(RSK_ZORAS_FOUNTAIN).IsNot(RO_ZF_OPEN));}}),
|
||||
}, {
|
||||
//Locations
|
||||
LocationAccess(RC_ZD_DIVING_MINIGAME, {[]{return logic->IsChild;}}),
|
||||
LocationAccess(RC_ZD_DIVING_MINIGAME, {[]{return logic->ChildsWallet && logic->IsChild;}}),
|
||||
LocationAccess(RC_ZD_CHEST, {[]{return logic->IsChild && logic->CanUse(RG_STICKS);}}),
|
||||
LocationAccess(RC_ZD_KING_ZORA_THAWED, {[]{return logic->KingZoraThawed;}}),
|
||||
LocationAccess(RC_ZD_TRADE_PRESCRIPTION, {[]{return logic->KingZoraThawed && logic->Prescription;}}),
|
||||
|
@ -7,6 +7,7 @@
|
||||
#include "z64item.h"
|
||||
#include "variables.h"
|
||||
#include "macros.h"
|
||||
#include "functions.h"
|
||||
#include "../../OTRGlobals.h"
|
||||
|
||||
namespace Rando {
|
||||
@ -116,8 +117,8 @@ std::shared_ptr<GetItemEntry> Item::GetGIEntry() const { // NOLINT(*-no-recursio
|
||||
return giEntry;
|
||||
}
|
||||
RandomizerGet actual = RG_NONE;
|
||||
const u8 numWallets =
|
||||
OTRGlobals::Instance->gRandomizer->GetRandoSettingValue(RSK_SHOPSANITY) > RO_SHOPSANITY_ZERO_ITEMS ? 3 : 2;
|
||||
const bool tycoonWallet =
|
||||
OTRGlobals::Instance->gRandomizer->GetRandoSettingValue(RSK_SHOPSANITY) > RO_SHOPSANITY_ZERO_ITEMS;
|
||||
switch (randomizerGet) {
|
||||
case RG_PROGRESSIVE_STICK_UPGRADE:
|
||||
switch (CUR_UPG_VALUE(UPG_STICKS)) {
|
||||
@ -238,6 +239,10 @@ std::shared_ptr<GetItemEntry> Item::GetGIEntry() const { // NOLINT(*-no-recursio
|
||||
}
|
||||
break;
|
||||
case RG_PROGRESSIVE_WALLET:
|
||||
if (!Flags_GetRandomizerInf(RAND_INF_HAS_WALLET)) {
|
||||
actual = RG_CHILD_WALLET;
|
||||
break;
|
||||
}
|
||||
switch (CUR_UPG_VALUE(UPG_WALLET)) {
|
||||
case 0:
|
||||
actual = RG_ADULT_WALLET;
|
||||
@ -247,7 +252,7 @@ std::shared_ptr<GetItemEntry> Item::GetGIEntry() const { // NOLINT(*-no-recursio
|
||||
break;
|
||||
case 2:
|
||||
case 3:
|
||||
actual = numWallets == 3 ? RG_TYCOON_WALLET : RG_GIANT_WALLET;
|
||||
actual = tycoonWallet ? RG_TYCOON_WALLET : RG_GIANT_WALLET;
|
||||
break;
|
||||
default:
|
||||
break;
|
||||
|
@ -299,6 +299,7 @@ void Rando::StaticData::InitItemTable() {
|
||||
itemTable[RG_ADULT_WALLET] = Item(RG_ADULT_WALLET, Text{ "Adult Wallet", "Grande Bourse", "Erwachsene Geldbörse" }, ITEMTYPE_ITEM, GI_WALLET_ADULT, true, &logic->ProgressiveWallet, RHT_ADULT_WALLET, ITEM_WALLET_ADULT, OBJECT_GI_PURSE, GID_WALLET_ADULT, 0x5E, 0x80, CHEST_ANIM_LONG, ITEM_CATEGORY_MAJOR, MOD_NONE);
|
||||
itemTable[RG_GIANT_WALLET] = Item(RG_GIANT_WALLET, Text{ "Giant Wallet", "Bourse de Géant", "Riesige Geldbörse" }, ITEMTYPE_ITEM, GI_WALLET_GIANT, true, &logic->ProgressiveWallet, RHT_GIANT_WALLET, ITEM_WALLET_GIANT, OBJECT_GI_PURSE, GID_WALLET_GIANT, 0x5F, 0x80, CHEST_ANIM_LONG, ITEM_CATEGORY_MAJOR, MOD_NONE);
|
||||
itemTable[RG_TYCOON_WALLET] = Item(RG_TYCOON_WALLET, Text{ "Tycoon Wallet", "Bourse de Magnat", "Reiche Geldbörse" }, ITEMTYPE_ITEM, RG_TYCOON_WALLET, true, &logic->ProgressiveWallet, RHT_TYCOON_WALLET, RG_TYCOON_WALLET, OBJECT_GI_PURSE, GID_WALLET_GIANT, TEXT_RANDOMIZER_CUSTOM_ITEM, 0x80, CHEST_ANIM_LONG, ITEM_CATEGORY_LESSER, MOD_RANDOMIZER);
|
||||
itemTable[RG_CHILD_WALLET] = Item(RG_CHILD_WALLET, Text{ "Child Wallet", "Bourse de Magnat", "Reiche Geldbörse" },/*FIXME: still says tycoon in french & german*/ ITEMTYPE_ITEM, RG_CHILD_WALLET, true, &logic->ProgressiveWallet, RHT_CHILD_WALLET, RG_CHILD_WALLET, OBJECT_GI_PURSE, GID_WALLET_ADULT, TEXT_RANDOMIZER_CUSTOM_ITEM, 0x80, CHEST_ANIM_LONG, ITEM_CATEGORY_MAJOR, MOD_RANDOMIZER);
|
||||
itemTable[RG_DEKU_NUT_CAPACITY_30] = Item(RG_DEKU_NUT_CAPACITY_30, Text{ "Deku Nut Capacity (30)", "Capacité de noix Mojo (30)", "Deku Nuss Kapazität (30)" }, ITEMTYPE_ITEM, GI_NUT_UPGRADE_30, false, &logic->noVariable, RHT_DEKU_NUT_CAPACITY_30, ITEM_NUT_UPGRADE_30, OBJECT_GI_NUTS, GID_NUTS, 0xA7, 0x80, CHEST_ANIM_SHORT, ITEM_CATEGORY_LESSER, MOD_NONE);
|
||||
itemTable[RG_DEKU_NUT_CAPACITY_40] = Item(RG_DEKU_NUT_CAPACITY_40, Text{ "Deku Nut Capacity (40)", "Capacité de noix Mojo (40)", "Deku Nuss Kapazität (40)" }, ITEMTYPE_ITEM, GI_NUT_UPGRADE_40, false, &logic->noVariable, RHT_DEKU_NUT_CAPACITY_40, ITEM_NUT_UPGRADE_40, OBJECT_GI_NUTS, GID_NUTS, 0xA8, 0x80, CHEST_ANIM_SHORT, ITEM_CATEGORY_LESSER, MOD_NONE);
|
||||
itemTable[RG_DEKU_STICK_CAPACITY_20] = Item(RG_DEKU_STICK_CAPACITY_20, Text{ "Deku Stick Capacity (20)", "Capacité de Bâtons Mojo (20)", "Deku Stick Kapazität (20)" }, ITEMTYPE_ITEM, GI_STICK_UPGRADE_20,false, &logic->noVariable, RHT_DEKU_STICK_CAPACITY_20, ITEM_STICK_UPGRADE_20, OBJECT_GI_STICK, GID_STICK, 0x90, 0x80, CHEST_ANIM_SHORT, ITEM_CATEGORY_LESSER, MOD_NONE);
|
||||
|
@ -257,7 +257,8 @@ namespace Rando {
|
||||
GoldenGauntlets = ProgressiveStrength >= 3;
|
||||
SilverScale = ProgressiveScale >= 1;
|
||||
GoldScale = ProgressiveScale >= 2;
|
||||
AdultsWallet = ProgressiveWallet >= 1;
|
||||
ChildsWallet = ProgressiveWallet >= 1;
|
||||
AdultsWallet = ProgressiveWallet >= 2;
|
||||
BiggoronSword = BiggoronSword || ProgressiveGiantKnife >= 2;
|
||||
|
||||
//you need at least 2 buttons for scarecrow song
|
||||
@ -283,7 +284,7 @@ namespace Rando {
|
||||
Fairy = HasBottle && FairyAccess;
|
||||
|
||||
FoundBombchus = (BombchuDrop || Bombchus || Bombchus5 || Bombchus10 || Bombchus20);
|
||||
CanPlayBowling = (ctx->GetOption(RSK_BOMBCHUS_IN_LOGIC) && FoundBombchus) || (!ctx->GetOption(RSK_BOMBCHUS_IN_LOGIC) && BombBag);
|
||||
CanPlayBowling = ChildsWallet && ((ctx->GetOption(RSK_BOMBCHUS_IN_LOGIC) && FoundBombchus) || (!ctx->GetOption(RSK_BOMBCHUS_IN_LOGIC) && BombBag));
|
||||
// TODO: Implement Ammo Drop Setting in place of bombchu drops
|
||||
HasBombchus = (BuyBombchus || (ctx->GetOption(RSK_ENABLE_BOMBCHU_DROPS).Is(RO_AMMO_DROPS_ON/*_PLUS_BOMBCHU*/) && FoundBombchus));
|
||||
|
||||
@ -333,7 +334,7 @@ namespace Rando {
|
||||
CanGetNightTimeGS = (CanUse(RG_SUNS_SONG) || !ctx->GetOption(RSK_SKULLS_SUNS_SONG));
|
||||
CanBreakUpperBeehives = HookshotOrBoomerang || (ctx->GetTrickOption(RT_BOMBCHU_BEEHIVES) && HasBombchus);
|
||||
CanBreakLowerBeehives = CanBreakUpperBeehives || Bombs;
|
||||
CanFish = CanUse(RG_FISHING_POLE) || !ctx->GetOption(RSK_SHUFFLE_FISHING_POLE);
|
||||
CanFish = ChildsWallet && (CanUse(RG_FISHING_POLE) || !ctx->GetOption(RSK_SHUFFLE_FISHING_POLE));
|
||||
CanGetChildFish = CanFish && (IsChild || (IsAdult && !ctx->GetOption(RSK_FISHSANITY_AGE_SPLIT)));
|
||||
CanGetAdultFish = CanFish && IsAdult && ctx->GetOption(RSK_FISHSANITY_AGE_SPLIT);
|
||||
|
||||
@ -610,7 +611,8 @@ namespace Rando {
|
||||
ProgressiveScale = 0;
|
||||
ProgressiveHookshot = 0;
|
||||
ProgressiveBow = 0;
|
||||
ProgressiveWallet = 0;
|
||||
//If we're not shuffling child's wallet, we start with it (wallet 1)
|
||||
ProgressiveWallet = ctx->GetOption(RSK_SHUFFLE_CHILD_WALLET).Is(true) ? 0 : 1;
|
||||
ProgressiveStrength = 0;
|
||||
ProgressiveOcarina = 0;
|
||||
ProgressiveGiantKnife = 0;
|
||||
@ -711,6 +713,7 @@ namespace Rando {
|
||||
GoldenGauntlets = false;
|
||||
SilverScale = false;
|
||||
GoldScale = false;
|
||||
ChildsWallet = false;
|
||||
AdultsWallet = false;
|
||||
|
||||
ChildScarecrow = false;
|
||||
|
@ -239,6 +239,7 @@ class Logic {
|
||||
bool GoldenGauntlets = false;
|
||||
bool SilverScale = false;
|
||||
bool GoldScale = false;
|
||||
bool ChildsWallet = false;
|
||||
bool AdultsWallet = false;
|
||||
|
||||
bool ChildScarecrow = false;
|
||||
|
@ -211,6 +211,10 @@ void Settings::CreateOptionDescriptions() {
|
||||
"\n"
|
||||
"Adult Link will start with a second free item instead of the Master Sword.\n"
|
||||
"If you haven't found the Master Sword before facing Ganon, you won't receive it during the fight.";
|
||||
mOptionDescriptions[RSK_SHUFFLE_CHILD_WALLET] =
|
||||
"Enabling this shuffles the Child's Wallet into the item pool.\n"
|
||||
"\n"
|
||||
"You will not be able to carry any rupees until you find a wallet.";
|
||||
mOptionDescriptions[RSK_SHUFFLE_OCARINA] =
|
||||
"Enabling this shuffles the Fairy Ocarina and the Ocarina of Time into the item pool.\n"
|
||||
"\n"
|
||||
|
@ -608,7 +608,7 @@ ItemObtainability Randomizer::GetItemObtainabilityFromRandomizerGet(RandomizerGe
|
||||
// Shopsanity with at least one item shuffled allows for a third wallet upgrade.
|
||||
// This is needed since Plentiful item pool also adds a third progressive wallet
|
||||
// but we should *not* get Tycoon's Wallet in that mode.
|
||||
u8 numWallets = GetRandoSettingValue(RSK_SHOPSANITY) > RO_SHOPSANITY_ZERO_ITEMS ? 3 : 2;
|
||||
bool tycoonWallet = GetRandoSettingValue(RSK_SHOPSANITY) > RO_SHOPSANITY_ZERO_ITEMS;
|
||||
switch (randoGet) {
|
||||
case RG_NONE:
|
||||
case RG_TRIFORCE:
|
||||
@ -791,7 +791,7 @@ ItemObtainability Randomizer::GetItemObtainabilityFromRandomizerGet(RandomizerGe
|
||||
case RG_PROGRESSIVE_STRENGTH:
|
||||
return CUR_UPG_VALUE(UPG_STRENGTH) < 3 ? CAN_OBTAIN : CANT_OBTAIN_ALREADY_HAVE;
|
||||
case RG_PROGRESSIVE_WALLET:
|
||||
return CUR_UPG_VALUE(UPG_WALLET) < numWallets ? CAN_OBTAIN : CANT_OBTAIN_ALREADY_HAVE;
|
||||
return CUR_UPG_VALUE(UPG_WALLET) < (tycoonWallet ? 3 : 2) ? CAN_OBTAIN : CANT_OBTAIN_ALREADY_HAVE;
|
||||
case RG_PROGRESSIVE_SCALE:
|
||||
return CUR_UPG_VALUE(UPG_SCALE) < 2 ? CAN_OBTAIN : CANT_OBTAIN_ALREADY_HAVE;
|
||||
case RG_PROGRESSIVE_MAGIC_METER:
|
||||
@ -962,7 +962,7 @@ GetItemID Randomizer::GetItemIdFromRandomizerGet(RandomizerGet randoGet, GetItem
|
||||
// Shopsanity with at least one item shuffled allows for a third wallet upgrade.
|
||||
// This is needed since Plentiful item pool also adds a third progressive wallet
|
||||
// but we should *not* get Tycoon's Wallet in that mode.
|
||||
u8 numWallets = GetRandoSettingValue(RSK_SHOPSANITY) > RO_SHOPSANITY_ZERO_ITEMS ? 3 : 2;
|
||||
bool tycoonWallet = GetRandoSettingValue(RSK_SHOPSANITY) > RO_SHOPSANITY_ZERO_ITEMS;
|
||||
switch (randoGet) {
|
||||
case RG_NONE:
|
||||
return ogItemId;
|
||||
@ -1197,6 +1197,9 @@ GetItemID Randomizer::GetItemIdFromRandomizerGet(RandomizerGet randoGet, GetItem
|
||||
return GI_GAUNTLETS_GOLD;
|
||||
}
|
||||
case RG_PROGRESSIVE_WALLET:
|
||||
if (!Flags_GetRandomizerInf(RAND_INF_HAS_WALLET)) {
|
||||
return (GetItemID)RG_CHILD_WALLET;
|
||||
}
|
||||
switch (CUR_UPG_VALUE(UPG_WALLET)) {
|
||||
case 0:
|
||||
return GI_WALLET_ADULT;
|
||||
@ -1204,7 +1207,7 @@ GetItemID Randomizer::GetItemIdFromRandomizerGet(RandomizerGet randoGet, GetItem
|
||||
return GI_WALLET_GIANT;
|
||||
case 2:
|
||||
case 3:
|
||||
return numWallets == 3 ? (GetItemID)RG_TYCOON_WALLET : GI_WALLET_GIANT;
|
||||
return tycoonWallet ? (GetItemID)RG_TYCOON_WALLET : GI_WALLET_GIANT;
|
||||
}
|
||||
case RG_PROGRESSIVE_SCALE:
|
||||
switch (CUR_UPG_VALUE(UPG_SCALE)) {
|
||||
@ -1389,6 +1392,9 @@ bool Randomizer::IsItemVanilla(RandomizerGet randoGet) {
|
||||
case RG_BUY_RED_POTION_50:
|
||||
return true;
|
||||
case RG_PROGRESSIVE_WALLET:
|
||||
if (!Flags_GetRandomizerInf(RAND_INF_HAS_WALLET)) {
|
||||
return false;
|
||||
}
|
||||
if (CUR_UPG_VALUE(UPG_WALLET) < 2) {
|
||||
return true;
|
||||
} else {
|
||||
@ -3233,7 +3239,7 @@ CustomMessage Randomizer::GetGoronMessage(u16 index) {
|
||||
void Randomizer::CreateCustomMessages() {
|
||||
// RANDTODO: Translate into french and german and replace GIMESSAGE_UNTRANSLATED
|
||||
// with GIMESSAGE(getItemID, itemID, english, german, french).
|
||||
const std::array<GetItemMessage, 72> getItemMessages = {{
|
||||
const std::array<GetItemMessage, 73> getItemMessages = {{
|
||||
GIMESSAGE(RG_GREG_RUPEE, ITEM_MASK_GORON,
|
||||
"You found %gGreg%w!",
|
||||
"%gGreg%w! Du hast ihn wirklich gefunden!",
|
||||
@ -3468,6 +3474,10 @@ void Randomizer::CreateCustomMessages() {
|
||||
"You got a %rTycoon's Wallet%w!&It's gigantic! Now you can carry&up to %y999 rupees%w!",
|
||||
"Du erhältst die %rGoldene&Geldbörse%w! Die größte aller&Geldbörsen! Jetzt kannst Du bis&zu %y999 Rubine%w mit dir führen!",
|
||||
"Vous obtenez la %rBourse de Magnat%w!&Elle peut contenir jusqu'à %y999 rubis%w!&C'est gigantesque!"),
|
||||
GIMESSAGE(RG_CHILD_WALLET, ITEM_WALLET_ADULT,
|
||||
"You got a %rChild's Wallet%w!&Now you can carry&up to %y99 rupees%w!",
|
||||
"Du erhältst die %rGoldene&Geldbörse%w! Jetzt kannst Du bis&zu %y99 Rubine%w mit dir führen!",//FIXME: still says tycoon
|
||||
"Vous obtenez la %rBourse de Magnat%w!&Elle peut contenir jusqu'à %y99 rubis%w!"),//FIXME: still says tycoon
|
||||
|
||||
GIMESSAGE_UNTRANSLATED(RG_GOHMA_SOUL, ITEM_BIG_POE, "You found the soul for %gGohma%w!"),
|
||||
GIMESSAGE_UNTRANSLATED(RG_KING_DODONGO_SOUL, ITEM_BIG_POE, "You found the soul for %rKing&Dodongo%w!"),
|
||||
|
@ -1959,6 +1959,7 @@ typedef enum {
|
||||
RG_FISHING_POLE,
|
||||
RG_HINT,
|
||||
RG_TYCOON_WALLET,
|
||||
RG_CHILD_WALLET,
|
||||
RG_FAIRY_OCARINA,
|
||||
RG_OCARINA_OF_TIME,
|
||||
RG_BOMB_BAG,
|
||||
@ -3161,6 +3162,7 @@ typedef enum {
|
||||
RHT_HINT,
|
||||
RHT_HINT_MYSTERIOUS,
|
||||
RHT_TYCOON_WALLET,
|
||||
RHT_CHILD_WALLET,
|
||||
RHT_HOOKSHOT,
|
||||
RHT_LONGSHOT,
|
||||
RHT_FAIRY_OCARINA,
|
||||
@ -3529,6 +3531,7 @@ typedef enum {
|
||||
RSK_STARTING_PRELUDE_OF_LIGHT,
|
||||
RSK_SHUFFLE_KOKIRI_SWORD,
|
||||
RSK_SHUFFLE_MASTER_SWORD,
|
||||
RSK_SHUFFLE_CHILD_WALLET,
|
||||
RSK_SHUFFLE_DUNGEON_REWARDS,
|
||||
RSK_SHUFFLE_SONGS,
|
||||
RSK_SHUFFLE_TOKENS,
|
||||
|
@ -212,6 +212,8 @@ typedef enum {
|
||||
RAND_INF_HAS_OCARINA_C_LEFT,
|
||||
RAND_INF_HAS_OCARINA_C_RIGHT,
|
||||
|
||||
RAND_INF_HAS_WALLET,
|
||||
|
||||
RAND_INF_BEEHIVE_KF_STORMS_GROTTO_LEFT,
|
||||
RAND_INF_BEEHIVE_KF_STORMS_GROTTO_RIGHT,
|
||||
RAND_INF_BEEHIVE_LW_NEAR_SHORTCUTS_GROTTO_LEFT,
|
||||
|
@ -386,7 +386,7 @@ ItemTrackerNumbers GetItemCurrentAndMax(ItemTrackerItem item) {
|
||||
break;
|
||||
case ITEM_WALLET_ADULT:
|
||||
case ITEM_WALLET_GIANT:
|
||||
result.currentCapacity = CUR_CAPACITY(UPG_WALLET);
|
||||
result.currentCapacity = IS_RANDO && !Flags_GetRandomizerInf(RAND_INF_HAS_WALLET) ? 0 : CUR_CAPACITY(UPG_WALLET);
|
||||
result.maxCapacity = OTRGlobals::Instance->gRandomizer->GetRandoSettingValue(RSK_SHOPSANITY) > RO_SHOPSANITY_ZERO_ITEMS ? 999 : 500;
|
||||
result.currentAmmo = gSaveContext.rupees;
|
||||
break;
|
||||
@ -635,7 +635,7 @@ void DrawItem(ItemTrackerItem item) {
|
||||
case ITEM_WALLET_ADULT:
|
||||
case ITEM_WALLET_GIANT:
|
||||
actualItemId = CUR_UPG_VALUE(UPG_WALLET) == 2 ? ITEM_WALLET_GIANT : ITEM_WALLET_ADULT;
|
||||
hasItem = true;
|
||||
hasItem = !IS_RANDO || Flags_GetRandomizerInf(RAND_INF_HAS_WALLET);
|
||||
break;
|
||||
case ITEM_BRACELET:
|
||||
case ITEM_GAUNTLETS_SILVER:
|
||||
|
@ -301,6 +301,10 @@ extern "C" void Randomizer_InitSaveFile() {
|
||||
Flags_SetRandomizerInf(RAND_INF_HAS_OCARINA_C_DOWN);
|
||||
}
|
||||
|
||||
if (Randomizer_GetSettingValue(RSK_SHUFFLE_CHILD_WALLET) == RO_GENERIC_OFF) {
|
||||
Flags_SetRandomizerInf(RAND_INF_HAS_WALLET);
|
||||
}
|
||||
|
||||
// Give Link's pocket item
|
||||
GiveLinksPocketItem();
|
||||
|
||||
|
@ -105,6 +105,7 @@ void Settings::CreateOptions() {
|
||||
mOptions[RSK_SHUFFLE_COWS] = Option::Bool("Shuffle Cows", "gRandomizeShuffleCows", mOptionDescriptions[RSK_SHUFFLE_COWS]);
|
||||
mOptions[RSK_SHUFFLE_KOKIRI_SWORD] = Option::Bool("Shuffle Kokiri Sword", "gRandomizeShuffleKokiriSword", mOptionDescriptions[RSK_SHUFFLE_KOKIRI_SWORD]);
|
||||
mOptions[RSK_SHUFFLE_MASTER_SWORD] = Option::Bool("Shuffle Master Sword", "gRandomizeShuffleMasterSword", mOptionDescriptions[RSK_SHUFFLE_MASTER_SWORD]);
|
||||
mOptions[RSK_SHUFFLE_CHILD_WALLET] = Option::Bool("Shuffle Child's Wallet", "gRandomizeShuffleChildWallet", mOptionDescriptions[RSK_SHUFFLE_CHILD_WALLET]);
|
||||
mOptions[RSK_SHUFFLE_OCARINA] = Option::Bool("Shuffle Ocarinas", "gRandomizeShuffleOcarinas", mOptionDescriptions[RSK_SHUFFLE_OCARINA]);
|
||||
mOptions[RSK_SHUFFLE_OCARINA_BUTTONS] = Option::Bool("Shuffle Ocarina Buttons", "gRandomizeShuffleOcarinaButtons", mOptionDescriptions[RSK_SHUFFLE_OCARINA_BUTTONS]);
|
||||
mOptions[RSK_SHUFFLE_WEIRD_EGG] = Option::Bool("Shuffle Weird Egg", "gRandomizeShuffleWeirdEgg", mOptionDescriptions[RSK_SHUFFLE_WEIRD_EGG]);
|
||||
@ -649,6 +650,7 @@ void Settings::CreateOptions() {
|
||||
&mOptions[RSK_SKULLS_SUNS_SONG],
|
||||
&mOptions[RSK_SHUFFLE_KOKIRI_SWORD],
|
||||
&mOptions[RSK_SHUFFLE_MASTER_SWORD],
|
||||
&mOptions[RSK_SHUFFLE_CHILD_WALLET],
|
||||
&mOptions[RSK_SHUFFLE_OCARINA],
|
||||
&mOptions[RSK_SHUFFLE_OCARINA_BUTTONS],
|
||||
&mOptions[RSK_SHUFFLE_WEIRD_EGG],
|
||||
@ -1093,6 +1095,7 @@ void Settings::CreateOptions() {
|
||||
{ "Shuffle Settings:Shuffle Magic Beans", RSK_SHUFFLE_MAGIC_BEANS },
|
||||
{ "Shuffle Settings:Shuffle Kokiri Sword", RSK_SHUFFLE_KOKIRI_SWORD },
|
||||
{ "Shuffle Settings:Shuffle Master Sword", RSK_SHUFFLE_MASTER_SWORD },
|
||||
{ "Shuffle Settings:Shuffle Child's Wallet", RSK_SHUFFLE_CHILD_WALLET },
|
||||
{ "Shuffle Settings:Shuffle Weird Egg", RSK_SHUFFLE_WEIRD_EGG },
|
||||
{ "Shuffle Settings:Shuffle Frog Song Rupees", RSK_SHUFFLE_FROG_SONG_RUPEES },
|
||||
{ "Shuffle Settings:Shuffle Merchants", RSK_SHUFFLE_MERCHANTS },
|
||||
@ -2241,6 +2244,7 @@ void Settings::ParseJson(nlohmann::json spoilerFileJson) {
|
||||
case RSK_SHUFFLE_100_GS_REWARD:
|
||||
case RSK_SHUFFLE_OCARINA:
|
||||
case RSK_SHUFFLE_OCARINA_BUTTONS:
|
||||
case RSK_SHUFFLE_CHILD_WALLET:
|
||||
case RSK_STARTING_DEKU_SHIELD:
|
||||
case RSK_STARTING_KOKIRI_SWORD:
|
||||
case RSK_STARTING_ZELDAS_LULLABY:
|
||||
|
@ -591,6 +591,7 @@ void SaveManager::InitMeta(int fileNum) {
|
||||
fileMetaInfo[fileNum].gsTokens = gSaveContext.inventory.gsTokens;
|
||||
fileMetaInfo[fileNum].isDoubleDefenseAcquired = gSaveContext.isDoubleDefenseAcquired;
|
||||
fileMetaInfo[fileNum].gregFound = Flags_GetRandomizerInf(RAND_INF_GREG_FOUND);
|
||||
fileMetaInfo[fileNum].hasWallet = Flags_GetRandomizerInf(RAND_INF_HAS_WALLET);
|
||||
fileMetaInfo[fileNum].defense = gSaveContext.inventory.defenseHearts;
|
||||
fileMetaInfo[fileNum].health = gSaveContext.health;
|
||||
auto randoContext = Rando::Context::GetInstance();
|
||||
|
@ -29,6 +29,7 @@ typedef struct {
|
||||
s16 gsTokens;
|
||||
u8 isDoubleDefenseAcquired;
|
||||
u8 gregFound;
|
||||
u8 hasWallet;
|
||||
} SaveFileMetaInfo;
|
||||
|
||||
#ifdef __cplusplus
|
||||
|
@ -2614,6 +2614,14 @@ u16 Randomizer_Item_Give(PlayState* play, GetItemEntry giEntry) {
|
||||
return Return_Item_Entry(giEntry, RG_NONE);
|
||||
}
|
||||
|
||||
if (item == RG_CHILD_WALLET) {
|
||||
Flags_SetRandomizerInf(RAND_INF_HAS_WALLET);
|
||||
if (IS_RANDO && Randomizer_GetSettingValue(RSK_FULL_WALLETS)) {
|
||||
Rupees_ChangeBy(99);
|
||||
}
|
||||
return Return_Item_Entry(giEntry, RG_NONE);
|
||||
}
|
||||
|
||||
if (item == RG_GREG_RUPEE) {
|
||||
Rupees_ChangeBy(1);
|
||||
Flags_SetRandomizerInf(RAND_INF_GREG_FOUND);
|
||||
@ -5156,81 +5164,84 @@ void Interface_Draw(PlayState* play) {
|
||||
Gfx_SetupDL_39Overlay(play->state.gfxCtx);
|
||||
|
||||
if (fullUi) {
|
||||
// Rupee Icon
|
||||
if (CVarGetInteger("gDynamicWalletIcon", 0)) {
|
||||
switch (CUR_UPG_VALUE(UPG_WALLET)) {
|
||||
case 0:
|
||||
if (CVarGetInteger("gCosmetics.Consumable_GreenRupee.Changed", 0)) {
|
||||
rColor = CVarGetColor24("gCosmetics.Consumable_GreenRupee.Value", rupeeWalletColors[0]);
|
||||
} else {
|
||||
rColor = rupeeWalletColors[0];
|
||||
}
|
||||
break;
|
||||
case 1:
|
||||
if (CVarGetInteger("gCosmetics.Consumable_BlueRupee.Changed", 0)) {
|
||||
rColor = CVarGetColor24("gCosmetics.Consumable_BlueRupee.Value", rupeeWalletColors[1]);
|
||||
} else {
|
||||
rColor = rupeeWalletColors[1];
|
||||
}
|
||||
break;
|
||||
case 2:
|
||||
if (CVarGetInteger("gCosmetics.Consumable_RedRupee.Changed", 0)) {
|
||||
rColor = CVarGetColor24("gCosmetics.Consumable_RedRupee.Value", rupeeWalletColors[2]);
|
||||
} else {
|
||||
rColor = rupeeWalletColors[2];
|
||||
}
|
||||
break;
|
||||
case 3:
|
||||
if (CVarGetInteger("gCosmetics.Consumable_PurpleRupee.Changed", 0)) {
|
||||
rColor = CVarGetColor24("gCosmetics.Consumable_PurpleRupee.Value", rupeeWalletColors[3]);
|
||||
} else {
|
||||
rColor = rupeeWalletColors[3];
|
||||
}
|
||||
break;
|
||||
}
|
||||
} else {
|
||||
if (CVarGetInteger("gCosmetics.Consumable_GreenRupee.Changed", rupeeWalletColors)) {
|
||||
rColor = CVarGetColor24("gCosmetics.Consumable_GreenRupee.Value", rupeeWalletColors[0]);
|
||||
} else {
|
||||
rColor = rupeeWalletColors[0];
|
||||
}
|
||||
}
|
||||
|
||||
//Rupee icon & counter
|
||||
s16 X_Margins_RC;
|
||||
s16 Y_Margins_RC;
|
||||
if (CVarGetInteger("gRCUseMargins", 0) != 0) {
|
||||
if (CVarGetInteger("gRCPosType", 0) == 0) {X_Margins_RC = Left_HUD_Margin;};
|
||||
Y_Margins_RC = Bottom_HUD_Margin;
|
||||
} else {
|
||||
X_Margins_RC = 0;
|
||||
Y_Margins_RC = 0;
|
||||
}
|
||||
s16 PosX_RC_ori = OTRGetRectDimensionFromLeftEdge(26+X_Margins_RC);
|
||||
s16 PosY_RC_ori = 206+Y_Margins_RC;
|
||||
s16 PosX_RC;
|
||||
s16 PosY_RC;
|
||||
if (CVarGetInteger("gRCPosType", 0) != 0) {
|
||||
PosY_RC = CVarGetInteger("gRCPosY", 0)+Y_Margins_RC;
|
||||
if (CVarGetInteger("gRCPosType", 0) == 1) {//Anchor Left
|
||||
if (CVarGetInteger("gRCUseMargins", 0) != 0) {X_Margins_RC = Left_HUD_Margin;};
|
||||
PosX_RC = OTRGetDimensionFromLeftEdge(CVarGetInteger("gRCPosX", 0)+X_Margins_RC);
|
||||
} else if (CVarGetInteger("gRCPosType", 0) == 2) {//Anchor Right
|
||||
if (CVarGetInteger("gRCUseMargins", 0) != 0) {X_Margins_RC = Right_HUD_Margin;};
|
||||
PosX_RC = OTRGetDimensionFromRightEdge(CVarGetInteger("gRCPosX", 0)+X_Margins_RC);
|
||||
} else if (CVarGetInteger("gRCPosType", 0) == 3) {//Anchor None
|
||||
PosX_RC = CVarGetInteger("gRCPosX", 0);
|
||||
} else if (CVarGetInteger("gRCPosType", 0) == 4) {//Hidden
|
||||
PosX_RC = -9999;
|
||||
//when not having a wallet in rando, don't calculate the ruppe icon
|
||||
if (!IS_RANDO || Flags_GetRandomizerInf(RAND_INF_HAS_WALLET)) {
|
||||
// Rupee Icon
|
||||
if (CVarGetInteger("gDynamicWalletIcon", 0)) {
|
||||
switch (CUR_UPG_VALUE(UPG_WALLET)) {
|
||||
case 0:
|
||||
if (CVarGetInteger("gCosmetics.Consumable_GreenRupee.Changed", 0)) {
|
||||
rColor = CVarGetColor24("gCosmetics.Consumable_GreenRupee.Value", rupeeWalletColors[0]);
|
||||
} else {
|
||||
rColor = rupeeWalletColors[0];
|
||||
}
|
||||
break;
|
||||
case 1:
|
||||
if (CVarGetInteger("gCosmetics.Consumable_BlueRupee.Changed", 0)) {
|
||||
rColor = CVarGetColor24("gCosmetics.Consumable_BlueRupee.Value", rupeeWalletColors[1]);
|
||||
} else {
|
||||
rColor = rupeeWalletColors[1];
|
||||
}
|
||||
break;
|
||||
case 2:
|
||||
if (CVarGetInteger("gCosmetics.Consumable_RedRupee.Changed", 0)) {
|
||||
rColor = CVarGetColor24("gCosmetics.Consumable_RedRupee.Value", rupeeWalletColors[2]);
|
||||
} else {
|
||||
rColor = rupeeWalletColors[2];
|
||||
}
|
||||
break;
|
||||
case 3:
|
||||
if (CVarGetInteger("gCosmetics.Consumable_PurpleRupee.Changed", 0)) {
|
||||
rColor = CVarGetColor24("gCosmetics.Consumable_PurpleRupee.Value", rupeeWalletColors[3]);
|
||||
} else {
|
||||
rColor = rupeeWalletColors[3];
|
||||
}
|
||||
break;
|
||||
}
|
||||
} else {
|
||||
if (CVarGetInteger("gCosmetics.Consumable_GreenRupee.Changed", rupeeWalletColors)) {
|
||||
rColor = CVarGetColor24("gCosmetics.Consumable_GreenRupee.Value", rupeeWalletColors[0]);
|
||||
} else {
|
||||
rColor = rupeeWalletColors[0];
|
||||
}
|
||||
}
|
||||
|
||||
//Rupee icon & counter
|
||||
s16 X_Margins_RC;
|
||||
s16 Y_Margins_RC;
|
||||
if (CVarGetInteger("gRCUseMargins", 0) != 0) {
|
||||
if (CVarGetInteger("gRCPosType", 0) == 0) {X_Margins_RC = Left_HUD_Margin;};
|
||||
Y_Margins_RC = Bottom_HUD_Margin;
|
||||
} else {
|
||||
X_Margins_RC = 0;
|
||||
Y_Margins_RC = 0;
|
||||
}
|
||||
s16 PosX_RC_ori = OTRGetRectDimensionFromLeftEdge(26+X_Margins_RC);
|
||||
s16 PosY_RC_ori = 206+Y_Margins_RC;
|
||||
if (CVarGetInteger("gRCPosType", 0) != 0) {
|
||||
PosY_RC = CVarGetInteger("gRCPosY", 0)+Y_Margins_RC;
|
||||
if (CVarGetInteger("gRCPosType", 0) == 1) {//Anchor Left
|
||||
if (CVarGetInteger("gRCUseMargins", 0) != 0) {X_Margins_RC = Left_HUD_Margin;};
|
||||
PosX_RC = OTRGetDimensionFromLeftEdge(CVarGetInteger("gRCPosX", 0)+X_Margins_RC);
|
||||
} else if (CVarGetInteger("gRCPosType", 0) == 2) {//Anchor Right
|
||||
if (CVarGetInteger("gRCUseMargins", 0) != 0) {X_Margins_RC = Right_HUD_Margin;};
|
||||
PosX_RC = OTRGetDimensionFromRightEdge(CVarGetInteger("gRCPosX", 0)+X_Margins_RC);
|
||||
} else if (CVarGetInteger("gRCPosType", 0) == 3) {//Anchor None
|
||||
PosX_RC = CVarGetInteger("gRCPosX", 0);
|
||||
} else if (CVarGetInteger("gRCPosType", 0) == 4) {//Hidden
|
||||
PosX_RC = -9999;
|
||||
}
|
||||
} else {
|
||||
PosY_RC = PosY_RC_ori;
|
||||
PosX_RC = PosX_RC_ori;
|
||||
}
|
||||
gDPSetPrimColor(OVERLAY_DISP++, 0, 0, rColor.r, rColor.g, rColor.b, interfaceCtx->magicAlpha);
|
||||
// Draw Rupee icon. Hide in Boss Rush.
|
||||
if (!IS_BOSS_RUSH) {
|
||||
OVERLAY_DISP = Gfx_TextureIA8(OVERLAY_DISP, gRupeeCounterIconTex, 16, 16, PosX_RC, PosY_RC, 16, 16, 1 << 10, 1 << 10);
|
||||
}
|
||||
} else {
|
||||
PosY_RC = PosY_RC_ori;
|
||||
PosX_RC = PosX_RC_ori;
|
||||
}
|
||||
gDPSetPrimColor(OVERLAY_DISP++, 0, 0, rColor.r, rColor.g, rColor.b, interfaceCtx->magicAlpha);
|
||||
// Draw Rupee icon. Hide in Boss Rush.
|
||||
if (!IS_BOSS_RUSH) {
|
||||
OVERLAY_DISP = Gfx_TextureIA8(OVERLAY_DISP, gRupeeCounterIconTex, 16, 16, PosX_RC, PosY_RC, 16, 16, 1 << 10, 1 << 10);
|
||||
}
|
||||
|
||||
switch (play->sceneNum) {
|
||||
@ -5346,8 +5357,8 @@ void Interface_Draw(PlayState* play) {
|
||||
svar2 = rupeeDigitsFirst[CUR_UPG_VALUE(UPG_WALLET)];
|
||||
svar5 = rupeeDigitsCount[CUR_UPG_VALUE(UPG_WALLET)];
|
||||
|
||||
// Draw Rupee Counter. Hide in Boss Rush.
|
||||
if (!IS_BOSS_RUSH) {
|
||||
// Draw Rupee Counter. Hide in Boss Rush and when not having a wallet in rando.
|
||||
if (!IS_BOSS_RUSH && (!IS_RANDO || Flags_GetRandomizerInf(RAND_INF_HAS_WALLET))) {
|
||||
for (svar1 = 0, svar3 = 16; svar1 < svar5; svar1++, svar2++, svar3 += 8) {
|
||||
OVERLAY_DISP = Gfx_TextureI8(OVERLAY_DISP, ((u8*)digitTextures[interfaceCtx->counterDigits[svar2]]),
|
||||
8, 16, PosX_RC + svar3, PosY_RC, 8, 16, 1 << 10, 1 << 10);
|
||||
|
@ -98,7 +98,7 @@ static ItemData itemData[88] = {
|
||||
{CREATE_SPRITE_32(dgItemIconMaskGerudoTex, 37), ITEM_MASK_GERUDO, INV_IC_POS(6, 1), SIZE_NORMAL},
|
||||
{CREATE_SPRITE_32(dgItemIconMaskTruthTex, 37), ITEM_MASK_TRUTH, INV_IC_POS(6, 1), SIZE_NORMAL},
|
||||
{CREATE_SPRITE_32(dgItemIconSoldOutTex, 37), ITEM_SOLD_OUT, INV_IC_POS(6, 1), SIZE_NORMAL},
|
||||
|
||||
|
||||
{CREATE_SPRITE_32(dgItemIconBoomerangTex, 14), ITEM_BOOMERANG, INV_IC_POS(0, 2), SIZE_NORMAL},
|
||||
{CREATE_SPRITE_32(dgItemIconLensOfTruthTex, 15), ITEM_LENS, INV_IC_POS(1, 2), SIZE_NORMAL},
|
||||
{CREATE_SPRITE_32(dgItemIconMagicBeanTex, 16), ITEM_BEAN, INV_IC_POS(2, 2), SIZE_NORMAL},
|
||||
@ -116,19 +116,19 @@ static ItemData itemData[88] = {
|
||||
{CREATE_SPRITE_32(dgItemIconEyeballFrogTex, 53), ITEM_FROG, INV_IC_POS(6, 2), SIZE_NORMAL},
|
||||
{CREATE_SPRITE_32(dgItemIconEyeDropsTex, 53), ITEM_EYEDROPS, INV_IC_POS(6, 2), SIZE_NORMAL},
|
||||
{CREATE_SPRITE_32(dgItemIconClaimCheckTex, 53), ITEM_CLAIM_CHECK, INV_IC_POS(6, 2), SIZE_NORMAL},
|
||||
|
||||
|
||||
{CREATE_SPRITE_32(dgItemIconSwordKokiriTex, 54), ITEM_SWORD_KOKIRI, EQP_IC_POS(0, 0), SIZE_NORMAL},
|
||||
{CREATE_SPRITE_32(dgItemIconSwordMasterTex, 55), ITEM_SWORD_MASTER, EQP_IC_POS(1, 0), SIZE_NORMAL},
|
||||
{CREATE_SPRITE_32(dgItemIconSwordBiggoronTex, 56), ITEM_SWORD_BGS, EQP_IC_POS(2, 0), SIZE_NORMAL},
|
||||
|
||||
|
||||
{CREATE_SPRITE_32(dgItemIconShieldDekuTex, 57), ITEM_SHIELD_DEKU, EQP_IC_POS(0, 1), SIZE_NORMAL},
|
||||
{CREATE_SPRITE_32(dgItemIconShieldHylianTex, 58), ITEM_SHIELD_HYLIAN, EQP_IC_POS(1, 1), SIZE_NORMAL},
|
||||
{CREATE_SPRITE_32(dgItemIconShieldMirrorTex, 59), ITEM_SHIELD_MIRROR, EQP_IC_POS(2, 1), SIZE_NORMAL},
|
||||
|
||||
|
||||
{CREATE_SPRITE_32(dgItemIconTunicKokiriTex, 60), ITEM_TUNIC_KOKIRI, EQP_IC_POS(0, 2), SIZE_NORMAL},
|
||||
{CREATE_SPRITE_32(dgItemIconTunicGoronTex, 61), ITEM_TUNIC_GORON, EQP_IC_POS(1, 2), SIZE_NORMAL},
|
||||
{CREATE_SPRITE_32(dgItemIconTunicZoraTex, 62), ITEM_TUNIC_ZORA, EQP_IC_POS(2, 2), SIZE_NORMAL},
|
||||
|
||||
|
||||
{CREATE_SPRITE_32(dgItemIconBootsKokiriTex, 63), ITEM_BOOTS_KOKIRI, EQP_IC_POS(0, 3), SIZE_NORMAL},
|
||||
{CREATE_SPRITE_32(dgItemIconBootsIronTex, 64), ITEM_BOOTS_IRON, EQP_IC_POS(1, 3), SIZE_NORMAL},
|
||||
{CREATE_SPRITE_32(dgItemIconBootsHoverTex, 65), ITEM_BOOTS_HOVER, EQP_IC_POS(2, 3), SIZE_NORMAL},
|
||||
@ -136,7 +136,7 @@ static ItemData itemData[88] = {
|
||||
{CREATE_SPRITE_24(dgQuestIconKokiriEmeraldTex, 87), ITEM_KOKIRI_EMERALD, STN_IC_POS(-1), SIZE_NORMAL},
|
||||
{CREATE_SPRITE_24(dgQuestIconGoronRubyTex, 88), ITEM_GORON_RUBY, STN_IC_POS(0), SIZE_NORMAL},
|
||||
{CREATE_SPRITE_24(dgQuestIconZoraSapphireTex, 89), ITEM_ZORA_SAPPHIRE, STN_IC_POS(1), SIZE_NORMAL},
|
||||
|
||||
|
||||
{CREATE_SPRITE_24(dgQuestIconMedallionForestTex, 81), ITEM_MEDALLION_FOREST, {0x37, 0x0A}, SIZE_NORMAL},
|
||||
{CREATE_SPRITE_24(dgQuestIconMedallionFireTex, 82), ITEM_MEDALLION_FIRE, {0x37, 0x1A}, SIZE_NORMAL},
|
||||
{CREATE_SPRITE_24(dgQuestIconMedallionWaterTex, 83), ITEM_MEDALLION_WATER, {0x29, 0x22}, SIZE_NORMAL},
|
||||
@ -394,39 +394,39 @@ u8 ShouldRenderItem(s16 fileIndex, u8 item) {
|
||||
if (item == ITEM_POCKET_CUCCO && !HasItem(fileIndex, ITEM_POCKET_CUCCO)) {
|
||||
return 0;
|
||||
}
|
||||
|
||||
|
||||
if (item == ITEM_COJIRO && !HasItem(fileIndex, ITEM_COJIRO)) {
|
||||
return 0;
|
||||
}
|
||||
|
||||
|
||||
if (item == ITEM_ODD_MUSHROOM && !HasItem(fileIndex, ITEM_ODD_MUSHROOM)) {
|
||||
return 0;
|
||||
}
|
||||
|
||||
|
||||
if (item == ITEM_ODD_POTION && !HasItem(fileIndex, ITEM_ODD_POTION)) {
|
||||
return 0;
|
||||
}
|
||||
|
||||
|
||||
if (item == ITEM_SAW && !HasItem(fileIndex, ITEM_SAW)) {
|
||||
return 0;
|
||||
}
|
||||
|
||||
|
||||
if (item == ITEM_SWORD_BROKEN && !HasItem(fileIndex, ITEM_SWORD_BROKEN)) {
|
||||
return 0;
|
||||
}
|
||||
|
||||
|
||||
if (item == ITEM_PRESCRIPTION && !HasItem(fileIndex, ITEM_PRESCRIPTION)) {
|
||||
return 0;
|
||||
}
|
||||
|
||||
|
||||
if (item == ITEM_FROG && !HasItem(fileIndex, ITEM_FROG)) {
|
||||
return 0;
|
||||
}
|
||||
|
||||
|
||||
if (item == ITEM_EYEDROPS && !HasItem(fileIndex, ITEM_EYEDROPS)) {
|
||||
return 0;
|
||||
}
|
||||
|
||||
|
||||
if (item == ITEM_CLAIM_CHECK && !HasItem(fileIndex, ITEM_CLAIM_CHECK)) {
|
||||
return 0;
|
||||
}
|
||||
@ -457,7 +457,7 @@ static void DrawItems(FileChooseContext* this, s16 fileIndex, u8 alpha) {
|
||||
} else {
|
||||
gDPSetPrimColor(POLY_OPA_DISP++, 0, 0, color_product(data->color.r, DIM.r), color_product(data->color.g, DIM.g), color_product(data->color.b, DIM.b), color_product(color_product(data->color.a, DIM.a), alpha));
|
||||
}
|
||||
|
||||
|
||||
SpriteLoad(this, &(data->sprite));
|
||||
SpriteDraw(this, &(data->sprite), LEFT_OFFSET + data->pos.left, TOP_OFFSET + data->pos.top, data->size.width, data->size.height);
|
||||
}
|
||||
@ -469,12 +469,13 @@ static void DrawItems(FileChooseContext* this, s16 fileIndex, u8 alpha) {
|
||||
|
||||
typedef enum {
|
||||
/* 0x00 */ COUNTER_HEALTH,
|
||||
/* 0x01 */ COUNTER_WALLET_CHILD,
|
||||
/* 0x02 */ COUNTER_WALLET_ADULT,
|
||||
/* 0x03 */ COUNTER_WALLET_GIANT,
|
||||
/* 0x04 */ COUNTER_WALLET_TYCOON,
|
||||
/* 0x04 */ COUNTER_SKULLTULLAS,
|
||||
/* 0x04 */ COUNTER_DEATHS,
|
||||
/* 0x01 */ COUNTER_WALLET_NONE,
|
||||
/* 0x02 */ COUNTER_WALLET_CHILD,
|
||||
/* 0x03 */ COUNTER_WALLET_ADULT,
|
||||
/* 0x04 */ COUNTER_WALLET_GIANT,
|
||||
/* 0x05 */ COUNTER_WALLET_TYCOON,
|
||||
/* 0x06 */ COUNTER_SKULLTULLAS,
|
||||
/* 0x07 */ COUNTER_DEATHS,
|
||||
} CounterID;
|
||||
|
||||
typedef struct {
|
||||
@ -485,8 +486,9 @@ typedef struct {
|
||||
IconSize size;
|
||||
} CounterData;
|
||||
|
||||
static CounterData counterData[7] = {
|
||||
static CounterData counterData[8] = {
|
||||
{CREATE_SPRITE_24(dgQuestIconHeartContainerTex, 101), COUNTER_HEALTH, {0x05, 0x00}, SIZE_COUNTER},
|
||||
{CREATE_SPRITE_RUPEE(0x32, 0x40, 0x19), COUNTER_WALLET_NONE, {0x05, 0x15}, SIZE_COUNTER},
|
||||
{CREATE_SPRITE_RUPEE(0xC8, 0xFF, 0x64), COUNTER_WALLET_CHILD, {0x05, 0x15}, SIZE_COUNTER},
|
||||
{CREATE_SPRITE_RUPEE(0x82, 0x82, 0xFF), COUNTER_WALLET_ADULT, {0x05, 0x15}, SIZE_COUNTER},
|
||||
{CREATE_SPRITE_RUPEE(0xFF, 0x64, 0x64), COUNTER_WALLET_GIANT, {0x05, 0x15}, SIZE_COUNTER},
|
||||
@ -509,20 +511,24 @@ static Sprite counterDigitSprites[10] = {
|
||||
};
|
||||
|
||||
u8 ShouldRenderCounter(s16 fileIndex, u8 counterId) {
|
||||
if (counterId == COUNTER_WALLET_NONE) {
|
||||
return !Save_GetSaveMetaInfo(fileIndex)->hasWallet;
|
||||
}
|
||||
|
||||
if (counterId == COUNTER_WALLET_CHILD) {
|
||||
return ((Save_GetSaveMetaInfo(fileIndex)->upgrades & gUpgradeMasks[UPG_WALLET]) >> gUpgradeShifts[UPG_WALLET]) == 0;
|
||||
return Save_GetSaveMetaInfo(fileIndex)->hasWallet && ((Save_GetSaveMetaInfo(fileIndex)->upgrades & gUpgradeMasks[UPG_WALLET]) >> gUpgradeShifts[UPG_WALLET]) == 0;
|
||||
}
|
||||
|
||||
if (counterId == COUNTER_WALLET_ADULT) {
|
||||
return ((Save_GetSaveMetaInfo(fileIndex)->upgrades & gUpgradeMasks[UPG_WALLET]) >> gUpgradeShifts[UPG_WALLET]) == 1;
|
||||
return Save_GetSaveMetaInfo(fileIndex)->hasWallet && ((Save_GetSaveMetaInfo(fileIndex)->upgrades & gUpgradeMasks[UPG_WALLET]) >> gUpgradeShifts[UPG_WALLET]) == 1;
|
||||
}
|
||||
|
||||
if (counterId == COUNTER_WALLET_GIANT) {
|
||||
return ((Save_GetSaveMetaInfo(fileIndex)->upgrades & gUpgradeMasks[UPG_WALLET]) >> gUpgradeShifts[UPG_WALLET]) == 2;
|
||||
return Save_GetSaveMetaInfo(fileIndex)->hasWallet && ((Save_GetSaveMetaInfo(fileIndex)->upgrades & gUpgradeMasks[UPG_WALLET]) >> gUpgradeShifts[UPG_WALLET]) == 2;
|
||||
}
|
||||
|
||||
if (counterId == COUNTER_WALLET_TYCOON) {
|
||||
return ((Save_GetSaveMetaInfo(fileIndex)->upgrades & gUpgradeMasks[UPG_WALLET]) >> gUpgradeShifts[UPG_WALLET]) == 3;
|
||||
return Save_GetSaveMetaInfo(fileIndex)->hasWallet && ((Save_GetSaveMetaInfo(fileIndex)->upgrades & gUpgradeMasks[UPG_WALLET]) >> gUpgradeShifts[UPG_WALLET]) == 3;
|
||||
}
|
||||
|
||||
return 1;
|
||||
|
Loading…
Reference in New Issue
Block a user