X-Git-Url: http://git.mutantstargoat.com/user/nuclear/?a=blobdiff_plain;f=tools%2Ftungen.c;h=f2485c3649c7f00fcef3c4152af40ddcb1432bee;hb=c4c558a9a9117b47aa6527767656c6f2c2c7afc1;hp=d1ff4001d3c9f144d926d09bd86a2cf57fed54c5;hpb=b8ce2cf8b8329cf8b8bdd6aba8831bfbc93d56e3;p=gbajam21 diff --git a/tools/tungen.c b/tools/tungen.c index d1ff400..f2485c3 100644 --- a/tools/tungen.c +++ b/tools/tungen.c @@ -114,7 +114,7 @@ invalopt: fprintf(stderr, "invalid argument: %s\n", argv[i]); if(x >= 0 && x < xsz && y >= 0 && y < ysz) { ptr = buf + y * xsz + x; ptr->x = (j << 8) / UDIV; - ptr->y = ((VDIV - i) << 11) / VDIV; + ptr->y = ((VDIV - i - 1) << 10) / VDIV; } } prev_r = r; @@ -125,8 +125,8 @@ invalopt: fprintf(stderr, "invalid argument: %s\n", argv[i]); for(j=0; jx; int v = ptr->y; - int r = (u << 3) & 0xff; - int g = (v >> 3) & 0xff; + int r = u & 0x3f; + int g = (v >> 2) & 0xff; /*if(v > 2.0) r = g = b = 0;*/