1 #ifndef INCLUDE_CAVE_PARSE_H
2 #define INCLUDE_CAVE_PARSE_H
9 unsigned char skylight
:4;
12 // this is the old fully-decoded chunk
15 int xpos
, zpos
, max_y
;
17 raw_block rb
[16][16][256]; // [z][x][y] which becomes [y][x][z] in stb
20 chunk
*get_decoded_chunk(int chunk_x
, int chunk_z
);
22 #define NUM_SEGMENTS 16
25 int max_y
, xpos
, zpos
;
27 unsigned char *blockdata
[NUM_SEGMENTS
];
28 unsigned char *data
[NUM_SEGMENTS
];
29 unsigned char *skylight
[NUM_SEGMENTS
];
30 unsigned char *light
[NUM_SEGMENTS
];
32 void *pointer_to_free
;
34 int refcount
; // this allows multi-threaded building without wrapping in ANOTHER struct
37 fast_chunk
*get_decoded_fastchunk(int chunk_x
, int chunk_z
); // cache, never call free()
39 fast_chunk
*get_decoded_fastchunk_uncached(int chunk_x
, int chunk_z
);