![]() |
Routines |
| Prev: CE79 | Up: Map | Next: CEB5 |
|
Used by the routine at NextStep.
Used when the ship is on the same row as a step of a segment in the bottom half of the tile. It sets bit 7 of the contact flags at ContactFlags. If the vertical speed is negative it also sets bit 1 (clearing bit 7) and copies the flags into LastContactFlags. It carries on at NextStep_Column.
|
||||
| FlagCeilingContact | CE97 | LD A,($5C31) | The contact flags. | |
| CE9A | OR %10000000 | Set the bits of A that are set in 80. | ||
| CE9C | LD ($5C31),A | Update the contact flags. | ||
| CE9F | LD A,($CCBA) | The vertical scroll speed. | ||
| CEA2 | BIT 7,A | Jump to NextStep_Column if bit 7 of A is clear. | ||
| CEA4 | JP Z,NextStep_Column | |||
| CEA7 | LD A,($5C31) | The contact flags. | ||
| CEAA | XOR %10000010 | Flip the bits of A that are set in 82. | ||
| CEAC | LD ($5C31),A | Update the contact flags. | ||
| CEAF | LD ($5C32),A | Update the last contact flags. | ||
| CEB2 | JP NextStep_Column | Jump to NextStep_Column. | ||
| Prev: CE79 | Up: Map | Next: CEB5 |