#include "data_structure.h"
#include <stddef.h>
Go to the source code of this file.
|
| int | maze_dir_x (int dir) |
| | Maze direction on x axis.
|
| |
| int | maze_dir_y (int dir) |
| | Maze direction on y axis.
|
| |
| int | maze_dir_opp (int dir) |
| | Maze inverted direction on x and y axis.
|
| |
| t_posvec * | posvecnew (size_t size) |
| | Create a vector with an initial starting size.
|
| |
| int | posvecpush (t_posvec *vec, t_pos2 data) |
| | Add a new element to the vector.
|
| |
| int | posvecpop (t_posvec *vec, t_pos2 *pos) |
| | Pops the last element of the vector if not empty.
|
| |
| int | posvecremove (t_posvec *vec, size_t index, t_pos2 *result) |
| | Removes the element at the specified index from the vector if found.
|
| |
| void | posvecfree (t_posvec *vec) |
| | Free the vector.
|
| |
| void | ft_srand (unsigned int seed) |
| | Sets the initial random state from the given seed.
|
| |
| unsigned int | ft_rand (void) |
| | Generate a random unsigned int.
|
| |
| void | array_shuffle (int *arr, int len) |
| | Shuffle an array.
|
| |
| int | cub_parse_generation_arg (char *gen, size_t *width, size_t *height) |
| | Parse the argument for generation.
|
| |
| t_map_raoul * | cub_new_map_from_dimensions (char *dimensions) |
| | Allocates a new map with the given dimension.
|
| |
| int | cub_growing_tree (t_map_raoul *map) |
| | Cub3D Maze Generator, uses dimensions from gen, store them in map and create a random perfect maze.
|
| |
| int | cub_spawn_objects (t_map_raoul *map, int key) |
| | Spawns a key and a door in the maze.
|
| |
◆ FT_RAND_MAX
| #define FT_RAND_MAX 32768 |
Maximum random value possible.
◆ MAZE_E
◆ MAZE_MAX_SIZE
| #define MAZE_MAX_SIZE 1000 |
◆ MAZE_MIN_SIZE
◆ MAZE_N
◆ MAZE_S
◆ MAZE_W
◆ t_posvec
◆ maze_dir_opp()
| int maze_dir_opp |
( |
int | dir | ) |
|
Maze inverted direction on x and y axis.
- Parameters
-
- Returns
- int value considering maze MACROS
◆ maze_dir_x()
| int maze_dir_x |
( |
int | dir | ) |
|
Maze direction on x axis.
- Parameters
-
- Returns
- int value considering maze MACROS
◆ maze_dir_y()
| int maze_dir_y |
( |
int | dir | ) |
|
Maze direction on y axis.
- Parameters
-
- Returns
- int value considering maze MACROS