I added perfectBob.s to the ZIP file.
It is an enhanced version of bobRAWB.s: it displays a BOB that is masked (ie: the BOB may contain transparent pixels) and that is cleared from the background between frames (ie: the whole background is not cleared between frames, which saves a lot of time when there are numerous bitplanes).
Note that using masks to recover only the pixels of the rectangular area of the background that the BOB hides is certainly not the fastest way to recover the background if this background did not change between frames. A better option would be to recover all the WORDs that the BOB hides even partially, which means copying a WORD-aligned part of the background without masking any part of it. Still, a precise recovering routine may be useful. Moreover, it is another interesting example of one usage of the Blitter.
So, the code contains three routines that use data structures :
_drawBOB draws the BOB
_clearBOB recovers the background behind the BOB with a pixel precision
_clearBOBFast recovers the background behind the BOB with a WORD precision
Last edited by Yragael; 13 August 2018 at 08:24.
Reason: I had trouble understanding myself :)
|