58 static double cs_30[2] = {0, 0};
64 cs_30[0] = cos(30 * M_PI / 180);
66 cs_30[1] = sin(30 * M_PI / 180);
103 while (x < map.
width)
126 mlx_get_monitor_size(0, &viewport[0], &viewport[1]);
127 viewport[0] *= FDF_TARGET_VIEWPORT_PERCENT;
128 viewport[1] *= FDF_TARGET_VIEWPORT_PERCENT;
130 if (viewport[0] < scale)
134 * atan(sin(30 * M_PI / 180)));
139 while (size[0] > viewport[0] || size[1] > viewport[1])
static void calc_size(t_map map, int *size)
Get boundaries of projected map.
static void apply_offset(t_map map, int x_offset, int y_offset)
Apply offset to projected coordinates.
static void project(t_map map, int scale)
Generate coordinates from map input and scale via isometric projection.
int project_map(t_map map, int *size)
Project map and attempt to automatically scale to viewport.
int width
Number of columns in the map.
int height
Number of rows in the map.
t_point ** point
2d array of points in [y][x] order
int projected[2]
Projected coordinates for this point.
int height
Height extracted from map file.