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

Sprite state structure holding position, animation, and direction. More...

Public Attributes

u8 flipx
u16 gfx_frame
u8 state
s16 x
s16 y

Detailed Description

Sprite state structure holding position, animation, and direction.

Combines all per-sprite data into one struct. On the SNES, each OAM entry only stores position and tile number — animation state must be tracked separately in RAM and used to compute the correct tile each frame.

Member Data Documentation

◆ flipx

u8 Walker::flipx

Horizontal flip flag: 1 = mirror sprite for left-facing

◆ gfx_frame

u16 Walker::gfx_frame

Current tile number to display in OAM

◆ state

u8 Walker::state

Current direction (SpriteState enum value)

◆ x

s16 Walker::x

◆ y

s16 Walker::y

Screen position in pixels (signed for off-screen clamping)


The documentation for this struct was generated from the following file:
  • examples/sprites/animated_sprite/main.c