mirror of
https://github.com/pret/pmd-sky.git
synced 2026-09-28 05:07:58 -05:00
643fd53bcfa102407221af8093e49b33c262f859
Decompile from asm: SetBothScreensWindowsColor 0x02027A80 GetWindowRectangle 0x02028284 GetWindowContents 0x0202833C GetWindowContents is the function the menu accessors landed over the last several commits all call. It reads the pointer at 0xC of a WINDOW_LIST entry, and its callers cast that to whichever menu layout they use. struct Window gains the fields these two touch: bytes at 0x4, 0x5, 0x7 and 0x8 around the existing width at 0x6, and the pointer at 0xC. The trailing padding shrinks to keep the entry at 0xE0, which is the stride GetWindow indexes by. GetWindowRectangle converts four of those bytes into a rectangle in pixels, multiplying each by 8, writing top and bottom from 0x5 and 0x7 and left and right from 0x4 and width. Its out parameter has no existing type and becomes struct unk_02028284. GetWindowContents needed the entry address bound to a pointer local. Returning WINDOW_LIST[window_id].field_0xC folds the field offset into the literal pool entry, giving a .word WINDOW_LIST+0xc and an indexed load; the target keeps WINDOW_LIST as the literal and reaches the field with mla plus ldr [r1, #0xc]. SetScreenWindowsColor is still asm and had no declaration in the tree, so its prototype is provisional. 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%