cecilarmitais 3256b16116 Decomp GetAppointedLeaderMemberIdx and sub_02056914
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>
2026-08-16 13:45:14 -07:00
2026-04-08 09:53:43 +02:00
2024-04-17 23:52:39 -04:00
2026-07-31 18:03:24 -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%