From: | Rik Sweeney |
Date: | 30 Aug 2000 at 19:40:52 |
Subject: | Problem with bob drawing |
I'm having problems moving bobs around the screen. After I initialise
two bobs and place them on the screen they both appear in the
locations specified and display the correct image. I have used the
following to create my bobs
BobVSprite[0].Width=2;
BobVSprite[0].Height=32;
BobVSprite[0].Flags=OVERLAY|SAVEBACK;
BobVSprite[0].Depth=2;
BobVSprite[0].ImageData=block;
BobVSprite[0].X=100;
BobVSprite[0].Y=100;
BobVSprite[0].PlanePick=0x0041;
BobVSprite[0].PlaneOnOff=0x0000;
Bob[0].Flags=0;
Bob[0].BobVSprite=&BobVSprite[0];
BobVSprite[0].VSBob=&Bob[0];
AddBob(&Bob[0],&scr->RastPort);
BobVSprite[1].ImageData=another;
BobVSprite[1].X=200;
BobVSprite[1].Y=200;
Bob[1].Flags=0;
Bob[1].BobVSprite=&BobVSprite[1];
BobVSprite[1].VSBob=&Bob[1];
AddBob(&Bob[1],&scr->RastPort);
(Missing parts of the second BobVSprite have been removed as they are
the same as the first BobVSprite). This works fine. When I attempt to
move the first BobVSprite, say, in the x axis, second one's image
also
moves. If I move the second BobVSprite, neither image moves, but the
X
coordinate of the second BobVSprite changes. Nothing I've tried makes
any difference. If anyone can help I'd be really appreciative.
Thanks
Richard Sweeney