From c5853d688f900308ba495cf25723f2b3141830ef Mon Sep 17 00:00:00 2001 From: Aubin DORIVAL Date: Fri, 20 Dec 2024 14:46:21 +0100 Subject: [PATCH] images -> image/ --- display.c | 18 +++++++++--------- box.png => image/box.png | 0 box_on_target.png => image/box_on_target.png | 0 empty.png => image/empty.png | 0 player.png => image/player.png | 0 .../player_on_target.png | 0 target.png => image/target.png | 0 test.png => image/test.png | 0 wall.png => image/wall.png | 0 9 files changed, 9 insertions(+), 9 deletions(-) rename box.png => image/box.png (100%) rename box_on_target.png => image/box_on_target.png (100%) rename empty.png => image/empty.png (100%) rename player.png => image/player.png (100%) rename player_on_target.png => image/player_on_target.png (100%) rename target.png => image/target.png (100%) rename test.png => image/test.png (100%) rename wall.png => image/wall.png (100%) 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