mirror of
https://github.com/pret/pmd-sky.git
synced 2026-09-29 05:41:47 -05:00
964beafb7d87ff2fd12c5852300832881c1ed3c8
Thirty-eight functions in nine groups, each group clearing a .s file's head or
the whole file so nothing splits:
asm/overlay_29_0231AFB4.s ov29_0231AFB4, ov29_0231B008, ActivateMotorDrive,
TryActivateFrisk (whole file)
asm/overlay_29_022FBC4C.s CountActiveMonsters, ov29_022FBC94,
ov29_022FBD08, ov29_022FBD24, ov29_022FBD80
(whole file)
asm/overlay_29_02302388.s ov29_02302388, UpdateStateFlags,
IsProtectedFromNegativeStatus, ov29_023024E0,
AddExpSpecial (whole file)
asm/main_02051098.s sub_02051098, sub_020510C0, MtInit, MtNext
(whole file)
asm/main_02055528.s IsMainCharacter, GetTeamMember,
GetRecruitMentryIdBySpecies (whole file)
asm/overlay_29_023350FC.s ov29_023350FC, TryWeatherFormChange
asm/main_020562B8.s sub_020562B8, SetActiveTeam, sub_02056318,
sub_0205633C, sub_02056360, GetActiveTeamMember
asm/overlay_29_022F0654.s MakeTargetFaceUserAndIdle, ov29_022F067C,
ov29_022F0780
asm/main_02013C30.s GetMovesetIdx__02013CAC, IsReflectedByMagicCoat,
CanBeSnatched, FailsWhileMuzzled, IsSoundMove,
IsRecoilMove
Five files are consumed entirely, so main.lsf loses five asm objects.
ov29_022FBD08, ov29_022FBD24 and ov29_022FBD80 do not exist in the JAPAN build:
they sit inside one #ifndef JAPAN in the .s, so their definitions and their
prototypes carry the same guard.
include/dungeon.h gains struct unk_022FBD24, grouping the two members at 0x3DCC
and 0x3E1C into one sub-object. Layout is byte-identical -- u32[20] then u32, same
order, same offsets -- but the grouping is what makes MWCC materialise the single
base register the target uses; without the type src/overlay_29_022FBBEC.c does not
compile. The four comment lines move verbatim with the members.
struct unk_022C4C6C::field_0x0 is enum type_id, not u8: it feeds
monster->types[0]. enum type_id maxes at 18, so -enum min keeps it one byte and
the layout is unchanged.
src/special_move_types.c declares DUNGEON_PTR as [2], not the [] the tree usually
writes. With the incomplete array type MWCC hoists the ldr out of the outer loop
of ov29_0231AFB4 and ov29_0231B008 (scores 460 and 515); 8 bytes is the symbol's
measured extent and [] and [2] are compatible types, so nothing else changes.
Eighteen call-site declarations are replaced by an include of the owning header.
Three were required rather than cosmetic: two K&R `extern int ov29_022FBD24();`
and `extern int ov29_022F0780();` with the wrong return type, and a
GetActiveTeamMember declared (int) against the definition's s32.
Authored by Claude (Opus 5) under human direction. Each function was measured at
decomp.me score 0 in every region it exists in, and re-measured by an independent
verifier. Confirmed by matching builds of all three regions:
build/pmdsky.us/pmdsky.us.nds: OK, build/pmdsky.eu/pmdsky.eu.nds: OK,
build/pmdsky.jp/pmdsky.jp.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%