![]() |
Routines |
| Prev: E249 | Up: Map | Next: E25B |
|
The blitter for directions 0 and 7 (flat floor and flat ceiling) at every fine position: all four entries in the fine-scroll tables point here. The step is three bytes wide and four rows tall (two row pairs); its graphic is twelve bytes in the order the zig-zag writes them -- the bottom row left to right, the row above right to left, and so on up. SP points at the graphic and each POP DE fetches two bytes.
column_address is moved on three bytes for the next step. Then each row pair passes three JRs whose displacements flat_step_clip patches: all 0 draws every column; the first (here) can go to flat_blit_left_edge (start column 0 or 31: from the second or third byte, at column 1), to flat_blit_lose_first, or, on later row pairs, straight into flat_blit_left_rows; the second (flat_blit_first_byte) to flat_blit_one_column (one column); the third (flat_blit_second_byte) to flat_blit_left_two (two columns). The cut paths POP the bytes they do not write, so SP stays in step with the graphic.
Each row pair ends with the step up a pixel row, including the crossing of a character row, and DJNZ back to this JR (in flat_blit_upper_row); at the end it returns to the second instruction of after_step_drawn with column_address already set. An uncut row pair costs about 170 T-states and a whole step about 400 -- less than the deciding done for each step in landscape_step_loop and flat_step_clip.
|
||||||||||||
| blit_flat_step | E24D | LD B,A | The next step starts three bytes on. | |||||||||
| E24E | LD A,(column_address) | |||||||||||
| E251 | ADD A,$03 | |||||||||||
| E253 | LD (column_address),A | |||||||||||
| E256 | INC L | To the step's first column. | ||||||||||
| E257 | INC L | |||||||||||
| E258 | INC L | |||||||||||
|
This entry point is used by the routine at flat_blit_upper_row.
|
||||||||||||
| blit_flat_step_0 | E259 | JR blit_flat_step_0 | Patched: 0 to draw; $33, $EE or $4C for the cut paths. | |||||||||
| Prev: E249 | Up: Map | Next: E25B |