AnimaEngine  1.0.0
Nintendo DS Pokemon Black, White, Black 2, and White 2 sprite extraction and preview toolchain
Data Structures | Macros | Typedefs | Functions
nclr.h File Reference

Nintendo Color Resource (.NCLR) palette parser. More...

#include "common.h"
#include "ppm.h"

Go to the source code of this file.

Data Structures

struct  NclrPalette
 Container representing parsed NCLR color palette data. More...
 

Macros

#define NCLR_MAX_COLORS   256
 

Typedefs

typedef struct NclrPalette NclrPalette
 Container representing parsed NCLR color palette data. More...
 

Functions

int Nclr_Parse (const u8 *data, size_t size, NclrPalette *out_palette)
 Parses species color palette data from raw NCLR binary stream. More...
 
void Nclr_PrintInfo (const NclrPalette *palette)
 Debug printing routine to write color palette metadata to stdout. More...
 

Detailed Description

Nintendo Color Resource (.NCLR) palette parser.

Macro Definition Documentation

◆ NCLR_MAX_COLORS

#define NCLR_MAX_COLORS   256

Maximum capacity constraint of a single NCLR palette page.

Typedef Documentation

◆ NclrPalette

typedef struct NclrPalette NclrPalette

Container representing parsed NCLR color palette data.

Function Documentation

◆ Nclr_Parse()

int Nclr_Parse ( const u8 data,
size_t  size,
NclrPalette out_palette 
)

Parses species color palette data from raw NCLR binary stream.

Parameters
dataPointer to binary data.
sizeBuffer size in bytes.
out_paletteDestination structure to write palette records.
Returns
0 on success; negative value on formatting or invalid signature errors.

◆ Nclr_PrintInfo()

void Nclr_PrintInfo ( const NclrPalette palette)

Debug printing routine to write color palette metadata to stdout.

Parameters
palettePointer to parsed palette.