summaryrefslogtreecommitdiff
path: root/main.c
diff options
context:
space:
mode:
authorrodri <rgl@antares-labs.eu>2023-12-28 22:08:31 +0000
committerrodri <rgl@antares-labs.eu>2023-12-28 22:08:31 +0000
commit32360e2b88f88f643be632941580c90d3e466076 (patch)
tree1c1205349ff6bb160c445dfba9fce04fe2fa9199 /main.c
parentde87611a25e3ce983d5bbd0e7173d8bfb131cc2a (diff)
downloadtinyrend-32360e2b88f88f643be632941580c90d3e466076.tar.gz
tinyrend-32360e2b88f88f643be632941580c90d3e466076.tar.bz2
tinyrend-32360e2b88f88f643be632941580c90d3e466076.zip
change the model's scale with the scroll wheel.
Diffstat (limited to 'main.c')
-rw-r--r--main.c9
1 files 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)