![]() |
Routines |
| Prev: 9ACB | Up: Map | Next: 9B14 |
|
Mirrored like BLIT_SPRITE_MIRRORED, and turned over as well: the call to START_AT_LAST_ROW moves the data pointer to the last row before anything is drawn, so the rows come out in the opposite order.
This is why there are eight drawing routines in each family rather than one. They are the eight symmetries of a rectangle -- the four ways to flip it (as stored, mirrored, upside down, both, which is a half turn) and the same four turned through a right angle -- and the top three bits of a door's or piece of furniture's +$05 pick between them.
|
||||
| BLIT_SPRITE_FLIPPED | 9AEF | POP BC | The combining opcode. | |
| 9AF0 | CALL SPRITE_COMBINE_OPCODE | |||
| 9AF3 | LD (BLIT_FLIPPED_OP),A | |||
| 9AF6 | CALL FETCH_SPRITE | |||
| 9AF9 | CALL START_AT_LAST_ROW | Move to the last row: this one draws bottom to top. | ||
| 9AFC | CALL NEXT_SPRITE_ROW | |||
| BLIT_SPRITE_FLIPPED_0 | 9AFF | PUSH BC | ||
| 9B00 | PUSH HL | |||
| BLIT_SPRITE_FLIPPED_1 | 9B01 | DEC DE | ||
| 9B02 | LD A,(DE) | |||
| 9B03 | CALL REVERSE_BITS | |||
| BLIT_FLIPPED_OP | 9B06 | NOP | ||
| 9B07 | LD (HL),A | |||
| 9B08 | INC L | |||
| 9B09 | DJNZ BLIT_SPRITE_FLIPPED_1 | |||
| 9B0B | POP HL | |||
| 9B0C | CALL SCREEN_ROW_UP | |||
| 9B0F | POP BC | |||
| 9B10 | DEC C | |||
| 9B11 | JR NZ,BLIT_SPRITE_FLIPPED_0 | |||
| 9B13 | RET | |||
| Prev: 9ACB | Up: Map | Next: 9B14 |