Télécharger le zip
moui, niveau initié....faut pas abuser qd meme! Je programmais ca sur ma TI82....
Salut,tu ne donne pas beaucoup d'explications sur ta source..Ca ne demarre pas chez moi : le processeur NTDVM a rencontré ...dletozeun -> et moi je programme ca sur ma ti 83 +le meme programme 3x plus simple :(vite-fait donc les noms de variables sont donnés à la volé)#include <time.h> // pour definir le rand#include <conio.h> // pour les nombres aleatoires#include <SDL/SDL.h> // pour SDL !//--------------------------------------------------int nbAlea(int min,int max){int d = max-min+1;return min+(rand()%d);} // nbAlea()int main(int argc, char **argv){SDL_Rect pos;SDL_Surface *ecran = NULL;SDL_Surface *rect = NULL;SDL_Event even;int n = 0;int c = 1;int hauteur = 1024;int largeur = hauteur;int a = hauteur;int b = largeur/2;int z = 10000;pos.x = 0;pos.y = hauteur;srand((unsigned)time(NULL));SDL_Init(SDL_INIT_VIDEO);ecran = SDL_SetVideoMode(largeur,hauteur,32,SDL_SWSURFACE);SDL_WM_SetCaption("Fractale",NULL);SDL_FillRect(ecran,NULL,SDL_MapRGB(ecran->format,255,255,255));rect = SDL_CreateRGBSurface(SDL_SWSURFACE,1,1,32,0,0,0,0);do { SDL_PollEvent(&even); n = nbAlea(0,2); if(n==0) { pos.x += a; pos.y += a; } else if(n==1) { pos.y += a; } else { pos.x += b; } pos.x /= 2; pos.y /= 2; SDL_BlitSurface(rect,NULL,ecran,&pos); c++; if(c == z) { c = 0; SDL_Flip(ecran);} } while(even.type != SDL_QUIT);SDL_FreeSurface(ecran);SDL_Quit();return EXIT_SUCCESS;} // main()...voila !je ne note pas ca ne marche pas !
a oui j'ai oublié.. dans mon code, plus z est grand plus ca va vite !
Se souvenir du profil
Mot de passe oublié ? / Activation de compteCréer un compte