OpenSNES
Modern Open-Source SNES Development SDK
Loading...
Searching...
No Matches
MetaspriteItem Struct Reference

Metasprite item structure (PVSnesLib compatible). More...

#include <sprite.h>

Public Attributes

u8 attr
s16 dx
s16 dy
u8 reserved
u16 tile

Detailed Description

Metasprite item structure (PVSnesLib compatible).

Each item represents one hardware sprite within a metasprite. Uses 8-byte alignment for efficient access.

Tile units (tooling-facing contract)
tile is in 8x8 OAM character-name units relative to the base tile, for the sprite sheet as it sits in VRAM. It is NOT a block index: a 16x16 sub-sprite one block to the right of another is +2 (two 8x8 columns), and moving one block row down adds the sheet's row stride (16 names for a 128px-wide sheet). gfx4snes -T emits these names directly (fixed in issue #100); editors composing their own sheet (Cooper) compute them from their own geometry.

Member Data Documentation

◆ attr

u8 MetaspriteItem::attr

Attributes: flip flags, palette offset, priority

◆ dx

s16 MetaspriteItem::dx

X offset from metasprite origin

◆ dy

s16 MetaspriteItem::dy

Y offset from metasprite origin

◆ reserved

u8 MetaspriteItem::reserved

Padding for 8-byte alignment

◆ tile

u16 MetaspriteItem::tile

Character name offset from base, 8x8 units (see above)


The documentation for this struct was generated from the following file:
  • /home/runner/work/opensnes/opensnes/lib/include/snes/sprite.h