cecilarmitais 19c62d4b1f Decomp five leftover single-function asm files; fix three stale declarations
Ninth cleanup sweep. Five asm files and their includes removed:

  asm/overlay_29_0231E990.s   ShouldTryEatItem
  asm/overlay_29_0232D378.s   DoMoveGuardSwap
  asm/overlay_29_0232A490.s   DoMoveSwallow
  asm/overlay_29_02329674.s   DoMoveHelpingHand
  asm/main_0205B738.s         sub_0205B738

All five merged into an adjacent source rather than splitting one.

Three declarations the tree already carried are contradicted by these bytes and
are corrected here, touching five files this sweep did not otherwise decompile:

SubstitutePlaceholderStringTags took `u8 *string_id` in four files and `int a` in
a fifth. DoMoveGuardSwap passes a literal 1, which no pointer parameter can take
without a cast; the existing call sites all passed 0, which is why nothing caught
it. The four are now s32, agreeing with the one that was already an integer.

TryIncreaseHp took `s16 hp` in two files. DoMoveSwallow loads its argument from a
word array and passes it untouched -- s16 inserts a sign extension and scores
210, s32 scores 0. The two existing call sites load s16 data with ldrsh, so the
value is already extended and the wider declaration is byte-neutral for them.

ShouldTryEatItem's parameter is signed: the range check emits blt/ble, while
enum item_id under -enum min compares unsigned and scores 400. s16 matches the
adjacent IsItemValidVeneer and every caller's ldrsh.

DoMoveSwallow also needed its two arms in the other source order, the same rule
as sub_02009DCC last sweep: MWCC lets the first arm written fall through.

sub_0205B738's copy at +0xB0 is element [1] of struct0, not a member: 0xB0 is
sizeof(struct unkStruct_020B0A54), as sub_0205B77C (a * 176 + ...) and
sub_0205B7C8 (MemsetSimple(..., 0xB0)) already say. Reading it as a member and
appending one scored 0 on a scratch but changed the struct's size, and with it
the stride in three neighbours and the copy length in a fourth -- 29 binaries
moved. No header change is needed; the array spelling also scores 0.

Three of the five log a message whose id differs between US and JP by no constant
offset, so each is a file-scope #ifdef JAPAN define, as dungeon_ai.c and
dungeon_projectile_throw.c already do.

Authored by Claude (Opus 5) under human direction. All five verified at score 0.
Three carry region conditionals, so this was confirmed by matching builds of all
three ROMs: US, EU and JP.

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
2026-08-19 21:36:48 -07:00
…
2026-08-01 12:46:55 -04:00
2026-07-16 07:36:58 -07: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%