SaturnRingLibrary 0.6
SGL wrapper
 
Loading...
Searching...
No Matches
SRL::CRAM Class Reference

Detailed Description

Color RAM management.

#include <srl_cram.hpp>

Classes

struct  Palette
 Color palette in color RAM. More...
 

Public Types

enum class  TextureColorMode : uint16_t {
  Paletted256 = 6 , Paletted128 = 5 , Paletted64 = 4 , Paletted16 = 2 ,
  RGB555 = 1
}
 Texture color mode. More...
 

Static Public Member Functions

static bool GetBankUsedState (uint16_t bank, CRAM::TextureColorMode size)
 Gets a value indicating whether said color bank is being used or not.
 
static int32_t GetFreeBank (CRAM::TextureColorMode size)
 Get the Free color RAM bank.
 
static void SetBankUsedState (uint16_t bank, CRAM::TextureColorMode size, bool used)
 Sets a value in bank indicating whether said color bank is being used or not.
 

Static Public Attributes

static const void * BaseAddress = (const void*)(VDP2_COLRAM)
 Base RAM address.
 

Member Enumeration Documentation

◆ TextureColorMode

enum class SRL::CRAM::TextureColorMode : uint16_t
strong

Texture color mode.

Enumerator
Paletted256 

256 color image

Paletted128 

128 color image

Paletted64 

64 color image

Paletted16 

16 color image

RGB555 

32k color image

Member Function Documentation

◆ GetBankUsedState()

static bool SRL::CRAM::GetBankUsedState ( uint16_t bank,
CRAM::TextureColorMode size )
inlinestatic

Gets a value indicating whether said color bank is being used or not.

Parameters
bankColor bank index
sizeColor bank size
Returns
true if bank is being used

◆ GetFreeBank()

static int32_t SRL::CRAM::GetFreeBank ( CRAM::TextureColorMode size)
inlinestatic

Get the Free color RAM bank.

Parameters
sizeColor palette size
Returns
-1 if no free bank was found, or Color bank index

◆ SetBankUsedState()

static void SRL::CRAM::SetBankUsedState ( uint16_t bank,
CRAM::TextureColorMode size,
bool used )
inlinestatic

Sets a value in bank indicating whether said color bank is being used or not.

Parameters
bankColor bank index
sizeColor bank size
usedtrue if bank is being used, otherwise false