mirror of
https://github.com/HarbourMasters/Shipwright.git
synced 2024-12-26 10:08:51 -05:00
Removes unused Randomizer_GetItemIdFromGetItemId
.
This commit is contained in:
parent
4dff1443a6
commit
e1b403a31b
@ -808,48 +808,6 @@ std::unordered_map<std::string, RandomizerCheck> SpoilerfileCheckNameToEnum = {
|
|||||||
{ "ZR Open Grotto Gossip Stone", RC_ZR_OPEN_GROTTO_GOSSIP_STONE }
|
{ "ZR Open Grotto Gossip Stone", RC_ZR_OPEN_GROTTO_GOSSIP_STONE }
|
||||||
};
|
};
|
||||||
|
|
||||||
std::unordered_map<s16, s16> getItemIdToItemId = {
|
|
||||||
{ GI_BOW, ITEM_BOW },
|
|
||||||
{ GI_ARROW_FIRE, ITEM_ARROW_FIRE },
|
|
||||||
{ GI_DINS_FIRE, ITEM_DINS_FIRE },
|
|
||||||
{ GI_SLINGSHOT, ITEM_SLINGSHOT },
|
|
||||||
{ GI_OCARINA_FAIRY, ITEM_OCARINA_FAIRY },
|
|
||||||
{ GI_OCARINA_OOT, ITEM_OCARINA_TIME },
|
|
||||||
{ GI_HOOKSHOT, ITEM_HOOKSHOT },
|
|
||||||
{ GI_LONGSHOT, ITEM_LONGSHOT },
|
|
||||||
{ GI_ARROW_ICE, ITEM_ARROW_ICE },
|
|
||||||
{ GI_FARORES_WIND, ITEM_FARORES_WIND },
|
|
||||||
{ GI_BOOMERANG, ITEM_BOOMERANG },
|
|
||||||
{ GI_LENS, ITEM_LENS },
|
|
||||||
{ GI_HAMMER, ITEM_HAMMER },
|
|
||||||
{ GI_ARROW_LIGHT, ITEM_ARROW_LIGHT },
|
|
||||||
{ GI_NAYRUS_LOVE, ITEM_NAYRUS_LOVE },
|
|
||||||
{ GI_BOTTLE, ITEM_BOTTLE },
|
|
||||||
{ GI_POTION_RED, ITEM_POTION_RED },
|
|
||||||
{ GI_POTION_GREEN, ITEM_POTION_GREEN },
|
|
||||||
{ GI_POTION_BLUE, ITEM_POTION_BLUE },
|
|
||||||
{ GI_FAIRY, ITEM_FAIRY },
|
|
||||||
{ GI_FISH, ITEM_FISH },
|
|
||||||
{ GI_MILK_BOTTLE, ITEM_MILK_BOTTLE },
|
|
||||||
{ GI_LETTER_RUTO, ITEM_LETTER_RUTO },
|
|
||||||
{ GI_BLUE_FIRE, ITEM_BLUE_FIRE },
|
|
||||||
{ GI_BUGS, ITEM_BUG },
|
|
||||||
{ GI_BIG_POE, ITEM_BIG_POE },
|
|
||||||
{ GI_POE, ITEM_POE },
|
|
||||||
{ GI_WEIRD_EGG, ITEM_WEIRD_EGG },
|
|
||||||
{ GI_LETTER_ZELDA, ITEM_LETTER_ZELDA },
|
|
||||||
{ GI_POCKET_EGG, ITEM_POCKET_EGG },
|
|
||||||
{ GI_COJIRO, ITEM_COJIRO },
|
|
||||||
{ GI_ODD_MUSHROOM, ITEM_ODD_MUSHROOM },
|
|
||||||
{ GI_ODD_POTION, ITEM_ODD_POTION },
|
|
||||||
{ GI_SAW, ITEM_SAW },
|
|
||||||
{ GI_SWORD_BROKEN, ITEM_SWORD_BROKEN },
|
|
||||||
{ GI_PRESCRIPTION, ITEM_PRESCRIPTION },
|
|
||||||
{ GI_FROG, ITEM_FROG },
|
|
||||||
{ GI_EYEDROPS, ITEM_EYEDROPS },
|
|
||||||
{ GI_CLAIM_CHECK, ITEM_CLAIM_CHECK }
|
|
||||||
};
|
|
||||||
|
|
||||||
std::unordered_map<std::string, RandomizerGet> SpoilerfileGetNameToEnum = {
|
std::unordered_map<std::string, RandomizerGet> SpoilerfileGetNameToEnum = {
|
||||||
{ "No Item", RG_NONE },
|
{ "No Item", RG_NONE },
|
||||||
{ "Rien", RG_NONE },
|
{ "Rien", RG_NONE },
|
||||||
@ -1266,14 +1224,6 @@ std::unordered_map<std::string, RandomizerSettingKey> SpoilerfileSettingNameToEn
|
|||||||
{ "Timesaver Settings:Skip Tower Escape", RSK_SKIP_TOWER_ESCAPE }
|
{ "Timesaver Settings:Skip Tower Escape", RSK_SKIP_TOWER_ESCAPE }
|
||||||
};
|
};
|
||||||
|
|
||||||
s32 Randomizer::GetItemIDFromGetItemID(s32 getItemId) {
|
|
||||||
if (getItemIdToItemId.count(getItemId) == 0) {
|
|
||||||
return -1;
|
|
||||||
}
|
|
||||||
|
|
||||||
return getItemIdToItemId[getItemId];
|
|
||||||
}
|
|
||||||
|
|
||||||
std::string sanitize(std::string stringValue) {
|
std::string sanitize(std::string stringValue) {
|
||||||
// Add backslashes.
|
// Add backslashes.
|
||||||
for (auto i = stringValue.begin();;) {
|
for (auto i = stringValue.begin();;) {
|
||||||
|
@ -1544,10 +1544,6 @@ extern "C" void* getN64WeirdFrame(s32 i) {
|
|||||||
return &weirdFrameBytes[i + sizeof(n64WeirdFrames)];
|
return &weirdFrameBytes[i + sizeof(n64WeirdFrames)];
|
||||||
}
|
}
|
||||||
|
|
||||||
extern "C" s32 Randomizer_GetItemIDFromGetItemID(s32 getItemId) {
|
|
||||||
return OTRGlobals::Instance->gRandomizer->GetItemIDFromGetItemID(getItemId);
|
|
||||||
}
|
|
||||||
|
|
||||||
extern "C" void Randomizer_LoadSettings(const char* spoilerFileName) {
|
extern "C" void Randomizer_LoadSettings(const char* spoilerFileName) {
|
||||||
OTRGlobals::Instance->gRandomizer->LoadRandomizerSettings(spoilerFileName);
|
OTRGlobals::Instance->gRandomizer->LoadRandomizerSettings(spoilerFileName);
|
||||||
}
|
}
|
||||||
|
@ -98,7 +98,6 @@ u8 Randomizer_GetSettingValue(RandomizerSettingKey randoSettingKey);
|
|||||||
RandomizerCheck Randomizer_GetCheckFromActor(s16 actorId, s16 actorParams, s16 sceneNum);
|
RandomizerCheck Randomizer_GetCheckFromActor(s16 actorId, s16 actorParams, s16 sceneNum);
|
||||||
void Randomizer_LoadHintLocations(const char* spoilerFileName);
|
void Randomizer_LoadHintLocations(const char* spoilerFileName);
|
||||||
void Randomizer_LoadItemLocations(const char* spoilerFileName, bool silent);
|
void Randomizer_LoadItemLocations(const char* spoilerFileName, bool silent);
|
||||||
s32 Randomizer_GetItemIDFromGetItemID(s32 getItemId); // TODO: Remove me
|
|
||||||
GetItemEntry Randomizer_GetRandomizedItem(GetItemID ogId, s16 actorId, s16 actorParams, s16 sceneNum);
|
GetItemEntry Randomizer_GetRandomizedItem(GetItemID ogId, s16 actorId, s16 actorParams, s16 sceneNum);
|
||||||
GetItemEntry Randomizer_GetItemFromKnownCheck(RandomizerCheck randomizerCheck, GetItemID ogId);
|
GetItemEntry Randomizer_GetItemFromKnownCheck(RandomizerCheck randomizerCheck, GetItemID ogId);
|
||||||
bool Randomizer_ObtainedFreestandingIceTrap(RandomizerCheck randomizerCheck, GetItemID ogId, Actor* actor);
|
bool Randomizer_ObtainedFreestandingIceTrap(RandomizerCheck randomizerCheck, GetItemID ogId, Actor* actor);
|
||||||
|
@ -757,7 +757,7 @@ void Sram_InitSave(FileChooseContext* fileChooseCtx) {
|
|||||||
} else if (giid == GI_NUT_UPGRADE_30 || giid == GI_NUT_UPGRADE_40) {
|
} else if (giid == GI_NUT_UPGRADE_30 || giid == GI_NUT_UPGRADE_40) {
|
||||||
GiveLinkDekuNutUpgrade(giid);
|
GiveLinkDekuNutUpgrade(giid);
|
||||||
} else {
|
} else {
|
||||||
s32 iid = Randomizer_GetItemIDFromGetItemID(giid);
|
s32 iid = getItem.itemId;
|
||||||
if (iid != -1) INV_CONTENT(iid) = iid;
|
if (iid != -1) INV_CONTENT(iid) = iid;
|
||||||
}
|
}
|
||||||
} else if (getItem.modIndex == MOD_RANDOMIZER) {
|
} else if (getItem.modIndex == MOD_RANDOMIZER) {
|
||||||
|
Loading…
Reference in New Issue
Block a user