mirror of
https://github.com/pret/pmd-sky.git
synced 2026-09-28 05:07:58 -05:00
0f3cbcbcd20586e4a6df5c9b3b03b26294bcf395
Closes the three near-match groups left from the previous batch. All of asm/overlay_29_02337EC0.s 6 functions asm/overlay_29_022E335C.s 10 functions asm/overlay_29_0230F02C.s 10 functions now match, so the three objects leave main.lsf and the .s/.inc files go. struct dungeon gains struct unk_02337EE8, grouping the ten members from 0x286B0 through spawn_table_entries_chosen into one sub-object at unchanged offsets. ov29_02337EE8 and GetRandomSpawnMonsterID reach spawn_entries_master through a local pointer to that member, which is what makes mwcc form the member base and the inner offset as two additions the way the target does; the sub-object alone, or the local alone, still scores 225. The spelling is already in the tree at src/overlay_29_022FBBEC.c:72 for the other grouped member. Eighteen expressions in seven files gain field_0x286b0; four of them are in upstream's src/overlay_30_init.c, which reaches highest_enemy_level and spawn_table_entries_chosen directly. Two width corrections, each replacing adjacent u8 members with one wider member at the same offset, so no following offset or alignment moves: dungeon::number_completed_floors u8 -> s16, absorbing speed_boost_counter at 0x1F (read ldrsh in three places, written strh in a fourth); and monster::field_0x188, four u8 -> one s32 (read ldr twice here, written str in overlay_29_022E0378). src/dg_camera.c declares DUNGEON_PTR as struct dungeon *[2] rather than the incomplete *[]. A complete type is what makes mwcc reload the pointer across an intervening store, which ov29_022E34C8 needs; [] and [2] are compatible types, so no use site changes. src/dungeon_map_access_1.c takes the scalar form for the same reason. Sixteen call-site-derived declarations in twelve files are replaced by an include of the owning header. Eight of them declared PlayEffectAnimationEntity with the wrong tail types -- s32, s32, s32 where its prologue reads u8, s16 and a pointer. Every affected call site passes literals, so the correction is byte-neutral, which the build confirms. Authored by Claude (Opus 5) under human direction. Confirmed by matching builds in all three regions: build/pmdsky.us/pmdsky.us.nds: OK, build/pmdsky.eu/pmdsky.eu.nds: OK, build/pmdsky.jp/pmdsky.jp.nds: OK. Co-Authored-By: Claude Opus 5 <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%