From a0d6ecbbbdf481e3d0457d6e66f7593b9ce17253 Mon Sep 17 00:00:00 2001 From: KonAki Date: Sun, 18 Oct 2026 04:26:33 +0800 Subject: build.c: packw module, konedit adds packw and image --- build.c | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) (limited to 'build.c') diff --git a/build.c b/build.c index b69c3c2..b3e4994 100644 --- a/build.c +++ b/build.c @@ -30,7 +30,7 @@ typedef struct module } module_t; static const module_t known[] = { - {"font", ""}, {"toml", ""}, {"fs", ""}, {"tile", ""}, {"pack", ""}, {"ui", "font"}, {"debug", "font assets"}, + {"font", ""}, {"toml", ""}, {"fs", ""}, {"tile", ""}, {"pack", ""}, {"packw", "pack"}, {"ui", "font"}, {"debug", "font assets"}, {"assets", "pack"}, {"image", ""}, {"audio", ""}, {"mic", ""}, {"sound", "audio"}, {"model", "assets"}, {"2d", ""}, {"fx", "2d"}, {"particles", ""}, {"picture", "2d"}, {"rm", ""}, {"rmmap", ""}, {"rmtile", ""}, {"rmdraw", "rmmap rmtile"}, {"rmfield", "rmmap"}, {"rmplugin", ""}, {"rmdata", "battle party save"}, @@ -407,6 +407,8 @@ static void addModuleUnits(const char *m) } else if (strcmp(m, "model") == 0) { addKon("konmodel"); addKon("konassets"); + } else if (strcmp(m, "packw") == 0) { + /* the pack unit is there with pack, this only turns the writer on in it */ } else if (strcmp(m, "image") == 0) { addUnit("stb_image", SRCDIR "/impl/stb_image.c", 1); } else if (strcmp(m, "audio") == 0 || strcmp(m, "mic") == 0) { @@ -490,6 +492,7 @@ static void setup(void) kon_freeCmd(&platformDefs); for (i = 0; i < chosenCount; i++) push(&defs, kon_fmt("-DKON_MODULE_%s", upper(chosen[i]))); if (hasModule("3d") || hasModule("model") || hasModule("sector")) push(&defs, "-DKONSOFREN_3D"); + if (hasModule("packw")) push(&defs, "-DKONPACK_WRITER"); if (hasModule("audio") && kon_exists(EXTDIR "/stb_vorbis.c")) push(&defs, "-DKON_VORBIS"); if (hasModule("audio") || hasModule("mic")) { if (strcmp(platform, "linux") == 0) { @@ -900,7 +903,7 @@ int main(int argc, char **argv) } if (targetCount == 0) targets[targetCount++] = "all"; for (i = 0; i < targetCount; i++) { - if (isEditorTarget(targets[i])) addModuleList("ui,font,toml,fs"); + if (isEditorTarget(targets[i])) addModuleList("ui,font,toml,fs,packw,image"); } maxJobs = jobsAsked > 0 ? jobsAsked : kon_cpuCount(); -- cgit