gr-sim: fix kaleido to compile again

variable name confusion
This commit is contained in:
Vince Weaver 2017-07-10 11:24:00 -04:00
parent 3846d4266d
commit bd2598bc8a

View File

@ -8,7 +8,7 @@
#include "gr-sim.h" #include "gr-sim.h"
static int r[11]; static int r[11];
static int x,y,j,a,b,x2,y2,n; static int xx,yy,j,aa,b,x2,y2,n;
static void tooo(void) { static void tooo(void) {
@ -19,42 +19,44 @@ static void tooo(void) {
} }
static void noo(void) { static void noo(void) {
int t,w; //int t;
int w;
// 900 // 900
color_equals(r[0]); color_equals(r[0]);
basic_plot(x,y); basic_plot(xx,yy);
grsim_update(); grsim_update();
if (j==1) return; if (j==1) return;
// 920 // 920
w=j/2; w=j/2;
t=j-w-1; //t=j-w-1;
// 930 // 930
for(n=1;n<=w;n++) { for(n=1;n<=w;n++) {
if (x==a) { if (xx==aa) {
y2=y; x2=x+n; tooo(); y2=yy; x2=xx+n; tooo();
x2=x-n; tooo(); x2=xx-n; tooo();
continue; continue;
} }
if (y==b) { if (yy==b) {
x2=x; y2=y+n; tooo(); x2=xx; y2=yy+n; tooo();
y2=y-n; tooo(); y2=yy-n; tooo();
continue; continue;
} }
y2=y; y2=yy;
if (x<a) { if (xx<aa) {
x2=x+n; tooo(); x2=xx+n; tooo();
} }
else { else {
x2=x-n; tooo(); x2=xx-n; tooo();
} }
// 990 // 990
x2=x; x2=xx;
if (y<b) { if (yy<b) {
y2=y+n; tooo(); y2=yy+n; tooo();
} }
else { else {
y2=y-n; tooo(); y2=yy-n; tooo();
} }
} }
@ -75,7 +77,7 @@ int main(int argc, char **argv) {
p=19; p=19;
// 130 // 130
a=p; b=p; d=-1; aa=p; b=p; d=-1;
// 135 // 135
m=15; m=15;
@ -94,14 +96,14 @@ label150:
} }
// 200 // 200
for(j=k;j<=l;j+=d) { for(j=k;j<=l;j+=d) {
x=a+j; y=b; noo(); xx=aa+j; yy=b; noo();
x=a-j; noo(); xx=aa-j; noo();
x=a; y=b+j; noo(); xx=aa; yy=b+j; noo();
y=b-j; noo(); yy=b-j; noo();
x=a+j;y=b+j; noo(); xx=aa+j;yy=b+j; noo();
x=a-j;y=b-j; noo(); xx=aa-j;yy=b-j; noo();
y=b+j; noo(); yy=b+j; noo();
x=a+j; y=b-j; noo(); xx=aa+j; yy=b-j; noo();
} }
for(j=1;j<10;j++) { for(j=1;j<10;j++) {