diff options
author | smatz <smatz@openttd.org> | 2009-09-20 23:11:01 +0000 |
---|---|---|
committer | smatz <smatz@openttd.org> | 2009-09-20 23:11:01 +0000 |
commit | 114d48e492cc38644c0c020c6a30ab6c57179862 (patch) | |
tree | 80044362459c1f30b75b8eb8d9020f318d3ce5fb /src/table/elrail_data.h | |
parent | e07efc2370b0c846f792a4f5d3f8695c21895583 (diff) | |
download | openttd-114d48e492cc38644c0c020c6a30ab6c57179862.tar.xz |
(svn r17596) -Codechange: constify some tables
Diffstat (limited to 'src/table/elrail_data.h')
-rw-r--r-- | src/table/elrail_data.h | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/src/table/elrail_data.h b/src/table/elrail_data.h index a40fcaa92..55725a249 100644 --- a/src/table/elrail_data.h +++ b/src/table/elrail_data.h @@ -38,7 +38,7 @@ enum { }; /** Which PPPs are possible at all on a given PCP */ -static byte AllowedPPPonPCP[DIAGDIR_END] = { +static const byte AllowedPPPonPCP[DIAGDIR_END] = { 1 << DIR_N | 1 << DIR_E | 1 << DIR_SE | 1 << DIR_S | 1 << DIR_W | 1 << DIR_NW, 1 << DIR_N | 1 << DIR_NE | 1 << DIR_E | 1 << DIR_S | 1 << DIR_SW | 1 << DIR_W, 1 << DIR_N | 1 << DIR_E | 1 << DIR_SE | 1 << DIR_S | 1 << DIR_W | 1 << DIR_NW, @@ -48,7 +48,7 @@ static byte AllowedPPPonPCP[DIAGDIR_END] = { /** Which of the PPPs are inside the tile. For the two PPPs on the tile border * the following system is used: if you rotate the PCP so that it is in the * north, the eastern PPP belongs to the tile. */ -static byte OwnedPPPonPCP[DIAGDIR_END] = { +static const byte OwnedPPPonPCP[DIAGDIR_END] = { 1 << DIR_SE | 1 << DIR_S | 1 << DIR_SW | 1 << DIR_W, 1 << DIR_N | 1 << DIR_SW | 1 << DIR_W | 1 << DIR_NW, 1 << DIR_N | 1 << DIR_NE | 1 << DIR_E | 1 << DIR_NW, @@ -70,7 +70,7 @@ static const DiagDirection PCPpositions[TRACK_END][2] = { * track, plus the point in extension of the track (to mark end-of-track). PCPs * which are not on either end of the track are fully preferred. * @see PCPpositions */ -static byte PreferredPPPofTrackAtPCP[TRACK_END][DIAGDIR_END] = { +static const byte PreferredPPPofTrackAtPCP[TRACK_END][DIAGDIR_END] = { { // X 1 << DIR_NE | 1 << DIR_SE | 1 << DIR_NW, // NE PCP_NOT_ON_TRACK, // SE @@ -111,7 +111,7 @@ static byte PreferredPPPofTrackAtPCP[TRACK_END][DIAGDIR_END] = { /** In case we have a staight line, we place pylon only every two tiles, * so there are certain tiles which we ignore. A straight line is found if * we have exactly two PPPs. */ -static byte IgnoredPCP[NUM_IGNORE_GROUPS][TLG_END][DIAGDIR_END] = { +static const byte IgnoredPCP[NUM_IGNORE_GROUPS][TLG_END][DIAGDIR_END] = { { // Ignore group 1, X and Y tracks { // X even, Y even IGNORE_NONE, @@ -186,7 +186,7 @@ static byte IgnoredPCP[NUM_IGNORE_GROUPS][TLG_END][DIAGDIR_END] = { #undef NO_IGNORE /** Which pylons can definately NOT be built */ -static byte DisallowedPPPofTrackAtPCP[TRACK_END][DIAGDIR_END] = { +static const byte DisallowedPPPofTrackAtPCP[TRACK_END][DIAGDIR_END] = { {1 << DIR_SW | 1 << DIR_NE, 0, 1 << DIR_SW | 1 << DIR_NE, 0 }, // X {0, 1 << DIR_NW | 1 << DIR_SE, 0, 1 << DIR_NW | 1 << DIR_SE}, // Y {1 << DIR_W | 1 << DIR_E, 0, 0, 1 << DIR_W | 1 << DIR_E }, // UPPER |