Prev: E4C9 Up: Map Next: E4DF
E4CD: The unrolled row of a shifted sprite
Entered by the JR in SPRITE_ROW, as many 18-byte units from the end as the sprite is wide. H is the first of the pair of pages MAKE_TABLES built for the shift: page H gives a byte shifted right, the part that stays in its own buffer byte, and page H + 1 the bits that fall out into the next. Each unit finishes the buffer byte in A -- cleared under the shifted mask (CPL, OR, CPL) and the shifted image ORed in -- stores it, and begins the next byte with the parts of the mask and image that fall into it, left in A for the next unit. The byte the last unit begins is stored after it.
Pentagram's tables are complemented and its unit ANDs and XORs; Nightshade's are plain and the unit complements around the OR, as the byte-aligned run does. This first unit is for a fifth byte and never runs (see SPRITE_ALIGNED_RUN); the code map took it for data.
SPRITE_SHIFTED_RUN E4CD CPL The unit for the fifth byte from the end
E4CE POP DE
E4CF LD L,E
E4D0 OR (HL)
E4D1 CPL
E4D2 LD L,D
E4D3 OR (HL)
E4D4 LD (BC),A
E4D5 INC BC
E4D6 INC H
E4D7 LD L,E
E4D8 LD A,(BC)
E4D9 CPL
E4DA OR (HL)
E4DB CPL
E4DC LD L,D
E4DD OR (HL)
E4DE DEC H
Prev: E4C9 Up: Map Next: E4DF