cecilarmitais 39a8db1b00 Decomp sub_0206549C; make monster_id and a third field signed
Decompile sub_0206549C (0x0206549C), which completes the actor cluster. It calls
sub_02065050 to resolve the entity id in place, then maps the result to a
monster id written through its second argument: entity kinds of 3 resolve
against the loaded unit or adventure NPC list, and everything else dispatches
through a switch over the script entity ids, reading team members, script
variables or SPECIAL_ACTORS slots. It merges into src/main_02064FFC.c, which
removes the last of asm/main_0206549C.s; main.lsf drops the object.

enum monster_id gains MONSTER_INVALID = -1, for the same reason
enum script_entity_id gained ENTITY_NONE in the previous commit. This function
reads nine SPECIAL_ACTORS slots of that type with ldrsh, and an enum with no
negative enumerator is unsigned under -enum min, so those compiled to ldrh. The
name avoids MONSTER_NONE, which the _MONSTER_ID_GENDERED macro already defines
as 0. The sentinel was verified in isolation -- added alone, with nothing else
in the tree modified -- and the ROM still matches, so it is byte-neutral for all
existing code and only affects what reads such a field.

struct unk_020A7FF0 field_0x2 becomes s16 on the same evidence: the switch's
default case reads it with ldrsh. That is the third field corrected this way,
after field_0x0 and the script_entity_id slots, and the reason they all surfaced
late is that storing to a field cannot reveal its signedness.

struct unk_020B0A48 is declared for the 0x44-byte records that
TEAM_MEMBER_TABLE_PTR points at, named for that pointer's address, which is
derived by counting to the next label in the data. GetMainCharacter1,
GetMainCharacter2, GetMainCharacter3, GetHero, GetPartner and sub_02056914 all
return it, and none of them had a declaration.

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