diff options
author | rodri <rgl@antares-labs.eu> | 2023-12-28 22:08:31 +0000 |
---|---|---|
committer | rodri <rgl@antares-labs.eu> | 2023-12-28 22:08:31 +0000 |
commit | 32360e2b88f88f643be632941580c90d3e466076 (patch) | |
tree | 1c1205349ff6bb160c445dfba9fce04fe2fa9199 | |
parent | de87611a25e3ce983d5bbd0e7173d8bfb131cc2a (diff) | |
download | tinyrend-32360e2b88f88f643be632941580c90d3e466076.tar.gz tinyrend-32360e2b88f88f643be632941580c90d3e466076.tar.bz2 tinyrend-32360e2b88f88f643be632941580c90d3e466076.zip |
change the model's scale with the scroll wheel.
-rw-r--r-- | main.c | 9 |
1 files changed, 5 insertions, 4 deletions
@@ -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) |