Relay-Version: version B 2.10 5/3/83; site utzoo.UUCP Posting-Version: version B 2.10.2 9/17/84 chuqui version 1.9 3/12/85; site unisoft.UUCP Path: utzoo!watmath!clyde!cbosgd!ihnp4!qantel!lll-crg!lll-lcc!unisoft!fnf From: fnf@unisoft.UUCP Newsgroups: net.micro.amiga Subject: Re: balls.c - some lines were truncated Message-ID: <603@unisoft.UUCP> Date: Thu, 28-Nov-85 22:48:35 EST Article-I.D.: unisoft.603 Posted: Thu Nov 28 22:48:35 1985 Date-Received: Sat, 30-Nov-85 01:08:17 EST References: <306@well.UUCP> Reply-To: fnf@unisoft.UUCP (I am the great and Oz) Organization: UniSoft Systems, Berkeley Lines: 48 Keywords: fixes In article <306@well.UUCP> perry@well.UUCP (Perry S. Kivolowitz) writes: >Captain Crunch has told me that the macintosh used to get balls.c onto >the WELL has trunctated three lines in the source code. Here's a list >of these three lines and what's wrong with each. > Here are the fixes I made. They seem to work, but no guarantees. By the way, the first time I tried it, I thought it was broken. It drew three balls in the bottom center of the screen, then nothing else happened for a LONG time. After about 15 seconds, I got bored, popped the workbench screen to the front and did a few other things. Then when I came back to the screen later, things were chugging along (don't want to spoil the fun for those that haven't seen it yet!)... Guess you just have to be patient. -Fred ----------------------------------- 177c177 < if(!(IntuitionBase = (struct IntuitionBase *)OpenLibrary("intuition.library") --- > if(!(IntuitionBase = (struct IntuitionBase *)OpenLibrary("intuition.library"))) 250c250 < ClipBlit(&right[NSTEPS-1].rp,0,0,w->RPort,right[NSTEPS-1].sx,right[NSTEPS-1]; --- > ClipBlit(&right[NSTEPS-1].rp,0,0,w->RPort,right[NSTEPS-1].sx,right[NSTEPS-1]); 365,366c365,371 < < length.i = SPSqrt(SPAdd(SPAdd(SPMul(p->x.i,p->x.i) , SPMul(p->y.i,p->y.i)) ,; --- > int xsquared, ysquared, zsquared; > > xsquared = SPMul (p -> x.i, p -> x.i); > ysquared = SPMul (p -> y.i, p -> y.i); > zsquared = SPMul (p -> z.i, p -> z.i); > length.i = SPSqrt (SPAdd (SPAdd (xsquared, ysquared), zsquared)); > 404c409,410 < d.i = SPAdd(SPAdd(SPMul(pnt.z.i , l.z.i) , SPMul(pnt.y.i , l.y.i)) , S; --- > d.i = SPAdd(SPMul(pnt.x.i , l.x.i) , SPMul(pnt.y.i, l.y.i)); > d.i = SPAdd(d.i , SPMul(pnt.z.i , l.z.i)); 414c420,421 < d.i = SPAdd(SPAdd(SPMul(H.x.i , pnt.x.i) , SPMul(H.y.i , pnt.y.i)) ; --- > d.i = SPAdd(SPMul(H.x.i , pnt.x.i), SPMul(H.y.i , pnt.y.i)); > d.i = SPAdd(d.i, SPMul(H.z.i , pnt.z.i));