Large Maps


Defines

#define PA_LoadLargeBg(screen, bg_select, bg_tiles, bg_map, color_mode, lx, ly)
 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)
 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)
 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

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.
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.
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.
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...
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...
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...
void PA_InitParallaxX (u8 screen, 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...
void PA_InitParallaxY (u8 screen, 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...
void PA_ParallaxScrollX (u8 screen, s32 x)
 Scroll the backgrounds
void PA_ParallaxScrollY (u8 screen, s32 y)
 Scroll the backgrounds
void PA_ParallaxScrollXY (u8 screen, s32 x, s32 y)
 Scroll the backgrounds

Detailed Description

Load Large Maps, scroll them...

Define Documentation

#define PA_LoadLargeBg screen,
bg_select,
bg_tiles,
bg_map,
color_mode,
lx,
ly   ) 
 

Value:

{\
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, Blank, BG_512X256, 0, color_mode);}\
else{PA_LoadTileEngine(screen, bg_select, (void*)bg_tiles);}\
PA_InitLargeBg(screen, bg_select, lx, ly, (void*)bg_map);}
Completely load and initialise a background with infinite scrolling (usefull if larger or wider than 512 pixels)

Parameters:
screen Chose de screen (0 or 1)
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_LoadLargeBgEx screen,
bg_select,
bg_tiles,
tile_size,
bg_map,
color_mode,
lx,
ly   ) 
 

Value:

{\
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, Blank, BG_512X256, 0, color_mode);}\
else{PA_LoadTileEngine(screen, bg_select, bg_tiles);}\
PA_InitLargeBg(screen, bg_select, lx, ly, (void*)bg_map);}
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...

Parameters:
screen Chose de screen (0 or 1)
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_LoadPAGfxLargeBg screen,
bg_number,
bg_name   ) 
 

Value:

{\
       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);}
Completely load and initialise a background with infinite scrolling (usefull if larger or wider than 512 pixels), converted with PAGfx

Parameters:
screen Chose de screen (0 or 1)
bg_number Background number to load (from 0 to 3)
bg_name Background name, in PAGfx


Function Documentation

void PA_InfLargeScrollX u8  screen,
u8  bg_select,
s32  x
[inline]
 

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

Parameters:
screen Chose de screen (0 or 1)
bg_select Background number to load (from 0 to 3)
x X value to scroll

inline void PA_InfLargeScrollXY u8  screen,
u8  bg_select,
s32  x,
s32  y
[inline]
 

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

Parameters:
screen Chose de screen (0 or 1)
bg_select Background number to load (from 0 to 3)
x X value to scroll
y Y value to scroll

void PA_InfLargeScrollY u8  screen,
u8  bg_select,
s32  y
[inline]
 

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

Parameters:
screen Chose de screen (0 or 1)
bg_select Background number to load (from 0 to 3)
y Y value to scroll

inline void PA_InitParallaxX u8  screen,
s32  bg0,
s32  bg1,
s32  bg2,
s32  bg3
[inline]
 

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

Parameters:
screen Chose de screen (0 or 1)
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

inline void PA_InitParallaxY u8  screen,
s32  bg0,
s32  bg1,
s32  bg2,
s32  bg3
[inline]
 

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

Parameters:
screen Chose de screen (0 or 1)
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

void PA_LargeScrollX u8  screen,
u8  bg_select,
s32  x
[inline]
 

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:
screen Chose de screen (0 or 1)
bg_select Background number to load (from 0 to 3)
x X value to scroll

inline void PA_LargeScrollXY u8  screen,
u8  bg_select,
s32  x,
s32  y
[inline]
 

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:
screen Chose de screen (0 or 1)
bg_select Background number to load (from 0 to 3)
x X value to scroll
y Y value to scroll

void PA_LargeScrollY u8  screen,
u8  bg_select,
s32  y
[inline]
 

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:
screen Chose de screen (0 or 1)
bg_select Background number to load (from 0 to 3)
y Y value to scroll

inline void PA_ParallaxScrollX u8  screen,
s32  x
[inline]
 

Scroll the backgrounds

Parameters:
screen Chose de screen (0 or 1)
x X value to scroll

inline void PA_ParallaxScrollXY u8  screen,
s32  x,
s32  y
[inline]
 

Scroll the backgrounds

Parameters:
screen Chose de screen (0 or 1)
x X value to scroll
y Y value to scroll

inline void PA_ParallaxScrollY u8  screen,
s32  y
[inline]
 

Scroll the backgrounds

Parameters:
screen Chose de screen (0 or 1)
y Y value to scroll


Generated on Tue Jan 30 23:10:11 2007 for PAlib by  doxygen 1.3.9.1