[comp.sys.amiga.tech] Sprites

s110018@vega.ucdavis.edu (0000;0000010000;4000;250;216;s110) (05/23/89)

Hi, I am currently trying to get control of all eight sprites
for a video game I am writing. I have a custom copper list set up, which
works fine, but when I try to use it to get sprites, I get maybe a
flicker or two, but nothing really interesting. Also, the intuition pointer
will not go away, which seems kind of strange, since every 1/60 of
a second, I change the pointers to all the sprites. I suppose Intuition
is just craftier than I am.

	I would appreciate it if someone could tell me a way to simultaneously
kill off the intuition pointer and get the sprites to appear. I thought
I followed the hardware manual very carefully, but I'm not so sure now.
(I use the hardware manual since the RKM scares me :-)

	thanks in advance,
	-Bruce Rogers
	currently s110018@pollux.ucdavis.edu
			^^ these pesky accounts change about once
			   every two weeks (blecch!)

addison@pollux.usc.edu (Richard Addison) (05/27/89)

In article <4374@ucdavis.ucdavis.edu> s110018@pollux.ucdavis.edu (Bruce Rogers) writes:
>
>Hi, I am currently trying to get control of all eight sprites
>for a video game I am writing. I have a custom copper list set up, which
>works fine, but when I try to use it to get sprites, I get maybe a
>flicker or two, but nothing really interesting. Also, the intuition pointer
>will not go away, which seems kind of strange, since every 1/60 of
>a second, I change the pointers to all the sprites. I suppose Intuition
>is just craftier than I am.
>
>	I would appreciate it if someone could tell me a way to simultaneously
>kill off the intuition pointer and get the sprites to appear. I thought
>I followed the hardware manual very carefully, but I'm not so sure now.
>(I use the hardware manual since the RKM scares me :-)
>
>	thanks in advance,
>	-Bruce Rogers
>	currently s110018@pollux.ucdavis.edu
>			^^ these pesky accounts change about once
>			   every two weeks (blecch!)

I recomend looking at your fully commented copper.h and gfxbase.h include
files.  Remember, the copper stuffs the pointers for the sprites at the top
of every frame.  You can locate this portion of the copper list through
GfxBase->copinit.sprstrtup.

You might find it simpler to use SimpleSprites which directly manipulate
this portion of the copper list.

Glance at

	GetSprite(sprite,pick)
	ChangeSprite(vp,s,a2)
	MoveSprite(vp,sprite,x,y)
	FreeSprite(pick)

in the Rom Kernel Manual.

If you wish to use User Copper lists, you may need to preload the SPRnPOS
registers after loading the SPRnPT registers to "wake" up the sprite engines
(e.g. add instructions to your copper lists to load these registers).  It's
been a while since I've tried to play with sprites through User Copper lists,
so I'd have to do more digging to find out for sure.

Hope this helps you on your way.

Richard Addison
"You hit the sprite with the wand of pointer stuffing. -more-
The Keystone Kopper hits.  You are blinded." -- NutHack? (-;