On this page
  1. texture, width, height, frames, tags, slices
  2. frame_count, tag_count
  3. frame
  4. slice_count
  5. slice
  6. tag

rmp::SheetData

struct #include <rmp/assets.h> include/rmp/assets.h:272
struct SheetData

Everything read out of an .aseprite: the packed texture, the frames and the tags. The tables are vectors and the sheet owns them: a resource slot holds the whole SheetData behind a shared_ptr, so the language frees them with it and there is no size limit on frames or tags. The texture is the one thing here raylib owns, and the table unloads it before the sheet goes.

texture, width, height, frames, tags, slices

Texture2D texture{}
int width = 0
int height = 0
std::vector<SheetFrame> frames
std::vector<SheetTag> tags
std::vector<SheetSlice> slices

Every frame side by side in one row. Empty (id 0) when there was no GPU to upload to; the frames and tags are there all the same.

width: One frame's width, not the packed texture's

height: One frame's height, which is the packed texture's too

frames: In the file's order

tags: In the file's order

slices: In the file's order

frame_count, tag_count

int frame_count() const
int tag_count() const

How many frames and tags the file had.

frame

const SheetFrame &frame(int index) const

The frame at index, or an empty one (no source, 0 seconds) out of range.

slice_count

int slice_count() const

How many slices the file had.

slice

const SheetSlice &slice(std::string_view name) const

The slice called name, or an empty one (no name, no bounds) when there is none. The first one, when two share a name.

tag

const SheetTag &tag(int index) const

The tag at index, or an empty one (no name, frames 0 to 0) out of range.