eco2d/code/apps/server/source/options.c

21 lines
479 B
C
Raw Normal View History

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 13:47:14 +00:00
#include "zpl.h"
#define TEST_MAP_DIM 32
void generate_minimap(int32_t seed) {
2021-01-11 16:20:12 +00:00
world_init(seed, TEST_MAP_DIM, TEST_MAP_DIM);
uint8_t *world;
uint32_t len = world_buf(&world, NULL);
for (int i=0; i<len; i++) {
if (i > 0 && i % TEST_MAP_DIM == 0) {
zpl_printf("\n");
2021-01-11 13:47:14 +00:00
}
2021-01-11 16:20:12 +00:00
zpl_printf("%c", blocks_get_symbol(world[i]));
2021-01-11 13:47:14 +00:00
}
2021-01-11 19:30:10 +00:00
zpl_printf("\n");
2021-01-11 16:20:12 +00:00
world_destroy();
2021-01-11 13:47:14 +00:00
}