Utility functions for environment chunks. More...
Functions | |
| bool | Chunk_IsValid (Vec2 chunkIndex) |
| [Utility] Checks if a chunk index is valid within the map bounds | |
| EnvironmentChunk * | Chunk_GetCurrentChunk (Vec2 position) |
| [Utility] Gets the chunk at a specific world position | |
| Vec2 | Chunk_GetChunkCenter (EnvironmentChunk *chunk) |
| Gets the center of the chunk. | |
| Vec2 | Chunk_GetRandomTileInRoom (EnvironmentChunk *chunk) |
| [Utility] Gets a random tile position within a room's boundaries | |
| Vec2 | Chunk_GetRandomTileCenterInRoom (EnvironmentChunk *chunk) |
| [Utility] Gets a random position at the center of a tile within a room | |
| Vec2 | Chunk_GetRoomTopLeft (EnvironmentChunk *chunk) |
| [Utility] Gets the top-left corner of the current room in the current chunk | |
| Vec2 | Chunk_GetRoomBottomRight (EnvironmentChunk *chunk) |
| [Utility] Gets the bottom-right corner of the current room in the current chunk | |
| bool | Chunk_IsOnMainPath (EnvironmentChunk *chunk) |
Utility functions for environment chunks.
Provides helper functions for chunk manipulation, validation, and coordinate conversions between world space and chunks.
| Vec2 Chunk_GetChunkCenter | ( | EnvironmentChunk * | chunk | ) |
| EnvironmentChunk * Chunk_GetCurrentChunk | ( | Vec2 | position | ) |
[Utility] Gets the chunk at a specific world position
Gets the current chunk based on position.
| position | World position to check |
| Vec2 Chunk_GetRandomTileCenterInRoom | ( | EnvironmentChunk * | chunk | ) |
[Utility] Gets a random position at the center of a tile within a room
Gets a random tile center in the room.
| chunk | Pointer to the chunk containing the room |
| Vec2 Chunk_GetRandomTileInRoom | ( | EnvironmentChunk * | chunk | ) |
[Utility] Gets a random tile position within a room's boundaries
Gets a random tile in the room.
| chunk | Pointer to the chunk containing the room |
| Vec2 Chunk_GetRoomBottomRight | ( | EnvironmentChunk * | chunk | ) |
[Utility] Gets the bottom-right corner of the current room in the current chunk
Gets the bottom-right corner of the current room in the current chunk.
| chunk | Pointer to the chunk containing the room |
| Vec2 Chunk_GetRoomTopLeft | ( | EnvironmentChunk * | chunk | ) |
[Utility] Gets the top-left corner of the current room in the current chunk
Gets the top-left corner of the current room in the current chunk.
| chunk | Pointer to the chunk containing the room |
| bool Chunk_IsOnMainPath | ( | EnvironmentChunk * | chunk | ) |
| bool Chunk_IsValid | ( | Vec2 | chunkIndex | ) |
[Utility] Checks if a chunk index is valid within the map bounds
Checks if a chunk index is valid.
| chunkIndex | Index of the chunk to check |