mirror of
https://github.com/pret/pmd-sky.git
synced 2026-09-28 05:07:58 -05:00
06c828e19b7717c5682364b61235bb71c77d257a
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>
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:
- pmdsky.us.nds
sha1: 5fa96ca8d8dd6405d6cd2bad73ed68bc73a9d152 - pmdsky.eu.nds
sha1: c838a5adf1ed32d2da8454976e5b1a1aa189c139 - pmdsky.jp.nds
sha1: 7785138dd343b6f2d0f2c9cadc26b4aa927161d7
For contacts and other pret projects, see pret.github.io.
Description
Languages
Assembly
66.3%
C
18%
C++
7.1%
Boogie
4.3%
sed
1.5%
Other
2.8%