/////////////////////////////////////////////////////////////////////////////// // Affiche les différents objets de la scène. //----------------------------------------------------------------------------- // Paramètres : // _ // Retour : // _ /////////////////////////////////////////////////////////////////////////////// void affiche_scene() { affiche_soleil(); affiche_sol(); affiche_maison( -10, 0, 0, 10 ); affiche_maison( 10, 0, -8, 80 ); affiche_maison( 4, 0, 10, 30 ); affiche_arbre( -9, 0,-12 ); affiche_arbre( -11, 0, 11 ); affiche_arbre( 12, 0, 2 ); glutSwapBuffers(); // Affiche la scène (affichage en double buffer) }
int main(int argc, char ** argv){ int m = 11; int i; struct liste_mots * lm = NULL; struct liste_sol * ls = NULL; if (argc < 2){ printf("usage: ./prog_dyn <fichier>\n"); return 0; } lm = cons_liste_mots(lm, argv[1]); /* valopt = (int **)malloc(sizeof(int *)*lm->nb); for(i = 0; i < lm->nb; i++){ valopt[i] = (int *)malloc(sizeof(int) *(m+1)); } */ /* for(i=0; i < lm->nb; i++){ printf("%s\n", lm->mots[i]); } */ //ALGO PROG DYN ls = progdyn(lm, m); printf("nombre de mots=%d\n", lm->nb); affiche_sol(ls); printf("\n"); affiche_mots(lm, ls, m); free(lm); free(ls); return 0; }