![]() |
Routines |
| Prev: D86A | Up: Map | Next: D937 |
|
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 | D8DA | LD A,($CCBB) | The horizontal scroll speed. | |||||
| D8DD | AND A | Jump to FinishSegment if A is zero. | ||||||
| D8DE | JP Z,FinishSegment | |||||||
| D8E1 | LD A,(IX+$01) | Read offset 01 of IX. | ||||||
| D8E4 | AND A | Jump to FillSlopeEdge_Right if A is not zero. | ||||||
| D8E5 | JR NZ,FillSlopeEdge_Right | |||||||
| D8E7 | LD A,($CCBB) | The horizontal scroll speed. | ||||||
| D8EA | BIT 7,A | Test bit 7 of A. | ||||||
| D8EC | LD A,($5C34) | The segment end shape. | ||||||
| D8EF | JR NZ,FillSlopeEdge_Check | Jump to FillSlopeEdge_Check if the zero flag is clear. | ||||||
| D8F1 | LD A,($5C33) | The segment start shape. | ||||||
| FillSlopeEdge_Check | D8F4 | BIT 0,A | Jump to FinishSegment if bit 0 of A is clear. | |||||
| D8F6 | JP Z,FinishSegment | |||||||
| D8F9 | EXX | Switch to the alternate registers. | ||||||
| D8FA | LD HL,($CE4F) | Fetch the word at SavedScreenAddress into HL. | ||||||
| D8FD | DEC L | Step L back. | ||||||
| D8FE | JR FillSlopeEdge_Fill | Jump to FillSlopeEdge_Fill. | ||||||
| FillSlopeEdge_Right | D900 | LD A,($5C27) | The shape flag. | |||||
| D903 | AND A | Jump to FinishSegment if A is zero. | ||||||
| D904 | JP Z,FinishSegment | |||||||
| D907 | EXX | Switch to the alternate registers. | ||||||
| D908 | LD HL,($CE4F) | Fetch the word at SavedScreenAddress into HL. | ||||||
| D90B | INC L | Advance L. | ||||||
| D90C | INC L | Advance L. | ||||||
| D90D | LD A,($5C1C) | The screen column. | ||||||
| D910 | CP $F0 | Jump to FillSlopeEdge_Fill if A is less than F0. | ||||||
| D912 | JR C,FillSlopeEdge_Fill | |||||||
| D914 | LD A,L | A=L. | ||||||
| D915 | SUB $20 | Subtract 20 from A. | ||||||
| D917 | LD L,A | L=A. | ||||||
| FillSlopeEdge_Fill | D918 | LD A,($CE53) | The saved row. | |||||
| D91B | LD ($CE44),A | Update the segment row. | ||||||
| D91E | LD A,($CCBB) | The horizontal scroll speed. | ||||||
| D921 | BIT 7,A | Jump to FillSlopeEdge_Pattern if bit 7 of A is clear. | ||||||
| D923 | JR Z,FillSlopeEdge_Pattern | |||||||
| D925 | LD A,L | A=L. | ||||||
| D926 | ADD A,$04 | Add 04 to A. | ||||||
| D928 | LD L,A | L=A. | ||||||
| FillSlopeEdge_Pattern | D929 | LD DE,$0000 | DE=00. | |||||
| D92C | LD C,$02 | C=02. | ||||||
| D92E | EXX | Switch to the alternate registers. | ||||||
| D92F | LD B,$01 | B=01. | ||||||
| D931 | CALL FillStripWithPattern | Call FillStripWithPattern. | ||||||
| D934 | JP FinishSegment | Jump to FinishSegment. | ||||||
| Prev: D86A | Up: Map | Next: D937 |