![]() |
Routines |
| Prev: DB89 | Up: Map | Next: DBFD |
|
Used by the routine at step_dispatch.
Reached through step_dispatch (dispatch 8) for a sloped step of a piece running right that hangs over the play area's left edge (slope_step_at_left_edge). HL moves to column 1 of the same character row; the first patched JR decides whether one or two graphic bytes are skipped (INC SP), so that the first byte popped belongs in column 1; the second decides how much of each row pair is written: displacement 0 the last two columns, $2C the last column of a two-byte step, $30 the last column of a three-byte step. A POP at the end of each row pair keeps the graphic in step. Afterwards the next step's column comes from move_across_kept.
This was code typed as text and data in the first code map, before the staged tours ran it.
|
||||||||||||
| blit_left_clip | DBB7 | LD B,A | B = row pairs. | |||||||||
| DBB8 | LD A,L | Column 1 of this character row. | ||||||||||
| DBB9 | INC A | |||||||||||
| DBBA | INC A | |||||||||||
| DBBB | AND $E0 | |||||||||||
| DBBD | INC A | |||||||||||
| DBBE | LD L,A | |||||||||||
| DBBF | INC SP | Skip a graphic byte... | ||||||||||
| blit_left_clip_0 | DBC0 | JR blit_left_clip_0 | ...patched: and another (displacement 0) or not (1). | |||||||||
| DBC2 | INC SP | The second byte skipped. | ||||||||||
| blit_left_clip_1 | DBC3 | POP DE | Lower row, column 1. | |||||||||
| DBC4 | LD (HL),E | |||||||||||
| blit_left_clip_2 | DBC5 | JR blit_left_clip_2 | Patched: how much more of the row pair is drawn. | |||||||||
| DBC7 | INC L | Column 2; up a row; upper row column 2, column 1. | ||||||||||
| DBC8 | LD (HL),D | |||||||||||
| DBC9 | DEC H | |||||||||||
| DBCA | POP DE | |||||||||||
| DBCB | LD (HL),E | |||||||||||
| DBCC | DEC L | |||||||||||
| blit_left_clip_3 | DBCD | LD (HL),D | ||||||||||
| blit_left_clip_4 | DBCE | POP DE | Pass the rest of the row pair. | |||||||||
| DBCF | DEC H | Up a pixel row, crossing a character row if need be. | ||||||||||
| DBD0 | LD A,H | |||||||||||
| DBD1 | INC A | |||||||||||
| DBD2 | AND $07 | |||||||||||
| DBD4 | JR NZ,blit_left_clip_5 | |||||||||||
| DBD6 | LD A,L | |||||||||||
| DBD7 | SUB $20 | |||||||||||
| DBD9 | LD L,A | |||||||||||
| DBDA | JR C,blit_left_clip_5 | |||||||||||
| DBDC | LD A,H | |||||||||||
| DBDD | ADD A,$08 | |||||||||||
| DBDF | LD H,A | |||||||||||
| blit_left_clip_5 | DBE0 | DJNZ blit_left_clip_1 | Next row pair. | |||||||||
| DBE2 | LD A,(move_across_kept) | The next step's column, from move_across_kept and the byte advance. | ||||||||||
| DBE5 | LD B,A | |||||||||||
| DBE6 | LD A,(piece_dcolumn) | |||||||||||
| DBE9 | LD C,A | |||||||||||
| DBEA | LD A,L | |||||||||||
| DBEB | AND $E0 | |||||||||||
| DBED | OR B | |||||||||||
| DBEE | SUB C | |||||||||||
| DBEF | LD L,A | |||||||||||
| DBF0 | JP after_step_drawn | Done. | ||||||||||
| DBF3 | DEC H | Last column of a two-byte step: up a row, the upper row's byte. | ||||||||||
| DBF4 | JP blit_left_clip_3 | |||||||||||
| DBF7 | DEC H | Last column of a three-byte step: up a row, the upper row's byte, pass a pair. | ||||||||||
| DBF8 | LD (HL),D | |||||||||||
| DBF9 | POP DE | |||||||||||
| DBFA | JP blit_left_clip_4 | |||||||||||
| Prev: DB89 | Up: Map | Next: DBFD |