Use putc for minimap
parent
f74580b3cb
commit
6a15cfaa82
|
@ -1,7 +1,7 @@
|
||||||
#include "options.h"
|
#include "options.h"
|
||||||
#include "world.h"
|
#include "world.h"
|
||||||
#include "blocks.h"
|
#include "blocks.h"
|
||||||
#include "zpl.h"
|
#include <stdio.h>
|
||||||
|
|
||||||
void generate_minimap(int32_t seed, int32_t world_size) {
|
void generate_minimap(int32_t seed, int32_t world_size) {
|
||||||
world_init(seed, world_size, world_size);
|
world_init(seed, world_size, world_size);
|
||||||
|
@ -9,10 +9,10 @@ void generate_minimap(int32_t seed, int32_t world_size) {
|
||||||
uint32_t len = world_buf(&world, NULL);
|
uint32_t len = world_buf(&world, NULL);
|
||||||
for (int i=0; i<len; i++) {
|
for (int i=0; i<len; i++) {
|
||||||
if (i > 0 && i % world_size == 0) {
|
if (i > 0 && i % world_size == 0) {
|
||||||
zpl_printf("\n");
|
putc('\n', stdout);
|
||||||
}
|
}
|
||||||
zpl_printf("%c", blocks_get_symbol(world[i]));
|
putc(blocks_get_symbol(world[i]), stdout);
|
||||||
}
|
}
|
||||||
zpl_printf("\n");
|
putc('\n', stdout);
|
||||||
world_destroy();
|
world_destroy();
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue