flower seed
This commit is contained in:
@@ -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");
|
||||
|
||||
Reference in New Issue
Block a user