mirror of
https://github.com/pret/pmd-sky.git
synced 2026-09-27 20:57:49 -05:00
39a8db1b001acc3d0eddb974a94f04de262eb2db
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>
…
…
…
…
…
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%