Ce projet a déjà été proposé des dizaines de fois, à chaque fois des programmeurs ont promis qu'ils sortiront une routine pour le faire, et jamais personne n'a tenu cette promesse.
Pen^2 Le 14/09/2002 à 00:50 y'a [cowboy]ExtendeD[/cowboy] qui a sorti une routine (open source).
enfin y'a pas la rotation et c un pitit peu lent pour un jeu.
Mais ça n'a jamais été prévu pour non plus. Ct juste un exemple.
Oui, c'était une routine extrêmement lente, juste pour voir comment ça fonctionnait.
Il y a déjà la routine de rotation que j'ai écrite pour Bob64 (Vertel):
char source[LCD_SIZE],cible[LCD_SIZE];
short x,y,sourcex,sourcey,dmax,xmin,xmax,ymin,ymax,centrex,centrey;
__complex__ float expmoinsitheta;
__complex__ short expmoinsitheta32768;
__complex__ long sourcexplusiy32768;
memcpy(cible,LCD_MEM,LCD_SIZE);
PortSet(source,239,127);
/*** AFFICHAGE D'UN FICHIER PIC (VOIR TIGCC) ***/
PortRestore();
/*** PLACE LES DIMENTIONS X & Y DU PIC DANS COMMANDES[8] & [9] ***/
sincos(-commandes[6],1,& __imag__ expmoinsitheta,& __real__ expmoinsitheta);
expmoinsitheta32768=expmoinsitheta*32767.; /* c'est sale, mais ça évite les débordements */
centrex=commandes[2]+commandes[4];
centrey=commandes[3]+commandes[5];
dmax=max(commandes[8]+commandes[9]-2,0);
xmin=max(centrex-dmax,0);
xmax=min(centrex+dmax,239);
ymin=max(centrey-dmax,0);
ymax=min(centrey+dmax,127);
for(x=xmin;x<=xmax;x++)
for(y=ymin;y<=ymax;y++)
{
sourcexplusiy32768=((x-centrex)+1i*(y-centrey))*(__complex__ long)expmoinsitheta32768;
sourcex=((__real__ sourcexplusiy32768)>>15)+commandes[4];sourcey=((__imag__ sourcexplusiy32768)>>15)+commandes[5];
if((sourcex>=0)&&(sourcex<commandes[8])&&(sourcey>=0)&&(sourcey<commandes[8]))
{
if(EXT_GETPIX(source,sourcex,sourcey)) EXT_SETPIX(cible,x,y); else EXT_CLRPIX(cible,x,y);
}
}
LCD_restore(cible);
On peut assez facilement rajouter le zoom là-dedans.
