coastline 0.0.4
Loading...
Searching...
No Matches
coastline::ConsoleSegment Class Reference

The main segment of a release, as the console loads it. More...

#include <consolesegment.h>

Public Member Functions

bool Has (u32 address, u32 size) const
u8 Byte (u32 address) const
u32 Word (u32 address) const
s32 Signed (u32 address) const
f32 Float (u32 address) const
std::string Text (u32 address) const
std::optional< std::string > AssetName (u32 romStart) const

Static Public Member Functions

static std::optional< ConsoleSegment > Load (const std::filesystem::path &release)
 Read the main segment of a release and the manifest of its cartridge.

Detailed Description

The main segment of a release, as the console loads it.

Member Function Documentation

◆ Load()

std::optional< ConsoleSegment > coastline::ConsoleSegment::Load ( const std::filesystem::path & release)
static

Read the main segment of a release and the manifest of its cartridge.

Parameters
releaseThe selected cartridge directory, n64/base of the prepared assets.
Returns
The segment, or nothing with the reason logged.

◆ Has()

bool coastline::ConsoleSegment::Has ( u32 address,
u32 size ) const
Parameters
addressAn address of the console.
sizeThe bytes from the address.
Returns
Whether the bytes are inside the segment.

◆ Byte()

u8 coastline::ConsoleSegment::Byte ( u32 address) const
Parameters
addressAn address of the console.
Returns
The byte there, or 0 outside the segment.

◆ Word()

u32 coastline::ConsoleSegment::Word ( u32 address) const
Parameters
addressAn address of the console.
Returns
The big-endian word there.

◆ Signed()

s32 coastline::ConsoleSegment::Signed ( u32 address) const
Parameters
addressAn address of the console.
Returns
The big-endian word there as a signed number.

◆ Float()

f32 coastline::ConsoleSegment::Float ( u32 address) const
Parameters
addressAn address of the console.
Returns
The big-endian float there.

◆ Text()

std::string coastline::ConsoleSegment::Text ( u32 address) const
Parameters
addressAn address of the console.
Returns
The string that ends at the first zero from the address.

◆ AssetName()

std::optional< std::string > coastline::ConsoleSegment::AssetName ( u32 romStart) const
Parameters
romStartWhere an asset starts on the cartridge.
Returns
The name of the asset in the import, such as data/g_texLogo, or nothing.

The documentation for this class was generated from the following file: