src/station_type.h
author rubidium
Thu, 18 Dec 2008 12:23:08 +0000
changeset 10436 8d3a9fbe8f19
parent 10260 c6ec6b3c1b18
permissions -rw-r--r--
(svn r14689) -Change: make configure die on commonly made user mistakes, like not having SDL development files or zlib headers installed; you can still compile a dedicated server or a binary without zlib, but you have to explicitly force it.
8769
b554c4996eb1 (svn r12468) -Codechange: move some type related stuff from station.h (and openttd.h) to station_type.h.
rubidium
parents:
diff changeset
     1
/* $Id$ */
b554c4996eb1 (svn r12468) -Codechange: move some type related stuff from station.h (and openttd.h) to station_type.h.
rubidium
parents:
diff changeset
     2
b554c4996eb1 (svn r12468) -Codechange: move some type related stuff from station.h (and openttd.h) to station_type.h.
rubidium
parents:
diff changeset
     3
/** @file station_type.h Types related to stations. */
b554c4996eb1 (svn r12468) -Codechange: move some type related stuff from station.h (and openttd.h) to station_type.h.
rubidium
parents:
diff changeset
     4
b554c4996eb1 (svn r12468) -Codechange: move some type related stuff from station.h (and openttd.h) to station_type.h.
rubidium
parents:
diff changeset
     5
#ifndef STATION_TYPE_H
b554c4996eb1 (svn r12468) -Codechange: move some type related stuff from station.h (and openttd.h) to station_type.h.
rubidium
parents:
diff changeset
     6
#define STATION_TYPE_H
b554c4996eb1 (svn r12468) -Codechange: move some type related stuff from station.h (and openttd.h) to station_type.h.
rubidium
parents:
diff changeset
     7
b554c4996eb1 (svn r12468) -Codechange: move some type related stuff from station.h (and openttd.h) to station_type.h.
rubidium
parents:
diff changeset
     8
typedef uint16 StationID;
b554c4996eb1 (svn r12468) -Codechange: move some type related stuff from station.h (and openttd.h) to station_type.h.
rubidium
parents:
diff changeset
     9
typedef uint16 RoadStopID;
b554c4996eb1 (svn r12468) -Codechange: move some type related stuff from station.h (and openttd.h) to station_type.h.
rubidium
parents:
diff changeset
    10
b554c4996eb1 (svn r12468) -Codechange: move some type related stuff from station.h (and openttd.h) to station_type.h.
rubidium
parents:
diff changeset
    11
struct Station;
b554c4996eb1 (svn r12468) -Codechange: move some type related stuff from station.h (and openttd.h) to station_type.h.
rubidium
parents:
diff changeset
    12
struct RoadStop;
8787
41d9d5adbe87 (svn r12495) -Codechange: reduce the dependency on newgrf_station.h (especially because newgrf_station.h includes a lot of stuff).
rubidium
parents: 8785
diff changeset
    13
struct StationSpec;
8769
b554c4996eb1 (svn r12468) -Codechange: move some type related stuff from station.h (and openttd.h) to station_type.h.
rubidium
parents:
diff changeset
    14
b554c4996eb1 (svn r12468) -Codechange: move some type related stuff from station.h (and openttd.h) to station_type.h.
rubidium
parents:
diff changeset
    15
static const StationID INVALID_STATION = 0xFFFF;
b554c4996eb1 (svn r12468) -Codechange: move some type related stuff from station.h (and openttd.h) to station_type.h.
rubidium
parents:
diff changeset
    16
10260
c6ec6b3c1b18 (svn r14491) -Documentation: updates/additions of doxygen docs (Alberth)
rubidium
parents: 9913
diff changeset
    17
/** Station types */
8769
b554c4996eb1 (svn r12468) -Codechange: move some type related stuff from station.h (and openttd.h) to station_type.h.
rubidium
parents:
diff changeset
    18
enum StationType {
b554c4996eb1 (svn r12468) -Codechange: move some type related stuff from station.h (and openttd.h) to station_type.h.
rubidium
parents:
diff changeset
    19
	STATION_RAIL,
b554c4996eb1 (svn r12468) -Codechange: move some type related stuff from station.h (and openttd.h) to station_type.h.
rubidium
parents:
diff changeset
    20
	STATION_AIRPORT,
b554c4996eb1 (svn r12468) -Codechange: move some type related stuff from station.h (and openttd.h) to station_type.h.
rubidium
parents:
diff changeset
    21
	STATION_TRUCK,
b554c4996eb1 (svn r12468) -Codechange: move some type related stuff from station.h (and openttd.h) to station_type.h.
rubidium
parents:
diff changeset
    22
	STATION_BUS,
b554c4996eb1 (svn r12468) -Codechange: move some type related stuff from station.h (and openttd.h) to station_type.h.
rubidium
parents:
diff changeset
    23
	STATION_OILRIG,
b554c4996eb1 (svn r12468) -Codechange: move some type related stuff from station.h (and openttd.h) to station_type.h.
rubidium
parents:
diff changeset
    24
	STATION_DOCK,
b554c4996eb1 (svn r12468) -Codechange: move some type related stuff from station.h (and openttd.h) to station_type.h.
rubidium
parents:
diff changeset
    25
	STATION_BUOY
b554c4996eb1 (svn r12468) -Codechange: move some type related stuff from station.h (and openttd.h) to station_type.h.
rubidium
parents:
diff changeset
    26
};
b554c4996eb1 (svn r12468) -Codechange: move some type related stuff from station.h (and openttd.h) to station_type.h.
rubidium
parents:
diff changeset
    27
8785
871586967963 (svn r12489) -Codechange: split station.h into station_base.h and station_func.h.
rubidium
parents: 8769
diff changeset
    28
/** Types of RoadStops */
871586967963 (svn r12489) -Codechange: split station.h into station_base.h and station_func.h.
rubidium
parents: 8769
diff changeset
    29
enum RoadStopType {
871586967963 (svn r12489) -Codechange: split station.h into station_base.h and station_func.h.
rubidium
parents: 8769
diff changeset
    30
	ROADSTOP_BUS,    ///< A standard stop for buses
871586967963 (svn r12489) -Codechange: split station.h into station_base.h and station_func.h.
rubidium
parents: 8769
diff changeset
    31
	ROADSTOP_TRUCK   ///< A standard stop for trucks
871586967963 (svn r12489) -Codechange: split station.h into station_base.h and station_func.h.
rubidium
parents: 8769
diff changeset
    32
};
871586967963 (svn r12489) -Codechange: split station.h into station_base.h and station_func.h.
rubidium
parents: 8769
diff changeset
    33
8769
b554c4996eb1 (svn r12468) -Codechange: move some type related stuff from station.h (and openttd.h) to station_type.h.
rubidium
parents:
diff changeset
    34
enum {
b554c4996eb1 (svn r12468) -Codechange: move some type related stuff from station.h (and openttd.h) to station_type.h.
rubidium
parents:
diff changeset
    35
	FACIL_TRAIN      = 0x01,
b554c4996eb1 (svn r12468) -Codechange: move some type related stuff from station.h (and openttd.h) to station_type.h.
rubidium
parents:
diff changeset
    36
	FACIL_TRUCK_STOP = 0x02,
b554c4996eb1 (svn r12468) -Codechange: move some type related stuff from station.h (and openttd.h) to station_type.h.
rubidium
parents:
diff changeset
    37
	FACIL_BUS_STOP   = 0x04,
b554c4996eb1 (svn r12468) -Codechange: move some type related stuff from station.h (and openttd.h) to station_type.h.
rubidium
parents:
diff changeset
    38
	FACIL_AIRPORT    = 0x08,
b554c4996eb1 (svn r12468) -Codechange: move some type related stuff from station.h (and openttd.h) to station_type.h.
rubidium
parents:
diff changeset
    39
	FACIL_DOCK       = 0x10,
b554c4996eb1 (svn r12468) -Codechange: move some type related stuff from station.h (and openttd.h) to station_type.h.
rubidium
parents:
diff changeset
    40
};
b554c4996eb1 (svn r12468) -Codechange: move some type related stuff from station.h (and openttd.h) to station_type.h.
rubidium
parents:
diff changeset
    41
b554c4996eb1 (svn r12468) -Codechange: move some type related stuff from station.h (and openttd.h) to station_type.h.
rubidium
parents:
diff changeset
    42
enum {
b554c4996eb1 (svn r12468) -Codechange: move some type related stuff from station.h (and openttd.h) to station_type.h.
rubidium
parents:
diff changeset
    43
//	HVOT_PENDING_DELETE = 1 << 0, // not needed anymore
b554c4996eb1 (svn r12468) -Codechange: move some type related stuff from station.h (and openttd.h) to station_type.h.
rubidium
parents:
diff changeset
    44
	HVOT_TRAIN    = 1 << 1,
b554c4996eb1 (svn r12468) -Codechange: move some type related stuff from station.h (and openttd.h) to station_type.h.
rubidium
parents:
diff changeset
    45
	HVOT_BUS      = 1 << 2,
b554c4996eb1 (svn r12468) -Codechange: move some type related stuff from station.h (and openttd.h) to station_type.h.
rubidium
parents:
diff changeset
    46
	HVOT_TRUCK    = 1 << 3,
b554c4996eb1 (svn r12468) -Codechange: move some type related stuff from station.h (and openttd.h) to station_type.h.
rubidium
parents:
diff changeset
    47
	HVOT_AIRCRAFT = 1 << 4,
b554c4996eb1 (svn r12468) -Codechange: move some type related stuff from station.h (and openttd.h) to station_type.h.
rubidium
parents:
diff changeset
    48
	HVOT_SHIP     = 1 << 5,
b554c4996eb1 (svn r12468) -Codechange: move some type related stuff from station.h (and openttd.h) to station_type.h.
rubidium
parents:
diff changeset
    49
	/* This bit is used to mark stations. No, it does not belong here, but what
b554c4996eb1 (svn r12468) -Codechange: move some type related stuff from station.h (and openttd.h) to station_type.h.
rubidium
parents:
diff changeset
    50
	 * can we do? ;-) */
b554c4996eb1 (svn r12468) -Codechange: move some type related stuff from station.h (and openttd.h) to station_type.h.
rubidium
parents:
diff changeset
    51
	HVOT_BUOY     = 1 << 6
b554c4996eb1 (svn r12468) -Codechange: move some type related stuff from station.h (and openttd.h) to station_type.h.
rubidium
parents:
diff changeset
    52
};
b554c4996eb1 (svn r12468) -Codechange: move some type related stuff from station.h (and openttd.h) to station_type.h.
rubidium
parents:
diff changeset
    53
