From 8eabef6c428edf4b732ef89e6f2f354fb0149b16 Mon Sep 17 00:00:00 2001 From: sonoftunk Date: Mon, 7 Nov 2022 06:24:14 -0500 Subject: [PATCH] InfTable Check Location Fixes: Lost Dog Richard, Rolling Gorons, HBA 1000, Thawed Zora --- soh/soh/Enhancements/randomizer/randomizer_item_tracker.cpp | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/soh/soh/Enhancements/randomizer/randomizer_item_tracker.cpp b/soh/soh/Enhancements/randomizer/randomizer_item_tracker.cpp index e16f8d616..ed1fcb0b9 100644 --- a/soh/soh/Enhancements/randomizer/randomizer_item_tracker.cpp +++ b/soh/soh/Enhancements/randomizer/randomizer_item_tracker.cpp @@ -677,7 +677,10 @@ bool HasItemBeenCollected(RandomizerCheckObject obj) { case SpoilerCollectionCheckType::SPOILER_CHK_GOLD_SKULLTULA: return GET_GS_FLAGS(scene) & flag; case SpoilerCollectionCheckType::SPOILER_CHK_INF_TABLE: - return gSaveContext.infTable[scene] & (0x01 << flag); + // Magic to flip an index `flag` to a lookup for 16bit big endian integers. Probably an easier way..... + shift = 7 - (flag % 8) + ((flag % 16) / 8) * 8; + mask = 0x8000 >> shift; + return gSaveContext.infTable[scene] & mask; case SpoilerCollectionCheckType::SPOILER_CHK_ITEM_GET_INF: // Magic to flip an index `flag` to a lookup for 16bit big endian integers. Probably an easier way..... shift = 7 - (flag % 8) + ((flag % 16) / 8) * 8;