struct RIPPLE_SCROLL_STATE
The water's ripple, this scene's view of the line scroll's state (LineScroll, LINE_SCROLL_STATE). More…
Declared in lemurian_ship.c.
Fields
| Name | Description | |
|---|---|---|
Uint16 | pages [2][960] | per page: 160 lines of BG3 x, y; the rest unused |
Uint8 | page | the page the HBlank DMA shows; the other is built |
Uint8 | mode | scLineScrollInitWave's first argument, 0 here; nothing here reads it |
Uint16 | phase | ticks built so far, added to BG3's y |
Uint8 | unused [4] | zeroed with the block; nothing reads or writes it |
FIXED | frequency [2] | x, y: 16.16 sine entries per tick and per row |
FIXED | step [2] | x, y: 16.16 sine entries a line |
FIXED | amplitude [2] | x, y: 16.16 scale on the sine, then divided by 256 |
Description
The water's ripple, this scene's view of the line scroll's state (LineScroll,
LINE_SCROLL_STATE). The overlay keeps its own copies of the field's
fdLineScrollArmDMA and fdLineScrollBuildPage (script_commands_line_scroll.c),
which scLineScrollInitWave starts.
It holds two pages of per-line scroll offsets, swapped each tick and built
from a sine table. Here a line is one word, BG3's x and y, where
LINE_SCROLL_STATE has three.
struct RIPPLE_SCROLL_STATE
Referenced by fdLineScrollArmDMA() and fdLineScrollBuildPage().
Definition at line 637 of file lemurian_ship.c.
Fields in detail
pages
Uint16 pages[2][960]
per page: 160 lines of BG3 x, y; the rest unused
page
Uint8 page
the page the HBlank DMA shows; the other is built
mode
Uint8 mode
scLineScrollInitWave's first argument, 0 here;
nothing here reads it
phase
Uint16 phase
ticks built so far, added to BG3's y
unused
Uint8 unused[4]
zeroed with the block; nothing reads or writes it
frequency
FIXED frequency[2]
x, y: 16.16 sine entries per tick and per row
step
FIXED step[2]
x, y: 16.16 sine entries a line
amplitude
FIXED amplitude[2]
x, y: 16.16 scale on the sine, then divided by 256