remove deprecated luminance texture generation
[voxelands-alt.git] / inc / map.h
blob57d101880387f22ffc84e65bf3230079a7d8ee68
1 #ifndef _MAP_H_
2 #define _MAP_H_
4 #include "common.h"
5 #include "array.h"
7 #define CHUNKSIZE 16
9 #define CHUNK_TIMESTAMP_UNDEFINED 0xFFFFFFFF
11 #define CHUNK_STATE_CLEAN 0x00 /* unmodified */
12 #define CHUNK_STATE_WRITE_AT_UNLOAD 0x01 /* modified, save when unloaded */
13 #define CHUNK_STATE_WRITE_NEEDED 0x02 /* modified, save ASAP */
14 #define CHUNK_STATE_UNDERGROUND 0x04 /* old is_underground = true */
15 #define CHUNK_STATE_BADLIGHT 0x08 /* old light_expired = true */
16 #define CHUNK_STATE_BADMESH 0x10 /* old mesh_expired = true */
18 #ifndef _HAVE_BLOCK_TYPE
19 #define _HAVE_BLOCK_TYPE
20 typedef struct block_s {
21 content_t content;
22 uint8_t param1;
23 uint8_t param2;
24 uint32_t envticks;
25 } block_t;
26 #endif
28 #ifndef _HAVE_CHUNK_TYPE
29 #define _HAVE_CHUNK_TYPE
30 typedef struct chunk_s {
31 pos_t pos;
32 block_t blocks[4096]; /* 16*16*16 */
33 uint32_t timestamp;
34 float idletime;
35 uint8_t state;
37 struct {
38 array_t data;
39 pos_t spawn;
40 uint32_t last;
41 } mobs;
43 struct {
44 void *obj;
45 mutex_t *mut;
46 array_t sounds;
47 } mesh;
49 array_t metadata;
50 } chunk_t;
51 #endif