diff --git a/builds/draw_bonus.o b/builds/draw_bonus.o index 96e4317..507538a 100644 Binary files a/builds/draw_bonus.o and b/builds/draw_bonus.o differ diff --git a/builds/fdf.o b/builds/fdf.o index 3806a75..bd2ba56 100644 Binary files a/builds/fdf.o and b/builds/fdf.o differ diff --git a/builds/keypress_bonus.o b/builds/keypress_bonus.o index 1204a13..56a096d 100644 Binary files a/builds/keypress_bonus.o and b/builds/keypress_bonus.o differ diff --git a/builds/modifs.o b/builds/modifs.o index 15803a4..b1b3130 100644 Binary files a/builds/modifs.o and b/builds/modifs.o differ diff --git a/builds/parse.o b/builds/parse.o index 6a97970..a3c20ba 100644 Binary files a/builds/parse.o and b/builds/parse.o differ diff --git a/fdf b/fdf index bebbe74..7593c7f 100755 Binary files a/fdf and b/fdf differ diff --git a/includes/fdf.h b/includes/fdf.h index b0219b0..eb34e8b 100644 --- a/includes/fdf.h +++ b/includes/fdf.h @@ -77,14 +77,19 @@ int **parse_map(t_fdf *fdf, int fd); // steps size for the hight transform with p and o // must be > 0 // 100 is small, 1 is the biggest -# define Z_HEIGHT 50 +# define Z_HEIGHT 100 +// then define the speed for height transform +// must be > 0 +// 1 is small, 100 is the big +# define Z_HEIGHT_UP 10 +# define Z_HEIGHT_DOWN 2 // color for altitude # define COLOR_START 0xffffff /* -# define COLOR_END 0x00d700 // green -*/ # define COLOR_END 0x1423e6 // blue +*/ +# define COLOR_END 0x00d700 // green // minimum time in milliseconds between two keypress # define DEBOUNCE_TIME 40 diff --git a/srcs/keypress_bonus.c b/srcs/keypress_bonus.c index a32920f..d2c01ee 100644 --- a/srcs/keypress_bonus.c +++ b/srcs/keypress_bonus.c @@ -28,10 +28,9 @@ void keypress_more(int keycode, t_fdf *fdf) fdf->zoom = 0; } else if (keycode == O) - fdf->altitude++; + fdf->altitude += Z_HEIGHT_UP; else if (keycode == P) - //if (fdf->altitude > 0) - fdf->altitude--; + fdf->altitude -= Z_HEIGHT_DOWN; } int should_ignore_keypress(const struct timeval *current_time, t_fdf *fdf)