commit 6f81f92
uint
·
2026-08-05 02:42:08 +0000 UTC
parent 0b9986a
increase max world chunks
2 files changed,
+59,
-1
+1,
-1
1@@ -4,7 +4,7 @@
2 #include "net/mc_chunk.h"
3 #include "world/chunk.h"
4
5-#define CLIENT_WORLD_MAX_CHUNKS 128
6+#define CLIENT_WORLD_MAX_CHUNKS 2048
7
8 typedef struct {
9 Chunk chunks[CLIENT_WORLD_MAX_CHUNKS];
+58,
-0
1@@ -0,0 +1,58 @@
2+#!/usr/bin/env sh
3+set -eu
4+
5+if ! command -v xclip >/dev/null 2>&1; then
6+ printf '%s\n' 'copy-files-to-clipboard: xclip was not found in PATH' >&2
7+ exit 1
8+fi
9+
10+repo_root=~/programming/c/magnolia
11+file_list=$(mktemp)
12+
13+cleanup()
14+{
15+ rm -f "$file_list"
16+}
17+
18+trap cleanup EXIT HUP INT TERM
19+
20+cd "$repo_root"
21+
22+find . \
23+ \( \
24+ -path './.git' -o \
25+ -path './.cache' -o \
26+ -path './build' -o \
27+ -path './build-*' -o \
28+ -path './vendor/sokol_gfx.h' -o \
29+ -path './vendor/stb_image_c89.h' -o \
30+ -path './vendor/small3dlib.h' -o \
31+ -path './vendor/HandmadeMath.h' -o \
32+ -path './subprojects/*' -o \
33+ \) -prune -o \
34+ -type f \
35+ \( \
36+ -name 'meson.build' -o \
37+ -name 'meson.options' -o \
38+ -name 'meson_options.txt' -o \
39+ -name '*.c' -o \
40+ -name '*.h' \
41+ \) -print \
42+ | LC_ALL=C sort > "$file_list"
43+
44+if [ ! -s "$file_list" ]; then
45+ printf '%s\n' 'copy-files-to-clipboard: no files found' >&2
46+ exit 1
47+fi
48+
49+{
50+ while IFS= read -r path; do
51+ path=${path#./}
52+ printf '===== %s =====\n' "$path"
53+ cat -- "$path"
54+ printf '\n\n'
55+ done < "$file_list"
56+} | xclip -selection clipboard
57+
58+count=$(wc -l < "$file_list" | tr -d ' ')
59+printf 'Copied %s files to the clipboard.\n' "$count"