cecilarmitais 86d3db8f56 Decomp sub_02055410, sub_02055474 and sub_020554D8
Decompile the three member-index predicates from asm/main_02054E4C.s. Each takes
a member index, checks that TEAM_MEMBER_TABLE_PTR->members[idx] is valid, and
returns whether that index is the one a particular main character occupies for
the current game mode: sub_02055410 tests index 2 during a special episode and 0
otherwise, sub_02055474 tests 3 and 1, and sub_020554D8 tests 4 and is false
outside a special episode. Those are the same indices GetMainCharacter1,
GetMainCharacter2 and GetMainCharacter3 select, so each predicate answers
"is this index that main character" without going through the accessor.

They merge into a new src/main_02055410.c; extracting them splits
asm/main_02054E4C.s, the trailing functions move verbatim into
asm/main_02055528.s, and main.lsf gains the two objects.

The return type is bool8 rather than int, and the parameter is subscripted as
members[(s16)idx] so the index multiply compiles to smulbb. Their prototypes move
out of main_02064FFC.h, where they were declared while sub_02065050 was
decompiled, into the new header, which main_02064FFC.h now includes;
sub_02065050 was rebuilt to confirm the return-type change leaves it
byte-identical.

The new header includes util.h. Without it the header is not self-contained:
bool8 is declared there, and a header that uses it before common.h is reached
makes the compiler infer int and then conflict with the real typedef.

No new names are introduced. struct team_member_table, its fields,
TEAM_MEMBER_TABLE_PTR, GetGameMode and GAME_MODE_SPECIAL_EPISODE already exist in
the tree, and all three functions keep their sub_ names.

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-07-31 18:03:24 -04:00
…
2026-08-01 12:46:55 -04:00
2026-07-16 07:36:58 -07: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%