2021-01-11 13:47:14 +00:00
|
|
|
#include "options.h"
|
2021-01-11 16:20:12 +00:00
|
|
|
#include "world.h"
|
|
|
|
#include "blocks.h"
|
2021-01-11 21:23:43 +00:00
|
|
|
#include <stdio.h>
|
2021-01-11 13:47:14 +00:00
|
|
|
|
2021-01-11 20:25:09 +00:00
|
|
|
void generate_minimap(int32_t seed, int32_t world_size) {
|
|
|
|
world_init(seed, world_size, world_size);
|
|
|
|
uint8_t const *world;
|
2021-01-11 16:20:12 +00:00
|
|
|
uint32_t len = world_buf(&world, NULL);
|
|
|
|
for (int i=0; i<len; i++) {
|
2021-01-11 20:25:09 +00:00
|
|
|
if (i > 0 && i % world_size == 0) {
|
2021-01-11 21:23:43 +00:00
|
|
|
putc('\n', stdout);
|
2021-01-11 13:47:14 +00:00
|
|
|
}
|
2021-01-11 21:23:43 +00:00
|
|
|
putc(blocks_get_symbol(world[i]), stdout);
|
2021-01-11 13:47:14 +00:00
|
|
|
}
|
2021-01-11 21:23:43 +00:00
|
|
|
putc('\n', stdout);
|
2021-01-11 16:20:12 +00:00
|
|
|
world_destroy();
|
2021-01-11 13:47:14 +00:00
|
|
|
}
|