mirror of
https://github.com/HarbourMasters/Shipwright
synced 2026-08-15 21:20:06 -04:00
Combine check identity structs into CheckIdentity (#5852)
This commit is contained in:
@@ -387,10 +387,10 @@ s32 EnGirlA_TryChangeShopItemShip(EnGirlA* this, PlayState* play) {
|
||||
}
|
||||
} else if (this->actor.params == SI_RANDOMIZED_ITEM) {
|
||||
ShopItemIdentity shopItemIdentity = Randomizer_IdentifyShopItem(play->sceneNum, this->randoSlotIndex);
|
||||
if (Flags_GetRandomizerInf(shopItemIdentity.randomizerInf)) {
|
||||
if (Flags_GetRandomizerInf(shopItemIdentity.identity.randomizerInf)) {
|
||||
this->actor.params = SI_SOLD_OUT;
|
||||
GetItemEntry getItemEntry = Randomizer_GetItemFromKnownCheckWithoutObtainabilityCheck(
|
||||
shopItemIdentity.randomizerCheck, shopItemIdentity.ogItemId);
|
||||
shopItemIdentity.identity.randomizerCheck, shopItemIdentity.ogItemId);
|
||||
|
||||
// Undo the rotation for spiritual stones
|
||||
if (getItemEntry.getItemId >= RG_KOKIRI_EMERALD && getItemEntry.getItemId <= RG_ZORA_SAPPHIRE) {
|
||||
@@ -485,7 +485,7 @@ void EnGirlA_InitItem(EnGirlA* this, PlayState* play) {
|
||||
if (params == SI_RANDOMIZED_ITEM) {
|
||||
ShopItemIdentity shopItemIdentity = Randomizer_IdentifyShopItem(play->sceneNum, this->randoSlotIndex);
|
||||
GetItemEntry getItemEntry = Randomizer_GetItemFromKnownCheckWithoutObtainabilityCheck(
|
||||
shopItemIdentity.randomizerCheck, shopItemIdentity.ogItemId);
|
||||
shopItemIdentity.identity.randomizerCheck, shopItemIdentity.ogItemId);
|
||||
|
||||
objectId = getItemEntry.objectId;
|
||||
}
|
||||
@@ -851,9 +851,9 @@ s32 EnGirlA_CanBuy_Fairy(PlayState* play, EnGirlA* this) {
|
||||
s32 EnGirlA_CanBuy_Randomizer(PlayState* play, EnGirlA* this) {
|
||||
ShopItemIdentity shopItemIdentity = Randomizer_IdentifyShopItem(play->sceneNum, this->randoSlotIndex);
|
||||
GetItemEntry getItemEntry = Randomizer_GetItemFromKnownCheckWithoutObtainabilityCheck(
|
||||
shopItemIdentity.randomizerCheck, shopItemIdentity.ogItemId);
|
||||
shopItemIdentity.identity.randomizerCheck, shopItemIdentity.ogItemId);
|
||||
ItemObtainability itemObtainability =
|
||||
Randomizer_GetItemObtainabilityFromRandomizerCheck(shopItemIdentity.randomizerCheck);
|
||||
Randomizer_GetItemObtainabilityFromRandomizerCheck(shopItemIdentity.identity.randomizerCheck);
|
||||
|
||||
if (itemObtainability == CANT_OBTAIN_NEED_EMPTY_BOTTLE) {
|
||||
return CANBUY_RESULT_NEED_BOTTLE;
|
||||
@@ -863,8 +863,8 @@ s32 EnGirlA_CanBuy_Randomizer(PlayState* play, EnGirlA* this) {
|
||||
return CANBUY_RESULT_CANT_GET_NOW_5;
|
||||
}
|
||||
|
||||
if (Flags_GetRandomizerInf(shopItemIdentity.randomizerInf) || itemObtainability == CANT_OBTAIN_ALREADY_HAVE ||
|
||||
itemObtainability == CANT_OBTAIN_MISC) {
|
||||
if (Flags_GetRandomizerInf(shopItemIdentity.identity.randomizerInf) ||
|
||||
itemObtainability == CANT_OBTAIN_ALREADY_HAVE || itemObtainability == CANT_OBTAIN_MISC) {
|
||||
return CANBUY_RESULT_CANT_GET_NOW;
|
||||
}
|
||||
|
||||
@@ -1056,9 +1056,9 @@ void EnGirlA_ItemGive_Randomizer(PlayState* play, EnGirlA* this) {
|
||||
Player* player = GET_PLAYER(play);
|
||||
ShopItemIdentity shopItemIdentity = Randomizer_IdentifyShopItem(play->sceneNum, this->randoSlotIndex);
|
||||
GetItemEntry getItemEntry = Randomizer_GetItemFromKnownCheckWithoutObtainabilityCheck(
|
||||
shopItemIdentity.randomizerCheck, shopItemIdentity.ogItemId);
|
||||
shopItemIdentity.identity.randomizerCheck, shopItemIdentity.ogItemId);
|
||||
|
||||
Flags_SetRandomizerInf(shopItemIdentity.randomizerInf);
|
||||
Flags_SetRandomizerInf(shopItemIdentity.identity.randomizerInf);
|
||||
Rupees_ChangeBy(-this->basePrice);
|
||||
}
|
||||
|
||||
@@ -1181,7 +1181,7 @@ void EnGirlA_SetItemDescription(PlayState* play, EnGirlA* this) {
|
||||
|
||||
if (params == SI_RANDOMIZED_ITEM) {
|
||||
ShopItemIdentity shopItemIdentity = Randomizer_IdentifyShopItem(play->sceneNum, this->randoSlotIndex);
|
||||
this->actor.textId = 0x9100 + (shopItemIdentity.randomizerInf - RAND_INF_SHOP_ITEMS_KF_SHOP_ITEM_1);
|
||||
this->actor.textId = 0x9100 + (shopItemIdentity.identity.randomizerInf - RAND_INF_SHOP_ITEMS_KF_SHOP_ITEM_1);
|
||||
}
|
||||
|
||||
this->isInvisible = false;
|
||||
@@ -1207,7 +1207,8 @@ void EnGirlA_UpdateStockedItem(PlayState* play, EnGirlA* this) {
|
||||
|
||||
if (this->actor.params == SI_RANDOMIZED_ITEM) {
|
||||
ShopItemIdentity shopItemIdentity = Randomizer_IdentifyShopItem(play->sceneNum, this->randoSlotIndex);
|
||||
this->actor.textId = 0x9100 + (shopItemIdentity.randomizerInf - RAND_INF_SHOP_ITEMS_KF_SHOP_ITEM_1);
|
||||
this->actor.textId =
|
||||
0x9100 + (shopItemIdentity.identity.randomizerInf - RAND_INF_SHOP_ITEMS_KF_SHOP_ITEM_1);
|
||||
} else {
|
||||
this->actor.textId = itemEntry->itemDescTextId;
|
||||
}
|
||||
@@ -1348,10 +1349,12 @@ void EnGirlA_WaitForObject(EnGirlA* this, PlayState* play) {
|
||||
if (params == SI_RANDOMIZED_ITEM) {
|
||||
ShopItemIdentity shopItemIdentity = Randomizer_IdentifyShopItem(play->sceneNum, this->randoSlotIndex);
|
||||
GetItemEntry getItemEntry = Randomizer_GetItemFromKnownCheckWithoutObtainabilityCheck(
|
||||
shopItemIdentity.randomizerCheck, shopItemIdentity.ogItemId);
|
||||
this->actor.textId = 0x9100 + (shopItemIdentity.randomizerInf - RAND_INF_SHOP_ITEMS_KF_SHOP_ITEM_1);
|
||||
shopItemIdentity.identity.randomizerCheck, shopItemIdentity.ogItemId);
|
||||
this->actor.textId =
|
||||
0x9100 + (shopItemIdentity.identity.randomizerInf - RAND_INF_SHOP_ITEMS_KF_SHOP_ITEM_1);
|
||||
this->itemBuyPromptTextId =
|
||||
0x9100 + ((shopItemIdentity.randomizerInf - RAND_INF_SHOP_ITEMS_KF_SHOP_ITEM_1) + NUM_SHOP_ITEMS);
|
||||
0x9100 +
|
||||
((shopItemIdentity.identity.randomizerInf - RAND_INF_SHOP_ITEMS_KF_SHOP_ITEM_1) + NUM_SHOP_ITEMS);
|
||||
this->getItemId = getItemEntry.getItemId;
|
||||
this->basePrice = shopItemIdentity.itemPrice;
|
||||
this->giDrawId = getItemEntry.gid;
|
||||
@@ -1438,7 +1441,7 @@ void EnGirlA_Draw(Actor* thisx, PlayState* play) {
|
||||
this->actor.params == SI_RANDOMIZED_ITEM)
|
||||
? GetItemMystery()
|
||||
: Randomizer_GetItemFromKnownCheckWithoutObtainabilityCheck(
|
||||
shopItemIdentity.randomizerCheck, shopItemIdentity.ogItemId);
|
||||
shopItemIdentity.identity.randomizerCheck, shopItemIdentity.ogItemId);
|
||||
|
||||
EnItem00_CustomItemsParticles(&this->actor, play, getItemEntry);
|
||||
GetItemEntry_Draw(play, getItemEntry);
|
||||
|
||||
@@ -434,10 +434,10 @@ void EnOssan_SpawnItemsOnShelves(EnOssan* this, PlayState* play, ShopItem* shopI
|
||||
itemParams = sShopItemReplaceFunc[shopItems->shopItemIndex](shopItems->shopItemIndex);
|
||||
if (IS_RANDO && Randomizer_GetSettingValue(RSK_SHOPSANITY) != RO_SHOPSANITY_OFF) {
|
||||
ShopItemIdentity shopItemIdentity = Randomizer_IdentifyShopItem(play->sceneNum, i + 1);
|
||||
if (shopItemIdentity.randomizerCheck != RC_UNKNOWN_CHECK) {
|
||||
if (shopItemIdentity.identity.randomizerCheck != RC_UNKNOWN_CHECK) {
|
||||
itemParams = shopItemIdentity.enGirlAShopItem;
|
||||
|
||||
if (Flags_GetRandomizerInf(shopItemIdentity.randomizerInf)) {
|
||||
if (Flags_GetRandomizerInf(shopItemIdentity.identity.randomizerInf)) {
|
||||
itemParams = SI_SOLD_OUT;
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user