Path: utzoo!mnetor!uunet!seismo!sundc!pitstop!sun!pepper!cmcmanis From: cmcmanis%pepper@Sun.COM (Chuck McManis) Newsgroups: comp.sys.amiga Subject: Re: Mouse Pointer Help Required Message-ID: <40779@sun.uucp> Date: 2 Feb 88 20:14:48 GMT References: <168@gould.doc.ic.ac.uk> <3542@batcomputer.tn.cornell.edu> Sender: news@sun.uucp Reply-To: cmcmanis@sun.UUCP (Chuck McManis) Organization: Sun Microsystems, Mountain View Lines: 45 Keywords: Help,Mouse Pointer In article <3542@batcomputer.tn.cornell.edu> (Dan Green) writes: >In article <168@gould.doc.ic.ac.uk> (Peter Walkley) originally wrote: >>My friend wants a CLEAN way of getting rid of the mouse pointer, and >>then being able to restore it again. He's writing a demo that grabs >>the display (i.e Ignores intuition), and wants the MP out of the way. >> P. Walkley > >Here is a method I clipped out from a program of mine. It works, and I >sure HOPE its "approved", but I don't know for sure. AAAAAAAAAAAAAAAAAAARRRRRRRRRRRRRRRRRRRRRGGGGGGGGGGGGGGGGGGGHHHHHHHHHHHH! So close, and yet so far away. The 'clean' approved way of changing your pointer to ANYTHING, including 'nothing' is to use the Intuition SetPointer call. To restore it to the original preferences set pointer you can use the Intuition ClearPointer() call. BUT THERE IS A GOTCHA! And a very important one it is. The data you pass to SetPointer(), and read my lips here, MUST BE IN CHIP RAM OR YOU WILL GET AN UGLY SMEAR ON SYSTEMS WITH FAST RAM. So, the appropriate code would be something like ... UWORD *Newpointer = NULL; GoAwayPointer() { if (!NewPointer) NewPointer = AllocMem(2*sizeof(UWORD),MEMF_CHIP+MEMF_CLEAR); SetPointer(NewPointer,1,1,1,1); } ComeBackPointer() { ClearPointer(); } Note also that the pointer is a sprite and follows the rules for sprite images, meaning that each plane is represented by "n" UWORDs where n is the number of lines high the new image is, and that you have to have 2 planes because a sprite is 3 colors (plus transparent). So 1 * 2 = 2 UWORDs. Finally, set the hotspot to 1,1 because if you set it to 0,0 SetPointer sometimes activates sprite 1 (for no apparent reason). --Chuck McManis uucp: {anywhere}!sun!cmcmanis BIX: cmcmanis ARPAnet: cmcmanis@sun.com These opinions are my own and no one elses, but you knew that didn't you.