![]() |
Routines |
| Prev: DBFD | Up: Map | Next: DC87 |
|
Used by the routine at step_dispatch.
Reached through step_dispatch (dispatch 5) for a sloped step of a piece running left that crosses the right edge. Like blit_mirrored_left_clip it mirrors each byte through the table bit_reverse_table and keeps the row count in B'. The patched JR (displacement set by use_mirrored_right_clip: 0 for two columns, $26, $27 or $28 for one, by how many pairs must be passed) decides how many of the step's columns are written.
This was code partly typed as data in the first code map.
|
||||||||||||
| blit_mirrored_right_clip | DC47 | EXX | Row count into B'. | |||||||||
| DC48 | LD B,A | |||||||||||
| DC49 | EXX | |||||||||||
| DC4A | LD A,(piece_dcolumn) | To the step's first column. | ||||||||||
| DC4D | ADD A,L | |||||||||||
| DC4E | LD L,A | |||||||||||
| DC4F | LD B,$F9 | B = the page of the bit-reversing table; into the loop. | ||||||||||
| DC51 | JP blit_mirrored_right_clip_1 | |||||||||||
| blit_mirrored_right_clip_0 | DC54 | EXX | Loop: the drawing registers. | |||||||||
| blit_mirrored_right_clip_1 | DC55 | POP DE | Lower row, first column, mirrored. | |||||||||
| DC56 | LD C,E | |||||||||||
| DC57 | LD A,(BC) | |||||||||||
| DC58 | LD (HL),A | |||||||||||
| blit_mirrored_right_clip_2 | DC59 | JR blit_mirrored_right_clip_2 | Patched: how much more of the row pair is drawn. | |||||||||
| DC5B | INC L | Second column; up a row; pass the third column's pair; upper row second column. | ||||||||||
| DC5C | LD C,D | |||||||||||
| DC5D | LD A,(BC) | |||||||||||
| DC5E | LD (HL),A | |||||||||||
| DC5F | DEC H | |||||||||||
| DC60 | POP DE | |||||||||||
| DC61 | POP DE | |||||||||||
| DC62 | LD C,E | |||||||||||
| DC63 | LD A,(BC) | |||||||||||
| DC64 | LD (HL),A | |||||||||||
| DC65 | DEC L | |||||||||||
| blit_mirrored_right_clip_3 | DC66 | LD C,D | Upper row, first column. | |||||||||
| DC67 | LD A,(BC) | |||||||||||
| DC68 | LD (HL),A | |||||||||||
| DC69 | DEC H | Up a pixel row, crossing a character row if need be. | ||||||||||
| DC6A | LD A,H | |||||||||||
| DC6B | INC A | |||||||||||
| DC6C | AND $07 | |||||||||||
| DC6E | JR NZ,blit_mirrored_right_clip_4 | |||||||||||
| DC70 | LD A,L | |||||||||||
| DC71 | SUB $20 | |||||||||||
| DC73 | LD L,A | |||||||||||
| DC74 | JR C,blit_mirrored_right_clip_4 | |||||||||||
| DC76 | LD A,H | |||||||||||
| DC77 | ADD A,$08 | |||||||||||
| DC79 | LD H,A | |||||||||||
| blit_mirrored_right_clip_4 | DC7A | EXX | Next row pair (counted in B'); done. | |||||||||
| DC7B | DJNZ blit_mirrored_right_clip_0 | |||||||||||
| DC7D | EXX | |||||||||||
| DC7E | JP after_step_drawn | |||||||||||
| DC81 | POP DE | One-column cuts: pass two pairs, one, or none; up a row; the upper row's first column. | ||||||||||
| DC82 | POP DE | |||||||||||
| DC83 | DEC H | |||||||||||
| DC84 | JP blit_mirrored_right_clip_3 | |||||||||||
| Prev: DBFD | Up: Map | Next: DC87 |