shithub: tinyrend

Download patch

ref: 32360e2b88f88f643be632941580c90d3e466076
parent: de87611a25e3ce983d5bbd0e7173d8bfb131cc2a
author: rodri <rgl@antares-labs.eu>
date: Thu Dec 28 17:08:31 EST 2023

change the model's scale with the scroll wheel.

--- a/main.c
+++ b/main.c
@@ -706,6 +706,10 @@
 		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 @@
 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");
 }
 
@@ -792,9 +796,6 @@
 		break;
 	case 'h':
 		fbh = strtoul(EARGF(usage()), nil, 10);
-		break;
-	case 'S':
-		scale = strtod(EARGF(usage()), nil);
 		break;
 	default: usage();
 	}ARGEND;