![]() |
Routines |
| Prev: BEF8 | Up: Map | Next: BFD6 |
|
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 | BFA3 | POP DE | Restore the mask into E and the pixels into D from the stack. | |
| BFA4 | LD L,E | Turn the mask round and clear the screen bits under it. | ||
| BFA5 | CPL | |||
| BFA6 | OR (HL) | |||
| BFA7 | CPL | |||
| BFA8 | LD L,D | Turn the pixels round and add them. | ||
| BFA9 | OR (HL) | |||
| BFAA | LD (BC),A | Store the byte, move to the byte on the left and fetch it. | ||
| BFAB | DEC BC | |||
| BFAC | LD A,(BC) | |||
|
The jump at SpriteJumpOpcode starts here for four columns.
|
||||
| BFAD | POP DE | Restore the mask into E and the pixels into D from the stack. | ||
| BFAE | LD L,E | Turn the mask round and clear the screen bits under it. | ||
| BFAF | CPL | |||
| BFB0 | OR (HL) | |||
| BFB1 | CPL | |||
| BFB2 | LD L,D | Turn the pixels round and add them. | ||
| BFB3 | OR (HL) | |||
| BFB4 | LD (BC),A | Store the byte, move to the byte on the left and fetch it. | ||
| BFB5 | DEC BC | |||
| BFB6 | LD A,(BC) | |||
|
The jump at SpriteJumpOpcode starts here for three columns.
|
||||
| BFB7 | POP DE | Restore the mask into E and the pixels into D from the stack. | ||
| BFB8 | LD L,E | Turn the mask round and clear the screen bits under it. | ||
| BFB9 | CPL | |||
| BFBA | OR (HL) | |||
| BFBB | CPL | |||
| BFBC | LD L,D | Turn the pixels round and add them. | ||
| BFBD | OR (HL) | |||
| BFBE | LD (BC),A | Store the byte, move to the byte on the left and fetch it. | ||
| BFBF | DEC BC | |||
| BFC0 | LD A,(BC) | |||
|
The jump at SpriteJumpOpcode starts here for two columns.
|
||||
| BFC1 | POP DE | Restore the mask into E and the pixels into D from the stack. | ||
| BFC2 | LD L,E | Turn the mask round and clear the screen bits under it. | ||
| BFC3 | CPL | |||
| BFC4 | OR (HL) | |||
| BFC5 | CPL | |||
| BFC6 | LD L,D | Turn the pixels round and add them. | ||
| BFC7 | OR (HL) | |||
| BFC8 | LD (BC),A | Store the byte, move to the byte on the left and fetch it. | ||
| BFC9 | DEC BC | |||
| BFCA | LD A,(BC) | |||
|
The jump at SpriteJumpOpcode starts here for one column.
|
||||
| BFCB | POP DE | Restore the mask into E and the pixels into D from the stack. | ||
| BFCC | LD L,E | Turn the mask round and clear the screen bits under it. | ||
| BFCD | CPL | |||
| BFCE | OR (HL) | |||
| BFCF | CPL | |||
| BFD0 | LD L,D | Turn the pixels round and add them. | ||
| BFD1 | OR (HL) | |||
| BFD2 | LD (BC),A | Store the byte. | ||
|
Finish the row.
|
||||
| BFD3 | JP FinishSpriteRow | Jump to FinishSpriteRow. | ||
| Prev: BEF8 | Up: Map | Next: BFD6 |