Skip to Content
The Alchemy Project

src/window/window_spans.c

The windows' outline for a screen transition: for each scan line, the left and right edge of the windows on it, read off the UI tilemap by ARM code that mnScanlineWindowFillSpans copies into RAM for each call. More…

Functions

NameDescription
voidmnScanlineWindowBuildEdges (Uint16 *scanlineBounds, Uint16 *tilemap)Builds the screen transition's window 1 edges for each of the screen's 160 scanlines from the window borders in the UI tilemap at tilemap (BG_SCREEN_WIDTH tiles a row, DISPLAY_TILE_WIDTH shown), so the windows stay in view while the transition covers the rest: each line takes a pair of halfwords in scanlineBounds, the second (left << 8) | right, and a corner's line is a pixel narrower.

Description

The windows' outline for a screen transition: for each scan line, the left and right edge of the windows on it, read off the UI tilemap by ARM code that mnScanlineWindowFillSpans copies into RAM for each call. The windows' rounded corners cut a pixel off each end of a window's top and bottom line.

Functions in detail

mnScanlineWindowBuildEdges

void mnScanlineWindowBuildEdges(Uint16 *scanlineBounds, Uint16 *tilemap)

Builds the screen transition's window 1 edges for each of the screen's 160 scanlines from the window borders in the UI tilemap at tilemap (BG_SCREEN_WIDTH tiles a row, DISPLAY_TILE_WIDTH shown), so the windows stay in view while the transition covers the rest: each line takes a pair of halfwords in scanlineBounds, the second (left << 8) | right, and a corner's line is a pixel narrower.

References Sint32, tileColumn and tileRow.

Referenced by mnScanlineWindowFillSpans().

Definition at line 18 of file window_spans.c.