09-06-2011, 01:01 AM
Working on improvements to this.
Again, it's a call between speed and size - this version is enormous at first glance, in that it has 7 * 512 byte rotate tables, and 512 bytes of screen lookup tables, for a lookup table size of 4K.
It does shave almost 20% off the time taken to make one call to the function, however - and remember that the example 16*16 sprite requires 8 calls to update the position, (4 things blanked off, and 4 new characters drawn). Still some flicker, but it's pushed quite a lot higher up the screen.
There are probably still quite a lot of speed optimizations that could be made out of this - I ran out of time, here.
Note also code is quite long - probably better to #include it than insert it directly. Those tables take up a lot of lines.
Again, it's a call between speed and size - this version is enormous at first glance, in that it has 7 * 512 byte rotate tables, and 512 bytes of screen lookup tables, for a lookup table size of 4K.
It does shave almost 20% off the time taken to make one call to the function, however - and remember that the example 16*16 sprite requires 8 calls to update the position, (4 things blanked off, and 4 new characters drawn). Still some flicker, but it's pushed quite a lot higher up the screen.
There are probably still quite a lot of speed optimizations that could be made out of this - I ran out of time, here.
Note also code is quite long - probably better to #include it than insert it directly. Those tables take up a lot of lines.