cecilarmitais 643fd53bcf Decomp GetWindowContents, GetWindowRectangle and SetBothScreensWindowsColor
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>
2026-08-17 02:28:23 -07:00
2026-04-08 09:53:43 +02:00
2024-04-17 23:52:39 -04:00
2023-11-20 17:24:08 -06:00
2024-06-23 16:59:48 -05:00
2023-08-13 23:03:51 -04:00
2024-12-28 02:25:07 -06:00
2026-08-01 12:46:55 -04:00
2023-06-28 23:35:19 -04:00
2023-06-28 23:35:19 -04:00
2023-06-28 23:35:19 -04:00
2023-06-28 23:35:19 -04:00
2026-07-16 07:36:58 -07:00
2025-06-10 23:35:01 -04:00
2023-08-20 22:43:00 -04:00
2023-08-14 00:17:21 -04:00
2023-11-01 18:44:19 -04:00
2024-04-17 23:52:39 -04:00
2023-08-28 00:09:02 -04:00
2024-04-17 23:52:40 -04:00
2023-08-08 00:17:03 -04:00

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:

For contacts and other pret projects, see pret.github.io.

Description
Decompilation of Pokémon Mystery Dungeon: Explorers of Sky
Readme 335 MiB
Languages
Assembly 66.3%
C 18%
C++ 7.1%
Boogie 4.3%
sed 1.5%
Other 2.8%