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

An animation clip — ROM-resident, 12 bytes. More...

#include <anim.h>

Public Attributes

const u8durations
const u16frames
u8 len
u8 mode
u8 reserved
u8 speed

Detailed Description

An animation clip — ROM-resident, 12 bytes.

Declare with DECLARE_ANIM_CLIP() for the uniform-speed case, or as a raw struct when per-frame durations are needed:

static const u16 boom_frames[] = { 4, 5, 6, 7 };
static const u8 boom_durations[] = { 2, 2, 3, 6 };
static const AnimClip boom =
{ boom_frames, boom_durations, 4, 0, ANIM_ONCE, 0 };
#define ANIM_ONCE
Loop mode: hold the last frame and raise ANIM_F_FINISHED.
Definition anim.h:57
unsigned short u16
16-bit unsigned integer (0 to 65535)
Definition types.h:53
unsigned char u8
8-bit unsigned integer (0 to 255)
Definition types.h:47

Member Data Documentation

◆ durations

const u8* AnimClip::durations

per-frame ticks, or NULL = uniform speed

◆ frames

const u16* AnimClip::frames

frame values, len entries (never NULL)

◆ len

u8 AnimClip::len

frame count, >= 1

◆ mode

u8 AnimClip::mode

ANIM_LOOP or ANIM_ONCE

◆ reserved

u8 AnimClip::reserved

must be 0 (layout stability)

◆ speed

u8 AnimClip::speed

ticks per frame when durations==NULL (0 acts as 1)


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