Common types, macros, and standard library includes used throughout AnimaEngine.
unsigned int u32
Definition: common.h:16
unsigned short u16
Definition: common.h:15
unsigned char u8
Definition: common.h:14
struct NcerCell NcerCell
A composite cell sprite made of multiple sub-sprite hardware OAM entries.
void Ncer_PrintInfo(const NcerFile *ncer)
Prints parsed .NCER layout metadata to stdout.
Definition: ncer.c:277
void Ncer_GetOamDrawOrigin(const NcerOam *oam, int *out_x, int *out_y)
Calculates resolved horizontal and vertical origins for drawing an OAM.
Definition: ncer.c:98
void Ncer_CellBounds(const NcerCell *cell, int *out_min_x, int *out_min_y, int *out_max_x, int *out_max_y)
Computes bounding box limits for a cell.
Definition: ncer.c:451
int Ncer_RenderCellToImageWithTileStride(const NcerFile *ncer, int cell_index, const NcgrImage *ncgr, const NclrPalette *palette, int tile_stride, RgbaColor **out_pixels, int *out_width, int *out_height)
Renders a composite cell using specific tile character width stride formatting constraints.
Definition: ncer.c:325
void Ncer_Free(NcerFile *ncer)
Deallocates all resources held inside an NcerFile structure.
Definition: ncer.c:257
struct NcerOam NcerOam
Represents a single Object Attribute Memory (OAM) hardware sub-sprite element.
int Ncer_Parse(const u8 *data, size_t size, NcerFile *out_ncer)
Parses an unpacked .NCER cell layout block from raw bytes.
Definition: ncer.c:152
int Ncer_RenderCellToImage(const NcerFile *ncer, int cell_index, const NcgrImage *ncgr, const NclrPalette *palette, RgbaColor **out_pixels, int *out_width, int *out_height)
Renders a composite cell into a raw RGBA pixels buffer.
Definition: ncer.c:303
struct NcerFile NcerFile
Unpacked representation of a complete .NCER resource.
Nintendo Character Graphic Resource (.NCGR) 2D tile character graphics structures.
Nintendo Color Resource (.NCLR) palette parser.
Portable Pixmap (PPM) format writer utilities and color structures.
A composite cell sprite made of multiple sub-sprite hardware OAM entries.
Definition: ncer.h:46
u32 raw_oam_offset
Definition: ncer.h:49
NcerOam * oams
Definition: ncer.h:50
int cell_attr
Definition: ncer.h:48
int oam_count
Definition: ncer.h:47
Unpacked representation of a complete .NCER resource.
Definition: ncer.h:56
int cell_count
Definition: ncer.h:57
NcerCell * cells
Definition: ncer.h:58
Represents a single Object Attribute Memory (OAM) hardware sub-sprite element.
Definition: ncer.h:17
int height
Definition: ncer.h:22
int double_size
Definition: ncer.h:34
int width
Definition: ncer.h:21
int tile_index
Definition: ncer.h:27
int x
Definition: ncer.h:18
int y
Definition: ncer.h:19
int affine
Definition: ncer.h:33
int flip_h
Definition: ncer.h:31
int priority
Definition: ncer.h:29
int obj_mode
Definition: ncer.h:35
int flip_v
Definition: ncer.h:32
int size
Definition: ncer.h:25
u16 attr2
Definition: ncer.h:40
int affine_index
Definition: ncer.h:36
u16 attr0
Definition: ncer.h:38
int palette
Definition: ncer.h:28
u16 attr1
Definition: ncer.h:39
int shape
Definition: ncer.h:24
Container representing parsed NCGR image tile graphics.
Definition: ncgr.h:15
Container representing parsed NCLR color palette data.
Definition: nclr.h:17
32-bit RGBA color representation struct.
Definition: ppm.h:14