Path: utzoo!utgpu!jarvis.csri.toronto.edu!mailrus!tut.cis.ohio-state.edu!bloom-beacon!think!ephraim From: ephraim@think.COM (Ephraim Vishniac) Newsgroups: comp.sys.mac.programmer Subject: Re: Calling Random Message-ID: <40216@think.UUCP> Date: 6 May 89 00:53:40 GMT References: <1055@mailrus.cc.umich.edu> <1499@internal.Apple.COM> Sender: news@think.UUCP Reply-To: ephraim@think.com (Ephraim Vishniac) Distribution: comp.sys.mac.programmer Organization: Thinking Machines Corporation, Cambridge MA, USA Lines: 25 In article <1499@internal.Apple.COM> darin@Apple.COM (Darin Adler) writes: >Random is a QuickDraw routine, so you must have an A5 world set up for >QuickDraw globals, and call InitGraf before calling Random. >This was a bug in the old "Insect" desk accessory by Burt Sloane. He used >Random to choose a random place for the insect to climb down the screen, >but didn't have QuickDraw globals in his insect code. He found the bug, but >not before copies of the DA spread around most of the Mac community. A much improved version of the Insect DA (improved by Yours Truly), complete with source code, is available via ftp from the info-mac directory at sumex-aim.stanfored.edu. It fixes this bug and many others. I'll happily mail a copy to anybody who can't get it from sumex. It still loses on the Mac II in multi-colors, but at least it's compatible with third-party monitors, and has an option to kill off insects. It's also an interesting example of how to install and (ab)use VBL tasks. Ephraim Vishniac / Internet: ephraim@think.com / AppleLink: ThinkingCorp Thinking Machines Corporation / 245 First Street / Cambridge, MA 02142-1214 "Arlo Guthrie, it seems, has found what he was looking for: God, and the Macintosh." (Boston Globe)