mirror of
https://github.com/pret/pmd-sky.git
synced 2026-09-28 21:31:17 -05:00
19c62d4b1f92f7b9f9e0b082efe9ca01b47f65f5
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>
…
…
…
…
…
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%