Prev: 48558 Up: Map Next: 48773
48731: Draw Aligned Columns
Draws the columns of a sprite which is not shifted or flipped. There is a piece of code for each of up to five columns, and the code for the width of the sprite is where the jump at SpriteJumpOpcode starts. Each piece takes the mask and the pixels for one byte of the row from the sprite data on the stack, wipes the screen where the mask is and puts the pixels in. The buffer address is in BC.
DrawAlignedColumns 48731 POP DE Fetch the mask into E and the pixels into D.
48732 LD A,(BC) Clear the screen bits under the mask.
48733 CPL
48734 OR E
48735 CPL
48736 OR D Add the pixels.
48737 LD (BC),A Store the byte and move on to the next.
48738 INC BC
48739 POP DE Fetch the mask into E and the pixels into D.
48740 LD A,(BC) Clear the screen bits under the mask.
48741 CPL
48742 OR E
48743 CPL
48744 OR D Add the pixels.
48745 LD (BC),A Store the byte and move on to the next.
48746 INC BC
48747 POP DE Fetch the mask into E and the pixels into D.
48748 LD A,(BC) Clear the screen bits under the mask.
48749 CPL
48750 OR E
48751 CPL
48752 OR D Add the pixels.
48753 LD (BC),A Store the byte and move on to the next.
48754 INC BC
48755 POP DE Fetch the mask into E and the pixels into D.
48756 LD A,(BC) Clear the screen bits under the mask.
48757 CPL
48758 OR E
48759 CPL
48760 OR D Add the pixels.
48761 LD (BC),A Store the byte and move on to the next.
48762 INC BC
48763 POP DE Fetch the mask into E and the pixels into D.
48764 LD A,(BC) Clear the screen bits under the mask.
48765 CPL
48766 OR E
48767 CPL
48768 OR D Add the pixels.
48769 LD (BC),A Store the byte.
Finish the row.
48770 JP FinishSpriteRow Jump to FinishSpriteRow.
View the equivalent code in;
Prev: 48558 Up: Map Next: 48773