-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathmap.h
42 lines (31 loc) · 741 Bytes
/
map.h
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
#ifndef MAP_H
#define MAP_H
#include "raylib_defs.h"
#include "minimal_state_info.h"
#include "math.h"
#include <stdint.h>
#include <stdbool.h>
typedef struct MapObject {
float pos_x;
float pos_y;
float size_x;
float size_y;
Texture2D* texture;
bool spawn_point;
bool collidable;
} MapObject;
typedef struct Map {
float size_x;
float size_y;
uint16_t num_objects;
uint8_t num_spawn_points;
uint16_t num_textures;
MapObject* objects;
Texture* textures;
MapObject** spawn_points;
} Map;
Map new_map(const char* file_name);
bool map_collision(AABB aabb, const Map* map);
bool map_collision_w_movement(AABB aabb, float distance, float angle, const Map* map);
MinimalMapInfo get_minimal_map_info(const Map* map);
#endif