cecilarmitais 399618a493 Decomp GetItemAtIdx and RemoveEmptyItemsInBag
Decompile from asm:

  GetItemAtIdx           0x0200F340
  RemoveEmptyItemsInBag  0x0200F370

GetItemAtIdx returns a pointer into the active inventory, or null for a negative
index. Its index parameter is s16, not s32: struct item is 6 bytes, and at 16-bit
width the compiler folds the index scaling and the base into a single smlabb,
which is what the target emits. An s32 index produces a separate multiply and
add, at score 1100.

RemoveEmptyItemsInBag tail-calls RemoveEmptyItems over the active inventory with
INVENTORY_SIZE, which is already 50 in item.h and matches the 0x32 immediate.

RemoveEmptyItems is still asm and was not declared anywhere in the tree, so its
prototype is provisional and declared here.

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:42:09 -07:00
2026-08-01 12:46:55 -04:00
2026-07-16 07:36:58 -07:00

Pokémon Mystery Dungeon: Explorers of Sky

This is a WIP disassembly of Pokémon Mystery Dungeon: Explorers of Sky. For instructions on how to set up the repository, please read INSTALL.md. For information on how to contribute changes, see CONTRIBUTING.md.

This repository builds the following ROMs:

For contacts and other pret projects, see pret.github.io.

Description
Decompilation of Pokémon Mystery Dungeon: Explorers of Sky
Readme 333 MiB
Languages
Assembly 66.3%
C 18%
C++ 7.1%
Boogie 4.3%
sed 1.5%
Other 2.8%