NdsForge.NET 1.0.1
Read, validate, edit, compare, and build Nintendo DS and DSi images from .NET
Loading...
Searching...
No Matches
NdsForge.NdsBannerBuilder Class Referencesealed

Builds deterministic DS banners, including the DSi animated-icon layout. More...

Public Member Functions

 NdsBannerBuilder (ushort version=1)
 Selects a fixed layout whose language slots and CRC coverage expand through the DSi revision.
NdsBannerBuilder SetTitle (NdsBannerLanguage language, string title)
 Assigns one version-supported UTF-16LE title while reserving a terminating NUL code unit.
NdsBannerBuilder SetIndexedIcon (ReadOnlySpan< byte > paletteIndices, ReadOnlySpan< ushort > bgr555Palette)
 Accepts developer-friendly row-major pixels and converts them to tiled 4-bpp banner storage during build.
NdsBannerBuilder SetAnimatedFrame (int frame, ReadOnlySpan< byte > paletteIndices, ReadOnlySpan< ushort > bgr555Palette)
 Assigns one of the eight DSi tile-and-palette slots from conventional row-major indexed pixels. The two slot numbers in an animation step may later differ, enabling palette cycling without redundant tile frames.
NdsBannerBuilder SetAnimationSequence (IEnumerable< NdsBannerAnimationStep > steps)
 Replaces the ordered DSi playback sequence. At most 63 poses are accepted so the serialized 64-word table always contains an explicit zero terminator instead of depending on bytes beyond the structure.
NdsBanner Build ()
 Builds a checksummed immutable banner.

Properties

ushort Version [get]
 Controls output length, title-slot count, and how many cumulative CRC fields are populated.

Detailed Description

Builds deterministic DS banners, including the DSi animated-icon layout.

Definition at line 7 of file NdsBannerBuilder.cs.

Constructor & Destructor Documentation

◆ NdsBannerBuilder()

NdsForge.NdsBannerBuilder.NdsBannerBuilder ( ushort version = 1)
inline

Selects a fixed layout whose language slots and CRC coverage expand through the DSi revision.

Parameters
versionStatic version 1, 2, or 3, or animated DSi version 0x0103.

Definition at line 28 of file NdsBannerBuilder.cs.

Member Function Documentation

◆ Build()

NdsBanner NdsForge.NdsBannerBuilder.Build ( )
inline

Builds a checksummed immutable banner.

Returns
The completed banner.

Definition at line 124 of file NdsBannerBuilder.cs.

◆ SetAnimatedFrame()

NdsBannerBuilder NdsForge.NdsBannerBuilder.SetAnimatedFrame ( int frame,
ReadOnlySpan< byte > paletteIndices,
ReadOnlySpan< ushort > bgr555Palette )
inline

Assigns one of the eight DSi tile-and-palette slots from conventional row-major indexed pixels. The two slot numbers in an animation step may later differ, enabling palette cycling without redundant tile frames.

Parameters
frameDestination slot from zero through seven.
paletteIndicesExactly 1024 palette indices from zero through 15.
bgr555PaletteExactly 16 raw BGR555 colors; index zero renders transparently.
Returns
This builder.
Exceptions
InvalidOperationExceptionThe selected banner version has no DSi animation area.

Definition at line 82 of file NdsBannerBuilder.cs.

◆ SetAnimationSequence()

NdsBannerBuilder NdsForge.NdsBannerBuilder.SetAnimationSequence ( IEnumerable< NdsBannerAnimationStep > steps)
inline

Replaces the ordered DSi playback sequence. At most 63 poses are accepted so the serialized 64-word table always contains an explicit zero terminator instead of depending on bytes beyond the structure.

Parameters
stepsPoses in playback order; an empty sequence leaves the console using the static icon.
Returns
This builder.
Exceptions
InvalidOperationExceptionThe selected banner version has no DSi animation area.

Definition at line 103 of file NdsBannerBuilder.cs.

◆ SetIndexedIcon()

NdsBannerBuilder NdsForge.NdsBannerBuilder.SetIndexedIcon ( ReadOnlySpan< byte > paletteIndices,
ReadOnlySpan< ushort > bgr555Palette )
inline

Accepts developer-friendly row-major pixels and converts them to tiled 4-bpp banner storage during build.

Parameters
paletteIndicesExactly 1024 palette indices from zero through 15.
bgr555PaletteExactly 16 BGR555 colors.
Returns
This builder.

Definition at line 63 of file NdsBannerBuilder.cs.

◆ SetTitle()

NdsBannerBuilder NdsForge.NdsBannerBuilder.SetTitle ( NdsBannerLanguage language,
string title )
inline

Assigns one version-supported UTF-16LE title while reserving a terminating NUL code unit.

Parameters
languageA language supported by the selected version.
titleThe localized title.
Returns
This builder.

Definition at line 45 of file NdsBannerBuilder.cs.

Property Documentation

◆ Version

ushort NdsForge.NdsBannerBuilder.Version
get

Controls output length, title-slot count, and how many cumulative CRC fields are populated.

Definition at line 39 of file NdsBannerBuilder.cs.


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