equal
deleted
inserted
replaced
294 * Discards all directional information from the given TrackdirBits. Any |
294 * Discards all directional information from the given TrackdirBits. Any |
295 * Track which is present in either direction will be present in the result. |
295 * Track which is present in either direction will be present in the result. |
296 */ |
296 */ |
297 static inline TrackBits TrackdirBitsToTrackBits(TrackdirBits bits) |
297 static inline TrackBits TrackdirBitsToTrackBits(TrackdirBits bits) |
298 { |
298 { |
299 return (TrackBits)(bits | (bits >> 8)); |
299 return (TrackBits)((bits | (bits >> 8)) & TRACK_BIT_MASK); |
300 } |
300 } |
301 |
301 |
302 /** |
302 /** |
303 * Maps a trackdir to the trackdir that you will end up on if you go straight |
303 * Maps a trackdir to the trackdir that you will end up on if you go straight |
304 * ahead. This will be the same trackdir for diagonal trackdirs, but a |
304 * ahead. This will be the same trackdir for diagonal trackdirs, but a |