extern char tileset, tilesetend, tilesetpal;
extern char mapkungfu, tilesetdef, tilesetatt;
u16 pad0;
s16 mapscx;
u8 keyl, keyr;
int main(void)
{
bgInitTileSet(0, &tileset, &tilesetpal, 0, (&tilesetend - &tileset), 16 * 2 * 3, BG_16COLORS, 0x2000);
mapLoad((u8 *)&mapkungfu, (u8 *)&tilesetdef, (u8 *)&tilesetatt);
mapscx = 16 * 8;
keyl = keyr = 0;
while (1)
{
{
if (mapscx > 16 * 8)
mapscx--;
}
{
if (mapscx < (208 * 8))
mapscx++;
}
}
return 0;
}
void bgSetDisable(u8 bgNumber)
Disable a BG in the actual SNES mode.
void bgSetMapPtr(u8 bgNumber, u16 address, u8 mapSize)
Change Background Map address.
void bgInitTileSet(u8 bgNumber, u8 *tileSource, u8 *tilePalette, u8 paletteEntry, u16 tileSize, u16 paletteSize, u16 colorMode, u16 address)
Initializes a Tile Set and Loads the Tile GFX into VRAM.
void consoleInit(void)
Initialize console.
void WaitForVBlank(void)
Wait for vblank interrupt
void mapVblank(void)
Display map regarding current buffer (must be done once per frame, near Vblank)
void mapUpdate(void)
Update map regarding current camera position (must be done once per frame)
void mapLoad(u8 *layer1map, u8 *layertiles, u8 *tilesprop)
Load map definition into memory.
void mapUpdateCamera(u16 xpos, u16 ypos)
Update map camera (must be done once per frame)
the master include file for snes applications.
void setScreenOn(void)
Put screen On.
void setMode(u8 mode, u8 size)
Set the SNES hardware to operate in new display mode.