![]() |
Routines |
| Prev: 55402 | Up: Map | Next: 55607 |
|
Used by the routine at EndSegment.
Clears the pixels at the end of a sloped segment when the world is moving horizontally and the shape code of the segment says that it is a slope (bit 0 of the shape code that goes with the direction, in StartShape or EndShape). The screen address of the end is found from SavedScreenAddress, moved to either side, and FillStripWithPattern fills a strip there with zeros.
|
||||||||
| FillSlopeEdge | 55514 | LD A,(52411) | The horizontal scroll speed. | |||||
| 55517 | AND A | Jump to FinishSegment if A is zero. | ||||||
| 55518 | JP Z,FinishSegment | |||||||
| 55521 | LD A,(IX+1) | Read offset 1 of IX. | ||||||
| 55524 | AND A | Jump to FillSlopeEdge_Right if A is not zero. | ||||||
| 55525 | JR NZ,FillSlopeEdge_Right | |||||||
| 55527 | LD A,(52411) | The horizontal scroll speed. | ||||||
| 55530 | BIT 7,A | Test bit 7 of A. | ||||||
| 55532 | LD A,(23604) | The segment end shape. | ||||||
| 55535 | JR NZ,FillSlopeEdge_Check | Jump to FillSlopeEdge_Check if the zero flag is clear. | ||||||
| 55537 | LD A,(23603) | The segment start shape. | ||||||
| FillSlopeEdge_Check | 55540 | BIT 0,A | Jump to FinishSegment if bit 0 of A is clear. | |||||
| 55542 | JP Z,FinishSegment | |||||||
| 55545 | EXX | Switch to the alternate registers. | ||||||
| 55546 | LD HL,(52815) | Fetch the word at SavedScreenAddress into HL. | ||||||
| 55549 | DEC L | Step L back. | ||||||
| 55550 | JR FillSlopeEdge_Fill | Jump to FillSlopeEdge_Fill. | ||||||
| FillSlopeEdge_Right | 55552 | LD A,(23591) | The shape flag. | |||||
| 55555 | AND A | Jump to FinishSegment if A is zero. | ||||||
| 55556 | JP Z,FinishSegment | |||||||
| 55559 | EXX | Switch to the alternate registers. | ||||||
| 55560 | LD HL,(52815) | Fetch the word at SavedScreenAddress into HL. | ||||||
| 55563 | INC L | Advance L. | ||||||
| 55564 | INC L | Advance L. | ||||||
| 55565 | LD A,(23580) | The screen column. | ||||||
| 55568 | CP 240 | Jump to FillSlopeEdge_Fill if A is less than 240. | ||||||
| 55570 | JR C,FillSlopeEdge_Fill | |||||||
| 55572 | LD A,L | A=L. | ||||||
| 55573 | SUB 32 | Subtract 32 from A. | ||||||
| 55575 | LD L,A | L=A. | ||||||
| FillSlopeEdge_Fill | 55576 | LD A,(52819) | The saved row. | |||||
| 55579 | LD (52804),A | Update the segment row. | ||||||
| 55582 | LD A,(52411) | The horizontal scroll speed. | ||||||
| 55585 | BIT 7,A | Jump to FillSlopeEdge_Pattern if bit 7 of A is clear. | ||||||
| 55587 | JR Z,FillSlopeEdge_Pattern | |||||||
| 55589 | LD A,L | A=L. | ||||||
| 55590 | ADD A,4 | Add 4 to A. | ||||||
| 55592 | LD L,A | L=A. | ||||||
| FillSlopeEdge_Pattern | 55593 | LD DE,0 | DE=0. | |||||
| 55596 | LD C,2 | C=2. | ||||||
| 55598 | EXX | Switch to the alternate registers. | ||||||
| 55599 | LD B,1 | B=1. | ||||||
| 55601 | CALL FillStripWithPattern | Call FillStripWithPattern. | ||||||
| 55604 | JP FinishSegment | Jump to FinishSegment. | ||||||
| Prev: 55402 | Up: Map | Next: 55607 |