Prev: 52827 Up: Map Next: 52887
52857: Record Floor Contact
Used by the routine at NextStep.
Used when the ship is on the same row as a step of a segment. It sets bit 7 of the contact flags at ContactFlags. If the vertical speed is not negative it also sets bit 0 (clearing bit 7) and copies the flags into LastContactFlags. It carries on at NextStep_Column.
FlagFloorContact 52857 LD A,(23601) The contact flags.
52860 OR %10000000 Set the bits of A that are set in 128.
52862 LD (23601),A Update the contact flags.
52865 LD A,(52410) The vertical scroll speed.
52868 BIT 7,A Jump to NextStep_Column if bit 7 of A is set.
52870 JP NZ,NextStep_Column
52873 LD A,(23601) The contact flags.
52876 XOR %10000001 Flip the bits of A that are set in 129.
52878 LD (23601),A Update the contact flags.
52881 LD (23602),A Update the last contact flags.
52884 JP NextStep_Column Jump to NextStep_Column.
Prev: 52827 Up: Map Next: 52887