Display, scroll and window HBlank DMA helpers. More...
Go to the source code of this file.
Functions | |
| void | BattleFx_ConfigureEffectDisplay (void) |
| Puts the battle screen back into the display state every effect starts from and ends with: no blending, window 0 and window 1 both covering the battle view (lines 16 to 135), and the effect display mode queued. | |
| void | BattleFx_AdvanceScrollOnInterval (void) |
| Scrolls BG1 by (scrollStepX, scrollStepY) once every scrollInterval frames. | |
| void | BattleFx_AdvanceBg2OnInterval (void) |
| Slides the affine BG2 in steps: once every scrollInterval frames, writes the work block's reference point (bg2x, bg2y) to BG2X and BG2Y, then moves it by (scrollStepX, scrollStepY). | |
| void | BattleFx_ArmWin0HBlankDma (void) |
| Restarts DMA 0 as an HBlank transfer of one WIN0H value a line from PARTICLES (Ram_MapCellBuffer), so window 0's edges follow the per-line table the effect drew there. | |
Display, scroll and window HBlank DMA helpers.
Part of effect.c, the battle effect object, compiled only through it.
Definition in file display.c.
| void BattleFx_ConfigureEffectDisplay | ( | void | ) |
Puts the battle screen back into the display state every effect starts from and ends with: no blending, window 0 and window 1 both covering the battle view (lines 16 to 135), and the effect display mode queued.
Called at the start and end of the handlers that change the display themselves: Ice and Douse (falling.c), the beam sequence, and the summons and scenes from Boreas to Judgment. Writes BLDCNT, BLDALPHA, the window registers and WININ and WINOUT, queues DISPCNT for two frames later and waits one frame.
Definition at line 16 of file display.c.
Referenced by BattleFx_ConfigureEffectDisplay(), BattleFx_RunAtalanta(), BattleFx_RunBeamSequence(), BattleFx_RunBoreas(), BattleFx_RunDouse(), BattleFx_RunIce(), BattleFx_RunJudgment(), BattleFx_RunKirin(), BattleFx_RunNeptune(), BattleFx_RunParticleStreams(), BattleFx_RunRamses(), and BattleFx_RunThor().
| void BattleFx_AdvanceScrollOnInterval | ( | void | ) |
Scrolls BG1 by (scrollStepX, scrollStepY) once every scrollInterval frames.
Runs each frame as a scheduler callback added by BattleFx_RunAtalanta and BattleFx_RunThor, which set the work block's scroll fields first and remove it before they return. Counts work->scrollTimer and moves gBgScroll[1].
Definition at line 37 of file display.c.
Referenced by BattleFx_AdvanceScrollOnInterval(), BattleFx_RunAtalanta(), and BattleFx_RunThor().
| void BattleFx_AdvanceBg2OnInterval | ( | void | ) |
Slides the affine BG2 in steps: once every scrollInterval frames, writes the work block's reference point (bg2x, bg2y) to BG2X and BG2Y, then moves it by (scrollStepX, scrollStepY).
Runs each frame as a scheduler callback added by BattleFx_RunParticleStreams, which removes it before it returns. Counts work->scrollTimer.
Definition at line 56 of file display.c.
Referenced by BattleFx_AdvanceBg2OnInterval(), and BattleFx_RunParticleStreams().
| void BattleFx_ArmWin0HBlankDma | ( | void | ) |
Restarts DMA 0 as an HBlank transfer of one WIN0H value a line from PARTICLES (Ram_MapCellBuffer), so window 0's edges follow the per-line table the effect drew there.
Runs each frame as a scheduler callback added by BattleFx_RunIce and BattleFx_RunDouse, which remove it before they return. Stopping the channel first makes each frame's transfer start again from the table's first line.
Definition at line 81 of file display.c.
Referenced by BattleFx_ArmWin0HBlankDma(), BattleFx_RunDouse(), and BattleFx_RunIce().