Files
pmd-sky/asm
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-07-16 07:36:58 -07:00
2026-07-18 09:27:28 -07:00
2026-07-02 20:51:00 -04:00
2026-07-02 20:51:00 -04:00
2026-06-12 17:33:06 -04:00
2026-07-02 20:51:00 -04:00
2026-07-11 17:18:26 -04:00
2026-07-11 17:18:26 -04:00
2026-07-11 17:18:26 -04:00
2026-08-01 12:46:55 -04:00
2026-07-02 20:51:00 -04:00
2026-06-21 19:14:04 -04:00
2026-06-12 17:09:45 -04:00
2026-06-16 19:29:57 -04:00
2026-06-16 19:29:57 -04:00
2026-07-02 20:51:00 -04:00
2026-06-19 13:18:58 -04:00
2026-06-19 13:18:58 -04:00
2026-06-16 19:29:57 -04:00
2026-06-19 13:18:58 -04:00
2026-06-19 13:18:58 -04:00
2026-06-19 13:18:58 -04:00
2026-07-15 22:12:22 -04:00
2026-07-11 17:18:26 -04:00
2026-07-11 17:18:25 -04:00
2026-07-11 17:18:26 -04:00
2026-07-02 20:51:00 -04:00
2026-06-19 13:18:58 -04:00
2026-06-07 16:55:08 -07:00
2026-07-02 20:51:00 -04:00
2026-06-16 19:29:57 -04:00
2026-07-31 18:03:24 -04:00
2026-07-11 17:18:26 -04:00
2026-07-31 18:03:24 -04:00
2026-06-19 13:18:58 -04:00
2026-07-19 16:27:08 -07:00
2026-07-02 20:51:00 -04:00
2026-06-07 16:55:08 -07:00
2026-07-02 20:51:00 -04:00
2026-07-18 09:27:28 -07:00
2026-07-16 07:36:58 -07:00
2026-07-15 22:12:22 -04:00
2026-07-16 07:36:58 -07:00
2026-08-01 12:46:55 -04:00
2026-07-02 20:51:00 -04:00
2026-07-02 20:51:00 -04:00
2026-07-31 18:03:24 -04:00
2026-06-16 19:29:57 -04:00
2026-07-15 22:50:47 -04:00
2026-08-16 13:45:14 -07:00
2026-07-02 20:51:00 -04:00
2026-08-01 12:46:55 -04:00
2026-08-16 13:45:14 -07:00
2026-07-10 23:22:20 +03:00
2026-06-16 19:29:57 -04:00
2026-07-02 20:51:00 -04:00
2026-07-02 20:51:00 -04:00
2026-07-02 20:51:00 -04:00
2026-06-16 19:29:57 -04:00
2026-06-19 13:18:58 -04:00
2026-06-16 19:29:57 -04:00
2026-07-02 20:51:00 -04:00
2026-07-02 20:51:00 -04:00
2026-07-02 20:51:00 -04:00
2026-07-02 20:51:00 -04:00
2026-07-02 20:51:00 -04:00
2026-08-12 12:04:11 -07:00
2026-08-12 12:04:11 -07:00
2026-07-02 20:51:00 -04:00
2026-07-02 20:51:00 -04:00
2026-06-16 19:29:57 -04:00
2026-06-19 13:18:58 -04:00
2026-07-31 18:03:24 -04:00
2026-07-15 22:12:22 -04:00
2026-07-31 18:03:24 -04:00
2026-07-07 20:46:43 -04:00
2026-07-31 18:03:24 -04:00
2026-07-31 18:03:24 -04:00
2026-07-15 22:12:22 -04:00
2026-06-16 19:29:57 -04:00
2026-07-15 22:12:22 -04:00
2026-07-15 22:12:22 -04:00
2026-07-02 20:51:00 -04:00
2026-06-19 13:18:58 -04:00
2026-07-15 22:12:22 -04:00
2026-07-15 22:12:22 -04:00
2026-07-15 22:12:22 -04:00
2026-07-15 22:12:22 -04:00
2026-07-15 22:12:22 -04:00
2026-07-31 18:03:24 -04:00
2026-07-31 18:03:24 -04:00
2026-07-31 18:03:24 -04:00
2026-07-31 18:03:24 -04:00
2026-07-31 18:03:24 -04:00
2026-07-31 18:03:24 -04:00
2026-07-31 18:03:24 -04:00
2026-07-15 22:12:22 -04:00
2026-07-02 20:51:00 -04:00
2026-07-31 18:03:24 -04:00
2026-06-19 13:18:58 -04:00
2026-07-31 18:03:24 -04:00
2026-07-31 18:03:24 -04:00
2026-07-31 18:03:24 -04:00
2026-07-07 20:46:43 -04:00
2026-07-15 22:12:22 -04:00
2026-07-15 22:12:22 -04:00
2026-07-15 22:12:22 -04:00
2026-06-16 19:29:57 -04:00
2026-07-31 18:03:24 -04:00
2026-07-31 18:03:24 -04:00
2026-07-31 18:03:24 -04:00
2026-07-31 18:03:24 -04:00
2026-07-15 22:12:22 -04:00
2026-07-15 22:12:22 -04:00
2026-07-07 20:46:43 -04:00
2026-07-07 20:46:43 -04:00
2026-07-31 18:03:24 -04:00
2026-07-31 18:03:24 -04:00
2026-07-07 20:46:43 -04:00
2026-07-07 20:46:43 -04:00
2026-07-07 20:46:43 -04:00
2026-06-16 19:29:57 -04:00
2026-06-16 19:29:57 -04:00
2026-07-31 18:03:24 -04:00
2026-07-02 20:51:00 -04:00
2026-07-31 18:03:24 -04:00
2026-07-15 22:12:22 -04:00
2026-07-31 18:03:24 -04:00
2026-07-15 22:12:22 -04:00
2026-07-07 20:46:43 -04:00
2026-07-07 20:46:43 -04:00
2026-07-02 20:51:00 -04:00
2026-07-15 22:12:22 -04:00
2026-07-15 22:12:22 -04:00
2026-07-31 18:03:24 -04:00
2026-07-02 20:51:00 -04:00
2026-07-31 18:03:24 -04:00
2026-06-16 19:29:57 -04:00
2026-06-19 13:18:58 -04:00
2026-07-07 20:46:43 -04:00
2026-07-02 20:51:00 -04:00
2026-07-15 22:12:22 -04:00
2026-07-15 22:12:22 -04:00
2026-06-16 19:29:57 -04:00
2026-07-15 22:12:22 -04:00
2026-07-07 20:46:43 -04:00
2026-07-15 22:12:22 -04:00
2026-07-07 20:46:43 -04:00
2026-06-16 19:29:57 -04:00
2026-07-07 20:46:43 -04:00
2026-07-07 20:46:43 -04:00
2026-07-31 18:03:24 -04:00
2026-07-31 18:03:24 -04:00
2026-07-31 18:03:24 -04:00
2026-07-02 20:51:00 -04:00
2026-07-31 18:03:24 -04:00
2026-07-07 20:46:43 -04:00
2026-07-15 22:50:47 -04:00
2026-07-15 22:12:22 -04:00
2026-07-07 20:46:43 -04:00
2026-07-15 22:12:22 -04:00
2026-07-07 20:46:43 -04:00
2026-07-02 20:51:00 -04:00
2026-08-01 12:46:55 -04:00
2026-06-02 20:11:08 -04:00