stream world data from pxl8d to pxl8

This commit is contained in:
asrael 2026-01-25 09:26:30 -06:00
parent 39ee0fefb7
commit a71a9840b2
55 changed files with 5290 additions and 2131 deletions

View file

@ -11,15 +11,10 @@ extern "C" {
#define PXL8_NET_USERDATA_SIZE 56
typedef struct pxl8_net pxl8_net;
typedef enum pxl8_net_mode {
PXL8_NET_LOCAL = 0,
PXL8_NET_REMOTE
} pxl8_net_mode;
typedef struct pxl8_chunk_cache pxl8_chunk_cache;
typedef struct pxl8_net_config {
const char* address;
pxl8_net_mode mode;
u16 port;
} pxl8_net_config;
@ -48,6 +43,11 @@ pxl8_result pxl8_net_send_input(pxl8_net* net, const pxl8_input_msg* input);
const pxl8_snapshot_header* pxl8_net_snapshot(const pxl8_net* net);
u64 pxl8_net_tick(const pxl8_net* net);
void pxl8_net_update(pxl8_net* net, f32 dt);
void pxl8_net_set_chunk_cache(pxl8_net* net, pxl8_chunk_cache* cache);
pxl8_chunk_cache* pxl8_net_chunk_cache(pxl8_net* net);
u32 pxl8_net_chunk_id(const pxl8_net* net);
u8 pxl8_net_chunk_type(const pxl8_net* net);
#ifdef __cplusplus
}