Skip to content

Document windowing functions#480

Merged
SethBarberee merged 9 commits into
pret:masterfrom
evanc577:window-bg
May 1, 2026
Merged

Document windowing functions#480
SethBarberee merged 9 commits into
pret:masterfrom
evanc577:window-bg

Conversation

@evanc577
Copy link
Copy Markdown
Contributor

@evanc577 evanc577 commented May 1, 2026

Refactor and document functions to handle GBA windows.

Looks like in addition to the normal menu and text box windows using WIN0, GBA windows are also used to dim the screen in dungeons with low visibility with WIN1. Windows dimensions can be changed per row, DMA writes to the window registers every HBlank. There is also a double buffering system going on when setting up the DMA presumably to prevent modifying the data while DMA is copying it.

@SethBarberee SethBarberee merged commit 4e0df83 into pret:master May 1, 2026
1 check passed
Comment thread src/textbox.c
}
else {
sub_8005838(0, 5);
CopyWindowBgBuffer(0, 5);
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Missed param2's #define

Comment thread src/dungeon_tilemap.c
sp[2] = room->unk14 - strPtr->cameraPixelPos.x;
sp[3] = room->unk18 - strPtr->cameraPixelPos.y;
sub_8005838(sp, 3);
CopyWindowBgBuffer(sp, 3);
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Missed param2's #define

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants