mirror of
https://github.com/pret/pmd-sky.git
synced 2026-09-28 05:07:58 -05:00
aade0cdfc8a0ea4d4a200c3dce514c43e3e912e5
Decompile from asm: GetWindow 0x020275F8 It indexes WINDOW_LIST with a stride of 0xE0, so its argument is a window id rather than a pointer, and its result is the address of one entry. overlay_31_02382820.c declared it as taking a struct Window * and passed one, which cannot be what the target computes: multiplying a pointer by 0xE0 and adding it to WINDOW_LIST is meaningless. The value it passes is an id, and the same value goes to DrawTextInWindow and UpdateWindow, so those take ids too. This retypes the three window callbacks and both of those prototypes accordingly, along with the callback type CreateTextBox stores. That retyping is byte-neutral -- a pointer and an id both travel in r0 -- but overlay_31_02382820.o was already matching, so it is rebuilt here to confirm rather than assumed. struct Window keeps its existing return type and gains padding to its real 0xE0 size, which is what lets &WINDOW_LIST[id] stride correctly. Its first seven bytes are unchanged, so the width field overlay_31 reads is where it was. The struct moves from the overlay's header into include/window.h, which already exists and is where a main-binary function returning one can reach it; the overlay includes it rather than the main binary including an overlay header. No comments are added to any pmd-sky file. Authored by Claude (Opus 5) under human direction. Confirmed by a matching build with overlay_31_02382820.o rebuilt: 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%