better lighting

This commit is contained in:
asrael 2026-01-31 09:31:17 -06:00
parent 805a2713a3
commit 6ed4e17065
75 changed files with 6417 additions and 3667 deletions

View file

@ -9,9 +9,16 @@ extern "C" {
#define PXL8_NET_INPUT_HISTORY_SIZE 64
#define PXL8_NET_USERDATA_SIZE 56
#define PXL8_NET_PACKET_MAX_SIZE 2048
typedef struct pxl8_net pxl8_net;
typedef struct pxl8_chunk_cache pxl8_chunk_cache;
typedef struct pxl8_world pxl8_world;
typedef struct pxl8_world_chunk_cache pxl8_world_chunk_cache;
typedef struct pxl8_packet {
u8 data[PXL8_NET_PACKET_MAX_SIZE];
usize len;
} pxl8_packet;
typedef struct pxl8_net_config {
const char* address;
@ -43,12 +50,27 @@ 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);
void pxl8_net_set_chunk_cache(pxl8_net* net, pxl8_world_chunk_cache* cache);
pxl8_world_chunk_cache* pxl8_net_chunk_cache(pxl8_net* net);
void pxl8_net_set_world(pxl8_net* net, pxl8_world* world);
u32 pxl8_net_chunk_id(const pxl8_net* net);
u8 pxl8_net_chunk_type(const pxl8_net* net);
pxl8_result pxl8_net_send_chunk_settings(pxl8_net* net, i32 render_distance, i32 sim_distance);
pxl8_result pxl8_net_spawn(pxl8_net* net, f32 x, f32 y, f32 z, f32 yaw, f32 pitch);
pxl8_result pxl8_net_exit_chunk(pxl8_net* net, f32 x, f32 y, f32 z);
pxl8_result pxl8_net_enter_chunk(pxl8_net* net, u32 chunk_id);
#ifdef PXL8_ASYNC_THREADS
void pxl8_net_start_thread(pxl8_net* net);
void pxl8_net_stop_thread(pxl8_net* net);
pxl8_packet* pxl8_net_pop_packet(pxl8_net* net);
void pxl8_net_packet_free(pxl8_packet* pkt);
bool pxl8_net_process_packet(pxl8_net* net, const pxl8_packet* pkt);
#endif
#ifdef __cplusplus
}
#endif