mirror of
https://github.com/pret/pmd-sky.git
synced 2026-09-29 21:57:42 -05:00
86d3db8f56d73293a5fa5858e7c79c33d81ffae7
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>
…
…
…
…
…
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%