PAlib
|
Macros | |
#define | PA_DualLoadTiledBg(bg_number, bg_name) |
[DEPRECATED] This will never get easier... Loads a background TiledBg converted with PAGfx, with it's tiles, map, and palette. Only 256 color mode available. On 2 screens as 1... | |
#define | PA_DualLoadSimpleBg(bg_select, bg_tiles, bg_map, bg_size, wraparound, color_mode) |
[DEPRECATED] Simplest way to load a Background on both screens | |
#define | PA_DualLoadRotBg(bg_select, bg_tiles, bg_map, bg_size, wraparound) |
[DEPRECATED] Load a background fit for rotating/scaling ! Warning, you must use PA_SetVideoMode to 1 if you want 1 rotating background (Bg3 only !), or 2 for 2 rotating backgrounds (Bg2 and 3). The background MUST be in 256 colors | |
#define | PA_DualLoadBg(bg_select, bg_tiles, tile_size, bg_map, bg_size, wraparound, color_mode) |
[DEPRECATED] Simplest way to load a Background. Combines PA_InitBg, PA_LoadBgTiles, and PA_LoadBgMap | |
#define | PA_DualLoadPAGfxLargeBg(bg_number, bg_name) |
[DEPRECATED] Completely load and initialise a background with infinite scrolling (usefull if larger or wider than 512 pixels), converted with PAGfx. Background on both screens, as one | |
#define | PA_DualLoadLargeBg(bg_select, bg_tiles, bg_map, color_mode, lx, ly) |
[DEPRECATED] Completely load and initialise a background with infinite scrolling (usefull if larger or wider than 512 pixels), on both screens | |
#define | PA_DualLoadLargeBgEx(bg_select, bg_tiles, tile_size, bg_map, color_mode, lx, ly) |
[DEPRECATED] Completely load and initialise a background with infinite scrolling (usefull if larger or wider than 512 pixels), but here you can put yourself the tile size... | |
#define | PA_DualEasyBgLoad(bg_number, bg_name) |
[DEPRECATED] EasyBg load, but for Dual screen... | |
Functions | |
static void | PA_DualHideBg (u8 bg_select) |
Hide a background on both screens. | |
static void | PA_DualShowBg (u8 bg_select) |
Show a hidden background, on both screens. | |
static void | PA_DualResetBg (void) |
Reinitialize de Bg system. | |
static void | PA_DualDeleteBg (u8 bg_select) |
Delete a complete background (tiles + map + hide it...) | |
static void | PA_DualBGScrollX (u8 bg_number, s16 x) |
Scroll horizontaly any background, on both screens. | |
static void | PA_DualBGScrollY (u8 bg_number, s16 y) |
Scroll vertically any background. | |
static void | PA_DualBGScrollXY (u8 bg_number, s16 x, s16 y) |
Scroll horizontaly and vertically any background. | |
static void | PA_DualEasyBgScrollX (u8 bg_select, s32 x) |
Scroll an EasyBg horizontaly. It must have been initialised with PA_LoadLargeBg. | |
static void | PA_DualEasyBgScrollY (u8 bg_select, s32 y) |
Scroll an EasyBg vertically. | |
static void | PA_DualLoadBackground (u8 bg_number, const PA_BgStruct *bg) |
Load a background (EasyBg, RotBg or UnlimitedBg), but for Dual screen... | |
static void | PA_DualEasyBgScrollXY (u8 bg_select, s32 x, s32 y) |
Scroll a Dual EasyBg. | |
static void | PA_DualInfLargeScrollX (u8 bg_select, s32 x) |
Scroll a large infinite scrolling background horizontaly. It must have been initialised with PA_LoadLargeBg. | |
static void | PA_DualInfLargeScrollY (u8 bg_select, s32 y) |
Scroll a large infinite scrolling background vertically. It must have been initialised with PA_LoadLargeBg. | |
static void | PA_DualInfLargeScrollXY (u8 bg_select, s32 x, s32 y) |
Scroll a large infinite scrolling background horizontaly and vertically. It must have been initialised with PA_LoadLargeBg. | |
static void | PA_DualLargeScrollX (u8 bg_select, s32 x) |
Scroll a large background horizontaly. It must have been initialised with PA_LoadLargeBg. This function does not wrap around, but is faster than the InfLargeScroll... | |
static void | PA_DualLargeScrollY (u8 bg_select, s32 y) |
Scroll a large background vertically. It must have been initialised with PA_LoadLargeBg. This function does not wrap around, but is faster than the InfLargeScroll... | |
static void | PA_DualLargeScrollXY (u8 bg_select, s32 x, s32 y) |
Scroll a large background horizontaly and vertically. It must have been initialised with PA_LoadLargeBg. This function does not wrap around, but is faster than the InfLargeScroll... | |
static void | PA_DualInitParallaxX (s32 bg0, s32 bg1, s32 bg2, s32 bg3) |
Initialise Parallax Scrolling for multiple backgrounds, horizontaly. Chose the speed at which each background will scroll compared to the others. Then use PA_ParallaxScrollX to scroll... | |
static void | PA_DualInitParallaxY (s32 bg0, s32 bg1, s32 bg2, s32 bg3) |
Initialise Parallax Scrolling for multiple backgrounds, horizontaly. Chose the speed at which each background will scroll compared to the others. Then use PA_ParallaxScrollX to scroll... | |
static void | PA_DualParallaxScrollX (s32 x) |
Scroll the backgrounds. | |
static void | PA_DualParallaxScrollY (s32 y) |
Scroll the backgrounds. | |
static void | PA_DualParallaxScrollXY (s32 x, s32 y) |
Scroll the backgrounds. | |
static void | PA_DualSetBgPrio (u8 bg, u8 prio) |
Change a backgrounds priority. | |
Load tiles, a map, scroll it... and 2 screens automatically
#define PA_DualLoadTiledBg | ( | bg_number, | |
bg_name | |||
) |
[DEPRECATED] This will never get easier... Loads a background TiledBg converted with PAGfx, with it's tiles, map, and palette. Only 256 color mode available. On 2 screens as 1...
bg_number | Background number to load (from 0 to 3) |
bg_name | Background name, like bg0 |
#define PA_DualLoadSimpleBg | ( | bg_select, | |
bg_tiles, | |||
bg_map, | |||
bg_size, | |||
wraparound, | |||
color_mode | |||
) |
[DEPRECATED] Simplest way to load a Background on both screens
bg_select | Background number to load (from 0 to 3) |
bg_tiles | Name of the tiles' info (example: ship_Tiles) |
bg_map | Name of the map's info (example : ship_Map) |
bg_size | Background size. To use a normal background, use the macros BG_256X256, BG_256X512, etc... |
wraparound | If the background wraps around or not. More important for rotating backgrounds. |
color_mode | Color mode : 0 for 16 color mode, 1 for 256... |
#define PA_DualLoadRotBg | ( | bg_select, | |
bg_tiles, | |||
bg_map, | |||
bg_size, | |||
wraparound | |||
) |
[DEPRECATED] Load a background fit for rotating/scaling ! Warning, you must use PA_SetVideoMode to 1 if you want 1 rotating background (Bg3 only !), or 2 for 2 rotating backgrounds (Bg2 and 3). The background MUST be in 256 colors
bg_select | Background number to load |
bg_tiles | Name of the tiles' info (example: ship_Tiles) |
bg_map | Name of the map's info (example : ship_Map) |
bg_size | Background size. Use the following macros : BG_ROT_128X128, or 256X256, 512X512, or 1024X1024 |
wraparound | If the background wraps around or not. |
#define PA_DualLoadBg | ( | bg_select, | |
bg_tiles, | |||
tile_size, | |||
bg_map, | |||
bg_size, | |||
wraparound, | |||
color_mode | |||
) |
[DEPRECATED] Simplest way to load a Background. Combines PA_InitBg, PA_LoadBgTiles, and PA_LoadBgMap
bg_select | Background number to load (from 0 to 3) |
bg_tiles | Name of the tiles' info (example: ship_Tiles) |
tile_size | Size of your tileset |
bg_map | Name of the map's info (example : ship_Map) |
bg_size | Background size. This is important, because it also determines whether the Bg is rotatable or not. To use a normal background, use the macros BG_256X256, BG_256X512, etc... For a rotatable Bg, use the macros BG_ROT_128X128... |
wraparound | If the background wraps around or not. More important for rotating backgrounds. |
color_mode | Color mode : 0 for 16 color mode, 1 for 256... |
#define PA_DualLoadPAGfxLargeBg | ( | bg_number, | |
bg_name | |||
) |
[DEPRECATED] Completely load and initialise a background with infinite scrolling (usefull if larger or wider than 512 pixels), converted with PAGfx. Background on both screens, as one
bg_number | Background number to load (from 0 to 3) |
bg_name | Background name, in PAGfx |
#define PA_DualLoadLargeBg | ( | bg_select, | |
bg_tiles, | |||
bg_map, | |||
color_mode, | |||
lx, | |||
ly | |||
) |
[DEPRECATED] Completely load and initialise a background with infinite scrolling (usefull if larger or wider than 512 pixels), on both screens
bg_select | Background number to load (from 0 to 3) |
bg_tiles | Name of the tiles' info (example: ship_Tiles) |
bg_map | Name of the map's info (example : ship_Map) |
color_mode | Color mode : 0 for 16 color mode, 1 for 256... |
lx | Width, in tiles. So a 512 pixel wide map is 64 tiles wide... |
ly | Height, in tiles. So a 512 pixel high map is 64 tiles high... |
#define PA_DualLoadLargeBgEx | ( | bg_select, | |
bg_tiles, | |||
tile_size, | |||
bg_map, | |||
color_mode, | |||
lx, | |||
ly | |||
) |
[DEPRECATED] Completely load and initialise a background with infinite scrolling (usefull if larger or wider than 512 pixels), but here you can put yourself the tile size...
bg_select | Background number to load (from 0 to 3) |
bg_tiles | Name of the tiles' info (example: ship_Tiles) |
tile_size | Size of your tileset |
bg_map | Name of the map's info (example : ship_Map) |
color_mode | Color mode : 0 for 16 color mode, 1 for 256... |
lx | Width, in tiles. So a 512 pixel wide map is 64 tiles wide... |
ly | Height, in tiles. So a 512 pixel high map is 64 tiles high... |
#define PA_DualEasyBgLoad | ( | bg_number, | |
bg_name | |||
) |
[DEPRECATED] EasyBg load, but for Dual screen...
bg_number | Background number to load (from 0 to 3) |
bg_name | Background name, in PAGfx |
|
inlinestatic |
Hide a background on both screens.
bg_select | Background number to load (from 0 to 3) |
|
inlinestatic |
Show a hidden background, on both screens.
bg_select | Background number to load (from 0 to 3) |
|
inlinestatic |
Delete a complete background (tiles + map + hide it...)
bg_select | Background number to load (from 0 to 3) |
|
inlinestatic |
Scroll horizontaly any background, on both screens.
bg_number | Background number (0-3) |
x | X value to scroll |
|
inlinestatic |
Scroll vertically any background.
bg_number | Background number (0-3) |
y | Y value to scroll |
|
inlinestatic |
Scroll horizontaly and vertically any background.
bg_number | Background number (0-3) |
x | X value to scroll |
y | Y value to scroll |
|
inlinestatic |
Scroll an EasyBg horizontaly. It must have been initialised with PA_LoadLargeBg.
bg_select | Background number to load (from 0 to 3) |
x | X value to scroll |
|
inlinestatic |
Scroll an EasyBg vertically.
bg_select | Background number to load (from 0 to 3) |
y | Y value to scroll |
|
inlinestatic |
Load a background (EasyBg, RotBg or UnlimitedBg), but for Dual screen...
bg_number | Background number to load (from 0 to 3) |
bg | Pointer to the background (struct) |
|
inlinestatic |
Scroll a Dual EasyBg.
bg_select | Background number to load (from 0 to 3) |
x | X value to scroll |
y | Y value to scroll |
|
inlinestatic |
Scroll a large infinite scrolling background horizontaly. It must have been initialised with PA_LoadLargeBg.
bg_select | Background number to load (from 0 to 3) |
x | X value to scroll |
|
inlinestatic |
Scroll a large infinite scrolling background vertically. It must have been initialised with PA_LoadLargeBg.
bg_select | Background number to load (from 0 to 3) |
y | Y value to scroll |
|
inlinestatic |
Scroll a large infinite scrolling background horizontaly and vertically. It must have been initialised with PA_LoadLargeBg.
bg_select | Background number to load (from 0 to 3) |
x | X value to scroll |
y | Y value to scroll |
|
inlinestatic |
Scroll a large background horizontaly. It must have been initialised with PA_LoadLargeBg. This function does not wrap around, but is faster than the InfLargeScroll...
bg_select | Background number to load (from 0 to 3) |
x | X value to scroll |
|
inlinestatic |
Scroll a large background vertically. It must have been initialised with PA_LoadLargeBg. This function does not wrap around, but is faster than the InfLargeScroll...
bg_select | Background number to load (from 0 to 3) |
y | Y value to scroll |
|
inlinestatic |
Scroll a large background horizontaly and vertically. It must have been initialised with PA_LoadLargeBg. This function does not wrap around, but is faster than the InfLargeScroll...
bg_select | Background number to load (from 0 to 3) |
x | X value to scroll |
y | Y value to scroll |
|
inlinestatic |
Initialise Parallax Scrolling for multiple backgrounds, horizontaly. Chose the speed at which each background will scroll compared to the others. Then use PA_ParallaxScrollX to scroll...
bg0 | Value for the first background (0). Set to 256 for normal scroll speed, lower for lower speed (128 is half speed...), higher for faster (512 is twice as fast...). You can set negative values. 0 inactivates parallax scrolling for this background |
bg1 | Same thing for Background 1 |
bg2 | Same thing for Background 2 |
bg3 | Same thing for Background 3 |
|
inlinestatic |
Initialise Parallax Scrolling for multiple backgrounds, horizontaly. Chose the speed at which each background will scroll compared to the others. Then use PA_ParallaxScrollX to scroll...
bg0 | Value for the first background (0). Set to 256 for normal scroll speed, lower for lower speed (128 is half speed...), higher for faster (512 is twice as fast...). You can set negative values. 0 inactivates parallax scrolling for this background |
bg1 | Same thing for Background 1 |
bg2 | Same thing for Background 2 |
bg3 | Same thing for Background 3 |
|
inlinestatic |
Scroll the backgrounds.
x | X value to scroll |
|
inlinestatic |
Scroll the backgrounds.
y | Y value to scroll |
|
inlinestatic |
Scroll the backgrounds.
x | X value to scroll |
y | Y value to scroll |
|
inlinestatic |
Change a backgrounds priority.
bg | Background... |
prio | Priority level (0-3, 0 being the highest) |