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
|
// steps size for the height transform with p and o
|
||||||
// must be > 0
|
// must be > 0
|
||||||
// 100 is small, 1 is the biggest
|
// 100 is small, 1 is the biggest
|
||||||
# define Z_HEIGHT 100
|
# define Z_HEIGHT 10
|
||||||
// then define the speed for height transform
|
// then define the speed for height transform
|
||||||
// must be > 0
|
// must be > 0
|
||||||
// 1 is small, 100 is the big
|
// 1 is small, 100 is big
|
||||||
# define Z_HEIGHT_UP 10
|
# define Z_HEIGHT_UP 20
|
||||||
# define Z_HEIGHT_DOWN 10
|
# define Z_HEIGHT_DOWN 20
|
||||||
|
|
||||||
/*
|
/*
|
||||||
- 50 : pink - blue
|
- 50 : pink - blue
|
||||||
@@ -94,10 +94,10 @@ int **parse_map(t_fdf *fdf, int fd);
|
|||||||
- test : white - pink
|
- test : white - pink
|
||||||
*/
|
*/
|
||||||
// color for altitude
|
// color for altitude
|
||||||
# define COLOR_START 0xf263a6 // pink
|
|
||||||
/*
|
|
||||||
# define COLOR_START 0xa263f6 // purple
|
|
||||||
# define COLOR_START 0xffffff // white
|
# define COLOR_START 0xffffff // white
|
||||||
|
/*
|
||||||
|
# define COLOR_START 0xf263a6 // pink
|
||||||
|
# define COLOR_START 0xa263f6 // purple
|
||||||
# define COLOR_START 0x1423e6 // blue
|
# define COLOR_START 0x1423e6 // blue
|
||||||
# define COLOR_START 0x877264 // brown
|
# define COLOR_START 0x877264 // brown
|
||||||
# define COLOR_START 0x00d700 // green
|
# define COLOR_START 0x00d700 // green
|
||||||
@@ -111,17 +111,23 @@ int **parse_map(t_fdf *fdf, int fd);
|
|||||||
*/
|
*/
|
||||||
# define COLOR_END 0xa263f6 // purple
|
# 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
|
// pixels deplacement for each keypress
|
||||||
# define MOVE 10
|
# define MOVE 10
|
||||||
|
|
||||||
// minimum time in milliseconds between two keypress
|
// minimum time in milliseconds between two keypress
|
||||||
# define DEBOUNCE_TIME 50
|
# define DEBOUNCE_TIME 50
|
||||||
|
|
||||||
# define ESCAPE 65307
|
# define ESCAPE 65307
|
||||||
# define UP 65362
|
# define UP 65362
|
||||||
# define DOWN 65364
|
# define DOWN 65364
|
||||||
# define LEFT 65361
|
# define LEFT 65361
|
||||||
# define RIGHT 65363
|
# define RIGHT 65363
|
||||||
# define A 97
|
# define A 97
|
||||||
# define B 98
|
# define B 98
|
||||||
# define C 99
|
# define C 99
|
||||||
|
|||||||
@@ -55,8 +55,8 @@ void init_fdf(t_fdf *fdf)
|
|||||||
{
|
{
|
||||||
struct timeval current_time;
|
struct timeval current_time;
|
||||||
|
|
||||||
fdf->win_size_x = 700;
|
fdf->win_size_x = 902;
|
||||||
fdf->win_size_y = 700;
|
fdf->win_size_y = 913;
|
||||||
fdf->img_size_x = fdf->win_size_x;
|
fdf->img_size_x = fdf->win_size_x;
|
||||||
fdf->img_size_y = fdf->win_size_y;
|
fdf->img_size_y = fdf->win_size_y;
|
||||||
init_offset(fdf);
|
init_offset(fdf);
|
||||||
|
|||||||
@@ -11,9 +11,9 @@
|
|||||||
void keypress_more(int keycode, t_fdf *fdf)
|
void keypress_more(int keycode, t_fdf *fdf)
|
||||||
{
|
{
|
||||||
if (keycode == A)
|
if (keycode == A)
|
||||||
fdf->zoom += 1;
|
fdf->zoom += ZOOM;
|
||||||
else if (keycode == W)
|
else if (keycode == W)
|
||||||
fdf->zoom -= 1;
|
fdf->zoom -= ZOOM;
|
||||||
else if (keycode == U)
|
else if (keycode == U)
|
||||||
{
|
{
|
||||||
fdf->rot_x = 0;
|
fdf->rot_x = 0;
|
||||||
@@ -66,13 +66,13 @@ int keypress(int keycode, t_fdf *fdf)
|
|||||||
if (keycode == ESCAPE)
|
if (keycode == ESCAPE)
|
||||||
shut_down(fdf);
|
shut_down(fdf);
|
||||||
else if (keycode == LEFT)
|
else if (keycode == LEFT)
|
||||||
fdf->rot_x += 1;
|
fdf->rot_x += ROT;
|
||||||
else if (keycode == RIGHT)
|
else if (keycode == RIGHT)
|
||||||
fdf->rot_x -= 1;
|
fdf->rot_x -= ROT;
|
||||||
else if (keycode == UP)
|
else if (keycode == UP)
|
||||||
fdf->rot_y += 1;
|
fdf->rot_y += ROT;
|
||||||
else if (keycode == DOWN)
|
else if (keycode == DOWN)
|
||||||
fdf->rot_y -= 1;
|
fdf->rot_y -= ROT;
|
||||||
else if (keycode == Q)
|
else if (keycode == Q)
|
||||||
fdf->mov_x -= MOVE;
|
fdf->mov_x -= MOVE;
|
||||||
else if (keycode == D)
|
else if (keycode == D)
|
||||||
|
|||||||
Reference in New Issue
Block a user