mirror of
https://github.com/pret/pmd-sky.git
synced 2026-09-29 05:41:47 -05:00
0587a6efcb1a2d20373c6e588c4bf4523a7e4581
The previous commit left src/overlay_29_022F0EDC.c carrying a provisional
`extern s32 SetActionUseMovePlayer();` because replacing it with the real header
broke three modules. The cause was not the return type, which is void, but the
parameters: the function was landed as (struct action_data*, u8, u8), and a u8
parameter makes every caller truncate.
SetLeaderAction's call site in retail passes GetTeamMemberIndex's result
unchanged and sign-extends the move index to 16 bits:
mov r1, r0
mov r2, r4, lsl #0x10
mov r2, r2, asr #0x10
bl SetActionUseMovePlayer
so the parameters are s32 and s16. The callee's own body cannot distinguish
u8, s16 or s32 -- it stores both with strb, and all three score 0 against it --
which is why the wrong types went unnoticed when it was landed.
With (struct action_data*, s32, s16) both functions match and the provisional
extern is deleted in favour of the header, leaving one declaration in the tree.
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>
…
…
…
…
…
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%