equal
deleted
inserted
replaced
21 #include "vehicle_gui.h" |
21 #include "vehicle_gui.h" |
22 #include "depot.h" |
22 #include "depot.h" |
23 #include "station.h" |
23 #include "station.h" |
24 #include "rail.h" |
24 #include "rail.h" |
25 #include "train.h" |
25 #include "train.h" |
|
26 #include "station_map.h" |
26 |
27 |
27 #define INVALID_COORD (-0x8000) |
28 #define INVALID_COORD (-0x8000) |
28 #define GEN_HASH(x,y) (((x & 0x1F80)>>7) + ((y & 0xFC0))) |
29 #define GEN_HASH(x,y) (((x & 0x1F80)>>7) + ((y & 0xFC0))) |
29 |
30 |
30 /* |
31 /* |
1986 |
1987 |
1987 case VEH_Road: |
1988 case VEH_Road: |
1988 if (v->u.road.state == 254) /* We'll assume the road vehicle is facing outwards */ |
1989 if (v->u.road.state == 254) /* We'll assume the road vehicle is facing outwards */ |
1989 return DiagdirToDiagTrackdir(GetRoadDepotDirection(v->tile)); |
1990 return DiagdirToDiagTrackdir(GetRoadDepotDirection(v->tile)); |
1990 |
1991 |
1991 if (IsRoadStationTile(v->tile)) /* We'll assume the road vehicle is facing outwards */ |
1992 if (IsRoadStopTile(v->tile)) /* We'll assume the road vehicle is facing outwards */ |
1992 return DiagdirToDiagTrackdir(GetRoadStationDir(v->tile)); /* Road vehicle in a station */ |
1993 return DiagdirToDiagTrackdir(GetRoadStopDir(v->tile)); /* Road vehicle in a station */ |
1993 |
1994 |
1994 return DiagdirToDiagTrackdir(DirToDiagDir(v->direction)); |
1995 return DiagdirToDiagTrackdir(DirToDiagDir(v->direction)); |
1995 |
1996 |
1996 /* case VEH_Aircraft: case VEH_Special: case VEH_Disaster: */ |
1997 /* case VEH_Aircraft: case VEH_Special: case VEH_Disaster: */ |
1997 default: return 0xFF; |
1998 default: return 0xFF; |