added different height speed change for up and down
This commit is contained in:
Binary file not shown.
BIN
builds/fdf.o
BIN
builds/fdf.o
Binary file not shown.
Binary file not shown.
BIN
builds/modifs.o
BIN
builds/modifs.o
Binary file not shown.
BIN
builds/parse.o
BIN
builds/parse.o
Binary file not shown.
@@ -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
|
||||
|
||||
@@ -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)
|
||||
|
||||
Reference in New Issue
Block a user