Implements procedural map generation. More...
#include <maps.h>#include <random.h>#include <enemy_types.h>#include <interactable.h>#include <game.h>Functions | |
| void | Map_Generate () |
| Generates a complete game map. | |
| void | Map_SetStartChunk (int x, int y) |
| Sets the starting chunk of the map. | |
| void | Map_SetEndChunk (int x, int y) |
| Sets the ending chunk of the map. | |
| void | Map_CreateMainPath () |
| Creates the main path through the map. | |
| RoomHallways | Map_GetChunkHallways (EnvironmentChunk chunk, EnvironmentMap map) |
| Determines which hallways a chunk should have. | |
Implements procedural map generation.
Handles the creation of procedurally generated maps, including room placement, hallway connections, and special room distribution.
| void Map_CreateMainPath | ( | ) |
Creates the main path through the map.
Create the main path through the map.
Generates a random path from the start to end chunk
| void Map_Generate | ( | ) |
Generates a complete game map.
Generate a new map.
Creates a procedurally generated map with rooms, hallways and paths.
| RoomHallways Map_GetChunkHallways | ( | EnvironmentChunk | chunk, |
| EnvironmentMap | map | ||
| ) |
Determines which hallways a chunk should have.
Get the hallways configuration for a specific chunk.
| chunk | The chunk to analyze |
| map | The complete map |
| void Map_SetEndChunk | ( | int | x, |
| int | y | ||
| ) |
Sets the ending chunk of the map.
Set the ending chunk of the map.
| x | X-coordinate of the end chunk |
| y | Y-coordinate of the end chunk |
| void Map_SetStartChunk | ( | int | x, |
| int | y | ||
| ) |
Sets the starting chunk of the map.
Set the starting chunk of the map.
| x | X-coordinate of the start chunk |
| y | Y-coordinate of the start chunk |