17#ifndef OPENSNES_BACKGROUND_H
18#define OPENSNES_BACKGROUND_H
36#define SC_32x32 BG_MAP_32x32
37#define SC_64x32 BG_MAP_64x32
38#define SC_32x64 BG_MAP_32x64
39#define SC_64x64 BG_MAP_64x64
48#define BG_256COLORS 256
181 u8 paletteEntry,
u16 tileSize,
u16 paletteSize,
182 u16 colorMode,
u16 vramAddr);
216#define bgClearTilemap(vramAddr, fillTile, sizeBytes) \
217 dmaFillVRAM((u16)(fillTile), (u16)(vramAddr), (u16)(sizeBytes))
void bgInitTileSet(u8 bgNumber, u8 *tileSource, u8 *tilePalette, u8 paletteEntry, u16 tileSize, u16 paletteSize, u16 colorMode, u16 vramAddr)
Initialize tileset with tiles and palette.
void bgSetMapPtr(u8 bg, u16 vramAddr, u8 mapSize)
Set background tilemap address and size.
void bgSetScrollY(u8 bg, u16 y)
Set vertical scroll only.
void bgSetScrollX(u8 bg, u16 x)
Set horizontal scroll only.
u16 bgGetScrollY(u8 bg)
Get current vertical scroll position (from shadow)
void bgSetGfxPtr(u8 bg, u16 vramAddr)
Set background tile graphics address.
void bgSetScroll(u8 bg, u16 x, u16 y)
Set background scroll position.
void bgInitTileSetData(u8 bgNumber, u8 *tileSource, u16 tileSize, u16 vramAddr)
Load tile graphics only (no palette)
u16 bgGetScrollX(u8 bg)
Get current horizontal scroll position (from shadow)
void bgInit(u8 bg)
Initialize background layer to defaults.
unsigned short u16
16-bit unsigned integer (0 to 65535)
Definition types.h:52
unsigned char u8
8-bit unsigned integer (0 to 255)
Definition types.h:46