Prev: 858E Up: Map Next: 85F6
85D9: Shift Old Sprite Pair
Copy of 861E for the old sprite. The self-modified jump at XORSpriteLoop_Shift lands in this run of shifts, which push the graphic pair into pixel alignment before it is XORed onto the screen.
ShiftOldSpritePair 85D9 ADD HL,HL Shift the pair left through A.
85DA ADC A,A
85DB ADD HL,HL
85DC ADC A,A
85DD ADD HL,HL
85DE ADC A,A
85DF ADD HL,HL
85E0 ADC A,A
85E1 ADD HL,HL
85E2 ADC A,A
85E3 ADD HL,HL
85E4 ADC A,A
85E5 ADD HL,HL
85E6 ADC A,A
85E7 EX DE,HL Switch the shifted pair into DE.
XOR three bytes onto the screen, then move up one pixel.
ShiftOldSpritePair_XOR 85E8 EX (SP),HL XOR A, D and E onto the screen at HL and restore the graphic pointer.
85E9 XOR (HL)
85EA LD (HL),A
85EB INC L
85EC LD A,D
85ED XOR (HL)
85EE LD (HL),A
85EF INC L
85F0 LD A,E
85F1 XOR (HL)
85F2 LD (HL),A
85F3 POP DE
85F4 DEC L
85F5 DEC L
Prev: 858E Up: Map Next: 85F6