PAlib: PA_SpriteDual.h File Reference

Main Page | Modules | File List | Globals | Search for

# PA_SpriteDual.h File Reference

Everything concerning the sprite system, but for 2 screens ! More...

Go to the source code of this file.

## Functions

void | PA_SetScreenSpace (s16 ScreenSpace)
| Set the space between the 2 screens for the Dual Fonctions. 48 pixels by default
void | PA_DualSetSpriteY (u8 obj, s16 y)
| Set the Y position of a sprite on screen
void | PA_DualCreateSprite (u8 obj_number, void *obj_data, u8 obj_shape, u8 obj_size, u8 color_mode, u8 palette, s16 x, s16 y)
| Create a sprite with it's gfx, on 2 screens
void | PA_DualCreateSpriteEx (u8 obj_number, void *obj_data, u8 obj_shape, u8 obj_size, u8 color_mode, u8 palette, u8 obj_mode, bool mosaic, bool hflip, bool vflip, u8 prio, bool dblsize, s16 x, s16 y)
| Create a sprite with it's gfx. This is the complex version of the function
void | PA_DualCreate16bitSpriteEx (u8 obj_number, void *obj_data, u8 obj_shape, u8 obj_size, bool mosaic, bool hflip, bool vflip, u8 prio, bool dblsize, s16 x, s16 y)
| Create a 16 bit sprite with it's gfx. This is the complex version of the function. Warning : a 16bit sprite MUST be 128 pixels large, even if you sprite only takes up a small part on the left...
void | PA_DualCreate16bitSprite (u8 obj_number, void *obj_data, u8 obj_shape, u8 obj_size, s16 x, s16 y)
| Create a 16 bit sprite with it's gfx. This is the simple version of the function. Warning : a 16bit sprite MUST be 128 pixels large, even if you sprite only takes up a small part on the left...
void | PA_DualCreateSpriteFromGfx (u8 obj_number, u16 *obj_gfx, u8 obj_shape, u8 obj_size, u8 color_mode, u8 palette, s16 x, s16 y)
| Create a sprite with it's gfx. This is the simple version of the function
void | PA_DualCreateSpriteExFromGfx (u8 obj_number, u16 *obj_gfx, u8 obj_shape, u8 obj_size, u8 color_mode, u8 palette, u8 obj_mode, bool mosaic, bool hflip, bool vflip, u8 prio, bool dblsize, s16 x, s16 y)
| Create a sprite with it's gfx. This is the complex version of the function
void | PA_DualUpdateSpriteGfx (u8 obj_number, void *obj_data)
| Update the Gfx of a given sprite
void | PA_DualUpdateGfx (u16 gfx_number, void *obj_data)
| Update the Gfx of a given sprite
void | PA_DualDeleteSprite (u8 obj_number)
| Delete a given sprite. If it is the only one to use it's gfx, it'll be deleted too.
void | PA_DualSetSpriteRotEnable (u8 sprite, u8 rotset)
| Rotate and zoom a sprite
void | PA_DualSetSpriteRotDisable (u8 sprite)
| Stop rotating and zooming a sprite
void | PA_DualSetRotset (u8 rotset, s16 angle, u16 zoomx, u16 zoomy)
| Rotate and zoom a sprite
void | PA_DualSetRotsetNoZoom (u8 rotset, s16 angle)
| Rotate a sprite without zooming. It's a bit faster than the normal PA_SetRotset function
void | PA_DualSetRotsetNoAngle (u8 rotset, u16 zoomx, u16 zoomy)
| Zoom a sprite without rotating. It's a bit faster than the normal PA_SetRotset function
void | PA_DualSetSpriteX (u8 obj, s16 x)
| Set the X position of a sprite on screen
void | PA_DualSetSpriteXY (u8 sprite, s16 x, s16 y)
| Set the X and Y position of a sprite on screen
void | PA_DualSetSpritePal (u8 obj, u8 pal)
| Set the color palette used by a sprite
void | PA_DualSetSpriteDblsize (u8 obj, bool dblsize)
| Enable or disable double size for a given sprite
void | PA_DualSetSpriteColors (u8 sprite, bool n_colors)
| Change the sprite's color mode
void | PA_DualSetSpriteMode (u8 sprite, u8 obj_mode)
| Set the sprite's mode : 0 for normal, 1 for alpha blending, 2 for window
void | PA_DualSetSpriteMosaic (u8 obj, bool mosaic)
| Enable or disable mosaic mode for a given sprite
void | PA_DualSetSpriteHflip (u8 obj, bool hflip)
| Enable or disable horizontal flip for a given sprite
void | PA_DualSetSpriteVflip (u8 obj, bool vflip)
| Enable or disable vertical flip for a given sprite
void | PA_DualSetSpriteGfx (u8 obj, u16 *gfx)
| Change the gfx used by a sprite
void | PA_DualSetSpritePrio (u8 obj, u8 prio)
| Set a sprite's Background priority
void | PA_DualCloneSprite (u8 obj, u8 target)
| Clone a sprite. Works only for sprites on the same screen
void | PA_DualSetSpriteAnimEx (u8 sprite, u8 lx, u8 ly, u8 ncolors, s16 animframe)
| Set the animation frame for a given sprite. This function is faster than the normal PA_SetSpriteAnim because it doesn't have to lookup the sprite dimensions...
void | PA_DualSetSpriteAnim (u8 sprite, s16 animframe)
| Set the animation frame for a given sprite. Same as PA_SetSpriteAnimEx, but a bit slower and easier to use...
void | PA_DualStartSpriteAnimEx (u8 sprite, s16 firstframe, s16 lastframe, s16 speed, u8 type, s16 ncycles)
| Start a sprite animation for DualSprites. Once started, it continues on and on by itself until you stop it !
void | PA_DualStartSpriteAnim (u8 sprite, s16 firstframe, s16 lastframe, s16 speed)
| Start a sprite animation for DualSprite. Once started, it continues on and on by itself until you stop it !
void | PA_DualStopSpriteAnim (u8 sprite)
| Stop a sprite animation for DualSprites
void | PA_DualSetSpriteAnimFrame (u8 sprite, u16 frame)
| Set the current animation frame number for DualSprites
u16 | PA_DualGetSpriteAnimFrame (u8 sprite)
| Returns the current animation frame number for DualSprites
void | PA_DualSetSpriteAnimSpeed (u8 sprite, s16 speed)
| Set the current animation speed for DualSprites
u16 | PA_DualGetSpriteAnimSpeed (u8 sprite)
| Returns the current animation speed for DualSprites
void | PA_DualSpriteAnimPause (u8 sprite, bool pause)
| Pause or UnPause a sprite animation for DualSprites

## Detailed Description

Everything concerning the sprite system, but for 2 screens !

This file contains all macros, variables, and prototypes regarding the sprite system (OAM, Sprite mouvement, Gfx loading...) on 2 screens, easily, like if it was just one screen