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

A 9-slice panel layer: one BG tilemap and the sheet to stamp from. More...

#include <panel.h>

Public Attributes

u16 base_tile
u16map
u8 palette
u8 priority
u8 stride
u16 vram_addr

Detailed Description

A 9-slice panel layer: one BG tilemap and the sheet to stamp from.

The sheet is read in raster order from base_tile:

base+0        base+1        base+2         <- top-left, top, top-right
base+stride   base+stride+1 base+stride+2  <- left, centre, right
base+2*stride …                            <- bottom-left, bottom, bottom-right

stride is the sheet's width in tiles, which is 3 for a bare 9-slice and more when the sheet carries other art in later columns — examples/games/rpg uses a 4-wide sheet whose fourth column holds HUD icons.

Member Data Documentation

◆ base_tile

u16 Panel::base_tile

Tile number of the sheet's top-left corner.

◆ map

u16* Panel::map

32x32 tilemap entries in RAM. Caller-owned.

◆ palette

u8 Panel::palette

BG palette slot 0-7.

◆ priority

u8 Panel::priority

Per-tile priority bit (1 = in front of BG-lo).

◆ stride

u8 Panel::stride

Sheet width in tiles (3 for a bare 9-slice).

◆ vram_addr

u16 Panel::vram_addr

VRAM word address the map is uploaded to.


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