SaturnRingLibrary 0.9.2
SGL wrapper
Loading...
Searching...
No Matches

◆ SetPalette()

template<class ScreenType, int16_t Id, uint16_t On>
void SRL::VDP2::ScrollScreen< ScreenType, Id, On >::SetPalette ( CRAM::Palette palette)
inlinestatic

Manually sets the CRAM palette index for this scrollScreen(Advanced Use Cases).

Shallow copies the specified palette handler to the ScrollScreen's TilePalette, forcing it to register with the specified palette. Use in cases where the user desires more control over palette placement in CRAM, such as palette sharing between tilemaps.

Note
when set this way, multiple sources may be able to write to the same palette. specify the LoadPalette parameter as false when using ScrollScreen::LoadTilemap() to ensure pre-existing palette is not overwritten during loading.