Skip to content

Commit

Permalink
Update gold skulltula actor check in key override.
Browse files Browse the repository at this point in the history
  • Loading branch information
PhlexPlexico committed Jul 7, 2024
1 parent 69ad906 commit ed10f57
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 6 deletions.
2 changes: 2 additions & 0 deletions code/include/game/actor.h
Original file line number Diff line number Diff line change
Expand Up @@ -48,6 +48,8 @@ namespace game::act {
EnJs = 0x0085,
// Cursed Man Spider House
EnSsh = 0x0090,
// Gold Skullutla
EnSi = 0x0099,
// Powder Keg Trial Goron
EnGo = 0x00D5,
// [1] Deku Palace / Woodfall Temple moving platforms (after player lands on them)
Expand Down
13 changes: 7 additions & 6 deletions code/source/rnd/item_override.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -88,8 +88,8 @@ namespace rnd {
retKey.scene = scene;
retKey.type = ItemOverride_Type::OVR_COLLECTABLE;
retKey.flag = actor->overlay_info->info->flags;
} else if (actor->id == (game::act::Id)game::ItemId::GoldSkulltula) { // Gold Skulltula Token
retKey.scene = (actor->params >> 8) & 0x1F;
} else if (actor->id == game::act::Id::EnSi) { // Gold Skulltula Token
retKey.scene = scene;
retKey.type = ItemOverride_Type::OVR_SKULL;
retKey.flag = actor->params & 0xFF;
} else if (scene == 0x14C0 && actor->id == (game::act::Id)0x0075) { // Grotto Salesman
Expand Down Expand Up @@ -681,10 +681,11 @@ namespace rnd {
s32 incomingNegative = incomingGetItemId < 0;
if (fromActor != NULL && incomingGetItemId != 0) {
s16 getItemId = ItemOverride_CheckNpc(fromActor->id, incomingGetItemId, incomingNegative);
// #if defined ENABLE_DEBUG || DEBUG_PRINT
// util::Print("%s: Our actor ID is %#06x\nScene is %#04x\nIncoming item id is %#04x\ngetItemId %#04x\nParams %#04x\n", __func__, fromActor->id,
// gctx->scene, incomingGetItemId, getItemId, fromActor->params);
// #endif
// #if defined ENABLE_DEBUG || DEBUG_PRINT
// util::Print("%s: Our actor ID is %#06x\nScene is %#04x\nIncoming item id is %#04x\ngetItemId
// %#04x\nParams %#04x\n", __func__, fromActor->id,
// gctx->scene, incomingGetItemId, getItemId, fromActor->params);
// #endif
storedActorId = fromActor->id;
storedGetItemId = incomingNegative ? (GetItemID)-incomingGetItemId : (GetItemID)incomingGetItemId;
override = ItemOverride_Lookup(fromActor, (u16)gctx->scene, getItemId);
Expand Down

0 comments on commit ed10f57

Please sign in to comment.