From 32360e2b88f88f643be632941580c90d3e466076 Mon Sep 17 00:00:00 2001 From: rodri Date: Thu, 28 Dec 2023 22:08:31 +0000 Subject: change the model's scale with the scroll wheel. --- main.c | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/main.c b/main.c index b6c9512..540b1bd 100644 --- a/main.c +++ b/main.c @@ -706,6 +706,10 @@ mouse(Mousectl *mc, Keyboardctl *kc) lmb(mc, kc); if((mc->buttons&4) != 0) rmb(mc, kc); + if((mc->buttons&8) != 0) + scale += 0.1; + if((mc->buttons&16) != 0) + scale -= 0.1; } void @@ -745,7 +749,7 @@ key(Rune r) void usage(void) { - fprint(2, "usage: %s [-n nprocs] [-m objfile] [-t texfile] [-a yrotangle] [-s shader] [-w width] [-h height] [-S scale]\n", argv0); + fprint(2, "usage: %s [-n nprocs] [-m objfile] [-t texfile] [-a yrotangle] [-s shader] [-w width] [-h height]\n", argv0); exits("usage"); } @@ -793,9 +797,6 @@ threadmain(int argc, char *argv[]) case 'h': fbh = strtoul(EARGF(usage()), nil, 10); break; - case 'S': - scale = strtod(EARGF(usage()), nil); - break; default: usage(); }ARGEND; if(argc != 0) -- cgit v1.2.3