void make_chunk(Chunk *chunk, int p, int q) { chunk->p = p; chunk->q = q; chunk->faces = 0; Map *map = &chunk->map; map_alloc(map); make_world(map, p, q); db_update_chunk(map, p, q); update_chunk(chunk); client_chunk(p, q); }
void create_chunk(Chunk *chunk, int p, int q) { chunk->p = p; chunk->q = q; chunk->faces = 0; chunk->dirty = 1; chunk->position_buffer = 0; chunk->normal_buffer = 0; chunk->uv_buffer = 0; Map *map = &chunk->map; map_alloc(map); create_world(map, p, q); db_load_map(map, p, q); gen_chunk_buffers(chunk); client_chunk(p, q); }