mirror of
https://github.com/pret/pmd-sky.git
synced 2026-09-28 13:24:02 -05:00
fdbc544fcb159492d45263d4d1cfd09b7e15ad73
Decompile from asm: GetNbItemsInBag 0x0200EDFC IsItemInBag 0x0200EEE0 Both walk the active inventory with a cursor rather than indexing, with the index and the cursor both advanced in the for clause, which is what puts the two adds at the top of the loop body as the target has them. GetNbItemsInBag's existence test goes through an explicit boolean: (item->flags & ITEM_FLAG_EXISTS) != 0 assigned to a bool8 before the branch. That is what produces the target's tst / movne / moveq / tst #0xff sequence; testing the masked value directly collapses it. IsItemInBag returns early on the first match, which the target reaches with bxeq lr mid-loop, and falls through to a single return of zero. GetNbItemsInBag lands in the existing src/main_0200EDC0.c, which already includes item.h; IsItemInBag needs a new file and declares BAG_ITEMS_PTR_MIRROR alongside it, matching how the other bag sources in this tree declare it. 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%