RYGARLe 29/05/2008 à 10:09
Je voudrais que ma séquence ne soit jouée que deux fois, alors j'ai fais :
for (z=0; z<2; z++)
{
for(aa=0; 340 > aa; aa++) { (plein de petites images arrivent sur l'écran)
DrawSprite(SCBfond);
y++;
if (y>25) y=25;
DrawSprite(SCBt1);
SCBX(SCBt1) = x;
SCBY(SCBt1) = y;
w++;
if (w>25) w=25;
DrawSprite(SCBt2);
SCBX(SCBt2) = v;
SCBY(SCBt2) = w;
s++;
if (s>25) s=25;
DrawSprite(SCBt3);
SCBX(SCBt3) = r;
SCBY(SCBt3) = s;
u++;
if (u>25) u=25;
DrawSprite(SCBt4);
SCBX(SCBt4) = t;
SCBY(SCBt4) = u;
a++;
if (a>39) a=39;
DrawSprite(SCBt5);
SCBX(SCBt5) = a;
SCBY(SCBt5) = b;
c++;
if (c>59) c=59;
DrawSprite(SCBt6);
SCBX(SCBt6) = c;
SCBY(SCBt6) = d;
e--;
if (e<79) e=79;
DrawSprite(SCBt7);
SCBX(SCBt7) = e;
SCBY(SCBt7) = f;
g--;
if (g<99) g=99;
DrawSprite(SCBt8);
SCBX(SCBt8) = g;
SCBY(SCBt8) = h;
j--;
if (j<59) j=59;
DrawSprite(SCBt9);
SCBX(SCBt9) = o;
SCBY(SCBt9) = j;
l--;
if (l<59) l=59;
DrawSprite(SCBt10);
SCBX(SCBt10) = k;
SCBY(SCBt10) = l;
n--;
if (n<59) n=59;
DrawSprite(SCBt11);
SCBX(SCBt11) = m;
SCBY(SCBt11) = n;
q--;
if (q<59) q=59;
DrawSprite(SCBt12);
SCBX(SCBt12) = p;
SCBY(SCBt12) = q;
Vsync();
SwapBuffers();
}
(Ca y est toutes les images sont en place maintenant je place une nouvelle image et je la zoom)
for(i=129; i<256; i++) {
SCBHS(SCBtitre) = i;
SCBVS(SCBtitre) = i;
DrawSprite(SCBtitre);
Vsync();
SwapBuffers();
}
for(i=340; i<500; i++) {
DrawSprite(SCBtitre);
Vsync();
SwapBuffers();
}
(je garde à l'écran mon image "titre")
}
}
Mais cela ne fonctionne pas.
Au final le programme aprés affiché "titre" jusqu'au time aa=500 réafiche l'image "titre" en position de zomm 129 puis plus rien.