added more settings in h file
This commit is contained in:
@@ -77,12 +77,12 @@ int **parse_map(t_fdf *fdf, int fd);
|
||||
// steps size for the height transform with p and o
|
||||
// must be > 0
|
||||
// 100 is small, 1 is the biggest
|
||||
# define Z_HEIGHT 100
|
||||
# define Z_HEIGHT 10
|
||||
// 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 10
|
||||
// 1 is small, 100 is big
|
||||
# define Z_HEIGHT_UP 20
|
||||
# define Z_HEIGHT_DOWN 20
|
||||
|
||||
/*
|
||||
- 50 : pink - blue
|
||||
@@ -94,10 +94,10 @@ int **parse_map(t_fdf *fdf, int fd);
|
||||
- test : white - pink
|
||||
*/
|
||||
// color for altitude
|
||||
# define COLOR_START 0xf263a6 // pink
|
||||
/*
|
||||
# define COLOR_START 0xa263f6 // purple
|
||||
# define COLOR_START 0xffffff // white
|
||||
/*
|
||||
# define COLOR_START 0xf263a6 // pink
|
||||
# define COLOR_START 0xa263f6 // purple
|
||||
# define COLOR_START 0x1423e6 // blue
|
||||
# define COLOR_START 0x877264 // brown
|
||||
# define COLOR_START 0x00d700 // green
|
||||
@@ -111,6 +111,12 @@ int **parse_map(t_fdf *fdf, int fd);
|
||||
*/
|
||||
# define COLOR_END 0xa263f6 // purple
|
||||
|
||||
// zoom change for each keypress
|
||||
# define ZOOM 1
|
||||
|
||||
// degree rotation for each keypress
|
||||
# define ROT 3
|
||||
|
||||
// pixels deplacement for each keypress
|
||||
# define MOVE 10
|
||||
|
||||
|
||||
@@ -55,8 +55,8 @@ void init_fdf(t_fdf *fdf)
|
||||
{
|
||||
struct timeval current_time;
|
||||
|
||||
fdf->win_size_x = 700;
|
||||
fdf->win_size_y = 700;
|
||||
fdf->win_size_x = 902;
|
||||
fdf->win_size_y = 913;
|
||||
fdf->img_size_x = fdf->win_size_x;
|
||||
fdf->img_size_y = fdf->win_size_y;
|
||||
init_offset(fdf);
|
||||
|
||||
@@ -11,9 +11,9 @@
|
||||
void keypress_more(int keycode, t_fdf *fdf)
|
||||
{
|
||||
if (keycode == A)
|
||||
fdf->zoom += 1;
|
||||
fdf->zoom += ZOOM;
|
||||
else if (keycode == W)
|
||||
fdf->zoom -= 1;
|
||||
fdf->zoom -= ZOOM;
|
||||
else if (keycode == U)
|
||||
{
|
||||
fdf->rot_x = 0;
|
||||
@@ -66,13 +66,13 @@ int keypress(int keycode, t_fdf *fdf)
|
||||
if (keycode == ESCAPE)
|
||||
shut_down(fdf);
|
||||
else if (keycode == LEFT)
|
||||
fdf->rot_x += 1;
|
||||
fdf->rot_x += ROT;
|
||||
else if (keycode == RIGHT)
|
||||
fdf->rot_x -= 1;
|
||||
fdf->rot_x -= ROT;
|
||||
else if (keycode == UP)
|
||||
fdf->rot_y += 1;
|
||||
fdf->rot_y += ROT;
|
||||
else if (keycode == DOWN)
|
||||
fdf->rot_y -= 1;
|
||||
fdf->rot_y -= ROT;
|
||||
else if (keycode == Q)
|
||||
fdf->mov_x -= MOVE;
|
||||
else if (keycode == D)
|
||||
|
||||
Reference in New Issue
Block a user