RBG0 interface.
#include <srl_vdp2.hpp>
Static Public Member Functions | |
static void * | GetCellAddress () |
Gets the starting address in VRAM of Cel data allocated to this scroll. | |
static uint32_t | GetCellOffset (SRL::Tilemap::TilemapInfo &tile, void *cellAddress) |
Compute the offset that must be added to map data When Corresponding Cel Data does not start on a VRAM bank boundary. | |
static void * | GetMapAddress () |
Gets the starting address in VRAM of Map data allocated to this scroll. | |
static void * | GetPageAddress (uint8_t index) |
returns the VRAM Address of the specified page number in a scroll's Page Table or nullptr if the requested page is outside of allocated Map Bounds | |
static uint32_t | GetPalOffset (int8_t paletteID=-1) |
Gets the Pallet Bank That must be included in Map Data to Reference a Palette in CRAM. | |
static void * | GetPlaneAddress (uint8_t index) |
Gets the VRAM Address of the specified plane in a scroll's Page Table (units of 1x1, 2x1, or 2x2 pages) | |
static void | Init (SRL::Tilemap::TilemapInfo &info) |
Initializes the ScrollScreen's tilemap specifications. | |
static void | LoadTilemap (SRL::Tilemap::ITilemap &tilemap) |
Loads Tilemap data to VRAM using ITilemap Interface and configures the Scroll Screen to use it. | |
static void | ScrollDisable () |
Removes the Scroll Screen from VDP2 cycle pattern register to disable display. | |
static void | ScrollEnable () |
Registers Scroll in VDP2 cycle pattern to enable display of this Scroll Screen. | |
static void * | SetCellAddress (void *address, int size) |
Manually Sets VRAM area for Cell Data (Advanced Use Cases) | |
static void | SetCurrentTransform () |
Writes the current matrix transform to RBG0RA Rotation parameters to update its position and perspective. | |
static void * | SetMapAddress (void *Address, int Size) |
Manually Sets VRAM area for Map Data (Advanced Use Cases) | |
static void | SetMapLayout (uint8_t a, uint8_t b, uint8_t c, uint8_t d) |
Manually set the Plane layout of a Scroll Screen. | |
static void | SetOpacity (Types::Fxp opacity=1.0) |
Set the opacity of a scroll screen. | |
static void | SetPlanes (void *a, void *b, void *c, void *d) |
Sets the plane of Tilemap Data to be displayed. | |
static void | SetPriority (SRL::VDP2::Priority pr) |
Set the Display Priority of a Scroll Screen. | |
static void | SetRotationMode (VDP2::RotationMode mode, bool vblank=true) |
Select what type of rotation to use for the rotating scroll (Call before Loading RBG0) | |
Static Public Attributes | |
static void * | CellAddress |
VRAM Address to start of Cell data when displying Tilemap or Bitmap data when using bitmaps. | |
static int | CellAllocSize |
static Tilemap::TilemapInfo | Info |
Tilemap config info for the ScrollScreen. | |
static void * | KtableAddress = (void*)(VDP2_VRAM_A0 - 1) |
VRAM Address of RBG0 Coefficient table. | |
static void * | MapAddress |
VRAM Address of ScrollScreen's Map data when displaying Tilemap. | |
static int | MapAllocSize |
Size of manually allocated VRAM for Map Data. | |
static constexpr int16_t | ScreenID |
SGL identifier for the ScrollScreen. | |
static constexpr uint16_t | ScreenON |
SGL flag for the ScrollScreen. | |
static CRAM::Palette | TilePalette |
CRAM Pallet for the ScrollScreen. | |
|
inlinestaticinherited |
|
inlinestaticinherited |
|
inlinestaticinherited |
Gets the starting address in VRAM of Map data allocated to this scroll.
|
inlinestaticinherited |
|
inlinestaticinherited |
Gets the Pallet Bank That must be included in Map Data to Reference a Palette in CRAM.
paletteID | (optional) specify to reference an arbitrary palette, otherwise uses Id from ScrollScreen::TilePalette |
|
inlinestaticinherited |
|
inlinestatic |
Initializes the ScrollScreen's tilemap specifications.
info | Tile map info |
|
inlinestaticinherited |
Loads Tilemap data to VRAM using ITilemap Interface and configures the Scroll Screen to use it.
If VRAM for this ScrollScreen's data has already been allocated by the user, SRL will attempt to load to the allocated VRAM and raise assert if the Tilemap Data does not fit within the existing allocation. If VRAM was not allocated SRL will attempt to auto allocate the Tilemap data and raise assert if there is not enough VRAM available to allocate.
tilemap | The Tilemap to load |
|
inlinestaticinherited |
Removes the Scroll Screen from VDP2 cycle pattern register to disable display.
Asserts when registration of a scroll fails due to cycle pattern conflicts. Possible causes: Assert should never occur here unless the user independently invoked SGL's slScrAutoDisp() with specifications differing from those tracked by SRL
|
inlinestaticinherited |
Registers Scroll in VDP2 cycle pattern to enable display of this Scroll Screen.
Asserts when registration of a scroll fails due to cycle pattern conflicts. Possible causes: -Too many Scroll Layers with higher bit depth are storing data in the same VRAM bank -NBG0 or NBG1 have their minimum scale limit set too small(eg 1/2x or 1/4x scale) -NBG Data was stored in a bank reserved by RBG0 Potential conflicts are minimized when using Automatic Allocation and setting the desired scale limits of NBG0/NBG1 beforehand.
|
inlinestaticinherited |
Manually Sets VRAM area for Cell Data (Advanced Use Cases)
This function manually sets an area in VRAM for a scrolls Cel Data to be loaded to. Unless the Address is obtained from VDP2::VRAM::Allocate(), the VRAM allocator will be bypassed entirely. No Checks are performed for proper data allignment or cycle conflicts. For advanced use cases only.
address | the VRAM address of the allocation |
size | the size of the allocation |
|
inlinestaticinherited |
Manually Sets VRAM area for Map Data (Advanced Use Cases)
This function manually sets an area in VRAM for a scroll's Map Data to be loaded to. Unless the Address is obtained from VDP2::VRAM::Allocate() the VRAM allocator will be bypassed entirely. No Checks are performed for proper data alignment or cycle conflicts. For advanced use cases only.
Address | the VRAM address of the allocation |
Size | the size of the allocation |
|
inlinestaticinherited |
Manually set the Plane layout of a Scroll Screen.
This function manually sets the 4 planes comprising a NBG scroll screen in cases when the default plane tiling pattern is not desired.
a,b,c,d | the plane indicies of the 4 planes that will display in the normal scroll |
|
inlinestaticinherited |
Set the opacity of a scroll screen.
This Function takes the opacity specified as a fixed point value and converts it to one of the 32 color calculation ratios that a scroll screen can use (value is floored to the nearest ratio). Color Calculation is turned on if Opacity < 1.0, or off if Opacity>= 1.0. Color calculation is unchanged if value is negative.
opacity | Fxp decimal value between 0.0 and 1.0 representing pixel opacity for the scroll screen (Default 1.0) |
|
inlinestatic |
|
inlinestaticinherited |
|
inlinestatic |
Select what type of rotation to use for the rotating scroll (Call before Loading RBG0)
mode | The RotationMode to use for this scroll |
vblank | Chose to update VRAM at VBLANK to reduce amount of coefficient data required for rotation of a plane (default = true) |
|
inlinestaticinherited |
Size of manually allocated VRAM for Cel Data