cecilarmitais 06c828e19b Decomp CountItemTypeInBag and GetEquippedThrowableItem
Decompile from asm:

  CountItemTypeInBag        0x0200EE88
  GetEquippedThrowableItem  0x0200F208

CountItemTypeInBag totals matching slots, adding the stack size for thrown items
and one for everything else, using IsThrownItem from item_util.c.

GetEquippedThrowableItem returns the index of the first existing slot flagged
usable by L+R, or -1. It reads item->flags through struct item_volatile. The
target loads the flags byte twice, once for each test, where a plain struct item
lets the compiler reuse the first load; item.h already carries item_volatile for
exactly this purpose and says so. The cast is written at each access, following
dungeon_ai_items.c and special_move_types.c rather than casting the cursor once,
though both spellings score 0.

Only the second flag test is left as a bare mask. The existence test goes through
an explicit bool8 because the target boolifies it -- tst, movne, moveq, tst
#0xff -- while the second test branches straight off tst, which is what a bare
mask in an if produces.

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 17:16:47 -07:00
2026-04-08 09:53:43 +02:00
2024-04-17 23:52:39 -04:00
2023-11-20 17:24:08 -06:00
2024-06-23 16:59:48 -05:00
2023-08-13 23:03:51 -04:00
2024-12-28 02:25:07 -06:00
2026-08-01 12:46:55 -04:00
2023-06-28 23:35:19 -04:00
2023-06-28 23:35:19 -04:00
2023-06-28 23:35:19 -04:00
2023-06-28 23:35:19 -04:00
2026-07-16 07:36:58 -07:00
2025-06-10 23:35:01 -04:00
2023-08-20 22:43:00 -04:00
2023-08-14 00:17:21 -04:00
2023-11-01 18:44:19 -04:00
2024-04-17 23:52:39 -04:00
2023-08-28 00:09:02 -04:00
2024-04-17 23:52:40 -04:00
2023-08-08 00:17:03 -04: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 335 MiB
Languages
Assembly 66.3%
C 18%
C++ 7.1%
Boogie 4.3%
sed 1.5%
Other 2.8%