mirror of
https://github.com/pret/pmd-sky.git
synced 2026-09-28 13:24:02 -05:00
3256b1611626ab6c47c9e29cff6fa322d79fb2f3
Decompile the last two accessors of this cluster from asm/main_02055894.s. Both resolve the appointed leader through the roster region of team_member_table: they read the active team from active_team, index the three number_active_team_members fields by it, and use that value to index active_roster_member_idxs. GetAppointedLeaderMemberIdx returns the resulting member index, or -1 when the first read is -1. sub_02056914 is its pointer counterpart, returning &members[index] or NULL when either read is -1 -- the same index/pointer pairing as GetHeroMemberIdx and GetHero. Each sits in the middle of asm/main_02055894.s and is not adjacent to the other, so each extraction splits the file: the trailing functions move verbatim into asm/main_020568DC.s and asm/main_02056960.s, the affected .inc files are regenerated, and main.lsf gains the four objects. GetAppointedLeaderMemberIdx returns u32, consistent with the other MemberIdx functions in this cluster. Its prototype and sub_02056914's move out of main_02064FFC.h, where they were declared while their callers were decompiled, into the new headers; main_02064FFC.h now includes those. sub_02065050 and sub_0206549C call them and were rebuilt to confirm the u32 change leaves both byte-identical. The three number_active_team_members fields are separate scalars in common.h but are indexed here as an array, which is what the asm does; the expression relies on them being contiguous, which the struct layout guarantees. No new names are introduced. struct team_member_table, struct ground_monster, their fields and TEAM_MEMBER_TABLE_PTR all already exist in the tree, and both function labels were already present. No comments are added to any pmd-sky file. Authored by Claude (Opus 4.8) under human direction. Confirmed by a matching build: build/pmdsky.us/pmdsky.us.nds: OK. Co-Authored-By: Claude Opus 4.8 <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%