Trace Engine
A Raycaster Engine in C
Loading...
Searching...
No Matches
map.h
Go to the documentation of this file.
1#ifndef _H_MAP
2#define _H_MAP
3
5
7#define MAP_CELL_SIZE 64
8
14typedef struct {
15 int x;
16 int y;
18
29
36
42
47
51void change_to_map(const int level_idx);
52
56void update_map_wall_at(const trc_grid_position_t position, const structures_t new_wall);
57
62
67
72
78int get_map_offset_from_id(const int level_idx);
79
87
95
99void draw_map_2D(void);
100
101
102#define FIRST_LEVEL 1
103#define LEVEL_COUNT 2
105#endif
void change_to_map(const int level_idx)
Definition map.c:51
structures_t get_map_wall_at(const trc_grid_position_t position)
Definition map.c:76
trc_world_position_t to_world_pos(const trc_grid_position_t grid_pos)
Definition map.c:25
void update_map_wall_at(const trc_grid_position_t position, const structures_t new_wall)
Definition map.c:71
trc_world_position_t get_map_size_from_id(const int level_idx)
Definition map.c:123
trc_grid_position_t to_grid_pos(const trc_world_position_t world_pos)
Definition map.c:34
trc_world_position_t get_camera_spwan_from_id(const int level_idx)
Definition map.c:128
structures_t get_map_ceiling_at(const trc_grid_position_t position)
Definition map.c:100
int get_map_offset_from_id(const int level_idx)
Definition map.c:112
void draw_map_2D(void)
Definition map.c:133
trc_world_position_t map_pos_to_real_pos(const trc_world_position_t map_pos)
Definition map.c:43
structures_t get_map_floor_at(const trc_grid_position_t position)
Definition map.c:88
structures_t
Definition map.h:22
@ STONE
Definition map.h:25
@ AIR
Definition map.h:24
@ UNDEFINED
Definition map.h:23
@ WOOD
Definition map.h:26
@ DOOR
Definition map.h:27
Definition map.h:14
int y
Definition map.h:16
int x
Definition map.h:15
Definition trc_world_position.h:7