Prev: 8606 Up: Map Next: 8634
8614: Prepare Sprite Write
Shift the next graphic pair of the new sprite and XOR it onto the screen, moving up one pixel. 862F positions the actor and then continues at PositionAndDrawSprite_ClearWidth.
Input
DE Graphic pointer
Shift the next graphic pair into place and XOR it onto the screen.
PrepareSpriteWrite 8614 EX DE,HL Load the next graphic pair from DE.
8615 PUSH DE
8616 LD D,(HL)
8617 INC HL
8618 LD E,(HL)
8619 INC HL
861A EX DE,HL
861B XOR A
PrepareSpriteWrite_ShiftPair 861C JR PrepareSpriteWrite_ShiftPair Self-modifying shift. The operand is written by PositionSprite_StoreShift.
861E ADD HL,HL Rotate the pair into pixel alignment.
861F ADC A,A
8620 ADD HL,HL
8621 ADC A,A
8622 ADD HL,HL
8623 ADC A,A
8624 ADD HL,HL
8625 ADC A,A
8626 ADD HL,HL
8627 ADC A,A
8628 ADD HL,HL
8629 ADC A,A
862A ADD HL,HL
862B ADC A,A
862C EX DE,HL Switch the pair back and jump to ShiftOldSpritePair_XOR.
862D JR ShiftOldSpritePair_XOR
862F CALL PositionSprite_Apply Apply the actor position, then continue at PositionAndDrawSprite_ClearWidth.
8632 JR PositionAndDrawSprite_ClearWidth
Prev: 8606 Up: Map Next: 8634