cecilarmitais eb0db73b1f Decomp ApplyDamage; fix a message-id parameter type and three field types
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>
2026-09-18 23:12:40 -07:00
2026-04-08 09:53:43 +02:00
2024-04-17 23:52:39 -04:00
2026-08-22 20:45:50 -04:00
2023-11-20 17:24:08 -06:00
2024-06-23 16:59:48 -05:00
2023-08-13 23:03:51 -04:00
2024-12-28 02:25:07 -06:00
2026-08-01 12:46:55 -04:00
2023-06-28 23:35:19 -04:00
2023-06-28 23:35:19 -04:00
2023-06-28 23:35:19 -04:00
2026-09-04 13:13:23 -07:00
2026-07-16 07:36:58 -07:00
2025-06-10 23:35:01 -04:00
2023-08-20 22:43:00 -04:00
2023-08-14 00:17:21 -04:00
2023-11-01 18:44:19 -04:00
2024-04-17 23:52:39 -04:00
2023-08-28 00:09:02 -04:00
2024-04-17 23:52:40 -04:00
2023-08-08 00:17:03 -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%