superbug@lopez.UUCP (Super Bug) (10/19/90)
Howdy' peoples, got a little situation that I was wondering if some of you could help me with. I am working on this program that uses MODULA-2 (benchmark) and some library comands to get double buffered screens. The two problems are: 1 > I have loaded a bob that will use the mouse as a reference (eg. the bob will follow the mouse around the screen.) and I dont want the pointer Image on the double buffered screen (I would like the pointer image invisible.) I have tried using ClearPointer, SetPointer (I know they are only good on windows not screens.) and tried to FreeSprite(0), GetSprite(0), and ChangeSprite(0) to blanks, and the image does go invisible, but the second I move the mouse the pointer image (that I blanked out) comes back! Could some one tell me **A> WHY the image comes back only when I move the mouse around the screens? **B> How to stop it from becoming visible when I move the mouse? **C> How to get the pointer image back to normal once the double buffering is through? 2 > I know that when programing mouse imput events one can simply use the IDCMPFlags on the window to capture mouse buttons. But the screen (double buffered or otherwise doesn't use the IDCMPFlags how would I use the mouse buttons with a double buffered screen? ********************************************************** IF at all possible could you send me some examples in C or MODULA-2, as that would be the most educational for me ********************************************************** The following is as clip from the program that I am working on, this should show you what it is I'm trying to do. Remember that it's the pointer I am having a problem with. *****Definitions********************************************** Sp : SpritePtr * Rp : RastPort * Vp : ViewPort * SpriteNum : CARDINAL (*a CARDINAL is from 0 to 32260*) * ImPtr : ImagePtr; (*this is used for picture data * * *that is placed on the end of the program and stuffed * * *into memory *) * NumDrag : CARDINAL (* this is used to change the dragon * bobs to make it look as though it is flying *) * ************************************************************** Scr := CreateDBufScreen(320,400,4); Rp := ADR(Scr^.RastPort); Vp := ADR(Scr^.ViewPort); FreeSprite(0); (*Free that sprite*) SpriteNum := GetSprite(Sp,0); (*Get me the mouse sprite*) Sp.height := 14; (*Sprite height*) ChangeSprite(Scr^.ViewPort, Sp,ImPtr^[6].Data); (*ImPtr^[6].Data is blank data *) Delay(200); GPtr := CreateGelsInfo(Rp^); XBow := CreateBob(160,200,215,229,ImPtr^[0].Depth, ImPtr^[0].Data,BYTE(0FH),BYTE(0)); Drag:= CreateBob(BaseX,BaseY,149,202,ImPtr^[2].Depth, ImPtr^[2].Data,BYTE(0FH),BYTE(0)); AddBob(XBow^,Rp^); AddBob(Drag^,Rp^); GetMeImage(1,ImPtr,Im); DrawImage(Rp^,Im,0,0); FlipDBufScreen(Scr^); DrawImage(Rp^,Im,0,0); FlipDBufScreen(Scr^); NumDrag := 2; Dont := TRUE; Scr^.MouseX := 267; Scr^.MouseY := 250; FOR X := 1 TO 75 DO SortGList(Rp^); DrawGList(Rp^,Vp^); FlipDBufScreen(Scr^); (*******************************************************) XBow^.BobVSprite^.Y := ((Scr^.MouseY)-50); (* so mouseY is placed at the center of bob *) XBow^.BobVSprite^.X := ((Scr^.MouseX)-107); (* so mouseX is placed at the center of bob *) (*******************************************************) Drag^.BobVSprite^.X := BaseX; Drag^.BobVSprite^.Y := BaseY; (* these are used to move the dragon *) Drag^.BobVSprite^.ImageData := ImPtr^[NumDrag].Data; (* #1 *) (* #1: This makes the dragon apper as its flappinf its wings *) InitMasks(Drag^.BobVSprite^); XBow^.BobVSprite^.Y := ((Scr^.MouseY)-50); XBow^.BobVSprite^.X := ((Scr^.MouseX)-107); END; (* end For Loop *) FreeSprite(0); END Intro; Thanks lots Sent info to SuperBug@Lopez