From fa1579cc9f209dbeb14ab277dc9c4ac741ace57c Mon Sep 17 00:00:00 2001 From: gbc dev Date: Sat, 18 Jul 2026 20:41:19 +0200 Subject: render: --shrink N - downscale the half-block live display (1-4) Decimates the LCD N x N before the half-block encode so the monitor pane takes 160/N cols x 72/N rows. Display-only: capture, recording and sixel still read the full-res framebuffer. Decimation is max-luma pick, not box-average: terminal fonts are 1px bright strokes on dark background, and averaging dims them into grey mush (the 'blurry font' regression). Keeping the brightest source pixel of each block preserves stroke brightness and hue. --- src/main.c | 5 +++++ 1 file changed, 5 insertions(+) (limited to 'src/main.c') diff --git a/src/main.c b/src/main.c index 0dec4df..811e0a4 100644 --- a/src/main.c +++ b/src/main.c @@ -76,6 +76,8 @@ static void print_usage(FILE *out, const char *prog) { " --sixel [scale] sixel graphics output; scale = pixel zoom 1-6 (def 2)\n" " --chrome draw a Game Boy body around the LCD (sixel display)\n" " --palette NAME recolor the LCD: dmg|green (pea green), pocket|gray\n" +" --shrink N shrink the half-block display N x (1-4); capture and\n" +" recording stay full-res\n" " --green alias for --palette dmg\n" " --frameskip N draw 1 of every (N+1) frames\n" "\n" @@ -172,6 +174,9 @@ int main(int argc, char **argv) { } else if (!strcmp(a, "--sixel")) { sixel = true; if (has_val) sixel_scale = atoi(argv[++i]); + } else if (!strcmp(a, "--shrink")) { + if (!has_val) { fprintf(stderr, "%s: --shrink needs a value\n", prog); return 1; } + render_set_shrink(atoi(argv[++i])); } else if (!strcmp(a, "--chrome")) { chrome = true; } else if (!strcmp(a, "--palette")) { -- cgit v1.3.1-sl0p