refactor: reorganize pxl8 into client/src/ module structure
- core/: main entry, types, logging, I/O, RNG - asset/: ase loader, cart, save, embed - gfx/: graphics, animation, atlas, fonts, tilemap, transitions - sfx/: audio - script/: lua/fennel runtime, REPL - hal/: platform abstraction (SDL3) - world/: BSP, world, procedural gen - math/: math utilities - game/: GUI, replay - lua/: Lua API modules
This commit is contained in:
parent
272e0bc615
commit
39b604b333
106 changed files with 6078 additions and 3715 deletions
68
pxl8.sh
68
pxl8.sh
|
|
@ -320,7 +320,7 @@ case "$COMMAND" in
|
|||
print_info "Compiler cache: ccache enabled"
|
||||
fi
|
||||
|
||||
INCLUDES="-Isrc -Ilib -Ilib/luajit/src -Ilib/linenoise -Ilib/miniz"
|
||||
INCLUDES="-Iclient/src/core -Iclient/src/math -Iclient/src/gfx -Iclient/src/sfx -Iclient/src/script -Iclient/src/hal -Iclient/src/world -Iclient/src/asset -Iclient/src/game -Ilib -Ilib/luajit/src -Ilib/linenoise -Ilib/miniz"
|
||||
COMPILE_FLAGS="$CFLAGS $INCLUDES"
|
||||
DEP_COMPILE_FLAGS="$DEP_CFLAGS $INCLUDES"
|
||||
|
||||
|
|
@ -329,32 +329,38 @@ case "$COMMAND" in
|
|||
LIB_SOURCE_FILES="lib/linenoise/linenoise.c lib/miniz/miniz.c"
|
||||
|
||||
PXL8_SOURCE_FILES="
|
||||
src/pxl8.c
|
||||
src/pxl8_anim.c
|
||||
src/pxl8_ase.c
|
||||
src/pxl8_atlas.c
|
||||
src/pxl8_blit.c
|
||||
src/pxl8_bsp.c
|
||||
src/pxl8_cart.c
|
||||
src/pxl8_font.c
|
||||
src/pxl8_gen.c
|
||||
src/pxl8_gfx.c
|
||||
src/pxl8_gui.c
|
||||
src/pxl8_io.c
|
||||
src/pxl8_log.c
|
||||
src/pxl8_math.c
|
||||
src/pxl8_repl.c
|
||||
src/pxl8_replay.c
|
||||
src/pxl8_rng.c
|
||||
src/pxl8_save.c
|
||||
src/pxl8_script.c
|
||||
src/pxl8_sdl3.c
|
||||
src/pxl8_sfx.c
|
||||
src/pxl8_tilemap.c
|
||||
src/pxl8_tilesheet.c
|
||||
src/pxl8_transition.c
|
||||
src/pxl8_vfx.c
|
||||
src/pxl8_world.c
|
||||
client/src/core/pxl8.c
|
||||
client/src/core/pxl8_io.c
|
||||
client/src/core/pxl8_log.c
|
||||
client/src/core/pxl8_rng.c
|
||||
client/src/math/pxl8_math.c
|
||||
client/src/gfx/pxl8_anim.c
|
||||
client/src/gfx/pxl8_atlas.c
|
||||
client/src/gfx/pxl8_blit.c
|
||||
client/src/gfx/pxl8_3d_camera.c
|
||||
client/src/gfx/pxl8_colormap.c
|
||||
client/src/gfx/pxl8_cpu.c
|
||||
client/src/gfx/pxl8_dither.c
|
||||
client/src/gfx/pxl8_font.c
|
||||
client/src/gfx/pxl8_gfx.c
|
||||
client/src/gfx/pxl8_mesh.c
|
||||
client/src/gfx/pxl8_palette.c
|
||||
client/src/gfx/pxl8_particles.c
|
||||
client/src/gfx/pxl8_tilemap.c
|
||||
client/src/gfx/pxl8_tilesheet.c
|
||||
client/src/gfx/pxl8_transition.c
|
||||
client/src/sfx/pxl8_sfx.c
|
||||
client/src/script/pxl8_repl.c
|
||||
client/src/script/pxl8_script.c
|
||||
client/src/hal/pxl8_sdl3.c
|
||||
client/src/world/pxl8_bsp.c
|
||||
client/src/world/pxl8_gen.c
|
||||
client/src/world/pxl8_world.c
|
||||
client/src/asset/pxl8_ase.c
|
||||
client/src/asset/pxl8_cart.c
|
||||
client/src/asset/pxl8_save.c
|
||||
client/src/game/pxl8_gui.c
|
||||
client/src/game/pxl8_replay.c
|
||||
"
|
||||
|
||||
LUAJIT_LIB="lib/luajit/src/libluajit.a"
|
||||
|
|
@ -384,13 +390,13 @@ case "$COMMAND" in
|
|||
|
||||
NEEDS_REBUILD=false
|
||||
if [[ "$src_file" -nt "$obj_file" ]] || \
|
||||
[[ "src/pxl8_types.h" -nt "$obj_file" ]] || \
|
||||
[[ "src/pxl8_macros.h" -nt "$obj_file" ]]; then
|
||||
[[ "client/src/core/pxl8_types.h" -nt "$obj_file" ]] || \
|
||||
[[ "client/src/core/pxl8_macros.h" -nt "$obj_file" ]]; then
|
||||
NEEDS_REBUILD=true
|
||||
fi
|
||||
|
||||
if [[ "$src_file" == "src/pxl8_script.c" ]]; then
|
||||
for lua_file in src/lua/*.lua src/lua/pxl8/*.lua lib/fennel/fennel.lua; do
|
||||
if [[ "$src_file" == "client/src/script/pxl8_script.c" ]]; then
|
||||
for lua_file in client/src/lua/*.lua client/src/lua/pxl8/*.lua lib/fennel/fennel.lua; do
|
||||
if [[ -f "$lua_file" ]] && [[ "$lua_file" -nt "$obj_file" ]]; then
|
||||
NEEDS_REBUILD=true
|
||||
break
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue