Prev: E3D9 Up: Map Next: E4A7
E49F: The unrolled row of a byte-aligned sprite
Entered by the JR in SPRITE_ROW, as many 8-byte units from the end as the sprite is wide. Each unit takes the next mask and image off the stack and does one buffer byte: cleared under the mask (CPL, OR E, CPL), the image ORed in, stored. The last unit has no INC BC, so a row leaves BC on its last byte, which the step patched in at SPRITE_NEXT_ROW allows for.
This first unit is for a fifth byte, and no sprite in the game is wider than four (graphics 2, 76 to 79 and 152 are four; read from the graphic table): it can never run, which is why the code map took it for data. Knight Lore, Alien 8 and Pentagram unroll the same five units.
SPRITE_ALIGNED_RUN E49F POP DE The unit for the fifth byte from the end
E4A0 LD A,(BC)
E4A1 CPL
E4A2 OR E
E4A3 CPL
E4A4 OR D
E4A5 LD (BC),A
E4A6 INC BC
Prev: E3D9 Up: Map Next: E4A7