mirror of
https://github.com/pret/pmd-sky.git
synced 2026-10-01 14:48:14 -05:00
Decompile from asm: CountNbItemsOfTypeInBag 0x0200EE4C HasStorableItems 0x0200F0FC CountNbItemsOfTypeInBag counts every slot whose id matches, without checking the existence flag, so empty slots are counted when the caller asks for whatever id they hold. That is what the target does; it is not an omission here. HasStorableItems checks the existence flag through the same explicit bool8 the other bag walkers use, then calls IsStorableItem, which is already decompiled in item_util_4.c, and returns on the first slot satisfying both. HasStorableItems sits at a lower address than GetItemIndex, so it is prepended to that file. The extern for BAG_ITEMS_PTR_MIRROR was below the existing function and is moved to the top, above both, since the new first function needs it too. 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>
5 lines
99 B
C++
5 lines
99 B
C++
#pragma once
|
|
.public AreItemsEquivalent
|
|
.public BAG_ITEMS_PTR_MIRROR
|
|
.public GetItemCategoryVeneer
|