flower seed

This commit is contained in:
cyjullien1
2025-01-07 19:20:22 +01:00
parent 2c39110885
commit 0c20e2ae20
13 changed files with 51 additions and 47 deletions

View File

@@ -72,7 +72,7 @@ void screenDisplayGameSDL (char **tab,vect dim_tab, dis *display_user, vect *pla
size = display_game / (fov*2);
}
SDL_Surface *img;
SDL_Texture *texture;
@@ -84,10 +84,22 @@ void screenDisplayGameSDL (char **tab,vect dim_tab, dis *display_user, vect *pla
switch (tab[j][i])
{
case EMPTY:
img = IMG_Load ("image/empty.png");
srand(seed+i*15+j*13);
int rand_int = rand() % 45;
if(rand_int==26){img = IMG_Load ("image/empty_grass.png");}
else if(rand_int==27){img = IMG_Load ("image/empty_mud.png");}
else if(rand_int==28){img = IMG_Load ("image/empty_mushroom.png");}
else if(rand_int==29){img = IMG_Load ("image/empty_mushroom2.png");}
else{img = IMG_Load ("image/empty.png");}
break;
case WALL:
img = IMG_Load ("image/wall.png");
srand(seed+i*15+j*13);
int rand_int = rand() % 30;
if(rand_int==26){img = IMG_Load ("image/wall3.png");}
else if(rand_int==29){img = IMG_Load ("image/wall2.png");}
else{img = IMG_Load ("image/wall.png");}
break;
case PLAYER:
img = IMG_Load ("image/player.png");