Skip to content

Commit

Permalink
Fix build issue with actors on override.
Browse files Browse the repository at this point in the history
  • Loading branch information
PhlexPlexico committed Dec 20, 2023
1 parent c65cb3a commit cb6b675
Showing 1 changed file with 4 additions and 8 deletions.
12 changes: 4 additions & 8 deletions code/source/rnd/item_override.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ extern "C" {

namespace rnd {
static s32 rItemOverrides_Count = 0;
static s16 storedActorId = 0;
static game::act::Id storedActorId = game::act::Id::Player;
ItemOverride rItemOverrides[640] = {0};
static game::act::Actor* rDummyActor = NULL;
static ItemOverride rPendingOverrideQueue[3] = {0};
Expand Down Expand Up @@ -163,7 +163,7 @@ namespace rnd {
rActiveItemGraphicId = 0;
rActiveItemFastChest = 0;
rCustomDungeonItemRetrieved = 0;
storedActorId = 0;
storedActorId = game::act::Id::Player;
}

static void ItemOverride_PushPendingOverride(ItemOverride override) {
Expand Down Expand Up @@ -402,6 +402,8 @@ namespace rnd {
getItemId = incomingNegative ? -0x01 : 0x01;
} else if (getItemId == static_cast<s16>(rnd::GetItemID::GI_MASK_CAPTAINS_HAT)) {
gExtSaveData.givenItemChecks.enOskGivenItem = 1;
} else if (storedActorId == game::act::Id::EnPst) {
getItemId = incomingNegative ? -0xBA : 0xBA;
}

return getItemId;
Expand All @@ -424,8 +426,6 @@ namespace rnd {
gExtSaveData.givenItemChecks.enFsnGivenItem = 1;
} else if (storedActorId == game::act::Id::NpcEnPm) {
gExtSaveData.givenItemChecks.enPmGivenItem = 1;
} else if (storedActorId == game::act::Id::EnPst) {
getItemId = incomingNegative ? -0xBA : 0xBA;
} else if (storedActorId == game::act::Id::EnSsh) {
gExtSaveData.givenItemChecks.enSshGivenItem = 1;
} else if (storedActorId == game::act::Id::EnDno) {
Expand Down Expand Up @@ -662,10 +662,6 @@ namespace rnd {
return (int)0xFF;
} else if (currentItem == game::ItemId::BunnyHood && gExtSaveData.givenItemChecks.enHsGivenItem == 0) {
return (int)0xFF;
} else if (currentItem == game::ItemId::BunnyHood && gExtSaveData.givenItemChecks.enHsGivenItem == 1) {
#if defined ENABLE_DEBUG || defined DEBUG_PRINT
rnd::util::Print("%s: Our enHsValue is one?\n", __func__);
#endif
} else if (currentItem == game::ItemId::GibdoMask && gExtSaveData.givenItemChecks.enHgoGivenItem == 0) {
return (int)0xFF;
} else if (currentItem == game::ItemId::RomaniMask && gExtSaveData.givenItemChecks.enMaYtoGivenItem == 0) {
Expand Down

0 comments on commit cb6b675

Please sign in to comment.