true 16-bit color... glorious
This commit is contained in:
parent
3dccce8a81
commit
b010f3e471
30 changed files with 679 additions and 652 deletions
89
src/pxl8_embed.h
Normal file
89
src/pxl8_embed.h
Normal file
|
|
@ -0,0 +1,89 @@
|
|||
#ifndef PXL8_EMBED_H
|
||||
#define PXL8_EMBED_H
|
||||
|
||||
#include "pxl8_types.h"
|
||||
#include <string.h>
|
||||
|
||||
static const char embed_fennel[] = {
|
||||
#embed "lib/fennel/fennel.lua"
|
||||
, 0 };
|
||||
|
||||
static const char embed_pxl8[] = {
|
||||
#embed "src/lua/pxl8.lua"
|
||||
, 0 };
|
||||
|
||||
static const char embed_pxl8_core[] = {
|
||||
#embed "src/lua/pxl8/core.lua"
|
||||
, 0 };
|
||||
|
||||
static const char embed_pxl8_gfx2d[] = {
|
||||
#embed "src/lua/pxl8/gfx2d.lua"
|
||||
, 0 };
|
||||
|
||||
static const char embed_pxl8_gfx3d[] = {
|
||||
#embed "src/lua/pxl8/gfx3d.lua"
|
||||
, 0 };
|
||||
|
||||
static const char embed_pxl8_input[] = {
|
||||
#embed "src/lua/pxl8/input.lua"
|
||||
, 0 };
|
||||
|
||||
static const char embed_pxl8_math[] = {
|
||||
#embed "src/lua/pxl8/math.lua"
|
||||
, 0 };
|
||||
|
||||
static const char embed_pxl8_vfx[] = {
|
||||
#embed "src/lua/pxl8/vfx.lua"
|
||||
, 0 };
|
||||
|
||||
static const char embed_pxl8_particles[] = {
|
||||
#embed "src/lua/pxl8/particles.lua"
|
||||
, 0 };
|
||||
|
||||
static const char embed_pxl8_tilemap[] = {
|
||||
#embed "src/lua/pxl8/tilemap.lua"
|
||||
, 0 };
|
||||
|
||||
static const char embed_pxl8_gui[] = {
|
||||
#embed "src/lua/pxl8/gui.lua"
|
||||
, 0 };
|
||||
|
||||
static const char embed_pxl8_world[] = {
|
||||
#embed "src/lua/pxl8/world.lua"
|
||||
, 0 };
|
||||
|
||||
static const char embed_pxl8_transition[] = {
|
||||
#embed "src/lua/pxl8/transition.lua"
|
||||
, 0 };
|
||||
|
||||
static const char embed_pxl8_anim[] = {
|
||||
#embed "src/lua/pxl8/anim.lua"
|
||||
, 0 };
|
||||
|
||||
typedef struct { const char* name; const char* data; u32 size; } pxl8_embed;
|
||||
|
||||
static const pxl8_embed pxl8_embeds[] = {
|
||||
{"fennel", embed_fennel, sizeof(embed_fennel) - 1},
|
||||
{"pxl8", embed_pxl8, sizeof(embed_pxl8) - 1},
|
||||
{"pxl8.core", embed_pxl8_core, sizeof(embed_pxl8_core) - 1},
|
||||
{"pxl8.gfx2d", embed_pxl8_gfx2d, sizeof(embed_pxl8_gfx2d) - 1},
|
||||
{"pxl8.gfx3d", embed_pxl8_gfx3d, sizeof(embed_pxl8_gfx3d) - 1},
|
||||
{"pxl8.input", embed_pxl8_input, sizeof(embed_pxl8_input) - 1},
|
||||
{"pxl8.math", embed_pxl8_math, sizeof(embed_pxl8_math) - 1},
|
||||
{"pxl8.vfx", embed_pxl8_vfx, sizeof(embed_pxl8_vfx) - 1},
|
||||
{"pxl8.particles", embed_pxl8_particles, sizeof(embed_pxl8_particles) - 1},
|
||||
{"pxl8.tilemap", embed_pxl8_tilemap, sizeof(embed_pxl8_tilemap) - 1},
|
||||
{"pxl8.gui", embed_pxl8_gui, sizeof(embed_pxl8_gui) - 1},
|
||||
{"pxl8.world", embed_pxl8_world, sizeof(embed_pxl8_world) - 1},
|
||||
{"pxl8.transition", embed_pxl8_transition, sizeof(embed_pxl8_transition) - 1},
|
||||
{"pxl8.anim", embed_pxl8_anim, sizeof(embed_pxl8_anim) - 1},
|
||||
{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;
|
||||
}
|
||||
|
||||
#endif
|
||||
Loading…
Add table
Add a link
Reference in a new issue