Prev: 48888 Up: Map Next: 49110
49059: Draw Flipped Aligned Columns
Draws the columns of a sprite which is flipped but not shifted. 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 from the sprite data on the stack, turns them round with the table, wipes the screen where the mask is and puts the pixels in. It works from right to left.
The jump at SpriteJumpOpcode starts here for five columns.
DrawFlippedAlignedColumns 49059 POP DE Restore the mask into E and the pixels into D from the stack.
49060 LD L,E Turn the mask round and clear the screen bits under it.
49061 CPL
49062 OR (HL)
49063 CPL
49064 LD L,D Turn the pixels round and add them.
49065 OR (HL)
49066 LD (BC),A Store the byte, move to the byte on the left and fetch it.
49067 DEC BC
49068 LD A,(BC)
The jump at SpriteJumpOpcode starts here for four columns.
49069 POP DE Restore the mask into E and the pixels into D from the stack.
49070 LD L,E Turn the mask round and clear the screen bits under it.
49071 CPL
49072 OR (HL)
49073 CPL
49074 LD L,D Turn the pixels round and add them.
49075 OR (HL)
49076 LD (BC),A Store the byte, move to the byte on the left and fetch it.
49077 DEC BC
49078 LD A,(BC)
The jump at SpriteJumpOpcode starts here for three columns.
49079 POP DE Restore the mask into E and the pixels into D from the stack.
49080 LD L,E Turn the mask round and clear the screen bits under it.
49081 CPL
49082 OR (HL)
49083 CPL
49084 LD L,D Turn the pixels round and add them.
49085 OR (HL)
49086 LD (BC),A Store the byte, move to the byte on the left and fetch it.
49087 DEC BC
49088 LD A,(BC)
The jump at SpriteJumpOpcode starts here for two columns.
49089 POP DE Restore the mask into E and the pixels into D from the stack.
49090 LD L,E Turn the mask round and clear the screen bits under it.
49091 CPL
49092 OR (HL)
49093 CPL
49094 LD L,D Turn the pixels round and add them.
49095 OR (HL)
49096 LD (BC),A Store the byte, move to the byte on the left and fetch it.
49097 DEC BC
49098 LD A,(BC)
The jump at SpriteJumpOpcode starts here for one column.
49099 POP DE Restore the mask into E and the pixels into D from the stack.
49100 LD L,E Turn the mask round and clear the screen bits under it.
49101 CPL
49102 OR (HL)
49103 CPL
49104 LD L,D Turn the pixels round and add them.
49105 OR (HL)
49106 LD (BC),A Store the byte.
Finish the row.
49107 JP FinishSpriteRow Jump to FinishSpriteRow.
Prev: 48888 Up: Map Next: 49110