![]() |
Routines |
| Prev: 52936 | Up: Map | Next: 53012 |
|
Used by the routine at NextStep.
Used when the ship has touched the side of a segment. For a segment that has a horizontal step the remaining length is limited to two steps if the slope goes the way that the tile is facing. If the ship has not touched a segment already the routine finds the screen address of the start with FindSegmentAddress and clears the first byte of the record. It carries on at FinishStep_Count.
|
||||
| NoteWallContact | 52955 | LD A,(52825) | The horizontal step copy. | |
| 52958 | AND A | Jump to NoteWallContact_Check if A is zero. | ||
| 52959 | JR Z,NoteWallContact_Check | |||
| 52961 | LD A,(23581) | The tile number. | ||
| 52964 | BIT 1,A | Jump to NoteWallContact_Right if bit 1 of A is set. | ||
| 52966 | JR NZ,NoteWallContact_Right | |||
| 52968 | LD A,(58395) | The slope direction. | ||
| 52971 | CP 1 | Jump to NoteWallContact_Check if A is not 1. | ||
| 52973 | JR NZ,NoteWallContact_Check | |||
| NoteWallContact_Limit | 52975 | LD A,C | A=C. | |
| 52976 | CP 2 | Jump to NoteWallContact_Check if A is less than 2. | ||
| 52978 | JR C,NoteWallContact_Check | |||
| 52980 | LD C,2 | C=2. | ||
| 52982 | JR NoteWallContact_Check | Jump to NoteWallContact_Check. | ||
| NoteWallContact_Right | 52984 | LD A,(58395) | The slope direction. | |
| 52987 | CP 255 | Jump to NoteWallContact_Check if A is not 255. | ||
| 52989 | JR NZ,NoteWallContact_Check | |||
| 52991 | JR NoteWallContact_Limit | Jump to NoteWallContact_Limit. | ||
| NoteWallContact_Check | 52993 | LD A,(23599) | The flagged steps. | |
| 52996 | AND A | Jump to FinishStep_Count if A is not zero. | ||
| 52997 | JP NZ,FinishStep_Count | |||
| 53000 | EXX | Switch to the alternate registers. | ||
| 53001 | CALL FindSegmentAddress | Call FindSegmentAddress. | ||
| 53004 | XOR A | Clear A. | ||
| 53005 | LD (IX+1),A | Write A to offset 1 of IX. | ||
| 53008 | EXX | Switch to the alternate registers. | ||
| 53009 | JP FinishStep_Count | Jump to FinishStep_Count. | ||
| Prev: 52936 | Up: Map | Next: 53012 |