mirror of
https://github.com/pret/pmd-sky.git
synced 2026-09-28 05:07:58 -05:00
eb0db73b1ff16a8a5289c7443cf0cf1ff594040e
ApplyDamage (overlay 29, 0x02308FE0). asm/overlay_29_02308FE0.s and its .inc are removed and the object drops out of main.lsf; the function merges into src/overlay_29_02308FBC.c alongside EntityIsValid__02308FBC. Types added: struct unk_02308FE0 (the damage-data argument, in the function's header), struct unk_023528A4 and struct unk_022C593C (element types for TYPE_DAMAGE_NEGATING_EXCLUSIVE_ITEM_EFFECTS and ov10_022C593C, local to the .c). Field types corrected, each required by the match: struct monster::bide_damage_tally u32 -> s32 (clamped with strgt) struct monster::field_0x168 / field_0x169 -> s16 field_0x168 (read ldrsh) struct dungeon_generation_info::music_table_idx u16 -> s16 (read ldrsh) TalkToSecretBazaarNpcStandard, ov29_022F0618, TalkToSecretBazaarNpcWithYesNoMenu and the TalkToSecretBazaarNpc extern take a message id in their first parameter, not a struct entity *. Every caller loads a small constant into r0 - 0xC6B from ApplyDamage, 0xF32/0xF4A/0xF4B/0xF4C in asm/overlay_29_02344178.s. The three tree functions are one-line forwarders, so their parameter types were unconstrained; ApplyDamage is the first C caller. Two things a reviewer should weigh. DUNGEON_PTR is declared scalar here (extern struct dungeon *DUNGEON_PTR;) rather than the *DUNGEON_PTR[] idiom the other files use - the array form lets MWCC CSE the load and costs three instructions. And one read is qualified volatile (*(volatile u8 *)&dmon->curse_class_status.curse) to reproduce a reload retail performs with no intervening call; it is standard C and the ROM matches, but it is a stand-in rather than recovered source, and a struct curse_class_status * local gets to within one instruction without it. Only the US branch is decompiled; the original block carries 50 preprocessor directives including two wholesale #ifdef EUROPE duplications. Authored by Claude (Opus 5) under human direction. Confirmed by a matching build: build/pmdsky.us/pmdsky.us.nds: OK (main.sha1 passes, so the ARM9 binary matches and not only the packaged ROM). 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%