cecilarmitais 7e1755ddf8 Decompile 11 more callees; give them headers and drop 40 call-site declarations
Each function was verified at score 0 against its NORTH_AMERICA, EUROPE and
JAPAN targets before landing, with the address walk closing exactly in each
region, and by a matching US build after.

  main_020517D4.c           GetRankUpEntry
  main_02001188.c           MemAlloc
  main_0203088C.c           CloseAdvancedTextBox
  main_020114F8.c           ApplyGummiBoostsToGroundMonster
  main_0205283C.c           GetExp
  overlay_29_02305C04.c     EndNegativeStatusConditionWrapper
  overlay_29_02338350.c     NearbyAllyIqSkillIsEnabled
  overlay_29_022E9FC0.c     AdvanceFrame
  overlay_29_022E99F0.c     TickStatusTurnCounter
  overlay_29_0234B4BC.c     LogMessageByIdWithPopup
  overlay_29_0234B340.c     LogMessageByIdWithPopupCheckUserTarget

All eleven sat at the head or tail of their .s, so every one merges into the
adjacent source file and no assembly file is split.

Forty call-site declarations of these functions are replaced by an include of
the owning header. Two of them disagreed with the real signature, and one had to
be fixed for the tree to compile at all:

  MemAlloc      was declared six different ways. src/overlay_24_end.c spelled it
                `void* MemAlloc(s32, s32);` -- signed -- and that file already
                includes main_02001188.h, so the contradiction became a hard
                compile error the moment MemAlloc had a header to contradict.
                It had been harmless only because the function had none.
  AdvanceFrame  was declared `void AdvanceFrame(u8);` in two overlay_31 files
                against the real u32. Byte-neutral in practice, since every call
                site passes the literal 0x62, but wrong.

struct unk_020517F4 was defined file-locally in src/main_0203D538.c. It now has
one definition, in include/main_020517D4.h, and both local copies are gone --
otherwise including that header where GetRankUpEntry is called would collide.

Two generated headers are made self-contained. extract_function.py emits a
header that names types it does not include, and since the .c includes it first,
the prototype builds its own scoped tag: include/main_020114F8.h declaring
`struct ground_monster *` before common.h defines it made the definition read as
a redeclaration with a different type.

Authored by Claude (Opus 5) under human direction. Confirmed by a matching
build: build/pmdsky.us/pmdsky.us.nds: OK.

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
2026-09-18 23:13:37 -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%