|
Defines |
#define | PA_HideBg(screen, bg_select) _REG16(REG_BGSCREEN(screen)) &= ~(0x100 << (bg_select)) |
| Hide a screen's background.
|
#define | PA_ShowBg(screen, bg_select) _REG16(REG_BGSCREEN(screen)) |= (0x100 << (bg_select)) |
| Show a hidden background.
|
#define | PA_ResetBg(screen) _REG16(REG_BGSCREEN(screen)) &= ~(0xF00) |
| Reinitialize de Bg system of a screen. It only hides all the backgrounds in reality...
|
#define | PA_LoadBgTiles(screen, bg_select, bg_tiles) PA_LoadBgTilesEx(screen, bg_select, (void*)bg_tiles, SIZEOF_16BIT(bg_tiles)) |
| Load a tileset into memory
|
#define | PA_LoadTiledBg(screen, bg_number, bg_name) |
| This will never get easier... Loads a background TiledBg converted with PAGfx, with it's tiles, map, and palette. Only 256 color mode available.
|
#define | PA_LoadSimpleBg(screen, bg_select, bg_tiles, bg_map, bg_size, wraparound, color_mode) |
| Simple way to load a Background. Combines PA_InitBg, PA_LoadBgTiles, and PA_LoadBgMap
|
#define | PA_LoadBg(screen, bg_select, bg_tiles, tile_size, bg_map, bg_size, wraparound, color_mode) |
| Simplest way to load a Background. Combines PA_InitBg, PA_LoadBgTiles, and PA_LoadBgMap
|
#define | PA_SetMapTileAll(screen, bg_select, x, y, tile_info) *(u16*)(PA_BgInfo[screen][bg_select].Map + ((x) << 1) + ((y) << 6)) = (tile_info) |
| Change the tile info used by a given tile in the map
|
#define | PA_SetMapTileHflip(screen, bg_select, x, y, hflip) {*(u16*)(PA_bgmap[screen][bg_select] + ((x) << 1) + ((y) << 6)) &= ALL_BUT(TILE_HFLIP); *(u16*)(PA_bgmap[screen][bg_select] + ((x) << 1) + ((y) << 6)) |= ((hflip) << 10);} |
| Flip a given tile horizontaly
|
#define | PA_SetMapTileVflip(screen, bg_select, x, y, vflip) {*(u16*)(PA_bgmap[screen][bg_select] + ((x) << 1) + ((y) << 6)) &= ALL_BUT(TILE_VFLIP); *(u16*)(PA_bgmap[screen][bg_select] + ((x) << 1) + ((y) << 6)) |= ((vflip) << 11);} |
| Flip a given tile verticaly
|
#define | PA_SetMapTilePal(screen, bg_select, x, y, palette_number) {*(u16*)(PA_BgInfo[screen][bg_select].Map + ((x) << 1) + ((y) << 6)) &= ALL_BUT(TILE_PAL); *(u16*)(PA_BgInfo[screen][bg_select].Map + ((x) << 1) + ((y) << 6)) |= ((palette_number) << 12);} |
| Change the 16 color palette used by a tile. Works only if the Bg is in 16 colors...
|
#define | PA_EasyBgLoad(screen, bg_number, bg_name) |
| Easiest way to load a background converted with PAGfx...
|
Functions |
void | PA_ResetBgSys (void) |
| Reset the background system
|
void | PA_ResetBgSysScreen (u8 screen) |
| Reset the background system on 1 screen
|
void | PA_InitBg (u8 screen, u8 bg_select, u8 bg_size, u8 wraparound, u8 color_mode) |
| Initialise a given background. Do this only after having loaded a tileset and a map.
|
void | PA_ReLoadBgTiles (u8 screen, u8 bg_select, void *bg_tiles) |
| ReLoad a tileset into memory
|
void | PA_DeleteTiles (u8 screen, u8 bg_select) |
| Delete a tilest in memory. Note that loading a tileset automatically deletes the preceding one, so you won't need to use this function often
|
void | PA_DeleteMap (u8 screen, u8 bg_select) |
| Delete a map in memory. Note that loading a map automatically deletes the preceding one, so you won't need to use this function often
|
void | PA_DeleteBg (u8 screen, u8 bg_select) |
| Delete a complete background (tiles + map + hide it...)
|
void | PA_LoadBgMap (u8 screen, u8 bg_select, void *bg_map, u8 bg_size) |
| Load a background's map info
|
void | PA_BGScrollX (u8 screen, u8 bg_number, s32 x) |
| Scroll horizontaly a Tiled background
|
void | PA_BGScrollY (u8 screen, u8 bg_number, s32 y) |
| Scroll vertically a Tiled background
|
void | PA_SetMapTile (u8 screen, u8 bg_select, s16 x, s16 y, s16 tile_number) |
| Change the tile gfx used by a given tile in the map
|
void | PA_SetLargeMapTile (u8 screen, u8 bg_select, s32 x, s32 y, u32 tile_info) |
| Change the tile info used by a given tile in the map, only for big background (512 large or wide)
|
void | PA_SetBgPrio (u8 screen, u8 bg, u8 prio) |
| Change a backgrounds priority
|
void | PA_ClearBg (u8 screen, u8 bg_select) |
| Erase a given background (just the tilemap)
|
void | PA_EasyBgScrollX (u8 screen, u8 bg_number, s32 x) |
| Scroll horizontaly any background
|
void | PA_EasyBgScrollY (u8 screen, u8 bg_number, s32 y) |
| Scroll vertically any background
|
void | PA_EasyBgScrollXY (u8 screen, u8 bg_number, s32 x, s32 y) |
| Scroll horizontaly and vertically any background
|
u8 | PA_EasyBgGetPixel (u8 screen, u8 bg_number, s32 x, s32 y) |
| Returns the color (number in the palette) of the screen pixel...
|
u16 | PA_EasyBgGetPixelCol (u8 screen, u8 bg_number, s32 x, s32 y) |
| Returns the color (u16 value) of the screen pixel...
|