b554c4996eb1 (svn r12468) -Codechange: move some type related stuff from station.h (and openttd.h) to station_type.h.
rubidium
parents:
diff changeset
    54
enum CatchmentArea {
b554c4996eb1 (svn r12468) -Codechange: move some type related stuff from station.h (and openttd.h) to station_type.h.
rubidium
parents:
diff changeset
    55
	CA_NONE            =  0,
b554c4996eb1 (svn r12468) -Codechange: move some type related stuff from station.h (and openttd.h) to station_type.h.
rubidium
parents:
diff changeset
    56
	CA_BUS             =  3,
b554c4996eb1 (svn r12468) -Codechange: move some type related stuff from station.h (and openttd.h) to station_type.h.
rubidium
parents:
diff changeset
    57
	CA_TRUCK           =  3,
b554c4996eb1 (svn r12468) -Codechange: move some type related stuff from station.h (and openttd.h) to station_type.h.
rubidium
parents:
diff changeset
    58
	CA_TRAIN           =  4,
b554c4996eb1 (svn r12468) -Codechange: move some type related stuff from station.h (and openttd.h) to station_type.h.
rubidium
parents:
diff changeset
    59
	CA_DOCK            =  5,
b554c4996eb1 (svn r12468) -Codechange: move some type related stuff from station.h (and openttd.h) to station_type.h.
rubidium
parents:
diff changeset
    60
9413
7042a8ec3fa8 (svn r13325) -Codechange: split the client-side only settings from the settings stored in the savegame so there is no need to have a duplicate copy of it for new games.
rubidium
parents: 9354
diff changeset
    61
	CA_UNMODIFIED      =  4, ///< Used when _settings_game.station.modified_catchment is false
8769
b554c4996eb1 (svn r12468) -Codechange: move some type related stuff from station.h (and openttd.h) to station_type.h.
rubidium
parents:
diff changeset
    62
b554c4996eb1 (svn r12468) -Codechange: move some type related stuff from station.h (and openttd.h) to station_type.h.
rubidium
parents:
diff changeset
    63
	MAX_CATCHMENT      = 10, ///< Airports have a catchment up to this number.
b554c4996eb1 (svn r12468) -Codechange: move some type related stuff from station.h (and openttd.h) to station_type.h.
rubidium
parents:
diff changeset
    64
};
b554c4996eb1 (svn r12468) -Codechange: move some type related stuff from station.h (and openttd.h) to station_type.h.
rubidium
parents:
diff changeset
    65
9913
d9ce89020cc0 (svn r14063) -Codechange: replace some "magic" constants with enumified constants.
rubidium
parents: 9413
diff changeset
    66
enum {
d9ce89020cc0 (svn r14063) -Codechange: replace some "magic" constants with enumified constants.
rubidium
parents: 9413
diff changeset
    67
	MAX_LENGTH_STATION_NAME_BYTES  =  31, ///< The maximum length of a station name in bytes including '\0'
d9ce89020cc0 (svn r14063) -Codechange: replace some "magic" constants with enumified constants.
rubidium
parents: 9413
diff changeset
    68
	MAX_LENGTH_STATION_NAME_PIXELS = 180, ///< The maximum length of a station name in pixels
d9ce89020cc0 (svn r14063) -Codechange: replace some "magic" constants with enumified constants.
rubidium
parents: 9413
diff changeset
    69
};
d9ce89020cc0 (svn r14063) -Codechange: replace some "magic" constants with enumified constants.
rubidium
parents: 9413
diff changeset
    70
8769
b554c4996eb1 (svn r12468) -Codechange: move some type related stuff from station.h (and openttd.h) to station_type.h.
rubidium
parents:
diff changeset
    71
#endif /* STATION_TYPE_H */