Alchemy
Loading...
Searching...
No Matches

RippleScrollWork Struct Reference

The water's ripple, this scene's view of the HBlank scroll work (gHBlankScrollWork, struct DisplayScrollWork): two pages of per-line scroll offsets, swapped each frame, built from a sine table. More...

Data Fields

u16 pages [2][0x3c0]
 per page: 160 lines of BG3 x, y; the rest unused
u8 page
 the page the HBlank DMA shows; the other is built
u8 mode
u16 phase
 frames built so far, added to BG3's y
u8 unkf04 [4]
s32 frequency [2]
 x, y: 16.16 sine entries per frame and per row
s32 step [2]
 x, y: 16.16 sine entries a line
s32 amplitude [2]
 x, y: 16.16 scale on the sine, then divided by 256

Detailed Description

The water's ripple, this scene's view of the HBlank scroll work (gHBlankScrollWork, struct DisplayScrollWork): two pages of per-line scroll offsets, swapped each frame, built from a sine table.

Here a line is one word, BG3's x and y, where DisplayScrollWork has three.

Definition at line 570 of file lemurian_ship.c.

Field Documentation

◆ pages

u16 RippleScrollWork::pages[2][0x3c0]

per page: 160 lines of BG3 x, y; the rest unused

Definition at line 571 of file lemurian_ship.c.

Referenced by DisplayScroll_ArmHBlankDma(), and DisplayScroll_BuildAndSwapHBlankPage().

◆ page

u8 RippleScrollWork::page

the page the HBlank DMA shows; the other is built

Definition at line 572 of file lemurian_ship.c.

Referenced by DisplayScroll_ArmHBlankDma(), and DisplayScroll_BuildAndSwapHBlankPage().

◆ mode

u8 RippleScrollWork::mode

Definition at line 573 of file lemurian_ship.c.

◆ phase

u16 RippleScrollWork::phase

frames built so far, added to BG3's y

Definition at line 574 of file lemurian_ship.c.

Referenced by DisplayScroll_BuildAndSwapHBlankPage().

◆ unkf04

u8 RippleScrollWork::unkf04[4]

Definition at line 575 of file lemurian_ship.c.

◆ frequency

s32 RippleScrollWork::frequency[2]

x, y: 16.16 sine entries per frame and per row

Definition at line 576 of file lemurian_ship.c.

Referenced by DisplayScroll_BuildAndSwapHBlankPage().

◆ step

s32 RippleScrollWork::step[2]

x, y: 16.16 sine entries a line

Definition at line 577 of file lemurian_ship.c.

Referenced by DisplayScroll_BuildAndSwapHBlankPage().

◆ amplitude

s32 RippleScrollWork::amplitude[2]

x, y: 16.16 scale on the sine, then divided by 256

Definition at line 578 of file lemurian_ship.c.

Referenced by DisplayScroll_BuildAndSwapHBlankPage().