equal
deleted
inserted
replaced
208 static const int8 _get_tunlen_inc[5] = { -16, 0, 16, 0, -16 }; |
208 static const int8 _get_tunlen_inc[5] = { -16, 0, 16, 0, -16 }; |
209 |
209 |
210 /* Returns the end tile and the length of a tunnel. The length does not |
210 /* Returns the end tile and the length of a tunnel. The length does not |
211 * include the starting tile (entry), it does include the end tile (exit). |
211 * include the starting tile (entry), it does include the end tile (exit). |
212 */ |
212 */ |
213 FindLengthOfTunnelResult FindLengthOfTunnel(TileIndex tile, uint direction) |
213 FindLengthOfTunnelResult FindLengthOfTunnel(TileIndex tile, DiagDirection direction) |
214 { |
214 { |
215 FindLengthOfTunnelResult flotr; |
215 FindLengthOfTunnelResult flotr; |
216 int x,y; |
216 int x,y; |
217 byte z; |
217 byte z; |
218 |
218 |
244 return flotr; |
244 return flotr; |
245 } |
245 } |
246 |
246 |
247 static const uint16 _tpfmode1_and[4] = { 0x1009, 0x16, 0x520, 0x2A00 }; |
247 static const uint16 _tpfmode1_and[4] = { 0x1009, 0x16, 0x520, 0x2A00 }; |
248 |
248 |
249 static uint SkipToEndOfTunnel(TrackPathFinder *tpf, TileIndex tile, int direction) |
249 static uint SkipToEndOfTunnel(TrackPathFinder* tpf, TileIndex tile, DiagDirection direction) |
250 { |
250 { |
251 FindLengthOfTunnelResult flotr; |
251 FindLengthOfTunnelResult flotr; |
252 TPFSetTileBit(tpf, tile, 14); |
252 TPFSetTileBit(tpf, tile, 14); |
253 flotr = FindLengthOfTunnel(tile, direction); |
253 flotr = FindLengthOfTunnel(tile, direction); |
254 tpf->rd.cur_length += flotr.length; |
254 tpf->rd.cur_length += flotr.length; |