template<class ScreenType, int16_t Id, uint16_t On>
class SRL::VDP2::ScrollScreen< ScreenType, Id, On >
Functionality available to all Scroll Screen interfaces.
|
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 | 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 * | 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 | SetPriority (SRL::VDP2::Priority pr) |
| Set the Display Priority of a Scroll Screen.
|
|
template<class ScreenType , int16_t Id, uint16_t On>
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.
- Parameters
-
- Note
- Manual VRAM allocation is for advanced use cases as is NOT verified for proper bank alignment
-
Does not turn Scroll Display on- once loaded use ScrollEnable() to display a Scroll Screen
-
It is recommended to perform loading/allocation for RBG0 before NBG0-3 screens if using it
template<class ScreenType , int16_t Id, uint16_t On>
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
template<class ScreenType , int16_t Id, uint16_t On>
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.
template<class ScreenType , int16_t Id, uint16_t On>
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.
static void * Allocate(uint32_t size, uint32_t boundary, VDP2::VramBank bank, uint8_t cycles=0)
Linearly Allocates Vram in a bank.
Definition srl_vdp2.hpp:93
- Parameters
-
address | the VRAM address of the allocation |
size | the size of the allocation |
- Returns
- Echoes Address
template<class ScreenType , int16_t Id, uint16_t On>
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.
- Note
- Color ratios only apply to highest priority pixels in frame
-
When ColorCalcMode is set to UseColorAddition, all scrolls with opacity < 1.0 will use color addition in place of their specified ratios.
- Parameters
-
opacity | Fxp decimal value between 0.0 and 1.0 representing pixel opacity for the scroll screen (Default 1.0) |