![]() |
Routines |
| Prev: CEC8 | Up: Map | Next: CF14 |
|
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 | CEDB | LD A,($CE59) | The horizontal step copy. | |
| CEDE | AND A | Jump to NoteWallContact_Check if A is zero. | ||
| CEDF | JR Z,NoteWallContact_Check | |||
| CEE1 | LD A,($5C1D) | The tile number. | ||
| CEE4 | BIT 1,A | Jump to NoteWallContact_Right if bit 1 of A is set. | ||
| CEE6 | JR NZ,NoteWallContact_Right | |||
| CEE8 | LD A,($E41B) | The slope direction. | ||
| CEEB | CP $01 | Jump to NoteWallContact_Check if A is not 01. | ||
| CEED | JR NZ,NoteWallContact_Check | |||
| NoteWallContact_Limit | CEEF | LD A,C | A=C. | |
| CEF0 | CP $02 | Jump to NoteWallContact_Check if A is less than 02. | ||
| CEF2 | JR C,NoteWallContact_Check | |||
| CEF4 | LD C,$02 | C=02. | ||
| CEF6 | JR NoteWallContact_Check | Jump to NoteWallContact_Check. | ||
| NoteWallContact_Right | CEF8 | LD A,($E41B) | The slope direction. | |
| CEFB | CP $FF | Jump to NoteWallContact_Check if A is not FF. | ||
| CEFD | JR NZ,NoteWallContact_Check | |||
| CEFF | JR NoteWallContact_Limit | Jump to NoteWallContact_Limit. | ||
| NoteWallContact_Check | CF01 | LD A,($5C2F) | The flagged steps. | |
| CF04 | AND A | Jump to FinishStep_Count if A is not zero. | ||
| CF05 | JP NZ,FinishStep_Count | |||
| CF08 | EXX | Switch to the alternate registers. | ||
| CF09 | CALL FindSegmentAddress | Call FindSegmentAddress. | ||
| CF0C | XOR A | Clear A. | ||
| CF0D | LD (IX+$01),A | Write A to offset 01 of IX. | ||
| CF10 | EXX | Switch to the alternate registers. | ||
| CF11 | JP FinishStep_Count | Jump to FinishStep_Count. | ||
| Prev: CEC8 | Up: Map | Next: CF14 |