Voilà le code de mon test :
#include <PA9.h>
// PAGfx Include
#include "gfx/all_gfx.c"
#include "gfx/all_gfx.h"
int main(void)
{
PA_Init(); //PAlib inits
PA_InitVBL();
PA_InitBgTrans(0);
PA_LoadSpritePal(0, // Screen
0, // Palette number
(void*)sprite0_Pal); // Palette name
PA_CreateSprite(0, // Screen
0, // Sprite number
(void*)vaisseau_Sprite, // Sprite name
OBJ_SIZE_32X32, // Sprite size
1, // 256 color mode
0, // Sprite palette number
50, 50); // X and Y position on the screen
int i;
while(1) // Infinite loops
{
if (Pad.Newpress.Anykey || Stylus.Newpress)
{
for (i = 0; i <= TRANS_LENGTH; i++)
{
// Fade length...
PA_BgTransLeftRight(0, // screen
0, // fade type, from 0 to 4, test them out !
0, // horizontal flip
i); // Time, 0 being the screen completely visible, 32 completely out
PA_WaitForVBL(); // To slow down the fades, we wait a frame...
}
for (i = 0 ; i < 100 ; i ++)
{
PA_SetSpriteXY(0, 0, 50 + i, 50);
PA_WaitForVBL();
}
}
}
return 0;
}
Lors du clic, je vois pas de transition.
Qu'est-ce que j'ai raté ?
Voici le projet de test si besoin :
http://virtuapeanuts.free.fr/TestSpriteEtTransition.rarMerci de vos aide