Alchemy
Loading...
Searching...
No Matches

BattleEffectBuffers Struct Reference

The colour buffer (heap block 32) that fades the BG and OBJ palettes: the source palette, the shown and target colour channels, their per-frame steps, and two pages of packed RGB555 colours queued each frame. More...

#include <graphics/palbuf.h>

Data Fields

u16 palette [0x1c0]
 The source palette, RGB555: 224 BG colours, then 224 OBJ colours; palette[0] is the backdrop.
u16 current [0x540]
 The shown colours, as B, G and R channels shifted up 10 bits, three a colour.
u16 target [0x540]
 the colours current moves toward, as current
u16 delta [0x540]
 added to each current channel each frame
u16 packed [2][0x1c0]
 Two pages of RGB555 colours: one is built while the other is queued.
u8 page
 the packed page queued this frame
s8 duration
 frames; 0 when the colours are not moving
s8 step
 frames
u8 padding2a03
 never named

Detailed Description

The colour buffer (heap block 32) that fades the BG and OBJ palettes: the source palette, the shown and target colour channels, their per-frame steps, and two pages of packed RGB555 colours queued each frame.

Definition at line 40 of file palbuf.h.

Field Documentation

◆ palette

◆ current

u16 BattleEffectBuffers::current[0x540]

The shown colours, as B, G and R channels shifted up 10 bits, three a colour.

Definition at line 46 of file palbuf.h.

Referenced by BattleEffect_InitializeSharedScene(), BattleFx_ApplyColorToSourceBuffer(), BattleFx_StartBufferInterpolation(), BattlePalette_UpdateBlend(), and Shop_SaveAndTintFieldPalette().

◆ target

◆ delta

u16 BattleEffectBuffers::delta[0x540]

added to each current channel each frame

Definition at line 48 of file palbuf.h.

Referenced by BattleFx_StartBufferInterpolation(), and BattlePalette_UpdateBlend().

◆ packed

u16 BattleEffectBuffers::packed[2][0x1c0]

Two pages of RGB555 colours: one is built while the other is queued.

Definition at line 50 of file palbuf.h.

Referenced by BattlePalette_UpdateBlend().

◆ page

u8 BattleEffectBuffers::page

the packed page queued this frame

Definition at line 51 of file palbuf.h.

Referenced by BattlePalette_UpdateBlend(), and Event_LeaveAfterRefusing().

◆ duration

s8 BattleEffectBuffers::duration

frames; 0 when the colours are not moving

Definition at line 52 of file palbuf.h.

Referenced by BattleFx_StartBufferInterpolation(), BattlePalette_UpdateBlend(), and Event_LeaveAfterRefusing().

◆ step

s8 BattleEffectBuffers::step

◆ padding2a03

u8 BattleEffectBuffers::padding2a03

never named

Definition at line 54 of file palbuf.h.

Referenced by Event_LeaveAfterRefusing().