AnimaEngine  1.0.0
Nintendo DS Pokemon Black, White, Black 2, and White 2 sprite extraction and preview toolchain
Typedefs | Enumerations | Functions
nitro_guess.h File Reference

Auto-detection routines matching magic signatures to Nintendo Nitro formats. More...

#include "common.h"

Go to the source code of this file.

Typedefs

typedef enum NitroFileType NitroFileType
 Identifiers for Nintendo Nitro SDK proprietary file formats. More...
 

Enumerations

enum  NitroFileType {
  NITRO_UNKNOWN , NITRO_NCGR , NITRO_NCLR , NITRO_NCER ,
  NITRO_NANR , NITRO_NMCR , NITRO_NMAR , NITRO_RAW_GFX_OR_SPECIAL ,
  NITRO_EMPTY
}
 Identifiers for Nintendo Nitro SDK proprietary file formats. More...
 

Functions

NitroFileType NitroGuess_Detect (const u8 *data, size_t size, int block_offset)
 Auto-detects the Nitro file format of a data stream by inspecting its magic signature. More...
 
const char * NitroGuess_Name (NitroFileType type)
 Returns a human-readable name string for a NitroFileType. More...
 
const char * NitroGuess_Extension (NitroFileType type)
 Returns the standard file extension string for a NitroFileType. More...
 

Detailed Description

Auto-detection routines matching magic signatures to Nintendo Nitro formats.

Typedef Documentation

◆ NitroFileType

Identifiers for Nintendo Nitro SDK proprietary file formats.

Enumeration Type Documentation

◆ NitroFileType

Identifiers for Nintendo Nitro SDK proprietary file formats.

Enumerator
NITRO_UNKNOWN 

Unrecognized binary block.

NITRO_NCGR 

Character Graphic Resource (tile graphics).

NITRO_NCLR 

Color Resource (palettes).

NITRO_NCER 

Cell Resource (sprite OAM cell compositions).

NITRO_NANR 

Animation Resource (timeline frame definitions).

NITRO_NMCR 

Multi-Cell Resource (sprite map layout mapping).

NITRO_NMAR 

Multi-Animation Resource (timelines/actions metadata).

NITRO_RAW_GFX_OR_SPECIAL 

Raw unheadered graphics block or specialized structures.

NITRO_EMPTY 

Empty or zero-padded segment.

Function Documentation

◆ NitroGuess_Detect()

NitroFileType NitroGuess_Detect ( const u8 data,
size_t  size,
int  block_offset 
)

Auto-detects the Nitro file format of a data stream by inspecting its magic signature.

Parameters
dataPointer to binary data buffer.
sizeData size in bytes.
block_offsetByte index offset to begin inspection (often 0 or 4).
Returns
Detected Nitro format identifier.

◆ NitroGuess_Extension()

const char* NitroGuess_Extension ( NitroFileType  type)

Returns the standard file extension string for a NitroFileType.

Parameters
typeNitro format identifier.
Returns
Read-only standard file extension string (e.g. ".nclr").

◆ NitroGuess_Name()

const char* NitroGuess_Name ( NitroFileType  type)

Returns a human-readable name string for a NitroFileType.

Parameters
typeNitro format identifier.
Returns
Read-only string description of file type.