Sorry, I made an incorrect statement in my earlier post. It is not the
sprite image that DBC uses, but the
sprite number itself that DBC uses to place them on the screen in order, starting at the lowest number.
I wrote a short program to test this. The order of creation did not matter, but the sprite number did. Sprite #1 was always drawn first, whereas sprite #2 was next and so on and so forth. I specifically drew sprites with higher #'s first to see what it would do, but it did not matter, the lower sprite numbers always were overwritten by sprites with higher numbers.
Here's the code to demonstrate:
` DBC sprite priority LB 4/11/07
sync on
sync rate 60
ink rgb(255,0,0),0
box 100,100,200,200
red=1
get image red,100,100,200,200
cls
ink rgb(0,255,0),0
box 100,100,200,200
green=2
get image green,100,100,200,200
cls
ink rgb(0,0,255),0
box 100,100,200,200
blue=3
get image blue,100,100,200,200
cls
print "Sprites: red=1 green=2 blue=3"
print "drawn in this order: red, green, blue"
print "Press any key."
sprite 1,100,100,red
sprite 2,133,133,green
sprite 3,166,166,blue
sync
wait key
cls
print "Sprites: red=2 green=1 blue=3"
print "drawn in this order: green, blue, red"
print "Press any key."
sprite 1,100,100,green
sprite 3,166,166,blue
sprite 2,133,133,red
sync
wait key
cls
print "Sprites: red=2 green=1 blue=3"
print "drawn in this order: red, green, blue"
print "Press any key."
sprite 2,133,133,red
sprite 1,100,100,green
sprite 3,166,166,blue
sync
wait key
cls
print "Sprites: red=3 green=2 blue=1"
print "drawn in this order: blue, red, green"
print "Press any key."
sprite 1,100,100,blue
sprite 3,166,166,red
sprite 2,133,133,green
sync
wait key
end
LB