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

Coordinates file parsing structures and functions for character offset rendering. More...

#include "common.h"

Go to the source code of this file.

Data Structures

struct  CoordRecord
 Representation of a single sprite layout frame coordinate record. More...
 
struct  CoordFile
 Collection of coordinate records parsed from a coordinates file. More...
 

Macros

#define COORD_RECORD_WORD_COUNT   12
 

Typedefs

typedef struct CoordRecord CoordRecord
 Representation of a single sprite layout frame coordinate record. More...
 
typedef struct CoordFile CoordFile
 Collection of coordinate records parsed from a coordinates file. More...
 

Functions

int Coord_Parse (const u8 *data, size_t size, CoordFile *out)
 Parses coordinate records from raw binary data. More...
 
void Coord_Free (CoordFile *coords)
 Deallocates all resources held inside a CoordFile structure. More...
 

Detailed Description

Coordinates file parsing structures and functions for character offset rendering.

Macro Definition Documentation

◆ COORD_RECORD_WORD_COUNT

#define COORD_RECORD_WORD_COUNT   12

Number of 32-bit words in a raw coordinate record.

Typedef Documentation

◆ CoordFile

typedef struct CoordFile CoordFile

Collection of coordinate records parsed from a coordinates file.

◆ CoordRecord

typedef struct CoordRecord CoordRecord

Representation of a single sprite layout frame coordinate record.

Function Documentation

◆ Coord_Free()

void Coord_Free ( CoordFile coords)

Deallocates all resources held inside a CoordFile structure.

Parameters
coordsPointer to the CoordFile structure to clear.

◆ Coord_Parse()

int Coord_Parse ( const u8 data,
size_t  size,
CoordFile out 
)

Parses coordinate records from raw binary data.

Parameters
dataPointer to the binary source data buffer.
sizeSize of the data buffer in bytes.
outPointer to the CoordFile structure to populate.
Returns
0 on success; negative value on error.