Operation Null Mind 0.4.1
A 2D roguelike top down shooter game made with SDL2
 
Loading...
Searching...
No Matches
maps.h
Go to the documentation of this file.
1
9#pragma once
10
11#include <SDL.h>
12#include <chunks.h>
13
14// Maps are 5 chunks wide and 5 chunks tall
15#define MAP_SIZE_CHUNK 8 //im changing this mango
16#define MAP_SIZE_TILE (MAP_SIZE_CHUNK * CHUNK_SIZE_TILE)
17#define MAP_LENGTH 7
18
35
40
44void Map_Start();
45
49void Map_Render();
50
54void Map_Generate();
55
62void Map_SetStartChunk(int x, int y);
63
70void Map_SetEndChunk(int x, int y);
71
76
Implements environment chunks that form game maps and rooms.
RoomHallways
Possible hallways directions in a room.
Definition chunks.h:72
RoomHallways Map_GetChunkHallways(EnvironmentChunk chunk, EnvironmentMap map)
Get the hallways configuration for a specific chunk.
Definition map_create.c:318
void Map_CreateMainPath()
Create the main path through the map.
Definition map_create.c:183
void Map_Start()
Initialize the map system.
Definition map_start.c:15
void Map_Generate()
Generate a new map.
Definition map_create.c:25
void Map_SetEndChunk(int x, int y)
Set the ending chunk of the map.
Definition map_create.c:170
void Map_Render()
Render the current map.
Definition map_render.c:18
void Map_SetStartChunk(int x, int y)
Set the starting chunk of the map.
Definition map_create.c:156
EnvironmentMap testMap
Global test map instance.
Definition map_data.c:14
#define MAP_SIZE_CHUNK
Definition maps.h:15
Represents a chunk of the environment.
Definition chunks.h:105
Represents a game environment map composed of chunks.
Definition maps.h:26
int mainPathLength
The number of positions in the main path.
Definition maps.h:33
EnvironmentChunk * startChunk
Pointer to the starting chunk of the map.
Definition maps.h:28
int alternatePathLength
The number of positions in the main path.
Definition maps.h:32
EnvironmentChunk * endChunk
Pointer to the ending chunk of the map.
Definition maps.h:29
A 2D vector structure.
Definition vec2.h:81