# signal_func.h

Go to the documentation of this file.

    00001 /* $Id: signal_func.h 11871 2008-01-16 01:18:15Z smatz $ */
    00002
    00005 #ifndef SIGNAL_FUNC_H
    00006 #define SIGNAL_FUNC_H
    00007
    00008 #include "track_type.h"
    00009 #include "tile_type.h"
    00010 #include "direction_type.h"
    00011 #include "track_type.h"
    00012 #include "player_type.h"
    00013
    00018 static inline byte SignalAlongTrackdir(Trackdir trackdir)
    00019 {
    00020   extern const byte _signal_along_trackdir[TRACKDIR_END];
    00021   return _signal_along_trackdir[trackdir];
    00022 }
    00023
    00028 static inline byte SignalAgainstTrackdir(Trackdir trackdir)
    00029 {
    00030   extern const byte _signal_against_trackdir[TRACKDIR_END];
    00031   return _signal_against_trackdir[trackdir];
    00032 }
    00033
    00038 static inline byte SignalOnTrack(Track track)
    00039 {
    00040   extern const byte _signal_on_track[TRACK_END];
    00041   return _signal_on_track[track];
    00042 }
    00043
    00044 bool UpdateSignalsOnSegment(TileIndex tile, DiagDirection side, Owner owner);
    00045 void SetSignalsOnBothDir(TileIndex tile, Track track, Owner owner);
    00046 void AddTrackToSignalBuffer(TileIndex tile, Track track, Owner owner);
    00047 void AddSideToSignalBuffer(TileIndex tile, DiagDirection side, Owner owner);
    00048 void UpdateSignalsInBuffer();
    00049
    00050 #endif /* SIGNAL_FUNC_H */