diff --git a/display.c b/display.c index 4e00fb7..4d2fb2c 100644 --- a/display.c +++ b/display.c @@ -32,35 +32,35 @@ void screenDisplayGameSDL (char **tab, dis *display_user) unsigned int marge = display_user->size_menu / 2; unsigned int i, j; + SDL_Surface *img; + SDL_Texture *texture; for (i = 0; i < display_user->size_box; ++i) { for (j = 0; j < display_user->size_box; ++j) { - SDL_Surface *img; - SDL_Texture *texture; vect pos = { i * size + marge, j * size }; switch (tab[j][i]) { case EMPTY: - img = IMG_Load ("empty.png"); + img = IMG_Load ("image/empty.png"); break; case WALL: - img = IMG_Load ("wall.png"); + img = IMG_Load ("image/wall.png"); break; case PLAYER: - img = IMG_Load ("player.png"); + img = IMG_Load ("image/player.png"); break; case TARGET: - img = IMG_Load ("target.png"); + img = IMG_Load ("image/target.png"); break; case BOX: - img = IMG_Load ("box.png"); + img = IMG_Load ("image/box.png"); break; case BOX_ON_TARGET: - img = IMG_Load ("box_on_target.png"); + img = IMG_Load ("image/box_on_target.png"); break; case PLAYER_ON_TARGET: - img = IMG_Load ("player_on_target.png"); + img = IMG_Load ("image/player_on_target.png"); break; } texture diff --git a/box.png b/image/box.png similarity index 100% rename from box.png rename to image/box.png diff --git a/box_on_target.png b/image/box_on_target.png similarity index 100% rename from box_on_target.png rename to image/box_on_target.png diff --git a/empty.png b/image/empty.png similarity index 100% rename from empty.png rename to image/empty.png diff --git a/player.png b/image/player.png similarity index 100% rename from player.png rename to image/player.png diff --git a/player_on_target.png b/image/player_on_target.png similarity index 100% rename from player_on_target.png rename to image/player_on_target.png diff --git a/target.png b/image/target.png similarity index 100% rename from target.png rename to image/target.png diff --git a/test.png b/image/test.png similarity index 100% rename from test.png rename to image/test.png diff --git a/wall.png b/image/wall.png similarity index 100% rename from wall.png rename to image/wall.png