05-29-2010, 03:59 PM
Nope. It's a little bit broken - though the actual sprite code should be solid. The only problem it has is when sprites overlap, right now.
I'm not sure of the best solution:
1> Instead of Sprite 1: Erase-Print, Sprite 2: Erase-Print.... etc; could do Erase-Erase-Erase-Erase-print-print-print-print (as the original fourspriter does)
2> Outside the sprite printing loop, flag sprites that overlap, and turn one of them off while overlapping.
I was looking at doing version 2, because it keeps the main loop faster; but it is less elegant. On the plus side, it does mean that a collision detection function could be implemented very easily.
[What I was talking about was using the Fourspriter fast push-pop code as part of a 4 character Put-Tiles function, as listed here]
I'm not sure of the best solution:
1> Instead of Sprite 1: Erase-Print, Sprite 2: Erase-Print.... etc; could do Erase-Erase-Erase-Erase-print-print-print-print (as the original fourspriter does)
2> Outside the sprite printing loop, flag sprites that overlap, and turn one of them off while overlapping.
I was looking at doing version 2, because it keeps the main loop faster; but it is less elegant. On the plus side, it does mean that a collision detection function could be implemented very easily.
[What I was talking about was using the Fourspriter fast push-pop code as part of a 4 character Put-Tiles function, as listed here]