![]() |
Routines |
| Prev: BDAE | Up: Map | Next: BE85 |
|
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 | BE5B | POP DE | Fetch the mask into E and the pixels into D. | |
| BE5C | LD A,(BC) | Clear the screen bits under the mask. | ||
| BE5D | CPL | |||
| BE5E | OR E | |||
| BE5F | CPL | |||
| BE60 | OR D | Add the pixels. | ||
| BE61 | LD (BC),A | Store the byte and move on to the next. | ||
| BE62 | INC BC | |||
| BE63 | POP DE | Fetch the mask into E and the pixels into D. | ||
| BE64 | LD A,(BC) | Clear the screen bits under the mask. | ||
| BE65 | CPL | |||
| BE66 | OR E | |||
| BE67 | CPL | |||
| BE68 | OR D | Add the pixels. | ||
| BE69 | LD (BC),A | Store the byte and move on to the next. | ||
| BE6A | INC BC | |||
| BE6B | POP DE | Fetch the mask into E and the pixels into D. | ||
| BE6C | LD A,(BC) | Clear the screen bits under the mask. | ||
| BE6D | CPL | |||
| BE6E | OR E | |||
| BE6F | CPL | |||
| BE70 | OR D | Add the pixels. | ||
| BE71 | LD (BC),A | Store the byte and move on to the next. | ||
| BE72 | INC BC | |||
| BE73 | POP DE | Fetch the mask into E and the pixels into D. | ||
| BE74 | LD A,(BC) | Clear the screen bits under the mask. | ||
| BE75 | CPL | |||
| BE76 | OR E | |||
| BE77 | CPL | |||
| BE78 | OR D | Add the pixels. | ||
| BE79 | LD (BC),A | Store the byte and move on to the next. | ||
| BE7A | INC BC | |||
| BE7B | POP DE | Fetch the mask into E and the pixels into D. | ||
| BE7C | LD A,(BC) | Clear the screen bits under the mask. | ||
| BE7D | CPL | |||
| BE7E | OR E | |||
| BE7F | CPL | |||
| BE80 | OR D | Add the pixels. | ||
| BE81 | LD (BC),A | Store the byte. | ||
|
Finish the row.
|
||||
| BE82 | JP FinishSpriteRow | Jump to FinishSpriteRow. | ||
|
View the equivalent code in;
|
||||
| Prev: BDAE | Up: Map | Next: BE85 |