Improve return value of UpdateSignalsInBuffer
[openttd/fttd.git] / src / signal_func.h
blobb3b72db47b712d9b24efdc0790fab9ec316b3c9a
1 /* $Id$ */
3 /*
4 * This file is part of OpenTTD.
5 * OpenTTD is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, version 2.
6 * OpenTTD is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
7 * See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with OpenTTD. If not, see <http://www.gnu.org/licenses/>.
8 */
10 /** @file signal_func.h Functions related to signals. */
12 #ifndef SIGNAL_FUNC_H
13 #define SIGNAL_FUNC_H
15 #include "track_type.h"
16 #include "tile_type.h"
17 #include "direction_type.h"
18 #include "company_type.h"
20 /** State of the signal segment */
21 enum SigSegState {
22 SIGSEG_NONE, ///< There was no segment (not usually a returned value)
23 SIGSEG_FREE, ///< Free and has no pre-signal exits or at least one green exit
24 SIGSEG_FULL, ///< Occupied by a train
25 SIGSEG_PBS, ///< Segment is a PBS segment
28 SigSegState UpdateSignalsOnSegment(TileIndex tile, DiagDirection side, Owner owner);
29 void SetSignalsOnBothDir(TileIndex tile, Track track, Owner owner);
30 void AddTrackToSignalBuffer(TileIndex tile, Track track, Owner owner);
31 void AddSideToSignalBuffer(TileIndex tile, DiagDirection side, Owner owner);
32 void UpdateSignalsInBuffer();
34 #endif /* SIGNAL_FUNC_H */