From: dennisf@flaherty.elk.miles.com (Dennis Flaherty) Subject: Re: xoj with gathering crowd In article <304tv8$gmv@fnnews.fnal.gov>, The Doctor wrote: > This is pretty crude (my first contrib to the PD world), so go easy > with the flames. It uses the same colors for the shirts as the > helicopters, and looks crummy on monochrome. But, I already wasted > one evening on it and should get back to my life, such as it is. > Thanks to the originator for the laughs. My 3-line Imakefile and patch to make the copters move around still work (shifted 12 lines) with this version too-- here they are again: ------ Imakefile ------- LOCAL_LIBRARIES = XawClientLibs DEPLIBS = XawClientDepLibs SimpleProgramTarget(xoj) ------ Moving Copters patch ------- *** xoj.c.orig Fri Jul 1 10:02:16 1994 --- xoj.c Thu Jul 14 08:36:11 1994 *************** *** 301,307 **** copters[i].y = copcars[i].y + 5; copters[i].xStep = BroncoSpeed; ! copters[i].yStep = 0; } /* Initialize the i'th cop car */ --- 301,307 ---- copters[i].y = copcars[i].y + 5; copters[i].xStep = BroncoSpeed; ! copters[i].yStep = 1; } /* Initialize the i'th cop car */ *************** *** 348,362 **** { EraseCopter(i); ! /* Move forward */ ! copters[i].x = copters[i].x + copters[i].xStep; ! ! /* Copters stay at the same height */ ! ! if (copters[i].x >= display_width) { ! InitCopter(i); ! copters[i].x = 0; ! } DrawCopter(i); } --- 348,364 ---- { EraseCopter(i); ! /* Copters move around! - dennisf@denix.elk.miles.com */ ! copters[i].x += theBronco.xStep; /* keep up with theBronco */ ! if (RandInt(10) > 3) copters[i].x += copters[i].xStep; ! if (copters[i].x < 0) copters[i].x = display_width; ! if (copters[i].x > display_width) copters[i].x = 0; ! if (RandInt(10) > 8) copters[i].xStep = -copters[i].xStep; ! ! if (RandInt(10) > 3) copters[i].y += copters[i].yStep; ! if (copters[i].y < 0) copters[i].y = display_height; ! if (copters[i].y > display_height) copters[i].y = 0; ! if (RandInt(10) > 8) copters[i].yStep = -copters[i].yStep; DrawCopter(i); } --