taille plateau max

This commit is contained in:
Tropicananass 2016-05-11 17:33:30 +02:00
parent 269fa59870
commit 4b335e6825
4 changed files with 8 additions and 8 deletions

BIN
bin/hex

Binary file not shown.

View File

@ -52,7 +52,7 @@ int menu_taille (SDL_Surface* window, scrolling_t scroll)
break;
case M_RIGHT :
{
if (param->size < SIZE_MAX)
if (param->size < MAXSIZE)
{
++param->size;
sprintf (entries [2], "%dx%d", param->size, param->size);
@ -175,7 +175,6 @@ int menu_charger (SDL_Surface* window, scrolling_t scroll, char** file)
cur = nb_sav - 1;
else
--cur;
printf ("%d\n", cur);
sprintf (entries [2], "%s", liste[cur]);
vec2 c = m->cur;
m->cur.x = 1;
@ -187,7 +186,6 @@ int menu_charger (SDL_Surface* window, scrolling_t scroll, char** file)
case M_RIGHT :
{
cur = (cur + 1) % nb_sav;
printf ("%d\n", cur);
sprintf (entries [2], "%s", liste[cur]);
vec2 c = m->cur;
m->cur.x = 1;

View File

@ -103,7 +103,7 @@ int chargement(char *nom , int **tab, int *IA)
return ERROR_IA;
}
fscanf(f_chargement, "%d", &taille);
if(taille<1 || taille > SIZE_MAX){
if(taille<1 || taille > MAXSIZE){
return ERROR_SIZE;
}

View File

@ -97,17 +97,19 @@ SDL_Surface* fullscreen_window (SDL_Surface* window)
else
{
SDL_Rect** modes = SDL_ListModes(window->format, SDL_HWSURFACE | SDL_FULLSCREEN | SDL_DOUBLEBUF);
if(modes == (SDL_Rect **)0)
/*if(modes == (SDL_Rect **)0)
{
printf("No modes available!\n");
}
}*/
/* Check if our resolution is restricted */
if(modes == (SDL_Rect **)-1)
/*if(modes == (SDL_Rect **)-1)
{
printf("All resolutions available.\n");
}
else{
else{*/
if(modes != (SDL_Rect **)-1)
{
/* Print valid modes
printf("Available Modes\n");
for(int i=0;modes[i];++i)