add networking, 3d improvements, reorganize src structure

This commit is contained in:
asrael 2026-01-17 22:52:36 -06:00
parent 39b604b333
commit 415d424057
122 changed files with 5358 additions and 721 deletions

View file

@ -1,88 +0,0 @@
#pragma once
#include "pxl8_types.h"
#include <string.h>
static const char embed_fennel[] = {
#embed "lib/fennel/fennel.lua"
, 0 };
static const char embed_pxl8[] = {
#embed "client/src/lua/pxl8.lua"
, 0 };
static const char embed_pxl8_anim[] = {
#embed "client/src/lua/pxl8/anim.lua"
, 0 };
static const char embed_pxl8_core[] = {
#embed "client/src/lua/pxl8/core.lua"
, 0 };
static const char embed_pxl8_gfx2d[] = {
#embed "client/src/lua/pxl8/gfx2d.lua"
, 0 };
static const char embed_pxl8_gfx3d[] = {
#embed "client/src/lua/pxl8/gfx3d.lua"
, 0 };
static const char embed_pxl8_gui[] = {
#embed "client/src/lua/pxl8/gui.lua"
, 0 };
static const char embed_pxl8_input[] = {
#embed "client/src/lua/pxl8/input.lua"
, 0 };
static const char embed_pxl8_math[] = {
#embed "client/src/lua/pxl8/math.lua"
, 0 };
static const char embed_pxl8_particles[] = {
#embed "client/src/lua/pxl8/particles.lua"
, 0 };
static const char embed_pxl8_sfx[] = {
#embed "client/src/lua/pxl8/sfx.lua"
, 0 };
static const char embed_pxl8_tilemap[] = {
#embed "client/src/lua/pxl8/tilemap.lua"
, 0 };
static const char embed_pxl8_transition[] = {
#embed "client/src/lua/pxl8/transition.lua"
, 0 };
static const char embed_pxl8_world[] = {
#embed "client/src/lua/pxl8/world.lua"
, 0 };
#define PXL8_EMBED_ENTRY(var, name) {name, var, sizeof(var) - 1}
typedef struct { const char* name; const char* data; u32 size; } pxl8_embed;
static const pxl8_embed pxl8_embeds[] = {
PXL8_EMBED_ENTRY(embed_fennel, "fennel"),
PXL8_EMBED_ENTRY(embed_pxl8, "pxl8"),
PXL8_EMBED_ENTRY(embed_pxl8_anim, "pxl8.anim"),
PXL8_EMBED_ENTRY(embed_pxl8_core, "pxl8.core"),
PXL8_EMBED_ENTRY(embed_pxl8_gfx2d, "pxl8.gfx2d"),
PXL8_EMBED_ENTRY(embed_pxl8_gfx3d, "pxl8.gfx3d"),
PXL8_EMBED_ENTRY(embed_pxl8_gui, "pxl8.gui"),
PXL8_EMBED_ENTRY(embed_pxl8_input, "pxl8.input"),
PXL8_EMBED_ENTRY(embed_pxl8_math, "pxl8.math"),
PXL8_EMBED_ENTRY(embed_pxl8_particles, "pxl8.particles"),
PXL8_EMBED_ENTRY(embed_pxl8_sfx, "pxl8.sfx"),
PXL8_EMBED_ENTRY(embed_pxl8_tilemap, "pxl8.tilemap"),
PXL8_EMBED_ENTRY(embed_pxl8_transition, "pxl8.transition"),
PXL8_EMBED_ENTRY(embed_pxl8_world, "pxl8.world"),
{0}
};
static inline const pxl8_embed* pxl8_embed_find(const char* name) {
for (const pxl8_embed* e = pxl8_embeds; e->name; e++)
if (strcmp(e->name, name) == 0) return e;
return NULL;
}