diff --git a/.gitignore b/.gitignore index d0c6fa8..098c3d9 100644 --- a/.gitignore +++ b/.gitignore @@ -3,4 +3,5 @@ node_modules/ .prettierignore tsconfig.tsbuildinfo *~ -*.wat \ No newline at end of file +*.wat +packer \ No newline at end of file diff --git a/build.js b/build.js index 4d3c7a4..910be77 100644 --- a/build.js +++ b/build.js @@ -33,28 +33,31 @@ if (!0) { "stb_image.h" ]).on('close', (data) => { if (data !== 0) return; - cmd("c3c", [ - "compile", - "-D", "PLATFORM_WEB", - "--reloc=none", - "--target", "wasm32", - "-O5", "-g0", "--link-libc=no", "--no-entry", - "--trust=full", - "-o", "client", - "-z", "--export-table", - "-z", "--allow-undefined", - "client.c3", "common.c3", - ]) - cmd("c3c", [ - "compile", - "-D", "PLATFORM_WEB", - "--reloc=none", - "--target", "wasm32", - "-O5", "-g0", "--link-libc=no", "--no-entry", - "-o", "server", - "-z", "--export-table", - "-z", "--allow-undefined", - "server.c3", "common.c3", - ]) + cmd("c3c", ["compile", "packer.c3", "common.c3", "stb_image.o"]).on('close', (data) => { + if (data !== 0) return; + cmd("c3c", [ + "compile", + "-D", "PLATFORM_WEB", + "--reloc=none", + "--target", "wasm32", + "-O5", "-g0", "--link-libc=no", "--no-entry", + "--trust=full", + "-o", "client", + "-z", "--export-table", + "-z", "--allow-undefined", + "client.c3", "common.c3", + ]) + }); }) + cmd("c3c", [ + "compile", + "-D", "PLATFORM_WEB", + "--reloc=none", + "--target", "wasm32", + "-O5", "-g0", "--link-libc=no", "--no-entry", + "-o", "server", + "-z", "--export-table", + "-z", "--allow-undefined", + "server.c3", "common.c3", + ]) } diff --git a/client.c3 b/client.c3 index a1904a3..79837b6 100644 --- a/client.c3 +++ b/client.c3 @@ -28,7 +28,7 @@ const float MINIMAP_SCALE = 0.07; const uint SPRITE_ANGLES_COUNT = 8; -$exec("packer.c3;common.c3;stb_image.o"); +$exec("./packer"); def Color = char[<4>];