/* This is the beginning of the fractal drawing program. This is the */ /* basic program, that simply draws a two dimensional fractal. It */ /* uses the mouse for inputting the x, y and window values for the */ /* fractal, and then blacks the screen, and draws the fractal in */ /* color or b/w, depending upon the monitor... */ #include int contrl[12], intin[256], ptsin[256], intout[256], ptsout[256]; int dummy,width,height,handle,i; char decimal[80]; int mx,my; /* This is the start of the main routine, which is always executed first */ /* Notice that we've defined all of our variables ahead of all our routines */ /* This ensures that all variables are global, and so can be altered by all */ /* routines w/out having to be passed back and forth... */ main() { /* The following is the setup to use the VDI and AES */ /* Set the system up to do GEM calls*/ appl_init(); /* Get the handle of the desktop */ handle=graf_handle(&width,&height,&dummy,&dummy); /* Open the workstation. */ for (i=1; i<10; ++i) intin[i] = i; intin[10] = 2; v_opnvwk(intin, &handle, intout); graf_mouse(3,&dummy); /* draw J.R. "Bob" Dobbs... */ v_gtext(handle,0,height,"Hey, kids, look!!"); v_gtext(handle,0,height*2,"It's J.R. 'Bob' Dobbs!!"); v_gtext(handle,0,height*3,"More information on 'Bob' Dobbs can be"); v_gtext(handle,0,height*4,"obtained from the Church of the Sub-Genius"); v_gtext(handle,0,height*5,"Ask your local book purveyor for:"); v_gtext(handle,0,height*6,"The Book of the SubGenius"); v_gtext(handle,0,height*7,"You too can obtain a picture of 'Bob',"); v_gtext(handle,0,height*8,"for he is contained in ASCII characters"); v_gtext(handle,0,height*9,"28 through 31 (can you believe it??!)"); v_gtext(handle,0,height*10,"(Press and release mouse button to exit.)"); i = 0; drawbob: decimal[0] = 28; decimal[1] = 29; decimal[2] = 0; v_gtext(handle,i*30,height*22,decimal); v_gtext(handle,i*30,height*13,decimal); v_gtext(handle,i*30,height*16,decimal); v_gtext(handle,i*30,height*19,decimal); decimal[0] = 30; decimal[1] = 31; v_gtext(handle,i*30,height*23,decimal); v_gtext(handle,i*30,height*14,decimal); v_gtext(handle,i*30,height*17,decimal); v_gtext(handle,i*30,height*20,decimal); i++; if(i < 8) goto drawbob; evnt_button(1,1,1,&mx,&my,&dummy,&dummy); evnt_button(1,1,0,&mx,&my,&dummy,&dummy); v_clsvwk(handle); }ÿðfffg ™™™™Ÿÿÿÿÿÿÿÿ