mirror of
https://github.com/pret/pmd-sky.git
synced 2026-09-28 21:31:17 -05:00
ac3e23890eb8543ea5393cc8ebada6b4ffef3c49
Decompile from asm: IsMarowakTrainingMaze ov29_022EAEFC FixedRoomIsSubstituteRoom ov29_022EAF20 IsSecretRoom SetUnkMusicFlag IsDungeonEndReasonFailure ov29_0234969C ChangeDungeonMusic ov29_023496B0 All ten reach struct dungeon through DUNGEON_PTR and every offset lands on a named field: id at 0x748, hidden_outlaw_defeated_message at 0x2, unk_music_flag at 0x792, dungeon_music_playing_id and field_0x2cb00 at 0x2CB06 and 0x2CB00, gen_info.fixed_room_id at 0x40DA, and fainted_monster_dungeon_end_reason at 0x2CA66. No new types. The constants resolve to existing enumerators that corroborate the function names rather than being chosen to fit them: FIXED_SUBSTITUTE_ROOM is 110 and FIXED_SECRET_ROOM is 113, which is what FixedRoomIsSubstituteRoom and IsSecretRoom compare against; DAMAGE_SOURCE_ESCAPE is 633, the 0x279 in IsDungeonEndReasonFailure. IsMarowakTrainingMaze tests the range DUNGEON_NORMAL_FLY_MAZE to DUNGEON_EXPLORER_MAZE inclusive, 180 to 190. IsDungeonEndReasonFailure reads its union member through an explicit (s16) cast. enum damage_source_non_move declares no negative enumerator, so under -enum min it is unsigned and compiles to ldrh with an unsigned comparison, where the target has ldrsh and a signed one. The cast is local and reversible; adding a sentinel to a shared enum, as was done for monster_id earlier on this branch, would not be. Two of the ten merged into src/run_dungeon_1.c, which already declares DUNGEON_PTR as an array and reaches it as DUNGEON_PTR[0]. They follow that file's convention rather than introducing a second spelling; both forms were checked on a scratch and produce identical bytes. No comments are added to any pmd-sky file. 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%