libft pas symlink
This commit is contained in:
50
srcs/fdf.c
50
srcs/fdf.c
@@ -54,51 +54,19 @@ int main(void)
|
||||
}
|
||||
|
||||
/*
|
||||
** w forward 119
|
||||
** a left 97
|
||||
** s backward 115
|
||||
** d right 100
|
||||
** < 65361
|
||||
** > 65363
|
||||
** v 65364
|
||||
** ^ 65362
|
||||
** esc 65307
|
||||
** x_event | x_mask | action
|
||||
** 2 | 1L << 0 | key press
|
||||
** 3 | 1L << 1 | key release
|
||||
** 4 | | mouse press
|
||||
** 5 | | mouse release
|
||||
** 6 | | mouse move
|
||||
** 12 | | expose event
|
||||
** 17 | 1L << 17 | x button press (red button)
|
||||
** | |
|
||||
**
|
||||
**
|
||||
**
|
||||
**
|
||||
**
|
||||
**
|
||||
**
|
||||
**
|
||||
**
|
||||
** // x_event | x_mask | action
|
||||
** // 2 | 1L << 0 | key press
|
||||
** // 3 | 1L << 1 | key release
|
||||
** // 4 | | mouse press
|
||||
** // 5 | | mouse release
|
||||
** // 6 | | mouse move
|
||||
** // 12 | | expose event
|
||||
** // 17 | 1L << 17 | x button press (red button)
|
||||
** // | |
|
||||
**
|
||||
**
|
||||
**
|
||||
** FONCTIONS EXTERNES AUTORISEES :
|
||||
** . open
|
||||
** . close
|
||||
** . read
|
||||
** . write
|
||||
** . malloc
|
||||
** . free
|
||||
** . perror
|
||||
** . strerror
|
||||
** . exit
|
||||
** . math lib :
|
||||
** -lm // needed at compilation to link the lib :
|
||||
** gcc foo.c -o foo -lm
|
||||
** man
|
||||
** man 3 math
|
||||
** . minilibx :
|
||||
** minilibx_opengl.tgz
|
||||
** minilibx_mms_20200219_beta.tgz
|
||||
|
||||
@@ -29,7 +29,22 @@ int keypress(int keycode, t_fdf *fdf)
|
||||
return (0);
|
||||
}
|
||||
|
||||
// return an int[3] : int[0] = x, int[1] = y, int[2] = z
|
||||
/*
|
||||
** int[0] = x, int[1] = y, int[2] = z
|
||||
** quick explanation :
|
||||
** zoom :
|
||||
** x = i * (fdf->offset + fdf->zoom);
|
||||
** center before 3d rotation :
|
||||
** x -= (fdf->map_size_x + fdf->zoom * fdf->map_width) / 2;
|
||||
** z changes according to zoom :
|
||||
** z += (z * fdf->zoom) / fdf->offset;
|
||||
** deplacement :
|
||||
** point[0] += fdf->margin + fdf->mov_x;
|
||||
** center zoom after :
|
||||
** point[0] -= ((fdf->map_size_x / 2) / fdf->offset) * fdf->zoom;
|
||||
** center after 3d rotation :
|
||||
** point[0] += (fdf->map_size_x + fdf->zoom * fdf->map_width) / 2;
|
||||
*/
|
||||
int *new_coordinates(t_fdf *fdf, int i, int j)
|
||||
{
|
||||
int x;
|
||||
|
||||
Reference in New Issue
Block a user