tester les erreurs de dconfig
This commit is contained in:
@@ -15,7 +15,7 @@
|
|||||||
static inline t_scene parsing_line(char *line, t_scene scene)
|
static inline t_scene parsing_line(char *line, t_scene scene)
|
||||||
{
|
{
|
||||||
scene.line_if_exit = line;
|
scene.line_if_exit = line;
|
||||||
if (line[0] == '#')
|
if (line[0] == '#' || line[0] == '\n')
|
||||||
return (scene);
|
return (scene);
|
||||||
else if (line[0] == 'A')
|
else if (line[0] == 'A')
|
||||||
scene = parsing_ambiant(scene);
|
scene = parsing_ambiant(scene);
|
||||||
|
|||||||
@@ -19,5 +19,3 @@ L 11,40,50 1 255,255,255
|
|||||||
sp 0,0,-20 10 0,0,100
|
sp 0,0,-20 10 0,0,100
|
||||||
|
|
||||||
pl 0,-5,0 0,1,0 100,55,0
|
pl 0,-5,0 0,1,0 100,55,0
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
@@ -42,13 +42,13 @@ static void render_pixel(t_app *app, int x, int y)
|
|||||||
void render_scene(t_app *app)
|
void render_scene(t_app *app)
|
||||||
{
|
{
|
||||||
const int total_pixels = app->win_height * app->win_width;
|
const int total_pixels = app->win_height * app->win_width;
|
||||||
|
static int done;
|
||||||
|
static int progress;
|
||||||
int y;
|
int y;
|
||||||
int x;
|
int x;
|
||||||
int progress;
|
|
||||||
|
|
||||||
|
|
||||||
y = 0;
|
y = 0;
|
||||||
progress = 0;
|
|
||||||
while (y < app->win_height)
|
while (y < app->win_height)
|
||||||
{
|
{
|
||||||
x = 0;
|
x = 0;
|
||||||
@@ -57,7 +57,12 @@ void render_scene(t_app *app)
|
|||||||
progress = ((y * app->win_width + x + 1) * 100) / total_pixels;
|
progress = ((y * app->win_width + x + 1) * 100) / total_pixels;
|
||||||
render_pixel(app, x, y);
|
render_pixel(app, x, y);
|
||||||
x++;
|
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++;
|
y++;
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user