tester les erreurs de dconfig

This commit is contained in:
YANNIS
2025-02-22 02:08:33 +01:00
parent c82b3bb029
commit 660d18d859
4 changed files with 9 additions and 6 deletions
+1 -1
View File
@@ -15,7 +15,7 @@
static inline t_scene parsing_line(char *line, t_scene scene)
{
scene.line_if_exit = line;
if (line[0] == '#')
if (line[0] == '#' || line[0] == '\n')
return (scene);
else if (line[0] == 'A')
scene = parsing_ambiant(scene);
Executable
BIN
View File
Binary file not shown.
-2
View File
@@ -19,5 +19,3 @@ L 11,40,50 1 255,255,255
sp 0,0,-20 10 0,0,100
pl 0,-5,0 0,1,0 100,55,0
+8 -3
View File
@@ -42,13 +42,13 @@ static void render_pixel(t_app *app, int x, int y)
void render_scene(t_app *app)
{
const int total_pixels = app->win_height * app->win_width;
static int done;
static int progress;
int y;
int x;
int progress;
y = 0;
progress = 0;
while (y < app->win_height)
{
x = 0;
@@ -57,7 +57,12 @@ void render_scene(t_app *app)
progress = ((y * app->win_width + x + 1) * 100) / total_pixels;
render_pixel(app, x, y);
x++;
printf("\rChargement de l'écran : %d%%", progress);
if (!done)
printf("\rChargement de l'écran : %d%% ", progress);
else
printf("\rTERMINE ");
if (progress >= 100)
done = 1;
}
y++;
}