Optimizing an Imaginary Sprite Part 3

<< Previous | Next >>

Version 2 – A little fix

Just before we get to the optimization, we need a quick fix. Version 2 fixes an issue so it doesn’t crap out when the last sprite byte is zero. You can see the cmpx #sp_end and beq render at line 16 & 17. This checks to see if we have reached the last byte and exits if so.

sprite2.asm

The original is on the left, version 2 on the right.

Next, Version 3