### Start Source: https://srl.reye.me/classSRL_1_1Sound_1_1Cdda_1_1Analysis.html Starts the CD audio volume analysis. This function should be called before retrieving volume analysis data. ```APIDOC ## Start ### Description Starts the CD audio volume analysis. ### Method Start ### Parameters None. ### Return Value None. ``` -------------------------------- ### Play() Source: https://srl.reye.me/classSRL_1_1CinepakPlayer.html Starts movie playback. ```APIDOC ## Play() ### Description Starts movie playback. ### Method Play ### Signature `void Play()` ### Parameters None ### Returns Nothing. ``` -------------------------------- ### Vector3D integral multiplication example Source: https://srl.reye.me/structSRL_1_1Math_1_1Types_1_1Vector3D_a3db3c71e88547d1c843b3977b58401be.html Shows how to use the integral-type operator*= on a Vector3D. The example creates a vector (1, 2, 3) and multiplies it by 2, resulting in (2, 4, 6) with optimized integral multiplication. ```cpp Vector3D v(1, 2, 3); v *= 2; // Results in v = (2, 4, 6) with optimized integral multiplication ``` -------------------------------- ### Vector2D::Length() example with standard and Turbo precision Source: https://srl.reye.me/structSRL_1_1Math_1_1Types_1_1Vector2D_a2b60208c3c93bc225339a8007c3bb12e.html Constructs a Vector2D with coordinates (3, 4) and calls Length() with default precision to get the exact length 5, then calls Length() to get a faster approximate length. The Turbo variant uses a fast approximation with alpha-beta coefficients instead of an exact square root. ```cpp Vector2D v(3, 4); Fxp length = v.Length(); // Returns 5 (standard precision) Fxp fastLength = v.Length(); // Returns approximate length (faster) ``` -------------------------------- ### SetMask() example: enable V-Blank In and disable all interrupts Source: https://srl.reye.me/classSRL_1_1Interrupt_a207855a109067e30a9c37b399854da23.html Use to replace the entire SCU interrupt mask. Set bits disable the corresponding interrupt source. The example enables only V-Blank In and then disables all interrupts. ```cpp // Enable only V-Blank In Interrupt::SetMask(Interrupt::Mask::VBlankIn); // Disable all interrupts Interrupt::SetMask(Interrupt::Mask::All); ``` -------------------------------- ### Fxp usage example: conversion and arithmetic Source: https://srl.reye.me/classSRL_1_1Math_1_1Types_1_1Fxp.html Shows compile-time and runtime conversion, arithmetic operations, and conversion back to an integer type. Compile-time conversion is preferred; runtime conversion with Fxp::Convert includes range checking and a performance warning. The example uses constexpr for compile-time evaluation. ```cpp // Compile-time conversion (preferred) constexpr Fxp a = 5; // 5 (0x00050000) constexpr Fxp b = 2.5; // 2.5 (0x00028000) // Runtime conversion Fxp c = Fxp::Convert(someInt); // With range checking Fxp d = Fxp::Convert(someFloat); // With performance warning // Arithmetic operations Fxp result = a * b; // 12.5 (0x000C8000) int16_t i = result.As(); // 12 ``` -------------------------------- ### CreateScale() example: uniform scale by 2 Source: https://srl.reye.me/structSRL_1_1Math_1_1Types_1_1Matrix33_a7fafb224b4ac5f51343d66e8c2d2296b.html Creates a non-uniform scale matrix using CreateScale and applies it to a vector. The example shows uniform scaling by 2, producing (2, 2, 2) when multiplied by (1, 1, 1). Unlike Scale(), this method returns a fresh matrix that only represents scaling without affecting rotation. ```cpp Matrix33 scaleMatrix = Matrix33::CreateScale(Vector3D(2, 2, 2)); // Uniform scale by 2 Vector3D scaled = scaleMatrix * Vector3D(1, 1, 1); // Results in (2, 2, 2) ``` -------------------------------- ### Initialize Source: https://srl.reye.me/classSRL_1_1Core.html Initializes the basic environment with a background color and optional resolution. ```APIDOC ## Initialize ### Description Initializes the basic environment with a background color and optional resolution. ### Method static void ### Signature `static void Initialize (const Types::HighColor &backColor, const TV::Resolutions resolution=TV::Resolutions::Normal320x240)` ### Parameters - **backColor** (Types::HighColor&) - Required - The background color. - **resolution** (TV::Resolutions) - Optional - The screen resolution, defaults to TV::Resolutions::Normal320x240. ### Returns void ``` -------------------------------- ### GetMapAddress Source: https://srl.reye.me/classSRL_1_1VDP2_1_1ScrollScreen.html Gets the starting address in VRAM of Map data allocated to this scroll. ```APIDOC ## GetMapAddress ### Description Gets the starting address in VRAM of Map data allocated to this scroll. ### Method static void* ### Returns - **void*** - The starting VRAM address of the Map data. ``` -------------------------------- ### GetCellAddress Source: https://srl.reye.me/classSRL_1_1VDP2_1_1ScrollScreen.html Gets the starting address in VRAM of Cell data allocated to this scroll. ```APIDOC ## GetCellAddress ### Description Gets the starting address in VRAM of Cell data allocated to this scroll. ### Method static void* ### Returns - **void*** - The starting VRAM address of the Cell data. ``` -------------------------------- ### Initialize Source: https://srl.reye.me/classSRL_1_1Cd.html Initializes file handling stuff. Returns true on success, false on failure. ```APIDOC ## Initialize ### Description Initializes file handling stuff. Returns true on success, false on failure. ### Method Initialize ### Signature static bool Initialize() ### Returns - **bool** - True if initialization succeeded, false otherwise. ``` -------------------------------- ### Play() Source: https://srl.reye.me/classSRL_1_1Sound_1_1Pcm_a93b70af1ed9099e831bad0073e627318.html Try to play sound on the first free channel. ```APIDOC ## Play() ### Description Try to play sound on the first free channel. ### Method Play ### Parameters - **pcm** (Pcm::IPcmFile&) - Required - Sound effect to play - **volume** (uint8_t) - Optional - Playback volume (0-127) - **pan** (int8_t) - Optional - Audio channel panning (-127 to 127) ### Returns Channel number if sound was played or -1 if it was not ``` -------------------------------- ### Convert ticks to milliseconds with overflow check Source: https://srl.reye.me/classSRL_1_1Tickstamp_aeaf91c6bc27d5b8ff95e063e89f407c7.html Shows how to use ToMilliseconds() to get elapsed time in milliseconds. The example checks if the elapsed time exceeds 16 ms (indicating a slow frame). Note the 32767 ms maximum range; use ToSeconds() for longer durations. ```cpp Tickstamp elapsed = Timer::DeltaTicks(); Fxp ms = elapsed.ToMilliseconds(); if (ms > 16.0) { // More than 16ms (>60fps) // Handle slow frame } ``` -------------------------------- ### Initialize Source: https://srl.reye.me/classSRL_1_1VDP2.html Initializes VDP2 with a specified background color. ```APIDOC ## Initialize ### Description Initializes VDP2. ### Method static void ### Endpoint Initialize(const Types::HighColor &backColor) ### Parameters #### Parameters - **backColor** (const Types::HighColor&) - Required - The background color to use for initialization. ### Response No return value. ``` -------------------------------- ### Convert Tickstamp to ClockTime and format as HH:MM:SS.mmm Source: https://srl.reye.me/classSRL_1_1Tickstamp_a0890540334f0425448cfb71a2da020e4.html Shows how to use ToClock() to get a ClockTime from a Tickstamp difference and format it into a string. The example uses sprintf with the ClockTime components. Note that ClockTime is immutable and intended for display only; use ToSeconds()/ToMilliseconds() for precise timing. ```cpp Tickstamp elapsed = end - start; ClockTime ct = elapsed.ToClock(); // Display as "02:15:30.500" sprintf(buf, "%02u:%02u:%02u.%03u", ct.Hours(), ct.Minutes(), ct.Seconds(), ct.Milliseconds()); ``` -------------------------------- ### SRL::Core::Initialize() Source: https://srl.reye.me/classSRL_1_1Core_a95f04a57a4a9f7ce0f276b360fb935b7.html Initializes basic environment, setting the screen back color and optional TV resolution. It is a static inline method in the SRL Core namespace. ```APIDOC ## SRL::Core::Initialize() ### Description Initializes basic environment for the SGL wrapper, setting the screen back color and TV resolution. ### Method Signature void SRL::Core::Initialize(const Types::HighColor &_backColor_, const TV::Resolutions _resolution_ = TV::Resolutions::Normal320x240) ### Parameters - **backColor** (Types::HighColor) - Required - Color of the screen. - **resolution** (TV::Resolutions) - Optional - TV resolution. Defaults to TV::Resolutions::Normal320x240. If not specified, the default is controlled by SRL_MODE or SRL_HIGH_RES in the makefile. ### Note The resolution can be overridden by SRL_MODE or SRL_HIGH_RES values in the makefile. ``` -------------------------------- ### Measure elapsed time with SRL::Timer::Capture() Source: https://srl.reye.me/classSRL_1_1Timer_ab73ab36d21c237a8407658de4f760754.html Call Capture() at the start and end of an operation to measure elapsed time. The returned Tickstamp values can be subtracted to get an elapsed Tickstamp, which can be converted to seconds using ToSeconds(). Capture() reads hardware registers on each call and uses a memory barrier, so prefer CurrentTickstamp() for in-frame timing that doesn't require a fresh hardware read. ```cpp Tickstamp start = Timer::Capture(); // ... perform operation ... Tickstamp end = Timer::Capture(); Tickstamp elapsed = end - start; Fxp seconds = elapsed.ToSeconds(); ``` -------------------------------- ### SRL::Sound::Hardware::Initialize() Source: https://srl.reye.me/classSRL_1_1Sound_1_1Hardware_abb9408065a37acd9edc96ca1ab46109c.html Initializes sound hardware with the SGL sound driver. This is a static inline method that takes no parameters and returns void. ```APIDOC ## SRL::Sound::Hardware::Initialize() ### Description Initializes sound hardware with the SGL sound driver. ### Method Initialize ### Signature `static inline void Initialize()` ### Parameters None ### Returns void ``` -------------------------------- ### Initialize Source: https://srl.reye.me/classSRL_1_1Memory.html Initialize memory. ```APIDOC ## Initialize ### Description Initialize memory. ### Method Initialize ### Parameters None ### Returns void ``` -------------------------------- ### Lerp() Source: https://srl.reye.me/classSRL_1_1Math_1_1Interpolation_a19d23fb179a7ee69e7973e58b2f8e54e.html Performs linear interpolation between two fixed-point values. The interpolation follows the formula: result = start + (end - start) * t. When t = 0, returns start; when t = 1, returns end; when t = 0.5, returns the midpoint. ```APIDOC ## Lerp() ### Description Performs linear interpolation between two fixed-point values. ### Method Lerp ### Signature ```cpp constexpr Fxp SRL::Math::Interpolation::Lerp(const Fxp &_start_, const Fxp &_end_, const Fxp &_t_) ``` ### Parameters - **start** (const Fxp&) - Starting value of the interpolation - **end** (const Fxp&) - Ending value of the interpolation - **t** (const Fxp&) - Interpolation factor in range [0,1] ### Returns - **Fxp** - Interpolated value ### Note For best performance, ensure t is pre-clamped to [0,1]. ``` -------------------------------- ### LightInitGouraudTable() Source: https://srl.reye.me/classSRL_1_1Scene3D_a862d5900420097270f928e9f00eae82d.html Initializes the gouraud table for light calculation with SRL::Scene3D::DrawSmoothMesh. ```APIDOC ## LightInitGouraudTable() ### Description Initializes the gouraud table for light calculation with SRL::Scene3D::DrawSmoothMesh. ### Method LightInitGouraudTable ### Signature ```cpp static void LightInitGouraudTable(uint32_t gouraudRamOffset, uint8_t *vertexCalculationBuffer, Types::HighColor *tableStorage, uint32_t maxPolygons) ``` ### Parameters - **gouraudRamOffset** (uint32_t) - Relative address to the first entry from which to write light gouraud data in SRL::VDP1::GetGouraudTable(). Using 0 here would mean first entry, 2 is second entry in the table, where each entry is 4 color long. - **vertexCalculationBuffer** (uint8_t*) - Vertex arithmetic work buffer - **tableStorage** (Types::HighColor*) - Work gouraud table with size of maxPolygons - **maxPolygons** (uint32_t) - Maximum number of polygons that can be processed by the light calculation ### Example ```cpp // When the total number of polygons is 500 and the maximum number of vertices per model is 100. #define MAX_POLYGON 500 #define MAX_MODEL_VERT 100 SRL::Types::HighColor workTable[MAX_POLYGON << 2]; uint8 vertWork[MAX_MODEL_VERT]; SRL::Scene3D::LightInitGouraudTable(0, vertWork, workTable, MAX_POLYGON); ``` ``` -------------------------------- ### Vector2D scalar multiplication example Source: https://srl.reye.me/structSRL_1_1Math_1_1Types_1_1Vector2D_a309fce70c10797a53161f47046099738.html Example usage of the scalar multiplication operator. Creates a vector v(1, 2), multiplies it by 3_fxp, and stores the result in result, which becomes (3, 6). ```cpp Vector2D v(1, 2); Vector2D result = v * 3_fxp; // Results in result = (3, 6) ``` -------------------------------- ### SRL::TV::TVOn() Source: https://srl.reye.me/classSRL_1_1TV_ab5bfd050830e0c74f17cceb85dee2d4c.html Inline static method that turns on the TV display. No parameters and no return value are documented. ```APIDOC ## SRL::TV::TVOn() ### Description Turns on the TV display. ### Method TVOn ### Signature `void SRL::TV::TVOn()` ### Parameters None. ### Return Value None. ``` -------------------------------- ### Init (BitmapInfo) Source: https://srl.reye.me/classSRL_1_1VDP2_1_1RBG0.html Initializes the scroll screen's bitmap specifications. ```APIDOC ## Init (BitmapInfo) ### Description Initializes the ScrollScreen's bitmap specifications. ### Method Init ### Parameters - **info** (SRL::Bitmap::BitmapInfo&) - Required - Bitmap information structure ### Returns void ``` -------------------------------- ### GetResolution() Source: https://srl.reye.me/classSRL_1_1CinepakPlayer.html Gets the movie resolution. ```APIDOC ## GetResolution() ### Description Gets the movie resolution. ### Method GetResolution ### Signature `SRL::Types::Resolution GetResolution() const` ### Parameters None ### Returns `SRL::Types::Resolution` - The movie resolution. ``` -------------------------------- ### TilemapInfo Constructors and SGLColorMode Source: https://srl.reye.me/structSRL_1_1Tilemap_1_1TilemapInfo.html Constructors and a method for the TilemapInfo class. ```APIDOC ## TilemapInfo() ### Description Initializes an empty tilemap info. ### Syntax ```cpp TilemapInfo() = default; ``` ### Parameters None. ### Returns Nothing. ``` ```APIDOC ## TilemapInfo(SRL::CRAM::TextureColorMode color, uint16_t map, uint16_t charSz, uint16_t plane, uint16_t height, uint16_t width, int size) ### Description Initialize by manually entering all parameters. ### Syntax ```cpp TilemapInfo(SRL::CRAM::TextureColorMode color, uint16_t map, uint16_t charSz, uint16_t plane, uint16_t height, uint16_t width, int size); ``` ### Parameters - `color` (SRL::CRAM::TextureColorMode) - Required - Color Mode of the Tilemap (Paletted16, Paletted256, or RGB555). - `map` (uint16_t) - Required - Map mode (size and bit configuration of the map data). - `charSz` (uint16_t) - Required - Size of the tiles that comprise the tilemap (character pattern data). - `plane` (uint16_t) - Required - Size of the Planes that comprise a Scroll Screen. - `height` (uint16_t) - Required - Height of the Tilemap (in tile units). - `width` (uint16_t) - Required - Width of the tilemap (in tile units). - `size` (int) - Required - Size of the tilemap data. ### Returns Nothing. ``` ```APIDOC ## uint16_t SGLColorMode() ### Description Gets the SGL macro corresponding to ColorMode. ### Syntax ```cpp uint16_t SGLColorMode(); ``` ### Parameters None. ### Returns - `uint16_t` - The SGL macro corresponding to the ColorMode. ``` -------------------------------- ### Initialize Gouraud Table with LightInitGouraudTable Source: https://srl.reye.me/classSRL_1_1Scene3D_a862d5900420097270f928e9f00eae82d.html Example usage of SRL::Scene3D::LightInitGouraudTable() with a maximum polygon count of 500 and maximum model vertices of 100. The work table size is MAX_POLYGON << 2 and the vertex buffer size is MAX_MODEL_VERT. ```cpp // When the total number of polygons is 500 and the maximum number of vertices per model is 100. #define MAX_POLYGON 500 #define MAX_MODEL_VERT 100 SRL::Types::HighColor workTable[MAX_POLYGON << 2]; uint8 vertWork[MAX_MODEL_VERT]; SRL::Scene3D::LightInitGouraudTable(0, vertWork, workTable, MAX_POLYGON); ``` -------------------------------- ### GetPageAddress() Source: https://srl.reye.me/structSRL_1_1Tilemap_1_1Interfaces_1_1Bmp2Tile_abbc36d4e5dee7c99ab9084e6b605cd3c.html Gets the address of a tilemap page. ```APIDOC ## GetPageAddress() ### Description Gets the address of a tilemap page. ### Method GetPageAddress ### Signature `uint16_t * SRL::Tilemap::Interfaces::Bmp2Tile::GetPageAddress(uint8_t _page_, Tilemap::Coord & _coord_)` ### Parameters - **page** (uint8_t) - Page index - **coord** (Tilemap::Coord &) - Page coordinate ### Returns - Page address (uint16_t *) ``` -------------------------------- ### Init (TilemapInfo) Source: https://srl.reye.me/classSRL_1_1VDP2_1_1RBG0.html Initializes the scroll screen's tilemap specifications. ```APIDOC ## Init (TilemapInfo) ### Description Initializes the ScrollScreen's tilemap specifications. ### Method Init ### Parameters - **info** (SRL::Tilemap::TilemapInfo&) - Required - Tilemap information structure ### Returns void ``` -------------------------------- ### GetType Source: https://srl.reye.me/structSRL_1_1Input_1_1Digital.html Gets the connected peripheral type. ```APIDOC ## GetType ### Description Gets the connected peripheral type. ### Signature `PeripheralType GetType() const` ### Parameters None. ### Returns - **PeripheralType** - The type of the connected peripheral. ``` -------------------------------- ### Init (Bitmap) Source: https://srl.reye.me/classSRL_1_1VDP2_1_1NBG1.html Initializes the NBG1 scroll screen for bitmap mode. ```APIDOC ## Init (Bitmap) ### Description Initializes the ScrollScreen's bitmap specifications. ### Method static void ### Endpoint Init(SRL::Bitmap::BitmapInfo &info) ### Parameters - **info** (SRL::Bitmap::BitmapInfo &) - Required - Bitmap information structure. ### Response No return value. ``` -------------------------------- ### SGLTile(void* _cellData_, void* _mapData_, void* _palData_, const TilemapInfo& _info_) Source: https://srl.reye.me/structSRL_1_1Tilemap_1_1Interfaces_1_1SGLTile_a7e88d267b93b102c11500813e0c78695.html Constructor for SGLTile that initializes the object with cell, map, and palette data tables along with a TilemapInfo configuration. ```APIDOC ## SGLTile(void* _cellData_, void* _mapData_, void* _palData_, const TilemapInfo& _info_) ### Description Initializes an SGLTile object with SGLTile data tables and Tilemap configuration. ### Method Constructor ### Signature SGLTile(void* _cellData_, void* _mapData_, void* _palData_, const TilemapInfo& _info_) ### Parameters - **cellData** (void*) - Required - SGLTile cell data table - **mapData** (void*) - Required - SGLTile map data table - **palData** (void*) - Required - SGLTile palette data table - **info** (const TilemapInfo&) - Required - TilemapInfo describing configuration of the SGLTile data ``` -------------------------------- ### GetTime() Source: https://srl.reye.me/classSRL_1_1CinepakPlayer.html Gets the current playback time. ```APIDOC ## GetTime() ### Description Gets the current playback time. ### Method GetTime ### Signature `SRL::Math::Fxp GetTime() const` ### Parameters None ### Returns `SRL::Math::Fxp` - The current playback time. ``` -------------------------------- ### GetStatus() Source: https://srl.reye.me/classSRL_1_1CinepakPlayer.html Gets the movie playback status. ```APIDOC ## GetStatus() ### Description Gets the movie playback status. ### Method GetStatus ### Signature `PlaybackStateEnum GetStatus() const` ### Parameters None ### Returns `PlaybackStateEnum` - The current playback status. ``` -------------------------------- ### Resume() Source: https://srl.reye.me/classSRL_1_1Sound_1_1Cdda_abfa315b57cbb86515b1f26c8f0964cff.html Resumes audio playback from where it left off. ```APIDOC ## Resume() ### Description Resumes audio playback from where it left off. ### Method Resume ### Parameters None ### Response None ``` -------------------------------- ### GetFrameData() Source: https://srl.reye.me/classSRL_1_1CinepakPlayer.html Gets the decoded frame data. ```APIDOC ## GetFrameData() ### Description Gets the decoded frame data. ### Method GetFrameData ### Signature `void* GetFrameData() const` ### Parameters None ### Returns `void*` - Pointer to the decoded frame data. ``` -------------------------------- ### GetDepth() Source: https://srl.reye.me/classSRL_1_1CinepakPlayer.html Gets the movie color depth. ```APIDOC ## GetDepth() ### Description Gets the movie color depth. ### Method GetDepth ### Signature `ColorDepth GetDepth() const` ### Parameters None ### Returns `ColorDepth` - The movie color depth. ``` -------------------------------- ### SRL::VDP2::NBG0::Init(SRL::Bitmap::BitmapInfo&) Source: https://srl.reye.me/classSRL_1_1VDP2_1_1NBG0_a1c86763c1e10f40e9880de6bcca8c43b.html Initializes the ScrollScreen's bitmap specifications using the provided bitmap info. ```APIDOC ## SRL::VDP2::NBG0::Init(SRL::Bitmap::BitmapInfo&) ### Description Initializes the ScrollScreen's bitmap specifications. ### Method Init (static inline) ### Parameters #### Parameters - **info** (SRL::Bitmap::BitmapInfo&) - Required - bitmap info ### Return Value void ``` -------------------------------- ### Vector2D operator/= integral division example Source: https://srl.reye.me/structSRL_1_1Math_1_1Types_1_1Vector2D_a63c9c885ddadcd66611ddb08eb95a0ac.html Shows how to use the integral compound division operator on a Vector2D. The example creates a vector with components (10, 20), divides it by the integral scalar 5, and the comment indicates the result is (2, 4). ```cpp Vector2D v(10, 20); v /= 5; // Results in v = (2, 4) with optimized integral division ``` -------------------------------- ### Play() Source: https://srl.reye.me/classSRL_1_1Sound_1_1Pcm_1_1IPcmFile_a097c1192e9b51d15ea462e9eef033acf.html Method to play a PCM sound on the first free channel with optional volume and panning. ```APIDOC ## Play() ### Description Try to play sound on the first free channel. ### Method Play ### Signature `int8_t SRL::Sound::Pcm::IPcmFile::Play(uint8_t _volume_ = 127, int8_t _pan_ = 0)` ### Parameters - **volume** (uint8_t) - Optional - Playback volume (0-127) - **pan** (int8_t) - Optional - Audio channel panning (-127 to 127) ### Returns - **int8_t** - Channel number if sound was played or -1 if it was not ``` -------------------------------- ### static void Play(const uint16_t fromTrack, const uint16_t toTrack, const bool loop) Source: https://srl.reye.me/classSRL_1_1Sound_1_1Cdda.html Plays a range of CD tracks. The playback can be set to loop. ```APIDOC ## static void Play(const uint16_t fromTrack, const uint16_t toTrack, const bool loop) ### Description Play range of tracks. ### Method static void ### Parameters - **fromTrack** (uint16_t) - Required - Starting track number. - **toTrack** (uint16_t) - Required - Ending track number. - **loop** (bool) - Required - Whether to loop playback. ``` -------------------------------- ### GetType Source: https://srl.reye.me/structSRL_1_1Input_1_1Analog.html Gets the connected peripheral's type. ```APIDOC ## GetType ### Description Gets the connected peripheral's type. ### Syntax ``` PeripheralType GetType() const ``` ### Returns - **PeripheralType** - The peripheral type. ``` -------------------------------- ### Init (Tilemap) Source: https://srl.reye.me/classSRL_1_1VDP2_1_1NBG1.html Initializes the NBG1 scroll screen for tilemap mode. ```APIDOC ## Init (Tilemap) ### Description Initializes the ScrollScreen's tilemap specifications. ### Method static void ### Endpoint Init(SRL::Tilemap::TilemapInfo &info) ### Parameters - **info** (SRL::Tilemap::TilemapInfo &) - Required - Tilemap information structure. ### Response No return value. ``` -------------------------------- ### GetFamily Source: https://srl.reye.me/structSRL_1_1Input_1_1Digital.html Gets the connected peripheral type family. ```APIDOC ## GetFamily ### Description Gets the connected peripheral type family. ### Signature `PeripheralFamily GetFamily() const` ### Parameters None. ### Returns - **PeripheralFamily** - The family of the connected peripheral. ``` -------------------------------- ### GetTextureCount() Source: https://srl.reye.me/classSRL_1_1VDP1_a27891856cb4cbbd4e08f669891dd322a.html Get the number of currently loaded textures. ```APIDOC ## GetTextureCount() ### Description Get the number of currently loaded textures. ### Method GetTextureCount ### Returns Number of currently loaded textures ``` -------------------------------- ### Calculate triangle normal with Vector3D::CalcNormal Source: https://srl.reye.me/structSRL_1_1Math_1_1Types_1_1Vector3D_a762d939ed0854418566214556be5e83e.html Example usage of Vector3D::CalcNormal() to compute the normalized normal vector of a triangle defined by three vertices. The example creates three vertices and calls the static method, expecting the result (0, 0, 1). ```cpp Vector3D v1(0, 0, 0); Vector3D v2(1, 0, 0); Vector3D v3(0, 1, 0); Vector3D normal = Vector3D::CalcNormal(v1, v2, v3); // Returns (0, 0, 1) ``` -------------------------------- ### static consteval Zero () Source: https://srl.reye.me/structSRL_1_1Math_1_1Types_1_1Vector3D.html Get a zero vector (0,0,0). ```APIDOC ## static consteval Zero () ### Description Get a zero vector (0,0,0). ### Method static consteval Vector3D ### Returns - **Vector3D** - The zero vector (0,0,0). ``` -------------------------------- ### Init (TilemapInfoA, TilemapInfoB) Source: https://srl.reye.me/classSRL_1_1VDP2_1_1RBG0.html Initializes primary and secondary rotation parameters to separate source tilemaps. ```APIDOC ## Init (TilemapInfoA, TilemapInfoB) ### Description Overload initializes Primary and Secondary rotation parameters to separate source tilemaps. ### Method Init ### Parameters - **infoA** (SRL::Tilemap::TilemapInfo&) - Required - Tilemap info for primary rotation parameter - **infoB** (SRL::Tilemap::TilemapInfo&) - Required - Tilemap info for secondary rotation parameter ### Returns void ``` -------------------------------- ### SglPtr() Source: https://srl.reye.me/structSRL_1_1Types_1_1SmoothMesh.html Get a non-const pointer to the underlying SGL type. ```APIDOC ## SglPtr() ### Description Get pointer to SGL type. ### Method `XPDATA * SglPtr()` ### Returns - `XPDATA*` - Pointer to the SGL data. ``` -------------------------------- ### CubeTile::CubeTile(const char* _filename) Source: https://srl.reye.me/structSRL_1_1Tilemap_1_1Interfaces_1_1CubeTile_aa07f9ecf17363038201746183f4d6402.html Initializes a CubeTile object by loading the specified CubeTile file into work RAM. The constructor is inline and takes a filename parameter. ```APIDOC ## CubeTile::CubeTile(const char* _filename) ### Description Initializes a CubeTile object with the given filename, allocating and loading the specified CubeTile file into work RAM. ### Method Constructor (inline) ### Parameters - **filename** (const char*) - Required - Name of the CubeTile file to load. ``` -------------------------------- ### SglConstPtr() Source: https://srl.reye.me/structSRL_1_1Types_1_1SmoothMesh.html Get a const pointer to the underlying SGL type. ```APIDOC ## SglConstPtr() ### Description Get pointer to SGL type. ### Method `const XPDATA * SglConstPtr() const` ### Returns - `const XPDATA*` - Const pointer to the SGL data. ``` -------------------------------- ### Fxp::As() Source: https://srl.reye.me/classSRL_1_1Math_1_1Types_1_1Fxp_a9bac73b9ae97e7000e2ed98ff71061c6.html Documentation for the Fxp::As method that converts a fixed-point value to a floating-point type. ```APIDOC ## [Fxp::As] [template requires std::floating_point T As() const] ### Description Converts the fixed-point value to the specified floating-point type. This is a heavy operation and should be avoided in performance-critical code paths. ### Method As() ### Signature ```cpp template requires std::floating_point constexpr T As() const; ``` ### Template Parameters - **T** (type) - Required - The target floating-point type (float or double) ### Returns - **T** - Value as the specified type ### Example ```cpp Fxp x = 3.14_fxp; auto f = x.As(); // Convert to float (heavy operation) auto d = x.As(); // Convert to double (heavy operation) ``` ### Notes - The performance warning can be disabled by defining `DISABLE_PERFORMANCE_WARNINGS` before including this header. - Converting to floating-point is a heavy operation. Avoid in performance-critical code paths. ``` -------------------------------- ### HighColor::GetABGR() Source: https://srl.reye.me/structSRL_1_1Types_1_1HighColor.html Gets the color represented as an ABGR555 value. ```APIDOC ### Description Returns the color as an ABGR555 value. ### Signature ```cpp constexpr uint16_t GetABGR () ``` ### Returns - **uint16_t** - The ABGR555 representation of the color. ``` -------------------------------- ### Define and use MemberProxy with OnVblank event Source: https://srl.reye.me/classSRL_1_1Types_1_1MemberProxy_a74c9ef1a3f6ae9233af845ed96efb9b6.html Shows how to create a MemberProxy for a member function, attach it to SRL::Core::OnVblank in the constructor, detach it in the destructor, and use it in a main loop. The example defines a TinyClass with a counter incremented in Test(). ```cpp // Define sample class class TinyClass { uint32_t counter; public: // Define proxy SRL::Types::MemberProxy<> Proxy = SRL::Types::MemberProxy(this, &TinyClass::Test); // Attach to v-blank in constructor TinyClass() { SRL::Core::OnVblank += &this->Proxy; } // De-attach from v-blank in destructor ~TinyClass() { SRL::Core::OnVblank -= &this->Proxy; } // Do our stuff inside this function void Test() { this->counter++; } } // Program start int main() { SRL::Core::Initialize(HighColor::Colors::Black); // Create object TinyClass tiny(); // Game loop while(1); } ``` -------------------------------- ### GetFamily Source: https://srl.reye.me/structSRL_1_1Input_1_1Analog.html Gets the connected peripheral's type family. ```APIDOC ## GetFamily ### Description Gets the connected peripheral's type family. ### Syntax ``` PeripheralFamily GetFamily() const ``` ### Returns - **PeripheralFamily** - The peripheral family. ``` -------------------------------- ### GetClosestPoint() Source: https://srl.reye.me/classSRL_1_1Math_1_1Types_1_1AABB_ab5b10d06bc08e3ba2ce6d690a7df008c.html Gets closest point on AABB to target point. ```APIDOC ## GetClosestPoint() ### Description Gets closest point on AABB to target point. ### Method GetClosestPoint ### Signature `Vector3D SRL::Math::Types::AABB::GetClosestPoint(const Vector3D &_point) const` ### Parameters - **point** (const Vector3D &) - Target point ### Returns Closest point on AABB surface or inside ``` -------------------------------- ### TryLoadTexture() [1/3] Source: https://srl.reye.me/classSRL_1_1VDP1_a2b780dbf9ef8825486e6f8fa15acdd85.html Static inline method to load a texture into VDP1. ```APIDOC ## TryLoadTexture() [1/3] ### Description Try to load a texture. ### Method TryLoadTexture ### Signature ```cpp int32_t SRL::VDP1::TryLoadTexture( const uint16_t _width_, const uint16_t _height_, const CRAM::TextureColorMode _colorMode_, const uint16_t _palette_, void *_data_ ) ``` ### Parameters - **width** (uint16_t) - Texture width - **height** (uint16_t) - Texture height - **colorMode** (CRAM::TextureColorMode) - Color mode - **palette** (uint16_t) - Palette start identifier in color RAM (not used in RGB555 mode) - **data** (void*) - Texture data ### Returns Index of the loaded texture ``` -------------------------------- ### GetType Source: https://srl.reye.me/classSRL_1_1Input_1_1Management.html Gets the connected peripheral type to the specified port. ```APIDOC ## GetType ### Description Gets the connected peripheral type to the specified port. ### Method static PeripheralType GetType(const uint8_t &port) ### Parameters - **port** (uint8_t) - Required - The port number to query. ### Returns - **PeripheralType** - The peripheral type connected to the specified port. ``` -------------------------------- ### Zero matrix representation for Matrix43 default constructor Source: https://srl.reye.me/structSRL_1_1Math_1_1Types_1_1Matrix43_a41d8bc99736ca181fd56c3b96e53eb0b.html Shows the zero matrix for a 4x3 matrix as displayed in the documentation. All elements are set to zero, representing the default state of the matrix. ```text | 0 0 0 | | 0 0 0 | | 0 0 0 | | 0 0 0 | ``` -------------------------------- ### GetPreviousRawData Source: https://srl.reye.me/classSRL_1_1Input_1_1Management.html Gets the raw port data from the previous frame. ```APIDOC ## GetPreviousRawData ### Description Gets the raw port data from the previous frame. ### Method static PerDigital * GetPreviousRawData(const uint8_t &port) ### Parameters - **port** (uint8_t) - Required - The port number to query. ### Returns - **PerDigital*** - Pointer to the raw port data from the previous frame. ``` -------------------------------- ### BitmapInfo Constructors Source: https://srl.reye.me/structSRL_1_1Bitmap_1_1BitmapInfo.html Constructors for the BitmapInfo class. ```APIDOC ## BitmapInfo ### Description Construct a new Bitmap info. ### Constructor BitmapInfo(uint16_t width, uint16_t height) ### Parameters - **width** (uint16_t) - Required - Image width. - **height** (uint16_t) - Required - Image height. ``` ```APIDOC ## BitmapInfo ### Description Construct a new Bitmap info. ### Constructor BitmapInfo(uint16_t width, uint16_t height, Bitmap::Palette *palette) ### Parameters - **width** (uint16_t) - Required - Image width. - **height** (uint16_t) - Required - Image height. - **palette** (Bitmap::Palette*) - Required - Used palette. ``` -------------------------------- ### static consteval Left () Source: https://srl.reye.me/structSRL_1_1Math_1_1Types_1_1Vector3D.html Get a vector pointing left (-1,0). ```APIDOC ## static consteval Left () ### Description Get a vector pointing left (-1,0). ### Method static consteval Vector2D ### Returns - **Vector2D** - The left vector (-1,0). ``` -------------------------------- ### SRL::System::ExecuteCdMultiplayer() Source: https://srl.reye.me/classSRL_1_1System_a3a81d19d6ebec8d99267e109bb510952.html Launches the CD Multiplayer and relinquishes control. Calls the BIOS entry at 0x600026C, reverting the system to its post-power-on state and launching the CD Multiplayer. This function does not return. ```APIDOC ## ExecuteCdMultiplayer() ### Description Launches the CD Multiplayer and relinquishes control. Calls the BIOS entry at 0x600026C, reverting the system to its post-power-on state and launching the CD Multiplayer. This function does not return. ### Method ExecuteCdMultiplayer ### Endpoint SRL::System::ExecuteCdMultiplayer() ### Parameters None ### Response None ### Notes - This function does not return. ``` -------------------------------- ### Compile-time vs runtime conversion with Fxp constructor and Convert() Source: https://srl.reye.me/classSRL_1_1Math_1_1Types_1_1Fxp_af8ba996d71a81f2df50763e35dbba209.html Shows two ways to create fixed-point values: using the consteval constructor for compile-time conversion (preferred) and using Fxp::Convert for runtime conversion, which warns about floating-point performance. The constructor is only available at compile time; values outside the valid fixed-point range may overflow. ```cpp // Compile-time conversion (preferred when possible) constexpr Fxp a = 3.14159; // Exact conversion at compile-time // Runtime conversion Fxp b = Fxp::Convert(someFloat); // Will warn about floating-point performance ``` -------------------------------- ### GetAxis Source: https://srl.reye.me/structSRL_1_1Input_1_1Analog.html Gets the current analog axis value for the specified axis. ```APIDOC ## GetAxis ### Description Get current axis value. ### Method Signature ``` virtual uint8_t GetAxis(const Axis axis) const ``` ### Parameters - **axis** (Axis) - The axis to query. Defined in the Axis enum (Axis1, Axis2, etc). ### Returns - **uint8_t** - Current value of the specified axis. ```