PAlib
Macros | Functions
Old large background system

Macros

#define PA_LoadLargeBg(screen, 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)
 
#define PA_LoadPAGfxLargeBg(screen, 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
 
#define PA_LoadLargeBgEx(screen, 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...
 

Functions

static void PA_InfLargeScrollX (u8 screen, u8 bg_select, s32 x)
 Scroll a large infinite scrolling background horizontaly. It must have been initialised with PA_LoadLargeBg.
 
static void PA_InfLargeScrollY (u8 screen, u8 bg_select, s32 y)
 Scroll a large infinite scrolling background vertically. It must have been initialised with PA_LoadLargeBg.
 
static void PA_InfLargeScrollXY (u8 screen, 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_LargeScrollX (u8 screen, 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_LargeScrollY (u8 screen, 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_LargeScrollXY (u8 screen, 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...
 

Detailed Description

Old LargeMap functions, obsoleted by PA_LoadBackground()

Macro Definition Documentation

◆ PA_LoadLargeBg

#define PA_LoadLargeBg (   screen,
  bg_select,
  bg_tiles,
  bg_map,
  color_mode,
  lx,
  ly 
)
Value:
do{\
PA_DEPRECATED_MACRO;\
PA_BgInfo[screen][bg_select].NTiles = SIZEOF_16BIT(bg_tiles)>>5;\
if (PA_BgInfo[screen][bg_select].NTiles < MAX_TILES) {PA_LoadSimpleBg(screen, bg_select, bg_tiles, NULL, BG_512X256, 0, color_mode);}\
else{PA_LoadTileEngine(screen, bg_select, (void*)bg_tiles);}\
PA_InitLargeBg(screen, bg_select, lx, ly, (void*)bg_map);}while(0)
#define PA_LoadSimpleBg(screen, bg_select, bg_tiles, bg_map, bg_size, wraparound, color_mode)
[DEPRECATED] Simple way to load a Background. Combines PA_InitBg, PA_LoadBgTiles, and PA_LoadBgMap
Definition PA_BgTiles.h:425

[DEPRECATED] Completely load and initialise a background with infinite scrolling (usefull if larger or wider than 512 pixels)

Deprecated:
Parameters
screenChose de screen (0 or 1)
bg_selectBackground number to load (from 0 to 3)
bg_tilesName of the tiles' info (example: ship_Tiles)
bg_mapName of the map's info (example : ship_Map)
color_modeColor mode : 0 for 16 color mode, 1 for 256...
lxWidth, in tiles. So a 512 pixel wide map is 64 tiles wide...
lyHeight, in tiles. So a 512 pixel high map is 64 tiles high...

◆ PA_LoadPAGfxLargeBg

#define PA_LoadPAGfxLargeBg (   screen,
  bg_number,
  bg_name 
)
Value:
do{\
PA_DEPRECATED_MACRO;\
PA_LoadBgPal(screen, bg_number, (void*)bg_name##_Pal); \
PA_LoadLargeBg(screen, bg_number, bg_name##_Tiles, bg_name##_Map, 1, (bg_name##_Info[1]) >> 3, (bg_name##_Info[2]) >> 3);}while(0)

[DEPRECATED] Completely load and initialise a background with infinite scrolling (usefull if larger or wider than 512 pixels), converted with PAGfx

Deprecated:
Parameters
screenChose de screen (0 or 1)
bg_numberBackground number to load (from 0 to 3)
bg_nameBackground name, in PAGfx

◆ PA_LoadLargeBgEx

#define PA_LoadLargeBgEx (   screen,
  bg_select,
  bg_tiles,
  tile_size,
  bg_map,
  color_mode,
  lx,
  ly 
)
Value:
do{\
PA_DEPRECATED_MACRO;\
PA_BgInfo[screen][bg_select].NTiles = SIZEOF_16BIT(bg_tiles)>>5;\
if (PA_BgInfo[screen][bg_select].NTiles < MAX_TILES) {PA_LoadBg(screen, bg_select, bg_tiles, tile_size, NULL, BG_512X256, 0, color_mode);}\
else{PA_LoadTileEngine(screen, bg_select, bg_tiles);}\
PA_InitLargeBg(screen, bg_select, lx, ly, (void*)bg_map);}while(0)
#define PA_LoadBg(screen, 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,...
Definition PA_BgTiles.h:465

[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...

Deprecated:
Parameters
screenChose de screen (0 or 1)
bg_selectBackground number to load (from 0 to 3)
bg_tilesName of the tiles' info (example: ship_Tiles)
tile_sizeSize of your tileset
bg_mapName of the map's info (example : ship_Map)
color_modeColor mode : 0 for 16 color mode, 1 for 256...
lxWidth, in tiles. So a 512 pixel wide map is 64 tiles wide...
lyHeight, in tiles. So a 512 pixel high map is 64 tiles high...

Function Documentation

◆ PA_InfLargeScrollX()

void PA_InfLargeScrollX ( u8  screen,
u8  bg_select,
s32  x 
)
inlinestatic

Scroll a large infinite scrolling background horizontaly. It must have been initialised with PA_LoadLargeBg.

Parameters
screenChose de screen (0 or 1)
bg_selectBackground number to load (from 0 to 3)
xX value to scroll

◆ PA_InfLargeScrollY()

void PA_InfLargeScrollY ( u8  screen,
u8  bg_select,
s32  y 
)
inlinestatic

Scroll a large infinite scrolling background vertically. It must have been initialised with PA_LoadLargeBg.

Parameters
screenChose de screen (0 or 1)
bg_selectBackground number to load (from 0 to 3)
yY value to scroll

◆ PA_InfLargeScrollXY()

static inline void PA_InfLargeScrollXY ( u8  screen,
u8  bg_select,
s32  x,
s32  y 
)
inlinestatic

Scroll a large infinite scrolling background horizontaly and vertically. It must have been initialised with PA_LoadLargeBg.

Parameters
screenChose de screen (0 or 1)
bg_selectBackground number to load (from 0 to 3)
xX value to scroll
yY value to scroll

◆ PA_LargeScrollX()

void PA_LargeScrollX ( u8  screen,
u8  bg_select,
s32  x 
)
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...

Parameters
screenChose de screen (0 or 1)
bg_selectBackground number to load (from 0 to 3)
xX value to scroll

◆ PA_LargeScrollY()

void PA_LargeScrollY ( u8  screen,
u8  bg_select,
s32  y 
)
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...

Parameters
screenChose de screen (0 or 1)
bg_selectBackground number to load (from 0 to 3)
yY value to scroll

◆ PA_LargeScrollXY()

static inline void PA_LargeScrollXY ( u8  screen,
u8  bg_select,
s32  x,
s32  y 
)
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...

Parameters
screenChose de screen (0 or 1)
bg_selectBackground number to load (from 0 to 3)
xX value to scroll
yY value to scroll