2021-01-11 13:47:14 +00:00
|
|
|
#pragma once
|
|
|
|
#include "system.h"
|
2021-01-17 14:23:23 +00:00
|
|
|
#include "librg.h"
|
|
|
|
#include "flecs/flecs.h"
|
2021-01-11 13:47:14 +00:00
|
|
|
|
|
|
|
#define WORLD_ERROR_NONE +0x0000
|
|
|
|
#define WORLD_ERROR_OUTOFMEM -0x0001
|
|
|
|
#define WORLD_ERROR_INVALID_BLOCKS -0x0002
|
|
|
|
#define WORLD_ERROR_INVALID_DIMENSIONS -0x0003
|
|
|
|
#define WORLD_ERROR_INVALID_BUFFER -0x0004
|
2021-01-17 14:23:23 +00:00
|
|
|
#define WORLD_ERROR_TRACKER_FAILED -0x0005
|
2021-01-11 13:47:14 +00:00
|
|
|
|
2021-01-17 14:23:23 +00:00
|
|
|
int32_t world_init(int32_t seed, uint16_t block_size, uint16_t chunk_size, uint16_t world_size);
|
2021-01-11 14:42:36 +00:00
|
|
|
int32_t world_destroy(void);
|
2021-01-17 14:23:23 +00:00
|
|
|
int32_t world_update(void);
|
2021-01-11 14:42:36 +00:00
|
|
|
|
2021-01-11 14:48:17 +00:00
|
|
|
uint32_t world_buf(uint8_t const **ptr, uint32_t *width);
|
2021-01-17 14:23:23 +00:00
|
|
|
ecs_world_t * world_ecs(void);
|
|
|
|
librg_world * world_tracker(void);
|
2021-05-03 22:44:39 +00:00
|
|
|
|
|
|
|
uint16_t world_chunk_size(void);
|
|
|
|
uint16_t world_chunk_amount(void);
|