Files
pmd-sky/asm/include/main_0200F7A8.inc
cecilarmitais d4b2c2fc01 Decomp two bag helpers that forward to asm callees
Decompile from asm:

  RemoveFirstUnequippedItemOfType  0x0200F798
  AddItemToBagNoHeld              0x0200F874

Both are thin forwarders. AddItemToBagNoHeld tail-calls AddItemToBag with a zero
second argument, which the target reaches with bx rather than bl.
RemoveFirstUnequippedItemOfType feeds GetFirstUnequippedItemOfType's result
straight into RemoveItemNoHoleCheck.

All three callees are still asm and had no declaration anywhere in the tree, so
their prototypes are provisional and declared in the new headers with the
loosest types that compile. They should collapse into the callees' own headers
when those land.

The return types are not determined by these functions' bytes. Both forward
whatever the callee returns without touching it, so declaring them void scores 0
as well. They are written as returning u32 because that is what a pass-through
of a word-sized result reads as, but a reviewer should treat the return type as
a guess rather than something the target settles.

No comments are added to any pmd-sky file.

Authored by Claude (Opus 5) under human direction. Confirmed by a matching
build: build/pmdsky.us/pmdsky.us.nds: OK.

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
2026-08-16 16:34:39 -07:00

8 lines
150 B
C++

#pragma once
.public AddItemToBag
.public BAG_ITEMS_PTR_MIRROR
.public BulkItemToItem
.public ItemZInit
.public RemoveEmptyItems
.public sub_020582E0