![]() |
tgrekov-fdf
HIVE fdf May 2024
|
Definition in file project_map.c.
Go to the source code of this file.
Functions | |
| 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. | |
| static void | calc_size (t_map map, int *size) |
| Get boundaries of projected map. | |
| int | project_map (t_map map, int *size) |
| Project map and attempt to automatically scale to viewport. | |
|
static |
Apply offset to projected coordinates.
| map | |
| x_offset | Offset required for left-most x to be zero |
| y_offset | Offset required for top-most y to be zero |
Definition at line 31 of file project_map.c.
References s_map::height, s_map::point, s_point::projected, and s_map::width.
|
static |
Get boundaries of projected map.
| map | |
| size |
Definition at line 91 of file project_map.c.
References s_map::height, s_map::point, s_point::projected, and s_map::width.
|
static |
Generate coordinates from map input and scale via isometric projection.
| map | |
| scale |
Definition at line 56 of file project_map.c.
References apply_offset(), s_point::height, s_map::height, s_map::point, s_point::projected, and s_map::width.
| int project_map | ( | t_map | map, |
| int * | size | ||
| ) |
Project map and attempt to automatically scale to viewport.
| map | |
| size |
| int | 0 if scaling was successful, 1 if map was too large |
Definition at line 121 of file project_map.c.
References calc_size(), s_map::height, project(), and s_map::width.