diff options
| author | Aldrik Ramaekers <aldrik@amftech.nl> | 2023-05-02 19:26:41 +0200 |
|---|---|---|
| committer | Aldrik Ramaekers <aldrik@amftech.nl> | 2023-05-02 19:26:41 +0200 |
| commit | b4a0031bdb0c5317b2ee56198f02a291bdb0e224 (patch) | |
| tree | c669d9b398aa1d6d187e6f932f9a8c3cc194406f /include | |
| parent | 7dd42a4af58f795dfced9a22b31855f276beecfc (diff) | |
lighting work
Diffstat (limited to 'include')
| -rw-r--r-- | include/map.h | 8 | ||||
| -rw-r--r-- | include/objects.h | 6 |
2 files changed, 14 insertions, 0 deletions
diff --git a/include/map.h b/include/map.h index 738d1c2..e264600 100644 --- a/include/map.h +++ b/include/map.h @@ -49,11 +49,19 @@ typedef struct t_map_data { object objects[MAX_OBJECTS]; } map_data; +typedef struct t_light_data { + float tl; + float tr; + float bl; + float br; +} light_data; + typedef struct t_extracted_map_data { int width; int height; tile heightmap[MAP_SIZE_Y][MAP_SIZE_X]; object objects[MAX_OBJECTS]; + light_data lightmap[MAP_SIZE_Y][MAP_SIZE_X]; } extracted_map_data; map_data map_to_load = {0}; diff --git a/include/objects.h b/include/objects.h index 5842985..f79e115 100644 --- a/include/objects.h +++ b/include/objects.h @@ -11,6 +11,12 @@ typedef struct t_vec3f { float x,y,z; } vec3f; +typedef struct t_light_emitter { + vec3f position; + float brightness; + float range; +} light_emitter; + typedef enum t_object_type { OBJECT_COBBLESTONEWALL1 = 1, OBJECT_PLANTBOX1 = 2, |
