author | peter1138 |
Sun, 03 Aug 2008 17:35:08 +0000 | |
changeset 9834 | 7474149531c1 |
parent 9111 | 48ce04029fe4 |
permissions | -rw-r--r-- |
4612
b7c32271ff0e
(svn r6465) -Fix: change some instances of '/* $Id */' to '/* $Id$ */', so SVN can do what is was supposed to do..
rubidium
parents:
4549
diff
changeset
|
1 |
/* $Id$ */ |
9111
48ce04029fe4
(svn r12971) -Documentation: add @file in files that missed them and add something more than whitespace as description of files that don't have a description.
rubidium
parents:
7534
diff
changeset
|
2 |
|
3449
d45c8d0bf848
(svn r4281) -Cleanup: Begun cleaning up elrail code a bit, mostly comments and enum/array alignment
celestar
parents:
3446
diff
changeset
|
3 |
/** @file elrail_data.h Stores all the data for overhead wire and pylon drawing. |
4549
106ed18a7675
(svn r6381) -Cleanup: make the '/* */' comments that span multiple lines more uniform.
rubidium
parents:
4470
diff
changeset
|
4 |
* @see elrail.c */ |
3355
e414a0b104a6
(svn r4150) -Feature: Merged elrails into trunk. Thanks to Tron for lots of code and proofreading, thanks to peter1138 for another lot of code and ideas.
celestar
parents:
diff
changeset
|
5 |
|
e414a0b104a6
(svn r4150) -Feature: Merged elrails into trunk. Thanks to Tron for lots of code and proofreading, thanks to peter1138 for another lot of code and ideas.
celestar
parents:
diff
changeset
|
6 |
#ifndef ELRAIL_DATA_H |
e414a0b104a6
(svn r4150) -Feature: Merged elrails into trunk. Thanks to Tron for lots of code and proofreading, thanks to peter1138 for another lot of code and ideas.
celestar
parents:
diff
changeset
|
7 |
#define ELRAIL_DATA_H |
e414a0b104a6
(svn r4150) -Feature: Merged elrails into trunk. Thanks to Tron for lots of code and proofreading, thanks to peter1138 for another lot of code and ideas.
celestar
parents:
diff
changeset
|
8 |
|
3449
d45c8d0bf848
(svn r4281) -Cleanup: Begun cleaning up elrail code a bit, mostly comments and enum/array alignment
celestar
parents:
3446
diff
changeset
|
9 |
/** Tile Location group. |
4549
106ed18a7675
(svn r6381) -Cleanup: make the '/* */' comments that span multiple lines more uniform.
rubidium
parents:
4470
diff
changeset
|
10 |
* This defines whether the X and or Y coordinate of a tile is even */ |
6248
e4a2ed7e5613
(svn r9051) -Codechange: typedef [enum|struct] Y {} X; -> [enum|struct] X {};
rubidium
parents:
5475
diff
changeset
|
11 |
enum TLG { |
3355
e414a0b104a6
(svn r4150) -Feature: Merged elrails into trunk. Thanks to Tron for lots of code and proofreading, thanks to peter1138 for another lot of code and ideas.
celestar
parents:
diff
changeset
|
12 |
XEVEN_YEVEN = 0, |
e414a0b104a6
(svn r4150) -Feature: Merged elrails into trunk. Thanks to Tron for lots of code and proofreading, thanks to peter1138 for another lot of code and ideas.
celestar
parents:
diff
changeset
|
13 |
XEVEN_YODD = 1, |
e414a0b104a6
(svn r4150) -Feature: Merged elrails into trunk. Thanks to Tron for lots of code and proofreading, thanks to peter1138 for another lot of code and ideas.
celestar
parents:
diff
changeset
|
14 |
XODD_YEVEN = 2, |
e414a0b104a6
(svn r4150) -Feature: Merged elrails into trunk. Thanks to Tron for lots of code and proofreading, thanks to peter1138 for another lot of code and ideas.
celestar
parents:
diff
changeset
|
15 |
XODD_YODD = 3, |
e414a0b104a6
(svn r4150) -Feature: Merged elrails into trunk. Thanks to Tron for lots of code and proofreading, thanks to peter1138 for another lot of code and ideas.
celestar
parents:
diff
changeset
|
16 |
TLG_END |
6248
e4a2ed7e5613
(svn r9051) -Codechange: typedef [enum|struct] Y {} X; -> [enum|struct] X {};
rubidium
parents:
5475
diff
changeset
|
17 |
}; |
3355
e414a0b104a6
(svn r4150) -Feature: Merged elrails into trunk. Thanks to Tron for lots of code and proofreading, thanks to peter1138 for another lot of code and ideas.
celestar
parents:
diff
changeset
|
18 |
|
3449
d45c8d0bf848
(svn r4281) -Cleanup: Begun cleaning up elrail code a bit, mostly comments and enum/array alignment
celestar
parents:
3446
diff
changeset
|
19 |
/** When determining the pylon configuration on the edge, two tiles are taken |
4549
106ed18a7675
(svn r6381) -Cleanup: make the '/* */' comments that span multiple lines more uniform.
rubidium
parents:
4470
diff
changeset
|
20 |
* into account: the tile being drawn itself (the home tile, the one in |
106ed18a7675
(svn r6381) -Cleanup: make the '/* */' comments that span multiple lines more uniform.
rubidium
parents:
4470
diff
changeset
|
21 |
* ti->tile), and the neighbouring tile */ |
6248
e4a2ed7e5613
(svn r9051) -Codechange: typedef [enum|struct] Y {} X; -> [enum|struct] X {};
rubidium
parents:
5475
diff
changeset
|
22 |
enum TileSource { |
3355
e414a0b104a6
(svn r4150) -Feature: Merged elrails into trunk. Thanks to Tron for lots of code and proofreading, thanks to peter1138 for another lot of code and ideas.
celestar
parents:
diff
changeset
|
23 |
TS_HOME = 0, |
e414a0b104a6
(svn r4150) -Feature: Merged elrails into trunk. Thanks to Tron for lots of code and proofreading, thanks to peter1138 for another lot of code and ideas.
celestar
parents:
diff
changeset
|
24 |
TS_NEIGHBOUR = 1, |
e414a0b104a6
(svn r4150) -Feature: Merged elrails into trunk. Thanks to Tron for lots of code and proofreading, thanks to peter1138 for another lot of code and ideas.
celestar
parents:
diff
changeset
|
25 |
|
e414a0b104a6
(svn r4150) -Feature: Merged elrails into trunk. Thanks to Tron for lots of code and proofreading, thanks to peter1138 for another lot of code and ideas.
celestar
parents:
diff
changeset
|
26 |
TS_END |
6248
e4a2ed7e5613
(svn r9051) -Codechange: typedef [enum|struct] Y {} X; -> [enum|struct] X {};
rubidium
parents:
5475
diff
changeset
|
27 |
}; |
3355
e414a0b104a6
(svn r4150) -Feature: Merged elrails into trunk. Thanks to Tron for lots of code and proofreading, thanks to peter1138 for another lot of code and ideas.
celestar
parents:
diff
changeset
|
28 |
|
e414a0b104a6
(svn r4150) -Feature: Merged elrails into trunk. Thanks to Tron for lots of code and proofreading, thanks to peter1138 for another lot of code and ideas.
celestar
parents:
diff
changeset
|
29 |
enum { |
3451
0e8ccac68fdf
(svn r4283) -Cleanup: More elrail housekeeping, remove code dublication, more meaningful variable names, simplify control flow..
celestar
parents:
3450
diff
changeset
|
30 |
NUM_TRACKS_AT_PCP = 6 |
3355
e414a0b104a6
(svn r4150) -Feature: Merged elrails into trunk. Thanks to Tron for lots of code and proofreading, thanks to peter1138 for another lot of code and ideas.
celestar
parents:
diff
changeset
|
31 |
}; |
e414a0b104a6
(svn r4150) -Feature: Merged elrails into trunk. Thanks to Tron for lots of code and proofreading, thanks to peter1138 for another lot of code and ideas.
celestar
parents:
diff
changeset
|
32 |
|
e414a0b104a6
(svn r4150) -Feature: Merged elrails into trunk. Thanks to Tron for lots of code and proofreading, thanks to peter1138 for another lot of code and ideas.
celestar
parents:
diff
changeset
|
33 |
/** Which PPPs are possible at all on a given PCP */ |
e414a0b104a6
(svn r4150) -Feature: Merged elrails into trunk. Thanks to Tron for lots of code and proofreading, thanks to peter1138 for another lot of code and ideas.
celestar
parents:
diff
changeset
|
34 |
static byte AllowedPPPonPCP[DIAGDIR_END] = { |
3449
d45c8d0bf848
(svn r4281) -Cleanup: Begun cleaning up elrail code a bit, mostly comments and enum/array alignment
celestar
parents:
3446
diff
changeset
|
35 |
1 << DIR_N | 1 << DIR_E | 1 << DIR_SE | 1 << DIR_S | 1 << DIR_W | 1 << DIR_NW, |
d45c8d0bf848
(svn r4281) -Cleanup: Begun cleaning up elrail code a bit, mostly comments and enum/array alignment
celestar
parents:
3446
diff
changeset
|
36 |
1 << DIR_N | 1 << DIR_NE | 1 << DIR_E | 1 << DIR_S | 1 << DIR_SW | 1 << DIR_W, |
d45c8d0bf848
(svn r4281) -Cleanup: Begun cleaning up elrail code a bit, mostly comments and enum/array alignment
celestar
parents:
3446
diff
changeset
|
37 |
1 << DIR_N | 1 << DIR_E | 1 << DIR_SE | 1 << DIR_S | 1 << DIR_W | 1 << DIR_NW, |
d45c8d0bf848
(svn r4281) -Cleanup: Begun cleaning up elrail code a bit, mostly comments and enum/array alignment
celestar
parents:
3446
diff
changeset
|
38 |
1 << DIR_N | 1 << DIR_NE | 1 << DIR_E | 1 << DIR_S | 1 << DIR_SW | 1 << DIR_W, |
3355
e414a0b104a6
(svn r4150) -Feature: Merged elrails into trunk. Thanks to Tron for lots of code and proofreading, thanks to peter1138 for another lot of code and ideas.
celestar
parents:
diff
changeset
|
39 |
}; |
e414a0b104a6
(svn r4150) -Feature: Merged elrails into trunk. Thanks to Tron for lots of code and proofreading, thanks to peter1138 for another lot of code and ideas.
celestar
parents:
diff
changeset
|
40 |
|
3449
d45c8d0bf848
(svn r4281) -Cleanup: Begun cleaning up elrail code a bit, mostly comments and enum/array alignment
celestar
parents:
3446
diff
changeset
|
41 |
/** Which of the PPPs are inside the tile. For the two PPPs on the tile border |
4549
106ed18a7675
(svn r6381) -Cleanup: make the '/* */' comments that span multiple lines more uniform.
rubidium
parents:
4470
diff
changeset
|
42 |
* the following system is used: if you rotate the PCP so that it is in the |
106ed18a7675
(svn r6381) -Cleanup: make the '/* */' comments that span multiple lines more uniform.
rubidium
parents:
4470
diff
changeset
|
43 |
* north, the eastern PPP belongs to the tile. */ |
3449
d45c8d0bf848
(svn r4281) -Cleanup: Begun cleaning up elrail code a bit, mostly comments and enum/array alignment
celestar
parents:
3446
diff
changeset
|
44 |
static byte OwnedPPPonPCP[DIAGDIR_END] = { |
d45c8d0bf848
(svn r4281) -Cleanup: Begun cleaning up elrail code a bit, mostly comments and enum/array alignment
celestar
parents:
3446
diff
changeset
|
45 |
1 << DIR_SE | 1 << DIR_S | 1 << DIR_SW | 1 << DIR_W, |
d45c8d0bf848
(svn r4281) -Cleanup: Begun cleaning up elrail code a bit, mostly comments and enum/array alignment
celestar
parents:
3446
diff
changeset
|
46 |
1 << DIR_N | 1 << DIR_SW | 1 << DIR_W | 1 << DIR_NW, |
d45c8d0bf848
(svn r4281) -Cleanup: Begun cleaning up elrail code a bit, mostly comments and enum/array alignment
celestar
parents:
3446
diff
changeset
|
47 |
1 << DIR_N | 1 << DIR_NE | 1 << DIR_E | 1 << DIR_NW, |
d45c8d0bf848
(svn r4281) -Cleanup: Begun cleaning up elrail code a bit, mostly comments and enum/array alignment
celestar
parents:
3446
diff
changeset
|
48 |
1 << DIR_NE | 1 << DIR_E | 1 << DIR_SE | 1 << DIR_S |
d45c8d0bf848
(svn r4281) -Cleanup: Begun cleaning up elrail code a bit, mostly comments and enum/array alignment
celestar
parents:
3446
diff
changeset
|
49 |
}; |
d45c8d0bf848
(svn r4281) -Cleanup: Begun cleaning up elrail code a bit, mostly comments and enum/array alignment
celestar
parents:
3446
diff
changeset
|
50 |
|
d45c8d0bf848
(svn r4281) -Cleanup: Begun cleaning up elrail code a bit, mostly comments and enum/array alignment
celestar
parents:
3446
diff
changeset
|
51 |
/** Maps a track bit onto two PCP positions */ |
d45c8d0bf848
(svn r4281) -Cleanup: Begun cleaning up elrail code a bit, mostly comments and enum/array alignment
celestar
parents:
3446
diff
changeset
|
52 |
static const DiagDirection PCPpositions[TRACK_END][2] = { |
d45c8d0bf848
(svn r4281) -Cleanup: Begun cleaning up elrail code a bit, mostly comments and enum/array alignment
celestar
parents:
3446
diff
changeset
|
53 |
{DIAGDIR_NE, DIAGDIR_SW}, /* X */ |
d45c8d0bf848
(svn r4281) -Cleanup: Begun cleaning up elrail code a bit, mostly comments and enum/array alignment
celestar
parents:
3446
diff
changeset
|
54 |
{DIAGDIR_SE, DIAGDIR_NW}, /* Y */ |
d45c8d0bf848
(svn r4281) -Cleanup: Begun cleaning up elrail code a bit, mostly comments and enum/array alignment
celestar
parents:
3446
diff
changeset
|
55 |
{DIAGDIR_NW, DIAGDIR_NE}, /* UPPER */ |
d45c8d0bf848
(svn r4281) -Cleanup: Begun cleaning up elrail code a bit, mostly comments and enum/array alignment
celestar
parents:
3446
diff
changeset
|
56 |
{DIAGDIR_SE, DIAGDIR_SW}, /* LOWER */ |
d45c8d0bf848
(svn r4281) -Cleanup: Begun cleaning up elrail code a bit, mostly comments and enum/array alignment
celestar
parents:
3446
diff
changeset
|
57 |
{DIAGDIR_SW, DIAGDIR_NW}, /* LEFT */ |
d45c8d0bf848
(svn r4281) -Cleanup: Begun cleaning up elrail code a bit, mostly comments and enum/array alignment
celestar
parents:
3446
diff
changeset
|
58 |
{DIAGDIR_NE, DIAGDIR_SE}, /* RIGHT */ |
d45c8d0bf848
(svn r4281) -Cleanup: Begun cleaning up elrail code a bit, mostly comments and enum/array alignment
celestar
parents:
3446
diff
changeset
|
59 |
}; |
d45c8d0bf848
(svn r4281) -Cleanup: Begun cleaning up elrail code a bit, mostly comments and enum/array alignment
celestar
parents:
3446
diff
changeset
|
60 |
|
d45c8d0bf848
(svn r4281) -Cleanup: Begun cleaning up elrail code a bit, mostly comments and enum/array alignment
celestar
parents:
3446
diff
changeset
|
61 |
#define PCP_NOT_ON_TRACK 0xFF |
d45c8d0bf848
(svn r4281) -Cleanup: Begun cleaning up elrail code a bit, mostly comments and enum/array alignment
celestar
parents:
3446
diff
changeset
|
62 |
/** Preferred points of each trackbit. Those are the ones perpendicular to the |
4549
106ed18a7675
(svn r6381) -Cleanup: make the '/* */' comments that span multiple lines more uniform.
rubidium
parents:
4470
diff
changeset
|
63 |
* track, plus the point in extension of the track (to mark end-of-track). PCPs |
106ed18a7675
(svn r6381) -Cleanup: make the '/* */' comments that span multiple lines more uniform.
rubidium
parents:
4470
diff
changeset
|
64 |
* which are not on either end of the track are fully preferred. |
106ed18a7675
(svn r6381) -Cleanup: make the '/* */' comments that span multiple lines more uniform.
rubidium
parents:
4470
diff
changeset
|
65 |
* @see PCPpositions */ |
3451
0e8ccac68fdf
(svn r4283) -Cleanup: More elrail housekeeping, remove code dublication, more meaningful variable names, simplify control flow..
celestar
parents:
3450
diff
changeset
|
66 |
static byte PreferredPPPofTrackAtPCP[TRACK_END][DIAGDIR_END] = { |
3449
d45c8d0bf848
(svn r4281) -Cleanup: Begun cleaning up elrail code a bit, mostly comments and enum/array alignment
celestar
parents:
3446
diff
changeset
|
67 |
{ /* X */ |
d45c8d0bf848
(svn r4281) -Cleanup: Begun cleaning up elrail code a bit, mostly comments and enum/array alignment
celestar
parents:
3446
diff
changeset
|
68 |
1 << DIR_NE | 1 << DIR_SE | 1 << DIR_NW, /* NE */ |
d45c8d0bf848
(svn r4281) -Cleanup: Begun cleaning up elrail code a bit, mostly comments and enum/array alignment
celestar
parents:
3446
diff
changeset
|
69 |
PCP_NOT_ON_TRACK, /* SE */ |
d45c8d0bf848
(svn r4281) -Cleanup: Begun cleaning up elrail code a bit, mostly comments and enum/array alignment
celestar
parents:
3446
diff
changeset
|
70 |
1 << DIR_SE | 1 << DIR_SW | 1 << DIR_NW, /* SW */ |
d45c8d0bf848
(svn r4281) -Cleanup: Begun cleaning up elrail code a bit, mostly comments and enum/array alignment
celestar
parents:
3446
diff
changeset
|
71 |
PCP_NOT_ON_TRACK /* NE */ |
d45c8d0bf848
(svn r4281) -Cleanup: Begun cleaning up elrail code a bit, mostly comments and enum/array alignment
celestar
parents:
3446
diff
changeset
|
72 |
}, { /* Y */ |
d45c8d0bf848
(svn r4281) -Cleanup: Begun cleaning up elrail code a bit, mostly comments and enum/array alignment
celestar
parents:
3446
diff
changeset
|
73 |
PCP_NOT_ON_TRACK, |
d45c8d0bf848
(svn r4281) -Cleanup: Begun cleaning up elrail code a bit, mostly comments and enum/array alignment
celestar
parents:
3446
diff
changeset
|
74 |
1 << DIR_NE | 1 << DIR_SE | 1 << DIR_SW, |
d45c8d0bf848
(svn r4281) -Cleanup: Begun cleaning up elrail code a bit, mostly comments and enum/array alignment
celestar
parents:
3446
diff
changeset
|
75 |
PCP_NOT_ON_TRACK, |
d45c8d0bf848
(svn r4281) -Cleanup: Begun cleaning up elrail code a bit, mostly comments and enum/array alignment
celestar
parents:
3446
diff
changeset
|
76 |
1 << DIR_SW | 1 << DIR_NW | 1 << DIR_NE |
d45c8d0bf848
(svn r4281) -Cleanup: Begun cleaning up elrail code a bit, mostly comments and enum/array alignment
celestar
parents:
3446
diff
changeset
|
77 |
}, { /* UPPER */ |
d45c8d0bf848
(svn r4281) -Cleanup: Begun cleaning up elrail code a bit, mostly comments and enum/array alignment
celestar
parents:
3446
diff
changeset
|
78 |
1 << DIR_E | 1 << DIR_N | 1 << DIR_S, |
d45c8d0bf848
(svn r4281) -Cleanup: Begun cleaning up elrail code a bit, mostly comments and enum/array alignment
celestar
parents:
3446
diff
changeset
|
79 |
PCP_NOT_ON_TRACK, |
d45c8d0bf848
(svn r4281) -Cleanup: Begun cleaning up elrail code a bit, mostly comments and enum/array alignment
celestar
parents:
3446
diff
changeset
|
80 |
PCP_NOT_ON_TRACK, |
d45c8d0bf848
(svn r4281) -Cleanup: Begun cleaning up elrail code a bit, mostly comments and enum/array alignment
celestar
parents:
3446
diff
changeset
|
81 |
1 << DIR_W | 1 << DIR_N | 1 << DIR_S |
d45c8d0bf848
(svn r4281) -Cleanup: Begun cleaning up elrail code a bit, mostly comments and enum/array alignment
celestar
parents:
3446
diff
changeset
|
82 |
}, { /* LOWER */ |
d45c8d0bf848
(svn r4281) -Cleanup: Begun cleaning up elrail code a bit, mostly comments and enum/array alignment
celestar
parents:
3446
diff
changeset
|
83 |
PCP_NOT_ON_TRACK, |
d45c8d0bf848
(svn r4281) -Cleanup: Begun cleaning up elrail code a bit, mostly comments and enum/array alignment
celestar
parents:
3446
diff
changeset
|
84 |
1 << DIR_E | 1 << DIR_N | 1 << DIR_S, |
d45c8d0bf848
(svn r4281) -Cleanup: Begun cleaning up elrail code a bit, mostly comments and enum/array alignment
celestar
parents:
3446
diff
changeset
|
85 |
1 << DIR_W | 1 << DIR_N | 1 << DIR_S, |
d45c8d0bf848
(svn r4281) -Cleanup: Begun cleaning up elrail code a bit, mostly comments and enum/array alignment
celestar
parents:
3446
diff
changeset
|
86 |
PCP_NOT_ON_TRACK |
d45c8d0bf848
(svn r4281) -Cleanup: Begun cleaning up elrail code a bit, mostly comments and enum/array alignment
celestar
parents:
3446
diff
changeset
|
87 |
}, { /* LEFT */ |
d45c8d0bf848
(svn r4281) -Cleanup: Begun cleaning up elrail code a bit, mostly comments and enum/array alignment
celestar
parents:
3446
diff
changeset
|
88 |
PCP_NOT_ON_TRACK, |
d45c8d0bf848
(svn r4281) -Cleanup: Begun cleaning up elrail code a bit, mostly comments and enum/array alignment
celestar
parents:
3446
diff
changeset
|
89 |
PCP_NOT_ON_TRACK, |
d45c8d0bf848
(svn r4281) -Cleanup: Begun cleaning up elrail code a bit, mostly comments and enum/array alignment
celestar
parents:
3446
diff
changeset
|
90 |
1 << DIR_S | 1 << DIR_E | 1 << DIR_W, |
d45c8d0bf848
(svn r4281) -Cleanup: Begun cleaning up elrail code a bit, mostly comments and enum/array alignment
celestar
parents:
3446
diff
changeset
|
91 |
1 << DIR_N | 1 << DIR_E | 1 << DIR_W |
d45c8d0bf848
(svn r4281) -Cleanup: Begun cleaning up elrail code a bit, mostly comments and enum/array alignment
celestar
parents:
3446
diff
changeset
|
92 |
}, { /* RIGHT */ |
d45c8d0bf848
(svn r4281) -Cleanup: Begun cleaning up elrail code a bit, mostly comments and enum/array alignment
celestar
parents:
3446
diff
changeset
|
93 |
1 << DIR_N | 1 << DIR_E | 1 << DIR_W, |
d45c8d0bf848
(svn r4281) -Cleanup: Begun cleaning up elrail code a bit, mostly comments and enum/array alignment
celestar
parents:
3446
diff
changeset
|
94 |
1 << DIR_S | 1 << DIR_E | 1 << DIR_W, |
d45c8d0bf848
(svn r4281) -Cleanup: Begun cleaning up elrail code a bit, mostly comments and enum/array alignment
celestar
parents:
3446
diff
changeset
|
95 |
PCP_NOT_ON_TRACK, |
d45c8d0bf848
(svn r4281) -Cleanup: Begun cleaning up elrail code a bit, mostly comments and enum/array alignment
celestar
parents:
3446
diff
changeset
|
96 |
PCP_NOT_ON_TRACK |
d45c8d0bf848
(svn r4281) -Cleanup: Begun cleaning up elrail code a bit, mostly comments and enum/array alignment
celestar
parents:
3446
diff
changeset
|
97 |
} |
3355
e414a0b104a6
(svn r4150) -Feature: Merged elrails into trunk. Thanks to Tron for lots of code and proofreading, thanks to peter1138 for another lot of code and ideas.
celestar
parents:
diff
changeset
|
98 |
}; |
3449
d45c8d0bf848
(svn r4281) -Cleanup: Begun cleaning up elrail code a bit, mostly comments and enum/array alignment
celestar
parents:
3446
diff
changeset
|
99 |
#undef PCP_NOT_ON_TRACK |
3355
e414a0b104a6
(svn r4150) -Feature: Merged elrails into trunk. Thanks to Tron for lots of code and proofreading, thanks to peter1138 for another lot of code and ideas.
celestar
parents:
diff
changeset
|
100 |
|
3450
b6c0635558dd
(svn r4282) -Cleanup: Re-arranged the ignore groups into a more readable arrangement
celestar
parents:
3449
diff
changeset
|
101 |
|
3355
e414a0b104a6
(svn r4150) -Feature: Merged elrails into trunk. Thanks to Tron for lots of code and proofreading, thanks to peter1138 for another lot of code and ideas.
celestar
parents:
diff
changeset
|
102 |
#define NUM_IGNORE_GROUPS 3 |
3450
b6c0635558dd
(svn r4282) -Cleanup: Re-arranged the ignore groups into a more readable arrangement
celestar
parents:
3449
diff
changeset
|
103 |
#define IGNORE_NONE 0xFF |
3449
d45c8d0bf848
(svn r4281) -Cleanup: Begun cleaning up elrail code a bit, mostly comments and enum/array alignment
celestar
parents:
3446
diff
changeset
|
104 |
/** In case we have a staight line, we place pylon only every two tiles, |
4549
106ed18a7675
(svn r6381) -Cleanup: make the '/* */' comments that span multiple lines more uniform.
rubidium
parents:
4470
diff
changeset
|
105 |
* so there are certain tiles which we ignore. A straight line is found if |
106ed18a7675
(svn r6381) -Cleanup: make the '/* */' comments that span multiple lines more uniform.
rubidium
parents:
4470
diff
changeset
|
106 |
* we have exactly two PPPs. */ |
3355
e414a0b104a6
(svn r4150) -Feature: Merged elrails into trunk. Thanks to Tron for lots of code and proofreading, thanks to peter1138 for another lot of code and ideas.
celestar
parents:
diff
changeset
|
107 |
static byte IgnoredPCP[NUM_IGNORE_GROUPS][TLG_END][DIAGDIR_END] = { |
3450
b6c0635558dd
(svn r4282) -Cleanup: Re-arranged the ignore groups into a more readable arrangement
celestar
parents:
3449
diff
changeset
|
108 |
{ /* Ignore group 1, X and Y tracks */ |
3449
d45c8d0bf848
(svn r4281) -Cleanup: Begun cleaning up elrail code a bit, mostly comments and enum/array alignment
celestar
parents:
3446
diff
changeset
|
109 |
{ /* X even, Y even */ |
3450
b6c0635558dd
(svn r4282) -Cleanup: Re-arranged the ignore groups into a more readable arrangement
celestar
parents:
3449
diff
changeset
|
110 |
IGNORE_NONE, |
3449
d45c8d0bf848
(svn r4281) -Cleanup: Begun cleaning up elrail code a bit, mostly comments and enum/array alignment
celestar
parents:
3446
diff
changeset
|
111 |
1 << DIR_NE | 1 << DIR_SW, |
d45c8d0bf848
(svn r4281) -Cleanup: Begun cleaning up elrail code a bit, mostly comments and enum/array alignment
celestar
parents:
3446
diff
changeset
|
112 |
1 << DIR_NW | 1 << DIR_SE, |
3450
b6c0635558dd
(svn r4282) -Cleanup: Re-arranged the ignore groups into a more readable arrangement
celestar
parents:
3449
diff
changeset
|
113 |
IGNORE_NONE |
3449
d45c8d0bf848
(svn r4281) -Cleanup: Begun cleaning up elrail code a bit, mostly comments and enum/array alignment
celestar
parents:
3446
diff
changeset
|
114 |
}, { /* X even, Y odd */ |
3450
b6c0635558dd
(svn r4282) -Cleanup: Re-arranged the ignore groups into a more readable arrangement
celestar
parents:
3449
diff
changeset
|
115 |
IGNORE_NONE, |
b6c0635558dd
(svn r4282) -Cleanup: Re-arranged the ignore groups into a more readable arrangement
celestar
parents:
3449
diff
changeset
|
116 |
IGNORE_NONE, |
3449
d45c8d0bf848
(svn r4281) -Cleanup: Begun cleaning up elrail code a bit, mostly comments and enum/array alignment
celestar
parents:
3446
diff
changeset
|
117 |
1 << DIR_NW | 1 << DIR_SE, |
d45c8d0bf848
(svn r4281) -Cleanup: Begun cleaning up elrail code a bit, mostly comments and enum/array alignment
celestar
parents:
3446
diff
changeset
|
118 |
1 << DIR_NE | 1 << DIR_SW |
d45c8d0bf848
(svn r4281) -Cleanup: Begun cleaning up elrail code a bit, mostly comments and enum/array alignment
celestar
parents:
3446
diff
changeset
|
119 |
}, { /* X odd, Y even */ |
d45c8d0bf848
(svn r4281) -Cleanup: Begun cleaning up elrail code a bit, mostly comments and enum/array alignment
celestar
parents:
3446
diff
changeset
|
120 |
1 << DIR_NW | 1 << DIR_SE, |
d45c8d0bf848
(svn r4281) -Cleanup: Begun cleaning up elrail code a bit, mostly comments and enum/array alignment
celestar
parents:
3446
diff
changeset
|
121 |
1 << DIR_NE | 1 << DIR_SW, |
3450
b6c0635558dd
(svn r4282) -Cleanup: Re-arranged the ignore groups into a more readable arrangement
celestar
parents:
3449
diff
changeset
|
122 |
IGNORE_NONE, |
b6c0635558dd
(svn r4282) -Cleanup: Re-arranged the ignore groups into a more readable arrangement
celestar
parents:
3449
diff
changeset
|
123 |
IGNORE_NONE |
3449
d45c8d0bf848
(svn r4281) -Cleanup: Begun cleaning up elrail code a bit, mostly comments and enum/array alignment
celestar
parents:
3446
diff
changeset
|
124 |
}, { /* X odd, Y odd */ |
d45c8d0bf848
(svn r4281) -Cleanup: Begun cleaning up elrail code a bit, mostly comments and enum/array alignment
celestar
parents:
3446
diff
changeset
|
125 |
1 << DIR_NW | 1 << DIR_SE, |
3450
b6c0635558dd
(svn r4282) -Cleanup: Re-arranged the ignore groups into a more readable arrangement
celestar
parents:
3449
diff
changeset
|
126 |
IGNORE_NONE, |
b6c0635558dd
(svn r4282) -Cleanup: Re-arranged the ignore groups into a more readable arrangement
celestar
parents:
3449
diff
changeset
|
127 |
IGNORE_NONE, |
3449
d45c8d0bf848
(svn r4281) -Cleanup: Begun cleaning up elrail code a bit, mostly comments and enum/array alignment
celestar
parents:
3446
diff
changeset
|
128 |
1 << DIR_NE | 1 << DIR_SW |
d45c8d0bf848
(svn r4281) -Cleanup: Begun cleaning up elrail code a bit, mostly comments and enum/array alignment
celestar
parents:
3446
diff
changeset
|
129 |
} |
3355
e414a0b104a6
(svn r4150) -Feature: Merged elrails into trunk. Thanks to Tron for lots of code and proofreading, thanks to peter1138 for another lot of code and ideas.
celestar
parents:
diff
changeset
|
130 |
}, |
3450
b6c0635558dd
(svn r4282) -Cleanup: Re-arranged the ignore groups into a more readable arrangement
celestar
parents:
3449
diff
changeset
|
131 |
{ /* Ignore group 2, LEFT and RIGHT tracks */ |
3449
d45c8d0bf848
(svn r4281) -Cleanup: Begun cleaning up elrail code a bit, mostly comments and enum/array alignment
celestar
parents:
3446
diff
changeset
|
132 |
{ |
d45c8d0bf848
(svn r4281) -Cleanup: Begun cleaning up elrail code a bit, mostly comments and enum/array alignment
celestar
parents:
3446
diff
changeset
|
133 |
1 << DIR_E | 1 << DIR_W, |
3450
b6c0635558dd
(svn r4282) -Cleanup: Re-arranged the ignore groups into a more readable arrangement
celestar
parents:
3449
diff
changeset
|
134 |
IGNORE_NONE, |
b6c0635558dd
(svn r4282) -Cleanup: Re-arranged the ignore groups into a more readable arrangement
celestar
parents:
3449
diff
changeset
|
135 |
IGNORE_NONE, |
3449
d45c8d0bf848
(svn r4281) -Cleanup: Begun cleaning up elrail code a bit, mostly comments and enum/array alignment
celestar
parents:
3446
diff
changeset
|
136 |
1 << DIR_E | 1 << DIR_W |
d45c8d0bf848
(svn r4281) -Cleanup: Begun cleaning up elrail code a bit, mostly comments and enum/array alignment
celestar
parents:
3446
diff
changeset
|
137 |
}, { |
3450
b6c0635558dd
(svn r4282) -Cleanup: Re-arranged the ignore groups into a more readable arrangement
celestar
parents:
3449
diff
changeset
|
138 |
IGNORE_NONE, |
b6c0635558dd
(svn r4282) -Cleanup: Re-arranged the ignore groups into a more readable arrangement
celestar
parents:
3449
diff
changeset
|
139 |
1 << DIR_E | 1 << DIR_W, |
b6c0635558dd
(svn r4282) -Cleanup: Re-arranged the ignore groups into a more readable arrangement
celestar
parents:
3449
diff
changeset
|
140 |
1 << DIR_E | 1 << DIR_W, |
b6c0635558dd
(svn r4282) -Cleanup: Re-arranged the ignore groups into a more readable arrangement
celestar
parents:
3449
diff
changeset
|
141 |
IGNORE_NONE |
b6c0635558dd
(svn r4282) -Cleanup: Re-arranged the ignore groups into a more readable arrangement
celestar
parents:
3449
diff
changeset
|
142 |
}, { |
b6c0635558dd
(svn r4282) -Cleanup: Re-arranged the ignore groups into a more readable arrangement
celestar
parents:
3449
diff
changeset
|
143 |
IGNORE_NONE, |
b6c0635558dd
(svn r4282) -Cleanup: Re-arranged the ignore groups into a more readable arrangement
celestar
parents:
3449
diff
changeset
|
144 |
1 << DIR_E | 1 << DIR_W, |
b6c0635558dd
(svn r4282) -Cleanup: Re-arranged the ignore groups into a more readable arrangement
celestar
parents:
3449
diff
changeset
|
145 |
1 << DIR_E | 1 << DIR_W, |
b6c0635558dd
(svn r4282) -Cleanup: Re-arranged the ignore groups into a more readable arrangement
celestar
parents:
3449
diff
changeset
|
146 |
IGNORE_NONE |
b6c0635558dd
(svn r4282) -Cleanup: Re-arranged the ignore groups into a more readable arrangement
celestar
parents:
3449
diff
changeset
|
147 |
}, { |
b6c0635558dd
(svn r4282) -Cleanup: Re-arranged the ignore groups into a more readable arrangement
celestar
parents:
3449
diff
changeset
|
148 |
1 << DIR_E | 1 << DIR_W, |
b6c0635558dd
(svn r4282) -Cleanup: Re-arranged the ignore groups into a more readable arrangement
celestar
parents:
3449
diff
changeset
|
149 |
IGNORE_NONE, |
b6c0635558dd
(svn r4282) -Cleanup: Re-arranged the ignore groups into a more readable arrangement
celestar
parents:
3449
diff
changeset
|
150 |
IGNORE_NONE, |
b6c0635558dd
(svn r4282) -Cleanup: Re-arranged the ignore groups into a more readable arrangement
celestar
parents:
3449
diff
changeset
|
151 |
1 << DIR_E | 1 << DIR_W |
b6c0635558dd
(svn r4282) -Cleanup: Re-arranged the ignore groups into a more readable arrangement
celestar
parents:
3449
diff
changeset
|
152 |
} |
b6c0635558dd
(svn r4282) -Cleanup: Re-arranged the ignore groups into a more readable arrangement
celestar
parents:
3449
diff
changeset
|
153 |
}, |
b6c0635558dd
(svn r4282) -Cleanup: Re-arranged the ignore groups into a more readable arrangement
celestar
parents:
3449
diff
changeset
|
154 |
{ /* Ignore group 3, UPPER and LOWER tracks */ |
b6c0635558dd
(svn r4282) -Cleanup: Re-arranged the ignore groups into a more readable arrangement
celestar
parents:
3449
diff
changeset
|
155 |
{ |
b6c0635558dd
(svn r4282) -Cleanup: Re-arranged the ignore groups into a more readable arrangement
celestar
parents:
3449
diff
changeset
|
156 |
1 << DIR_N | 1 << DIR_S, |
b6c0635558dd
(svn r4282) -Cleanup: Re-arranged the ignore groups into a more readable arrangement
celestar
parents:
3449
diff
changeset
|
157 |
1 << DIR_N | 1 << DIR_S, |
b6c0635558dd
(svn r4282) -Cleanup: Re-arranged the ignore groups into a more readable arrangement
celestar
parents:
3449
diff
changeset
|
158 |
IGNORE_NONE, |
b6c0635558dd
(svn r4282) -Cleanup: Re-arranged the ignore groups into a more readable arrangement
celestar
parents:
3449
diff
changeset
|
159 |
IGNORE_NONE |
b6c0635558dd
(svn r4282) -Cleanup: Re-arranged the ignore groups into a more readable arrangement
celestar
parents:
3449
diff
changeset
|
160 |
}, { |
b6c0635558dd
(svn r4282) -Cleanup: Re-arranged the ignore groups into a more readable arrangement
celestar
parents:
3449
diff
changeset
|
161 |
IGNORE_NONE, |
b6c0635558dd
(svn r4282) -Cleanup: Re-arranged the ignore groups into a more readable arrangement
celestar
parents:
3449
diff
changeset
|
162 |
IGNORE_NONE, |
3449
d45c8d0bf848
(svn r4281) -Cleanup: Begun cleaning up elrail code a bit, mostly comments and enum/array alignment
celestar
parents:
3446
diff
changeset
|
163 |
1 << DIR_N | 1 << DIR_S, |
d45c8d0bf848
(svn r4281) -Cleanup: Begun cleaning up elrail code a bit, mostly comments and enum/array alignment
celestar
parents:
3446
diff
changeset
|
164 |
1 << DIR_N | 1 << DIR_S |
d45c8d0bf848
(svn r4281) -Cleanup: Begun cleaning up elrail code a bit, mostly comments and enum/array alignment
celestar
parents:
3446
diff
changeset
|
165 |
}, { |
3450
b6c0635558dd
(svn r4282) -Cleanup: Re-arranged the ignore groups into a more readable arrangement
celestar
parents:
3449
diff
changeset
|
166 |
IGNORE_NONE, |
b6c0635558dd
(svn r4282) -Cleanup: Re-arranged the ignore groups into a more readable arrangement
celestar
parents:
3449
diff
changeset
|
167 |
IGNORE_NONE, |
b6c0635558dd
(svn r4282) -Cleanup: Re-arranged the ignore groups into a more readable arrangement
celestar
parents:
3449
diff
changeset
|
168 |
1 << DIR_N | 1 << DIR_S , |
3449
d45c8d0bf848
(svn r4281) -Cleanup: Begun cleaning up elrail code a bit, mostly comments and enum/array alignment
celestar
parents:
3446
diff
changeset
|
169 |
1 << DIR_N | 1 << DIR_S |
d45c8d0bf848
(svn r4281) -Cleanup: Begun cleaning up elrail code a bit, mostly comments and enum/array alignment
celestar
parents:
3446
diff
changeset
|
170 |
}, { |
d45c8d0bf848
(svn r4281) -Cleanup: Begun cleaning up elrail code a bit, mostly comments and enum/array alignment
celestar
parents:
3446
diff
changeset
|
171 |
1 << DIR_N | 1 << DIR_S, |
d45c8d0bf848
(svn r4281) -Cleanup: Begun cleaning up elrail code a bit, mostly comments and enum/array alignment
celestar
parents:
3446
diff
changeset
|
172 |
1 << DIR_N | 1 << DIR_S, |
3450
b6c0635558dd
(svn r4282) -Cleanup: Re-arranged the ignore groups into a more readable arrangement
celestar
parents:
3449
diff
changeset
|
173 |
IGNORE_NONE, |
b6c0635558dd
(svn r4282) -Cleanup: Re-arranged the ignore groups into a more readable arrangement
celestar
parents:
3449
diff
changeset
|
174 |
IGNORE_NONE |
3449
d45c8d0bf848
(svn r4281) -Cleanup: Begun cleaning up elrail code a bit, mostly comments and enum/array alignment
celestar
parents:
3446
diff
changeset
|
175 |
} |
3355
e414a0b104a6
(svn r4150) -Feature: Merged elrails into trunk. Thanks to Tron for lots of code and proofreading, thanks to peter1138 for another lot of code and ideas.
celestar
parents:
diff
changeset
|
176 |
} |
e414a0b104a6
(svn r4150) -Feature: Merged elrails into trunk. Thanks to Tron for lots of code and proofreading, thanks to peter1138 for another lot of code and ideas.
celestar
parents:
diff
changeset
|
177 |
}; |
e414a0b104a6
(svn r4150) -Feature: Merged elrails into trunk. Thanks to Tron for lots of code and proofreading, thanks to peter1138 for another lot of code and ideas.
celestar
parents:
diff
changeset
|
178 |
|
3449
d45c8d0bf848
(svn r4281) -Cleanup: Begun cleaning up elrail code a bit, mostly comments and enum/array alignment
celestar
parents:
3446
diff
changeset
|
179 |
#undef NO_IGNORE |
d45c8d0bf848
(svn r4281) -Cleanup: Begun cleaning up elrail code a bit, mostly comments and enum/array alignment
celestar
parents:
3446
diff
changeset
|
180 |
|
3355
e414a0b104a6
(svn r4150) -Feature: Merged elrails into trunk. Thanks to Tron for lots of code and proofreading, thanks to peter1138 for another lot of code and ideas.
celestar
parents:
diff
changeset
|
181 |
/** Which pylons can definately NOT be built */ |
3451
0e8ccac68fdf
(svn r4283) -Cleanup: More elrail housekeeping, remove code dublication, more meaningful variable names, simplify control flow..
celestar
parents:
3450
diff
changeset
|
182 |
static byte DisallowedPPPofTrackAtPCP[TRACK_END][DIAGDIR_END] = { |
3355
e414a0b104a6
(svn r4150) -Feature: Merged elrails into trunk. Thanks to Tron for lots of code and proofreading, thanks to peter1138 for another lot of code and ideas.
celestar
parents:
diff
changeset
|
183 |
{1 << DIR_SW | 1 << DIR_NE, 0, 1 << DIR_SW | 1 << DIR_NE, 0 }, /* X */ |
e414a0b104a6
(svn r4150) -Feature: Merged elrails into trunk. Thanks to Tron for lots of code and proofreading, thanks to peter1138 for another lot of code and ideas.
celestar
parents:
diff
changeset
|
184 |
{0, 1 << DIR_NW | 1 << DIR_SE, 0, 1 << DIR_NW | 1 << DIR_SE}, /* Y */ |
e414a0b104a6
(svn r4150) -Feature: Merged elrails into trunk. Thanks to Tron for lots of code and proofreading, thanks to peter1138 for another lot of code and ideas.
celestar
parents:
diff
changeset
|
185 |
{1 << DIR_W | 1 << DIR_E, 0, 0, 1 << DIR_W | 1 << DIR_E }, /* UPPER */ |
e414a0b104a6
(svn r4150) -Feature: Merged elrails into trunk. Thanks to Tron for lots of code and proofreading, thanks to peter1138 for another lot of code and ideas.
celestar
parents:
diff
changeset
|
186 |
{0, 1 << DIR_W | 1 << DIR_E, 1 << DIR_W | 1 << DIR_E, 0 }, /* LOWER */ |
e414a0b104a6
(svn r4150) -Feature: Merged elrails into trunk. Thanks to Tron for lots of code and proofreading, thanks to peter1138 for another lot of code and ideas.
celestar
parents:
diff
changeset
|
187 |
{0, 0, 1 << DIR_S | 1 << DIR_N, 1 << DIR_N | 1 << DIR_S }, /* LEFT */ |
e414a0b104a6
(svn r4150) -Feature: Merged elrails into trunk. Thanks to Tron for lots of code and proofreading, thanks to peter1138 for another lot of code and ideas.
celestar
parents:
diff
changeset
|
188 |
{1 << DIR_S | 1 << DIR_N, 1 << DIR_S | 1 << DIR_N, 0, 0, }, /* RIGHT */ |
e414a0b104a6
(svn r4150) -Feature: Merged elrails into trunk. Thanks to Tron for lots of code and proofreading, thanks to peter1138 for another lot of code and ideas.
celestar
parents:
diff
changeset
|
189 |
}; |
e414a0b104a6
(svn r4150) -Feature: Merged elrails into trunk. Thanks to Tron for lots of code and proofreading, thanks to peter1138 for another lot of code and ideas.
celestar
parents:
diff
changeset
|
190 |
|
3449
d45c8d0bf848
(svn r4281) -Cleanup: Begun cleaning up elrail code a bit, mostly comments and enum/array alignment
celestar
parents:
3446
diff
changeset
|
191 |
/* This array stores which track bits can meet at a tile edge */ |
3451
0e8ccac68fdf
(svn r4283) -Cleanup: More elrail housekeeping, remove code dublication, more meaningful variable names, simplify control flow..
celestar
parents:
3450
diff
changeset
|
192 |
static const Track TracksAtPCP[DIAGDIR_END][NUM_TRACKS_AT_PCP] = { |
3449
d45c8d0bf848
(svn r4281) -Cleanup: Begun cleaning up elrail code a bit, mostly comments and enum/array alignment
celestar
parents:
3446
diff
changeset
|
193 |
{TRACK_X, TRACK_X, TRACK_UPPER, TRACK_LOWER, TRACK_LEFT, TRACK_RIGHT}, |
d45c8d0bf848
(svn r4281) -Cleanup: Begun cleaning up elrail code a bit, mostly comments and enum/array alignment
celestar
parents:
3446
diff
changeset
|
194 |
{TRACK_Y, TRACK_Y, TRACK_UPPER, TRACK_LOWER, TRACK_LEFT, TRACK_RIGHT}, |
d45c8d0bf848
(svn r4281) -Cleanup: Begun cleaning up elrail code a bit, mostly comments and enum/array alignment
celestar
parents:
3446
diff
changeset
|
195 |
{TRACK_X, TRACK_X, TRACK_UPPER, TRACK_LOWER, TRACK_LEFT, TRACK_RIGHT}, |
d45c8d0bf848
(svn r4281) -Cleanup: Begun cleaning up elrail code a bit, mostly comments and enum/array alignment
celestar
parents:
3446
diff
changeset
|
196 |
{TRACK_Y, TRACK_Y, TRACK_UPPER, TRACK_LOWER, TRACK_LEFT, TRACK_RIGHT}, |
d45c8d0bf848
(svn r4281) -Cleanup: Begun cleaning up elrail code a bit, mostly comments and enum/array alignment
celestar
parents:
3446
diff
changeset
|
197 |
}; |
d45c8d0bf848
(svn r4281) -Cleanup: Begun cleaning up elrail code a bit, mostly comments and enum/array alignment
celestar
parents:
3446
diff
changeset
|
198 |
|
3451
0e8ccac68fdf
(svn r4283) -Cleanup: More elrail housekeeping, remove code dublication, more meaningful variable names, simplify control flow..
celestar
parents:
3450
diff
changeset
|
199 |
/* takes each of the 6 track bits from the array above and |
4549
106ed18a7675
(svn r6381) -Cleanup: make the '/* */' comments that span multiple lines more uniform.
rubidium
parents:
4470
diff
changeset
|
200 |
* assigns it to the home tile or neighbour tile */ |
3451
0e8ccac68fdf
(svn r4283) -Cleanup: More elrail housekeeping, remove code dublication, more meaningful variable names, simplify control flow..
celestar
parents:
3450
diff
changeset
|
201 |
static const TileSource TrackSourceTile[DIAGDIR_END][NUM_TRACKS_AT_PCP] = { |
3449
d45c8d0bf848
(svn r4281) -Cleanup: Begun cleaning up elrail code a bit, mostly comments and enum/array alignment
celestar
parents:
3446
diff
changeset
|
202 |
{TS_HOME, TS_NEIGHBOUR, TS_HOME , TS_NEIGHBOUR, TS_NEIGHBOUR, TS_HOME }, |
d45c8d0bf848
(svn r4281) -Cleanup: Begun cleaning up elrail code a bit, mostly comments and enum/array alignment
celestar
parents:
3446
diff
changeset
|
203 |
{TS_HOME, TS_NEIGHBOUR, TS_NEIGHBOUR, TS_HOME , TS_NEIGHBOUR, TS_HOME }, |
d45c8d0bf848
(svn r4281) -Cleanup: Begun cleaning up elrail code a bit, mostly comments and enum/array alignment
celestar
parents:
3446
diff
changeset
|
204 |
{TS_HOME, TS_NEIGHBOUR, TS_NEIGHBOUR, TS_HOME , TS_HOME , TS_NEIGHBOUR}, |
d45c8d0bf848
(svn r4281) -Cleanup: Begun cleaning up elrail code a bit, mostly comments and enum/array alignment
celestar
parents:
3446
diff
changeset
|
205 |
{TS_HOME, TS_NEIGHBOUR, TS_HOME , TS_NEIGHBOUR, TS_HOME , TS_NEIGHBOUR}, |
d45c8d0bf848
(svn r4281) -Cleanup: Begun cleaning up elrail code a bit, mostly comments and enum/array alignment
celestar
parents:
3446
diff
changeset
|
206 |
}; |
d45c8d0bf848
(svn r4281) -Cleanup: Begun cleaning up elrail code a bit, mostly comments and enum/array alignment
celestar
parents:
3446
diff
changeset
|
207 |
|
d45c8d0bf848
(svn r4281) -Cleanup: Begun cleaning up elrail code a bit, mostly comments and enum/array alignment
celestar
parents:
3446
diff
changeset
|
208 |
/* Several PPPs maybe exist, here they are sorted in order of preference. */ |
d45c8d0bf848
(svn r4281) -Cleanup: Begun cleaning up elrail code a bit, mostly comments and enum/array alignment
celestar
parents:
3446
diff
changeset
|
209 |
static const Direction PPPorder[DIAGDIR_END][TLG_END][DIR_END] = { /* X - Y */ |
d45c8d0bf848
(svn r4281) -Cleanup: Begun cleaning up elrail code a bit, mostly comments and enum/array alignment
celestar
parents:
3446
diff
changeset
|
210 |
{ /* PCP 0 */ |
d45c8d0bf848
(svn r4281) -Cleanup: Begun cleaning up elrail code a bit, mostly comments and enum/array alignment
celestar
parents:
3446
diff
changeset
|
211 |
{DIR_NE, DIR_NW, DIR_SE, DIR_SW, DIR_N, DIR_E, DIR_S, DIR_W}, /* evn - evn */ |
d45c8d0bf848
(svn r4281) -Cleanup: Begun cleaning up elrail code a bit, mostly comments and enum/array alignment
celestar
parents:
3446
diff
changeset
|
212 |
{DIR_NE, DIR_SE, DIR_SW, DIR_NW, DIR_S, DIR_W, DIR_N, DIR_E}, /* evn - odd */ |
d45c8d0bf848
(svn r4281) -Cleanup: Begun cleaning up elrail code a bit, mostly comments and enum/array alignment
celestar
parents:
3446
diff
changeset
|
213 |
{DIR_SW, DIR_NW, DIR_NE, DIR_SE, DIR_S, DIR_W, DIR_N, DIR_E}, /* odd - evn */ |
d45c8d0bf848
(svn r4281) -Cleanup: Begun cleaning up elrail code a bit, mostly comments and enum/array alignment
celestar
parents:
3446
diff
changeset
|
214 |
{DIR_SW, DIR_SE, DIR_NE, DIR_NW, DIR_N, DIR_E, DIR_S, DIR_W}, /* odd - odd */ |
d45c8d0bf848
(svn r4281) -Cleanup: Begun cleaning up elrail code a bit, mostly comments and enum/array alignment
celestar
parents:
3446
diff
changeset
|
215 |
}, {/* PCP 1 */ |
d45c8d0bf848
(svn r4281) -Cleanup: Begun cleaning up elrail code a bit, mostly comments and enum/array alignment
celestar
parents:
3446
diff
changeset
|
216 |
{DIR_NE, DIR_NW, DIR_SE, DIR_SW, DIR_S, DIR_E, DIR_N, DIR_W}, /* evn - evn */ |
d45c8d0bf848
(svn r4281) -Cleanup: Begun cleaning up elrail code a bit, mostly comments and enum/array alignment
celestar
parents:
3446
diff
changeset
|
217 |
{DIR_NE, DIR_SE, DIR_SW, DIR_NW, DIR_N, DIR_W, DIR_S, DIR_E}, /* evn - odd */ |
d45c8d0bf848
(svn r4281) -Cleanup: Begun cleaning up elrail code a bit, mostly comments and enum/array alignment
celestar
parents:
3446
diff
changeset
|
218 |
{DIR_SW, DIR_NW, DIR_NE, DIR_SE, DIR_N, DIR_W, DIR_S, DIR_E}, /* odd - evn */ |
d45c8d0bf848
(svn r4281) -Cleanup: Begun cleaning up elrail code a bit, mostly comments and enum/array alignment
celestar
parents:
3446
diff
changeset
|
219 |
{DIR_SW, DIR_SE, DIR_NE, DIR_NW, DIR_S, DIR_E, DIR_N, DIR_W}, /* odd - odd */ |
d45c8d0bf848
(svn r4281) -Cleanup: Begun cleaning up elrail code a bit, mostly comments and enum/array alignment
celestar
parents:
3446
diff
changeset
|
220 |
}, {/* PCP 2 */ |
d45c8d0bf848
(svn r4281) -Cleanup: Begun cleaning up elrail code a bit, mostly comments and enum/array alignment
celestar
parents:
3446
diff
changeset
|
221 |
{DIR_NE, DIR_NW, DIR_SE, DIR_SW, DIR_S, DIR_W, DIR_N, DIR_E}, /* evn - evn */ |
d45c8d0bf848
(svn r4281) -Cleanup: Begun cleaning up elrail code a bit, mostly comments and enum/array alignment
celestar
parents:
3446
diff
changeset
|
222 |
{DIR_NE, DIR_SE, DIR_SW, DIR_NW, DIR_N, DIR_E, DIR_S, DIR_W}, /* evn - odd */ |
d45c8d0bf848
(svn r4281) -Cleanup: Begun cleaning up elrail code a bit, mostly comments and enum/array alignment
celestar
parents:
3446
diff
changeset
|
223 |
{DIR_SW, DIR_NW, DIR_NE, DIR_SE, DIR_N, DIR_E, DIR_S, DIR_W}, /* odd - evn */ |
d45c8d0bf848
(svn r4281) -Cleanup: Begun cleaning up elrail code a bit, mostly comments and enum/array alignment
celestar
parents:
3446
diff
changeset
|
224 |
{DIR_SW, DIR_SE, DIR_NE, DIR_NW, DIR_S, DIR_W, DIR_N, DIR_E}, /* odd - odd */ |
d45c8d0bf848
(svn r4281) -Cleanup: Begun cleaning up elrail code a bit, mostly comments and enum/array alignment
celestar
parents:
3446
diff
changeset
|
225 |
}, {/* PCP 3 */ |
d45c8d0bf848
(svn r4281) -Cleanup: Begun cleaning up elrail code a bit, mostly comments and enum/array alignment
celestar
parents:
3446
diff
changeset
|
226 |
{DIR_NE, DIR_NW, DIR_SE, DIR_SW, DIR_N, DIR_W, DIR_S, DIR_E}, /* evn - evn */ |
d45c8d0bf848
(svn r4281) -Cleanup: Begun cleaning up elrail code a bit, mostly comments and enum/array alignment
celestar
parents:
3446
diff
changeset
|
227 |
{DIR_NE, DIR_SE, DIR_SW, DIR_NW, DIR_S, DIR_E, DIR_N, DIR_W}, /* evn - odd */ |
d45c8d0bf848
(svn r4281) -Cleanup: Begun cleaning up elrail code a bit, mostly comments and enum/array alignment
celestar
parents:
3446
diff
changeset
|
228 |
{DIR_SW, DIR_NW, DIR_NE, DIR_SE, DIR_S, DIR_E, DIR_N, DIR_W}, /* odd - evn */ |
d45c8d0bf848
(svn r4281) -Cleanup: Begun cleaning up elrail code a bit, mostly comments and enum/array alignment
celestar
parents:
3446
diff
changeset
|
229 |
{DIR_SW, DIR_SE, DIR_NE, DIR_NW, DIR_N, DIR_W, DIR_S, DIR_E}, /* odd - odd */ |
d45c8d0bf848
(svn r4281) -Cleanup: Begun cleaning up elrail code a bit, mostly comments and enum/array alignment
celestar
parents:
3446
diff
changeset
|
230 |
} |
d45c8d0bf848
(svn r4281) -Cleanup: Begun cleaning up elrail code a bit, mostly comments and enum/array alignment
celestar
parents:
3446
diff
changeset
|
231 |
}; |
d45c8d0bf848
(svn r4281) -Cleanup: Begun cleaning up elrail code a bit, mostly comments and enum/array alignment
celestar
parents:
3446
diff
changeset
|
232 |
/* Geometric placement of the PCP relative to the tile origin */ |
7534
2e4dcc2c3bc9
(svn r11054) -Fix [FS#944]: mismatch between TTDP's and OTTD's placement of catenary, creating graphical glitches when loading a catenary replacement. Patch by frosch.
rubidium
parents:
6268
diff
changeset
|
233 |
static const int8 x_pcp_offsets[DIAGDIR_END] = {0, 8, 16, 8}; |
2e4dcc2c3bc9
(svn r11054) -Fix [FS#944]: mismatch between TTDP's and OTTD's placement of catenary, creating graphical glitches when loading a catenary replacement. Patch by frosch.
rubidium
parents:
6268
diff
changeset
|
234 |
static const int8 y_pcp_offsets[DIAGDIR_END] = {8, 16, 8, 0}; |
3449
d45c8d0bf848
(svn r4281) -Cleanup: Begun cleaning up elrail code a bit, mostly comments and enum/array alignment
celestar
parents:
3446
diff
changeset
|
235 |
/* Geometric placement of the PPP relative to the PCP*/ |
7534
2e4dcc2c3bc9
(svn r11054) -Fix [FS#944]: mismatch between TTDP's and OTTD's placement of catenary, creating graphical glitches when loading a catenary replacement. Patch by frosch.
rubidium
parents:
6268
diff
changeset
|
236 |
static const int8 x_ppp_offsets[DIR_END] = {-2, -4, -2, 0, 2, 4, 2, 0}; |
2e4dcc2c3bc9
(svn r11054) -Fix [FS#944]: mismatch between TTDP's and OTTD's placement of catenary, creating graphical glitches when loading a catenary replacement. Patch by frosch.
rubidium
parents:
6268
diff
changeset
|
237 |
static const int8 y_ppp_offsets[DIR_END] = {-2, 0, 2, 4, 2, 0, -2, -4}; |
3449
d45c8d0bf848
(svn r4281) -Cleanup: Begun cleaning up elrail code a bit, mostly comments and enum/array alignment
celestar
parents:
3446
diff
changeset
|
238 |
/* The type of pylon to draw at each PPP */ |
7534
2e4dcc2c3bc9
(svn r11054) -Fix [FS#944]: mismatch between TTDP's and OTTD's placement of catenary, creating graphical glitches when loading a catenary replacement. Patch by frosch.
rubidium
parents:
6268
diff
changeset
|
239 |
static const SpriteID pylon_sprites[] = { |
3449
d45c8d0bf848
(svn r4281) -Cleanup: Begun cleaning up elrail code a bit, mostly comments and enum/array alignment
celestar
parents:
3446
diff
changeset
|
240 |
SPR_PYLON_EW_N, |
d45c8d0bf848
(svn r4281) -Cleanup: Begun cleaning up elrail code a bit, mostly comments and enum/array alignment
celestar
parents:
3446
diff
changeset
|
241 |
SPR_PYLON_Y_NE, |
d45c8d0bf848
(svn r4281) -Cleanup: Begun cleaning up elrail code a bit, mostly comments and enum/array alignment
celestar
parents:
3446
diff
changeset
|
242 |
SPR_PYLON_NS_E, |
d45c8d0bf848
(svn r4281) -Cleanup: Begun cleaning up elrail code a bit, mostly comments and enum/array alignment
celestar
parents:
3446
diff
changeset
|
243 |
SPR_PYLON_X_SE, |
d45c8d0bf848
(svn r4281) -Cleanup: Begun cleaning up elrail code a bit, mostly comments and enum/array alignment
celestar
parents:
3446
diff
changeset
|
244 |
SPR_PYLON_EW_S, |
d45c8d0bf848
(svn r4281) -Cleanup: Begun cleaning up elrail code a bit, mostly comments and enum/array alignment
celestar
parents:
3446
diff
changeset
|
245 |
SPR_PYLON_Y_SW, |
d45c8d0bf848
(svn r4281) -Cleanup: Begun cleaning up elrail code a bit, mostly comments and enum/array alignment
celestar
parents:
3446
diff
changeset
|
246 |
SPR_PYLON_NS_W, |
d45c8d0bf848
(svn r4281) -Cleanup: Begun cleaning up elrail code a bit, mostly comments and enum/array alignment
celestar
parents:
3446
diff
changeset
|
247 |
SPR_PYLON_X_NW |
d45c8d0bf848
(svn r4281) -Cleanup: Begun cleaning up elrail code a bit, mostly comments and enum/array alignment
celestar
parents:
3446
diff
changeset
|
248 |
}; |
d45c8d0bf848
(svn r4281) -Cleanup: Begun cleaning up elrail code a bit, mostly comments and enum/array alignment
celestar
parents:
3446
diff
changeset
|
249 |
|
6248
e4a2ed7e5613
(svn r9051) -Codechange: typedef [enum|struct] Y {} X; -> [enum|struct] X {};
rubidium
parents:
5475
diff
changeset
|
250 |
struct SortableSpriteStruct { |
3355
e414a0b104a6
(svn r4150) -Feature: Merged elrails into trunk. Thanks to Tron for lots of code and proofreading, thanks to peter1138 for another lot of code and ideas.
celestar
parents:
diff
changeset
|
251 |
SpriteID image; |
e414a0b104a6
(svn r4150) -Feature: Merged elrails into trunk. Thanks to Tron for lots of code and proofreading, thanks to peter1138 for another lot of code and ideas.
celestar
parents:
diff
changeset
|
252 |
int8 x_offset; |
e414a0b104a6
(svn r4150) -Feature: Merged elrails into trunk. Thanks to Tron for lots of code and proofreading, thanks to peter1138 for another lot of code and ideas.
celestar
parents:
diff
changeset
|
253 |
int8 y_offset; |
e414a0b104a6
(svn r4150) -Feature: Merged elrails into trunk. Thanks to Tron for lots of code and proofreading, thanks to peter1138 for another lot of code and ideas.
celestar
parents:
diff
changeset
|
254 |
int8 x_size; |
e414a0b104a6
(svn r4150) -Feature: Merged elrails into trunk. Thanks to Tron for lots of code and proofreading, thanks to peter1138 for another lot of code and ideas.
celestar
parents:
diff
changeset
|
255 |
int8 y_size; |
e414a0b104a6
(svn r4150) -Feature: Merged elrails into trunk. Thanks to Tron for lots of code and proofreading, thanks to peter1138 for another lot of code and ideas.
celestar
parents:
diff
changeset
|
256 |
int8 z_size; |
e414a0b104a6
(svn r4150) -Feature: Merged elrails into trunk. Thanks to Tron for lots of code and proofreading, thanks to peter1138 for another lot of code and ideas.
celestar
parents:
diff
changeset
|
257 |
int8 z_offset; |
6248
e4a2ed7e5613
(svn r9051) -Codechange: typedef [enum|struct] Y {} X; -> [enum|struct] X {};
rubidium
parents:
5475
diff
changeset
|
258 |
}; |
3355
e414a0b104a6
(svn r4150) -Feature: Merged elrails into trunk. Thanks to Tron for lots of code and proofreading, thanks to peter1138 for another lot of code and ideas.
celestar
parents:
diff
changeset
|
259 |
|
e414a0b104a6
(svn r4150) -Feature: Merged elrails into trunk. Thanks to Tron for lots of code and proofreading, thanks to peter1138 for another lot of code and ideas.
celestar
parents:
diff
changeset
|
260 |
enum { |
e414a0b104a6
(svn r4150) -Feature: Merged elrails into trunk. Thanks to Tron for lots of code and proofreading, thanks to peter1138 for another lot of code and ideas.
celestar
parents:
diff
changeset
|
261 |
/** Distance between wire and rail */ |
7534
2e4dcc2c3bc9
(svn r11054) -Fix [FS#944]: mismatch between TTDP's and OTTD's placement of catenary, creating graphical glitches when loading a catenary replacement. Patch by frosch.
rubidium
parents:
6268
diff
changeset
|
262 |
ELRAIL_ELEVATION = 10, |
3355
e414a0b104a6
(svn r4150) -Feature: Merged elrails into trunk. Thanks to Tron for lots of code and proofreading, thanks to peter1138 for another lot of code and ideas.
celestar
parents:
diff
changeset
|
263 |
/** Wires that a draw one level higher than the north corner. */ |
e414a0b104a6
(svn r4150) -Feature: Merged elrails into trunk. Thanks to Tron for lots of code and proofreading, thanks to peter1138 for another lot of code and ideas.
celestar
parents:
diff
changeset
|
264 |
ELRAIL_ELEVRAISE = ELRAIL_ELEVATION + TILE_HEIGHT |
e414a0b104a6
(svn r4150) -Feature: Merged elrails into trunk. Thanks to Tron for lots of code and proofreading, thanks to peter1138 for another lot of code and ideas.
celestar
parents:
diff
changeset
|
265 |
}; |
e414a0b104a6
(svn r4150) -Feature: Merged elrails into trunk. Thanks to Tron for lots of code and proofreading, thanks to peter1138 for another lot of code and ideas.
celestar
parents:
diff
changeset
|
266 |
|
e414a0b104a6
(svn r4150) -Feature: Merged elrails into trunk. Thanks to Tron for lots of code and proofreading, thanks to peter1138 for another lot of code and ideas.
celestar
parents:
diff
changeset
|
267 |
static const SortableSpriteStruct CatenarySpriteData[] = { |
e414a0b104a6
(svn r4150) -Feature: Merged elrails into trunk. Thanks to Tron for lots of code and proofreading, thanks to peter1138 for another lot of code and ideas.
celestar
parents:
diff
changeset
|
268 |
/* X direction */ |
e414a0b104a6
(svn r4150) -Feature: Merged elrails into trunk. Thanks to Tron for lots of code and proofreading, thanks to peter1138 for another lot of code and ideas.
celestar
parents:
diff
changeset
|
269 |
/* Flat tiles: */ |
e414a0b104a6
(svn r4150) -Feature: Merged elrails into trunk. Thanks to Tron for lots of code and proofreading, thanks to peter1138 for another lot of code and ideas.
celestar
parents:
diff
changeset
|
270 |
/* Wires */ |
7534
2e4dcc2c3bc9
(svn r11054) -Fix [FS#944]: mismatch between TTDP's and OTTD's placement of catenary, creating graphical glitches when loading a catenary replacement. Patch by frosch.
rubidium
parents:
6268
diff
changeset
|
271 |
{ SPR_WIRE_X_SW, 0, 7, 15, 1, 1, ELRAIL_ELEVATION }, //! 0: Wire in X direction, pylon on the SW end only |
2e4dcc2c3bc9
(svn r11054) -Fix [FS#944]: mismatch between TTDP's and OTTD's placement of catenary, creating graphical glitches when loading a catenary replacement. Patch by frosch.
rubidium
parents:
6268
diff
changeset
|
272 |
{ SPR_WIRE_X_NE, 0, 7, 15, 1, 1, ELRAIL_ELEVATION }, //! 1: Wire in X direction, pylon on the NE end |
2e4dcc2c3bc9
(svn r11054) -Fix [FS#944]: mismatch between TTDP's and OTTD's placement of catenary, creating graphical glitches when loading a catenary replacement. Patch by frosch.
rubidium
parents:
6268
diff
changeset
|
273 |
{ SPR_WIRE_X_SHORT, 0, 7, 15, 1, 1, ELRAIL_ELEVATION }, //! 2: Wire in X direction, pylon on both ends |
3355
e414a0b104a6
(svn r4150) -Feature: Merged elrails into trunk. Thanks to Tron for lots of code and proofreading, thanks to peter1138 for another lot of code and ideas.
celestar
parents:
diff
changeset
|
274 |
|
e414a0b104a6
(svn r4150) -Feature: Merged elrails into trunk. Thanks to Tron for lots of code and proofreading, thanks to peter1138 for another lot of code and ideas.
celestar
parents:
diff
changeset
|
275 |
/* "up" tiles */ |
e414a0b104a6
(svn r4150) -Feature: Merged elrails into trunk. Thanks to Tron for lots of code and proofreading, thanks to peter1138 for another lot of code and ideas.
celestar
parents:
diff
changeset
|
276 |
/* Wires */ |
7534
2e4dcc2c3bc9
(svn r11054) -Fix [FS#944]: mismatch between TTDP's and OTTD's placement of catenary, creating graphical glitches when loading a catenary replacement. Patch by frosch.
rubidium
parents:
6268
diff
changeset
|
277 |
{ SPR_WIRE_X_SW_UP, 0, 7, 15, 8, 1, ELRAIL_ELEVRAISE }, //! 3: Wire in X pitch up, pylon on the SW end only |
2e4dcc2c3bc9
(svn r11054) -Fix [FS#944]: mismatch between TTDP's and OTTD's placement of catenary, creating graphical glitches when loading a catenary replacement. Patch by frosch.
rubidium
parents:
6268
diff
changeset
|
278 |
{ SPR_WIRE_X_NE_UP, 0, 7, 15, 8, 1, ELRAIL_ELEVRAISE }, //! 4: Wire in X pitch up, pylon on the NE end |
2e4dcc2c3bc9
(svn r11054) -Fix [FS#944]: mismatch between TTDP's and OTTD's placement of catenary, creating graphical glitches when loading a catenary replacement. Patch by frosch.
rubidium
parents:
6268
diff
changeset
|
279 |
{ SPR_WIRE_X_SHORT_UP, 0, 7, 15, 8, 1, ELRAIL_ELEVRAISE }, //! 5: Wire in X pitch up, pylon on both ends |
3355
e414a0b104a6
(svn r4150) -Feature: Merged elrails into trunk. Thanks to Tron for lots of code and proofreading, thanks to peter1138 for another lot of code and ideas.
celestar
parents:
diff
changeset
|
280 |
|
e414a0b104a6
(svn r4150) -Feature: Merged elrails into trunk. Thanks to Tron for lots of code and proofreading, thanks to peter1138 for another lot of code and ideas.
celestar
parents:
diff
changeset
|
281 |
/* "down" tiles */ |
e414a0b104a6
(svn r4150) -Feature: Merged elrails into trunk. Thanks to Tron for lots of code and proofreading, thanks to peter1138 for another lot of code and ideas.
celestar
parents:
diff
changeset
|
282 |
/* Wires */ |
7534
2e4dcc2c3bc9
(svn r11054) -Fix [FS#944]: mismatch between TTDP's and OTTD's placement of catenary, creating graphical glitches when loading a catenary replacement. Patch by frosch.
rubidium
parents:
6268
diff
changeset
|
283 |
{ SPR_WIRE_X_SW_DOWN, 0, 7, 15, 8, 1, ELRAIL_ELEVATION }, //! 6: Wire in X pitch down, pylon on the SW end |
2e4dcc2c3bc9
(svn r11054) -Fix [FS#944]: mismatch between TTDP's and OTTD's placement of catenary, creating graphical glitches when loading a catenary replacement. Patch by frosch.
rubidium
parents:
6268
diff
changeset
|
284 |
{ SPR_WIRE_X_NE_DOWN, 0, 7, 15, 8, 1, ELRAIL_ELEVATION }, //! 7: Wire in X pitch down, pylon on the NE end |
2e4dcc2c3bc9
(svn r11054) -Fix [FS#944]: mismatch between TTDP's and OTTD's placement of catenary, creating graphical glitches when loading a catenary replacement. Patch by frosch.
rubidium
parents:
6268
diff
changeset
|
285 |
{ SPR_WIRE_X_SHORT_DOWN, 0, 7, 15, 8, 1, ELRAIL_ELEVATION }, //! 8: Wire in X pitch down, pylon on both ends |
3355
e414a0b104a6
(svn r4150) -Feature: Merged elrails into trunk. Thanks to Tron for lots of code and proofreading, thanks to peter1138 for another lot of code and ideas.
celestar
parents:
diff
changeset
|
286 |
|
e414a0b104a6
(svn r4150) -Feature: Merged elrails into trunk. Thanks to Tron for lots of code and proofreading, thanks to peter1138 for another lot of code and ideas.
celestar
parents:
diff
changeset
|
287 |
|
e414a0b104a6
(svn r4150) -Feature: Merged elrails into trunk. Thanks to Tron for lots of code and proofreading, thanks to peter1138 for another lot of code and ideas.
celestar
parents:
diff
changeset
|
288 |
/* Y direction */ |
e414a0b104a6
(svn r4150) -Feature: Merged elrails into trunk. Thanks to Tron for lots of code and proofreading, thanks to peter1138 for another lot of code and ideas.
celestar
parents:
diff
changeset
|
289 |
/* Flat tiles: */ |
e414a0b104a6
(svn r4150) -Feature: Merged elrails into trunk. Thanks to Tron for lots of code and proofreading, thanks to peter1138 for another lot of code and ideas.
celestar
parents:
diff
changeset
|
290 |
/* Wires */ |
7534
2e4dcc2c3bc9
(svn r11054) -Fix [FS#944]: mismatch between TTDP's and OTTD's placement of catenary, creating graphical glitches when loading a catenary replacement. Patch by frosch.
rubidium
parents:
6268
diff
changeset
|
291 |
{ SPR_WIRE_Y_SE, 7, 0, 1, 15, 1, ELRAIL_ELEVATION }, //! 9: Wire in Y direction, pylon on the SE end only |
2e4dcc2c3bc9
(svn r11054) -Fix [FS#944]: mismatch between TTDP's and OTTD's placement of catenary, creating graphical glitches when loading a catenary replacement. Patch by frosch.
rubidium
parents:
6268
diff
changeset
|
292 |
{ SPR_WIRE_Y_NW, 7, 0, 1, 15, 1, ELRAIL_ELEVATION }, //!10: Wire in Y direction, pylon on the NW end |
2e4dcc2c3bc9
(svn r11054) -Fix [FS#944]: mismatch between TTDP's and OTTD's placement of catenary, creating graphical glitches when loading a catenary replacement. Patch by frosch.
rubidium
parents:
6268
diff
changeset
|
293 |
{ SPR_WIRE_Y_SHORT, 7, 0, 1, 15, 1, ELRAIL_ELEVATION }, //!11: Wire in Y direction, pylon on both ends |
3355
e414a0b104a6
(svn r4150) -Feature: Merged elrails into trunk. Thanks to Tron for lots of code and proofreading, thanks to peter1138 for another lot of code and ideas.
celestar
parents:
diff
changeset
|
294 |
|
e414a0b104a6
(svn r4150) -Feature: Merged elrails into trunk. Thanks to Tron for lots of code and proofreading, thanks to peter1138 for another lot of code and ideas.
celestar
parents:
diff
changeset
|
295 |
/* "up" tiles */ |
e414a0b104a6
(svn r4150) -Feature: Merged elrails into trunk. Thanks to Tron for lots of code and proofreading, thanks to peter1138 for another lot of code and ideas.
celestar
parents:
diff
changeset
|
296 |
/* Wires */ |
7534
2e4dcc2c3bc9
(svn r11054) -Fix [FS#944]: mismatch between TTDP's and OTTD's placement of catenary, creating graphical glitches when loading a catenary replacement. Patch by frosch.
rubidium
parents:
6268
diff
changeset
|
297 |
{ SPR_WIRE_Y_SE_UP, 7, 0, 8, 15, 1, ELRAIL_ELEVRAISE }, //!12: Wire in Y pitch up, pylon on the SE end only |
2e4dcc2c3bc9
(svn r11054) -Fix [FS#944]: mismatch between TTDP's and OTTD's placement of catenary, creating graphical glitches when loading a catenary replacement. Patch by frosch.
rubidium
parents:
6268
diff
changeset
|
298 |
{ SPR_WIRE_Y_NW_UP, 7, 0, 8, 15, 1, ELRAIL_ELEVRAISE }, //!13: Wire in Y pitch up, pylon on the NW end |
2e4dcc2c3bc9
(svn r11054) -Fix [FS#944]: mismatch between TTDP's and OTTD's placement of catenary, creating graphical glitches when loading a catenary replacement. Patch by frosch.
rubidium
parents:
6268
diff
changeset
|
299 |
{ SPR_WIRE_Y_SHORT_UP, 7, 0, 8, 15, 1, ELRAIL_ELEVRAISE }, //!14: Wire in Y pitch up, pylon on both ends |
3355
e414a0b104a6
(svn r4150) -Feature: Merged elrails into trunk. Thanks to Tron for lots of code and proofreading, thanks to peter1138 for another lot of code and ideas.
celestar
parents:
diff
changeset
|
300 |
|
e414a0b104a6
(svn r4150) -Feature: Merged elrails into trunk. Thanks to Tron for lots of code and proofreading, thanks to peter1138 for another lot of code and ideas.
celestar
parents:
diff
changeset
|
301 |
/* "down" tiles */ |
e414a0b104a6
(svn r4150) -Feature: Merged elrails into trunk. Thanks to Tron for lots of code and proofreading, thanks to peter1138 for another lot of code and ideas.
celestar
parents:
diff
changeset
|
302 |
/* Wires */ |
7534
2e4dcc2c3bc9
(svn r11054) -Fix [FS#944]: mismatch between TTDP's and OTTD's placement of catenary, creating graphical glitches when loading a catenary replacement. Patch by frosch.
rubidium
parents:
6268
diff
changeset
|
303 |
{ SPR_WIRE_Y_SE_DOWN, 7, 0, 8, 15, 1, ELRAIL_ELEVATION }, //!15: Wire in Y pitch down, pylon on the SE end |
2e4dcc2c3bc9
(svn r11054) -Fix [FS#944]: mismatch between TTDP's and OTTD's placement of catenary, creating graphical glitches when loading a catenary replacement. Patch by frosch.
rubidium
parents:
6268
diff
changeset
|
304 |
{ SPR_WIRE_Y_NW_DOWN, 7, 0, 8, 15, 1, ELRAIL_ELEVATION }, //!16: Wire in Y pitch down, pylon on the NW end |
2e4dcc2c3bc9
(svn r11054) -Fix [FS#944]: mismatch between TTDP's and OTTD's placement of catenary, creating graphical glitches when loading a catenary replacement. Patch by frosch.
rubidium
parents:
6268
diff
changeset
|
305 |
{ SPR_WIRE_Y_SHORT_DOWN, 7, 0, 8, 15, 1, ELRAIL_ELEVATION }, //!17: Wire in Y pitch down, pylon on both ends |
3355
e414a0b104a6
(svn r4150) -Feature: Merged elrails into trunk. Thanks to Tron for lots of code and proofreading, thanks to peter1138 for another lot of code and ideas.
celestar
parents:
diff
changeset
|
306 |
|
e414a0b104a6
(svn r4150) -Feature: Merged elrails into trunk. Thanks to Tron for lots of code and proofreading, thanks to peter1138 for another lot of code and ideas.
celestar
parents:
diff
changeset
|
307 |
/* NS Direction */ |
e414a0b104a6
(svn r4150) -Feature: Merged elrails into trunk. Thanks to Tron for lots of code and proofreading, thanks to peter1138 for another lot of code and ideas.
celestar
parents:
diff
changeset
|
308 |
{ SPR_WIRE_NS_SHORT, 8, 0, 8, 8, 1, ELRAIL_ELEVATION }, //!18: LEFT trackbit wire, pylon on both ends |
e414a0b104a6
(svn r4150) -Feature: Merged elrails into trunk. Thanks to Tron for lots of code and proofreading, thanks to peter1138 for another lot of code and ideas.
celestar
parents:
diff
changeset
|
309 |
{ SPR_WIRE_NS_SHORT, 0, 8, 8, 8, 1, ELRAIL_ELEVATION }, //!19: RIGHT trackbit wire, pylon on both ends |
e414a0b104a6
(svn r4150) -Feature: Merged elrails into trunk. Thanks to Tron for lots of code and proofreading, thanks to peter1138 for another lot of code and ideas.
celestar
parents:
diff
changeset
|
310 |
|
e414a0b104a6
(svn r4150) -Feature: Merged elrails into trunk. Thanks to Tron for lots of code and proofreading, thanks to peter1138 for another lot of code and ideas.
celestar
parents:
diff
changeset
|
311 |
{ SPR_WIRE_NS_N, 8, 0, 8, 8, 1, ELRAIL_ELEVATION }, //!20: LEFT trackbit wire, pylon on N end |
e414a0b104a6
(svn r4150) -Feature: Merged elrails into trunk. Thanks to Tron for lots of code and proofreading, thanks to peter1138 for another lot of code and ideas.
celestar
parents:
diff
changeset
|
312 |
{ SPR_WIRE_NS_N, 0, 8, 8, 8, 1, ELRAIL_ELEVATION }, //!21: RIGHT trackbit wire, pylon on N end |
e414a0b104a6
(svn r4150) -Feature: Merged elrails into trunk. Thanks to Tron for lots of code and proofreading, thanks to peter1138 for another lot of code and ideas.
celestar
parents:
diff
changeset
|
313 |
|
e414a0b104a6
(svn r4150) -Feature: Merged elrails into trunk. Thanks to Tron for lots of code and proofreading, thanks to peter1138 for another lot of code and ideas.
celestar
parents:
diff
changeset
|
314 |
{ SPR_WIRE_NS_S, 8, 0, 8, 8, 1, ELRAIL_ELEVATION }, //!22: LEFT trackbit wire, pylon on S end |
e414a0b104a6
(svn r4150) -Feature: Merged elrails into trunk. Thanks to Tron for lots of code and proofreading, thanks to peter1138 for another lot of code and ideas.
celestar
parents:
diff
changeset
|
315 |
{ SPR_WIRE_NS_S, 0, 8, 8, 8, 1, ELRAIL_ELEVATION }, //!23: RIGHT trackbit wire, pylon on S end |
e414a0b104a6
(svn r4150) -Feature: Merged elrails into trunk. Thanks to Tron for lots of code and proofreading, thanks to peter1138 for another lot of code and ideas.
celestar
parents:
diff
changeset
|
316 |
|
e414a0b104a6
(svn r4150) -Feature: Merged elrails into trunk. Thanks to Tron for lots of code and proofreading, thanks to peter1138 for another lot of code and ideas.
celestar
parents:
diff
changeset
|
317 |
/* EW Direction */ |
7534
2e4dcc2c3bc9
(svn r11054) -Fix [FS#944]: mismatch between TTDP's and OTTD's placement of catenary, creating graphical glitches when loading a catenary replacement. Patch by frosch.
rubidium
parents:
6268
diff
changeset
|
318 |
{ SPR_WIRE_EW_SHORT, 7, 0, 1, 1, 1, ELRAIL_ELEVATION }, //!24: UPPER trackbit wire, pylon on both ends |
2e4dcc2c3bc9
(svn r11054) -Fix [FS#944]: mismatch between TTDP's and OTTD's placement of catenary, creating graphical glitches when loading a catenary replacement. Patch by frosch.
rubidium
parents:
6268
diff
changeset
|
319 |
{ SPR_WIRE_EW_SHORT, 15, 8, 3, 3, 1, ELRAIL_ELEVATION }, //!25: LOWER trackbit wire, pylon on both ends |
3355
e414a0b104a6
(svn r4150) -Feature: Merged elrails into trunk. Thanks to Tron for lots of code and proofreading, thanks to peter1138 for another lot of code and ideas.
celestar
parents:
diff
changeset
|
320 |
|
7534
2e4dcc2c3bc9
(svn r11054) -Fix [FS#944]: mismatch between TTDP's and OTTD's placement of catenary, creating graphical glitches when loading a catenary replacement. Patch by frosch.
rubidium
parents:
6268
diff
changeset
|
321 |
{ SPR_WIRE_EW_W, 7, 0, 1, 1, 1, ELRAIL_ELEVATION }, //!28: UPPER trackbit wire, pylon on both ends |
2e4dcc2c3bc9
(svn r11054) -Fix [FS#944]: mismatch between TTDP's and OTTD's placement of catenary, creating graphical glitches when loading a catenary replacement. Patch by frosch.
rubidium
parents:
6268
diff
changeset
|
322 |
{ SPR_WIRE_EW_W, 15, 8, 3, 3, 1, ELRAIL_ELEVATION }, //!29: LOWER trackbit wire, pylon on both ends |
3355
e414a0b104a6
(svn r4150) -Feature: Merged elrails into trunk. Thanks to Tron for lots of code and proofreading, thanks to peter1138 for another lot of code and ideas.
celestar
parents:
diff
changeset
|
323 |
|
7534
2e4dcc2c3bc9
(svn r11054) -Fix [FS#944]: mismatch between TTDP's and OTTD's placement of catenary, creating graphical glitches when loading a catenary replacement. Patch by frosch.
rubidium
parents:
6268
diff
changeset
|
324 |
{ SPR_WIRE_EW_E, 7, 0, 1, 1, 1, ELRAIL_ELEVATION }, //!32: UPPER trackbit wire, pylon on both ends |
2e4dcc2c3bc9
(svn r11054) -Fix [FS#944]: mismatch between TTDP's and OTTD's placement of catenary, creating graphical glitches when loading a catenary replacement. Patch by frosch.
rubidium
parents:
6268
diff
changeset
|
325 |
{ SPR_WIRE_EW_E, 15, 8, 3, 3, 1, ELRAIL_ELEVATION } //!33: LOWER trackbit wire, pylon on both ends |
4470 | 326 |
}; |
3355
e414a0b104a6
(svn r4150) -Feature: Merged elrails into trunk. Thanks to Tron for lots of code and proofreading, thanks to peter1138 for another lot of code and ideas.
celestar
parents:
diff
changeset
|
327 |
|
4470 | 328 |
static const SortableSpriteStruct CatenarySpriteData_Depot[] = { |
7534
2e4dcc2c3bc9
(svn r11054) -Fix [FS#944]: mismatch between TTDP's and OTTD's placement of catenary, creating graphical glitches when loading a catenary replacement. Patch by frosch.
rubidium
parents:
6268
diff
changeset
|
329 |
{ SPR_WIRE_DEPOT_NE, 0, 7, 15, 1, 1, ELRAIL_ELEVATION }, //! Wire for NE depot exit |
2e4dcc2c3bc9
(svn r11054) -Fix [FS#944]: mismatch between TTDP's and OTTD's placement of catenary, creating graphical glitches when loading a catenary replacement. Patch by frosch.
rubidium
parents:
6268
diff
changeset
|
330 |
{ SPR_WIRE_DEPOT_SE, 7, 0, 1, 15, 1, ELRAIL_ELEVATION }, //! Wire for SE depot exit |
2e4dcc2c3bc9
(svn r11054) -Fix [FS#944]: mismatch between TTDP's and OTTD's placement of catenary, creating graphical glitches when loading a catenary replacement. Patch by frosch.
rubidium
parents:
6268
diff
changeset
|
331 |
{ SPR_WIRE_DEPOT_SW, 0, 7, 15, 1, 1, ELRAIL_ELEVATION }, //! Wire for SW depot exit |
2e4dcc2c3bc9
(svn r11054) -Fix [FS#944]: mismatch between TTDP's and OTTD's placement of catenary, creating graphical glitches when loading a catenary replacement. Patch by frosch.
rubidium
parents:
6268
diff
changeset
|
332 |
{ SPR_WIRE_DEPOT_NW, 7, 0, 1, 15, 1, ELRAIL_ELEVATION } //! Wire for NW depot exit |
3355
e414a0b104a6
(svn r4150) -Feature: Merged elrails into trunk. Thanks to Tron for lots of code and proofreading, thanks to peter1138 for another lot of code and ideas.
celestar
parents:
diff
changeset
|
333 |
}; |
e414a0b104a6
(svn r4150) -Feature: Merged elrails into trunk. Thanks to Tron for lots of code and proofreading, thanks to peter1138 for another lot of code and ideas.
celestar
parents:
diff
changeset
|
334 |
|
6268
437cf82d933b
(svn r9077) -Fix [FS#612]: the wrong catenary wires were drawn for tunnel entrances.
rubidium
parents:
6248
diff
changeset
|
335 |
static const SortableSpriteStruct CatenarySpriteData_Tunnel[] = { |
7534
2e4dcc2c3bc9
(svn r11054) -Fix [FS#944]: mismatch between TTDP's and OTTD's placement of catenary, creating graphical glitches when loading a catenary replacement. Patch by frosch.
rubidium
parents:
6268
diff
changeset
|
336 |
{ SPR_WIRE_TUNNEL_NE, 0, 7, 15, 1, 1, ELRAIL_ELEVATION }, //! Wire for NE tunnel exit |
2e4dcc2c3bc9
(svn r11054) -Fix [FS#944]: mismatch between TTDP's and OTTD's placement of catenary, creating graphical glitches when loading a catenary replacement. Patch by frosch.
rubidium
parents:
6268
diff
changeset
|
337 |
{ SPR_WIRE_TUNNEL_SE, 7, 0, 1, 15, 1, ELRAIL_ELEVATION }, //! Wire for SE tunnel exit |
2e4dcc2c3bc9
(svn r11054) -Fix [FS#944]: mismatch between TTDP's and OTTD's placement of catenary, creating graphical glitches when loading a catenary replacement. Patch by frosch.
rubidium
parents:
6268
diff
changeset
|
338 |
{ SPR_WIRE_TUNNEL_SW, 0, 7, 15, 1, 1, ELRAIL_ELEVATION }, //! Wire for SW tunnel exit |
2e4dcc2c3bc9
(svn r11054) -Fix [FS#944]: mismatch between TTDP's and OTTD's placement of catenary, creating graphical glitches when loading a catenary replacement. Patch by frosch.
rubidium
parents:
6268
diff
changeset
|
339 |
{ SPR_WIRE_TUNNEL_NW, 7, 0, 1, 15, 1, ELRAIL_ELEVATION } //! Wire for NW tunnel exit |
6268
437cf82d933b
(svn r9077) -Fix [FS#612]: the wrong catenary wires were drawn for tunnel entrances.
rubidium
parents:
6248
diff
changeset
|
340 |
}; |
437cf82d933b
(svn r9077) -Fix [FS#612]: the wrong catenary wires were drawn for tunnel entrances.
rubidium
parents:
6248
diff
changeset
|
341 |
|
437cf82d933b
(svn r9077) -Fix [FS#612]: the wrong catenary wires were drawn for tunnel entrances.
rubidium
parents:
6248
diff
changeset
|
342 |
|
3355
e414a0b104a6
(svn r4150) -Feature: Merged elrails into trunk. Thanks to Tron for lots of code and proofreading, thanks to peter1138 for another lot of code and ideas.
celestar
parents:
diff
changeset
|
343 |
/** Refers to a certain element of the catenary. |
4549
106ed18a7675
(svn r6381) -Cleanup: make the '/* */' comments that span multiple lines more uniform.
rubidium
parents:
4470
diff
changeset
|
344 |
* Identifiers for Wires: |
106ed18a7675
(svn r6381) -Cleanup: make the '/* */' comments that span multiple lines more uniform.
rubidium
parents:
4470
diff
changeset
|
345 |
* <ol><li>Direction of the wire</li> |
106ed18a7675
(svn r6381) -Cleanup: make the '/* */' comments that span multiple lines more uniform.
rubidium
parents:
4470
diff
changeset
|
346 |
* <li>Slope of the tile for diagonals, placement inside the track for horiz/vertical pieces</li> |
106ed18a7675
(svn r6381) -Cleanup: make the '/* */' comments that span multiple lines more uniform.
rubidium
parents:
4470
diff
changeset
|
347 |
* <li>Place where a pylon shoule be</li></ol> |
106ed18a7675
(svn r6381) -Cleanup: make the '/* */' comments that span multiple lines more uniform.
rubidium
parents:
4470
diff
changeset
|
348 |
* Identifiers for Pylons: |
106ed18a7675
(svn r6381) -Cleanup: make the '/* */' comments that span multiple lines more uniform.
rubidium
parents:
4470
diff
changeset
|
349 |
* <ol><li>Direction of the wire</li> |
106ed18a7675
(svn r6381) -Cleanup: make the '/* */' comments that span multiple lines more uniform.
rubidium
parents:
4470
diff
changeset
|
350 |
* <li>Slope of the tile</li> |
106ed18a7675
(svn r6381) -Cleanup: make the '/* */' comments that span multiple lines more uniform.
rubidium
parents:
4470
diff
changeset
|
351 |
* <li>Position of the Pylon relative to the track</li> |
106ed18a7675
(svn r6381) -Cleanup: make the '/* */' comments that span multiple lines more uniform.
rubidium
parents:
4470
diff
changeset
|
352 |
* <li>Position of the Pylon inside the tile</li></ol> |
106ed18a7675
(svn r6381) -Cleanup: make the '/* */' comments that span multiple lines more uniform.
rubidium
parents:
4470
diff
changeset
|
353 |
*/ |
6248
e4a2ed7e5613
(svn r9051) -Codechange: typedef [enum|struct] Y {} X; -> [enum|struct] X {};
rubidium
parents:
5475
diff
changeset
|
354 |
enum CatenarySprite { |
3355
e414a0b104a6
(svn r4150) -Feature: Merged elrails into trunk. Thanks to Tron for lots of code and proofreading, thanks to peter1138 for another lot of code and ideas.
celestar
parents:
diff
changeset
|
355 |
WIRE_X_FLAT_SW, |
e414a0b104a6
(svn r4150) -Feature: Merged elrails into trunk. Thanks to Tron for lots of code and proofreading, thanks to peter1138 for another lot of code and ideas.
celestar
parents:
diff
changeset
|
356 |
WIRE_X_FLAT_NE, |
e414a0b104a6
(svn r4150) -Feature: Merged elrails into trunk. Thanks to Tron for lots of code and proofreading, thanks to peter1138 for another lot of code and ideas.
celestar
parents:
diff
changeset
|
357 |
WIRE_X_FLAT_BOTH, |
e414a0b104a6
(svn r4150) -Feature: Merged elrails into trunk. Thanks to Tron for lots of code and proofreading, thanks to peter1138 for another lot of code and ideas.
celestar
parents:
diff
changeset
|
358 |
|
e414a0b104a6
(svn r4150) -Feature: Merged elrails into trunk. Thanks to Tron for lots of code and proofreading, thanks to peter1138 for another lot of code and ideas.
celestar
parents:
diff
changeset
|
359 |
WIRE_X_UP_SW, |
e414a0b104a6
(svn r4150) -Feature: Merged elrails into trunk. Thanks to Tron for lots of code and proofreading, thanks to peter1138 for another lot of code and ideas.
celestar
parents:
diff
changeset
|
360 |
WIRE_X_UP_NE, |
e414a0b104a6
(svn r4150) -Feature: Merged elrails into trunk. Thanks to Tron for lots of code and proofreading, thanks to peter1138 for another lot of code and ideas.
celestar
parents:
diff
changeset
|
361 |
WIRE_X_UP_BOTH, |
e414a0b104a6
(svn r4150) -Feature: Merged elrails into trunk. Thanks to Tron for lots of code and proofreading, thanks to peter1138 for another lot of code and ideas.
celestar
parents:
diff
changeset
|
362 |
|
e414a0b104a6
(svn r4150) -Feature: Merged elrails into trunk. Thanks to Tron for lots of code and proofreading, thanks to peter1138 for another lot of code and ideas.
celestar
parents:
diff
changeset
|
363 |
WIRE_X_DOWN_SW, |
e414a0b104a6
(svn r4150) -Feature: Merged elrails into trunk. Thanks to Tron for lots of code and proofreading, thanks to peter1138 for another lot of code and ideas.
celestar
parents:
diff
changeset
|
364 |
WIRE_X_DOWN_NE, |
e414a0b104a6
(svn r4150) -Feature: Merged elrails into trunk. Thanks to Tron for lots of code and proofreading, thanks to peter1138 for another lot of code and ideas.
celestar
parents:
diff
changeset
|
365 |
WIRE_X_DOWN_BOTH, |
e414a0b104a6
(svn r4150) -Feature: Merged elrails into trunk. Thanks to Tron for lots of code and proofreading, thanks to peter1138 for another lot of code and ideas.
celestar
parents:
diff
changeset
|
366 |
|
e414a0b104a6
(svn r4150) -Feature: Merged elrails into trunk. Thanks to Tron for lots of code and proofreading, thanks to peter1138 for another lot of code and ideas.
celestar
parents:
diff
changeset
|
367 |
WIRE_Y_FLAT_SE, |
e414a0b104a6
(svn r4150) -Feature: Merged elrails into trunk. Thanks to Tron for lots of code and proofreading, thanks to peter1138 for another lot of code and ideas.
celestar
parents:
diff
changeset
|
368 |
WIRE_Y_FLAT_NW, |
e414a0b104a6
(svn r4150) -Feature: Merged elrails into trunk. Thanks to Tron for lots of code and proofreading, thanks to peter1138 for another lot of code and ideas.
celestar
parents:
diff
changeset
|
369 |
WIRE_Y_FLAT_BOTH, |
e414a0b104a6
(svn r4150) -Feature: Merged elrails into trunk. Thanks to Tron for lots of code and proofreading, thanks to peter1138 for another lot of code and ideas.
celestar
parents:
diff
changeset
|
370 |
|
e414a0b104a6
(svn r4150) -Feature: Merged elrails into trunk. Thanks to Tron for lots of code and proofreading, thanks to peter1138 for another lot of code and ideas.
celestar
parents:
diff
changeset
|
371 |
WIRE_Y_UP_SE, |
e414a0b104a6
(svn r4150) -Feature: Merged elrails into trunk. Thanks to Tron for lots of code and proofreading, thanks to peter1138 for another lot of code and ideas.
celestar
parents:
diff
changeset
|
372 |
WIRE_Y_UP_NW, |
e414a0b104a6
(svn r4150) -Feature: Merged elrails into trunk. Thanks to Tron for lots of code and proofreading, thanks to peter1138 for another lot of code and ideas.
celestar
parents:
diff
changeset
|
373 |
WIRE_Y_UP_BOTH, |
e414a0b104a6
(svn r4150) -Feature: Merged elrails into trunk. Thanks to Tron for lots of code and proofreading, thanks to peter1138 for another lot of code and ideas.
celestar
parents:
diff
changeset
|
374 |
|
e414a0b104a6
(svn r4150) -Feature: Merged elrails into trunk. Thanks to Tron for lots of code and proofreading, thanks to peter1138 for another lot of code and ideas.
celestar
parents:
diff
changeset
|
375 |
WIRE_Y_DOWN_SE, |
e414a0b104a6
(svn r4150) -Feature: Merged elrails into trunk. Thanks to Tron for lots of code and proofreading, thanks to peter1138 for another lot of code and ideas.
celestar
parents:
diff
changeset
|
376 |
WIRE_Y_DOWN_NW, |
e414a0b104a6
(svn r4150) -Feature: Merged elrails into trunk. Thanks to Tron for lots of code and proofreading, thanks to peter1138 for another lot of code and ideas.
celestar
parents:
diff
changeset
|
377 |
WIRE_Y_DOWN_BOTH, |
e414a0b104a6
(svn r4150) -Feature: Merged elrails into trunk. Thanks to Tron for lots of code and proofreading, thanks to peter1138 for another lot of code and ideas.
celestar
parents:
diff
changeset
|
378 |
|
e414a0b104a6
(svn r4150) -Feature: Merged elrails into trunk. Thanks to Tron for lots of code and proofreading, thanks to peter1138 for another lot of code and ideas.
celestar
parents:
diff
changeset
|
379 |
WIRE_NS_W_BOTH, |
e414a0b104a6
(svn r4150) -Feature: Merged elrails into trunk. Thanks to Tron for lots of code and proofreading, thanks to peter1138 for another lot of code and ideas.
celestar
parents:
diff
changeset
|
380 |
WIRE_NS_E_BOTH, |
e414a0b104a6
(svn r4150) -Feature: Merged elrails into trunk. Thanks to Tron for lots of code and proofreading, thanks to peter1138 for another lot of code and ideas.
celestar
parents:
diff
changeset
|
381 |
|
e414a0b104a6
(svn r4150) -Feature: Merged elrails into trunk. Thanks to Tron for lots of code and proofreading, thanks to peter1138 for another lot of code and ideas.
celestar
parents:
diff
changeset
|
382 |
WIRE_NS_W_N, |
e414a0b104a6
(svn r4150) -Feature: Merged elrails into trunk. Thanks to Tron for lots of code and proofreading, thanks to peter1138 for another lot of code and ideas.
celestar
parents:
diff
changeset
|
383 |
WIRE_NS_E_N, |
e414a0b104a6
(svn r4150) -Feature: Merged elrails into trunk. Thanks to Tron for lots of code and proofreading, thanks to peter1138 for another lot of code and ideas.
celestar
parents:
diff
changeset
|
384 |
|
e414a0b104a6
(svn r4150) -Feature: Merged elrails into trunk. Thanks to Tron for lots of code and proofreading, thanks to peter1138 for another lot of code and ideas.
celestar
parents:
diff
changeset
|
385 |
WIRE_NS_W_S, |
e414a0b104a6
(svn r4150) -Feature: Merged elrails into trunk. Thanks to Tron for lots of code and proofreading, thanks to peter1138 for another lot of code and ideas.
celestar
parents:
diff
changeset
|
386 |
WIRE_NS_E_S, |
e414a0b104a6
(svn r4150) -Feature: Merged elrails into trunk. Thanks to Tron for lots of code and proofreading, thanks to peter1138 for another lot of code and ideas.
celestar
parents:
diff
changeset
|
387 |
|
e414a0b104a6
(svn r4150) -Feature: Merged elrails into trunk. Thanks to Tron for lots of code and proofreading, thanks to peter1138 for another lot of code and ideas.
celestar
parents:
diff
changeset
|
388 |
WIRE_EW_N_BOTH, |
e414a0b104a6
(svn r4150) -Feature: Merged elrails into trunk. Thanks to Tron for lots of code and proofreading, thanks to peter1138 for another lot of code and ideas.
celestar
parents:
diff
changeset
|
389 |
WIRE_EW_S_BOTH, |
e414a0b104a6
(svn r4150) -Feature: Merged elrails into trunk. Thanks to Tron for lots of code and proofreading, thanks to peter1138 for another lot of code and ideas.
celestar
parents:
diff
changeset
|
390 |
|
e414a0b104a6
(svn r4150) -Feature: Merged elrails into trunk. Thanks to Tron for lots of code and proofreading, thanks to peter1138 for another lot of code and ideas.
celestar
parents:
diff
changeset
|
391 |
WIRE_EW_N_W, |
e414a0b104a6
(svn r4150) -Feature: Merged elrails into trunk. Thanks to Tron for lots of code and proofreading, thanks to peter1138 for another lot of code and ideas.
celestar
parents:
diff
changeset
|
392 |
WIRE_EW_S_W, |
e414a0b104a6
(svn r4150) -Feature: Merged elrails into trunk. Thanks to Tron for lots of code and proofreading, thanks to peter1138 for another lot of code and ideas.
celestar
parents:
diff
changeset
|
393 |
|
e414a0b104a6
(svn r4150) -Feature: Merged elrails into trunk. Thanks to Tron for lots of code and proofreading, thanks to peter1138 for another lot of code and ideas.
celestar
parents:
diff
changeset
|
394 |
WIRE_EW_N_E, |
e414a0b104a6
(svn r4150) -Feature: Merged elrails into trunk. Thanks to Tron for lots of code and proofreading, thanks to peter1138 for another lot of code and ideas.
celestar
parents:
diff
changeset
|
395 |
WIRE_EW_S_E, |
e414a0b104a6
(svn r4150) -Feature: Merged elrails into trunk. Thanks to Tron for lots of code and proofreading, thanks to peter1138 for another lot of code and ideas.
celestar
parents:
diff
changeset
|
396 |
|
e414a0b104a6
(svn r4150) -Feature: Merged elrails into trunk. Thanks to Tron for lots of code and proofreading, thanks to peter1138 for another lot of code and ideas.
celestar
parents:
diff
changeset
|
397 |
INVALID_CATENARY = 0xFF |
6248
e4a2ed7e5613
(svn r9051) -Codechange: typedef [enum|struct] Y {} X; -> [enum|struct] X {};
rubidium
parents:
5475
diff
changeset
|
398 |
}; |
3355
e414a0b104a6
(svn r4150) -Feature: Merged elrails into trunk. Thanks to Tron for lots of code and proofreading, thanks to peter1138 for another lot of code and ideas.
celestar
parents:
diff
changeset
|
399 |
|
e414a0b104a6
(svn r4150) -Feature: Merged elrails into trunk. Thanks to Tron for lots of code and proofreading, thanks to peter1138 for another lot of code and ideas.
celestar
parents:
diff
changeset
|
400 |
/* Selects a Wire (with white and grey ends) depending on whether: |
4549
106ed18a7675
(svn r6381) -Cleanup: make the '/* */' comments that span multiple lines more uniform.
rubidium
parents:
4470
diff
changeset
|
401 |
* a) none (should never happen) |
106ed18a7675
(svn r6381) -Cleanup: make the '/* */' comments that span multiple lines more uniform.
rubidium
parents:
4470
diff
changeset
|
402 |
* b) the first |
106ed18a7675
(svn r6381) -Cleanup: make the '/* */' comments that span multiple lines more uniform.
rubidium
parents:
4470
diff
changeset
|
403 |
* c) the second |
106ed18a7675
(svn r6381) -Cleanup: make the '/* */' comments that span multiple lines more uniform.
rubidium
parents:
4470
diff
changeset
|
404 |
* d) both |
106ed18a7675
(svn r6381) -Cleanup: make the '/* */' comments that span multiple lines more uniform.
rubidium
parents:
4470
diff
changeset
|
405 |
* PCP exists.*/ |
3355
e414a0b104a6
(svn r4150) -Feature: Merged elrails into trunk. Thanks to Tron for lots of code and proofreading, thanks to peter1138 for another lot of code and ideas.
celestar
parents:
diff
changeset
|
406 |
static const CatenarySprite Wires[5][TRACK_END][4] = { |
e414a0b104a6
(svn r4150) -Feature: Merged elrails into trunk. Thanks to Tron for lots of code and proofreading, thanks to peter1138 for another lot of code and ideas.
celestar
parents:
diff
changeset
|
407 |
{ /* Tileh == 0 */ |
4344
7e123fec5b0b
(svn r6045) -Cleanup: align all table-like structures using spaces, i.e. whitespace fixes only except for a few comments to make them uniform for the whole enum/struct.
rubidium
parents:
3971
diff
changeset
|
408 |
{INVALID_CATENARY, WIRE_X_FLAT_NE, WIRE_X_FLAT_SW, WIRE_X_FLAT_BOTH}, |
7e123fec5b0b
(svn r6045) -Cleanup: align all table-like structures using spaces, i.e. whitespace fixes only except for a few comments to make them uniform for the whole enum/struct.
rubidium
parents:
3971
diff
changeset
|
409 |
{INVALID_CATENARY, WIRE_Y_FLAT_SE, WIRE_Y_FLAT_NW, WIRE_Y_FLAT_BOTH}, |
7e123fec5b0b
(svn r6045) -Cleanup: align all table-like structures using spaces, i.e. whitespace fixes only except for a few comments to make them uniform for the whole enum/struct.
rubidium
parents:
3971
diff
changeset
|
410 |
{INVALID_CATENARY, WIRE_EW_N_W, WIRE_EW_N_E, WIRE_EW_N_BOTH}, |
7e123fec5b0b
(svn r6045) -Cleanup: align all table-like structures using spaces, i.e. whitespace fixes only except for a few comments to make them uniform for the whole enum/struct.
rubidium
parents:
3971
diff
changeset
|
411 |
{INVALID_CATENARY, WIRE_EW_S_E, WIRE_EW_S_W, WIRE_EW_S_BOTH}, |
7e123fec5b0b
(svn r6045) -Cleanup: align all table-like structures using spaces, i.e. whitespace fixes only except for a few comments to make them uniform for the whole enum/struct.
rubidium
parents:
3971
diff
changeset
|
412 |
{INVALID_CATENARY, WIRE_NS_W_S, WIRE_NS_W_N, WIRE_NS_W_BOTH}, |
7e123fec5b0b
(svn r6045) -Cleanup: align all table-like structures using spaces, i.e. whitespace fixes only except for a few comments to make them uniform for the whole enum/struct.
rubidium
parents:
3971
diff
changeset
|
413 |
{INVALID_CATENARY, WIRE_NS_E_N, WIRE_NS_E_S, WIRE_NS_E_BOTH}, |
3355
e414a0b104a6
(svn r4150) -Feature: Merged elrails into trunk. Thanks to Tron for lots of code and proofreading, thanks to peter1138 for another lot of code and ideas.
celestar
parents:
diff
changeset
|
414 |
}, { /* Tileh == 3 */ |
4344
7e123fec5b0b
(svn r6045) -Cleanup: align all table-like structures using spaces, i.e. whitespace fixes only except for a few comments to make them uniform for the whole enum/struct.
rubidium
parents:
3971
diff
changeset
|
415 |
{INVALID_CATENARY, WIRE_X_UP_NE, WIRE_X_UP_SW, WIRE_X_UP_BOTH}, |
3355
e414a0b104a6
(svn r4150) -Feature: Merged elrails into trunk. Thanks to Tron for lots of code and proofreading, thanks to peter1138 for another lot of code and ideas.
celestar
parents:
diff
changeset
|
416 |
{INVALID_CATENARY, INVALID_CATENARY, INVALID_CATENARY, INVALID_CATENARY}, |
e414a0b104a6
(svn r4150) -Feature: Merged elrails into trunk. Thanks to Tron for lots of code and proofreading, thanks to peter1138 for another lot of code and ideas.
celestar
parents:
diff
changeset
|
417 |
{INVALID_CATENARY, INVALID_CATENARY, INVALID_CATENARY, INVALID_CATENARY}, |
e414a0b104a6
(svn r4150) -Feature: Merged elrails into trunk. Thanks to Tron for lots of code and proofreading, thanks to peter1138 for another lot of code and ideas.
celestar
parents:
diff
changeset
|
418 |
{INVALID_CATENARY, INVALID_CATENARY, INVALID_CATENARY, INVALID_CATENARY}, |
e414a0b104a6
(svn r4150) -Feature: Merged elrails into trunk. Thanks to Tron for lots of code and proofreading, thanks to peter1138 for another lot of code and ideas.
celestar
parents:
diff
changeset
|
419 |
{INVALID_CATENARY, INVALID_CATENARY, INVALID_CATENARY, INVALID_CATENARY}, |
e414a0b104a6
(svn r4150) -Feature: Merged elrails into trunk. Thanks to Tron for lots of code and proofreading, thanks to peter1138 for another lot of code and ideas.
celestar
parents:
diff
changeset
|
420 |
{INVALID_CATENARY, INVALID_CATENARY, INVALID_CATENARY, INVALID_CATENARY}, |
e414a0b104a6
(svn r4150) -Feature: Merged elrails into trunk. Thanks to Tron for lots of code and proofreading, thanks to peter1138 for another lot of code and ideas.
celestar
parents:
diff
changeset
|
421 |
}, { /* Tileh == 6 */ |
e414a0b104a6
(svn r4150) -Feature: Merged elrails into trunk. Thanks to Tron for lots of code and proofreading, thanks to peter1138 for another lot of code and ideas.
celestar
parents:
diff
changeset
|
422 |
{INVALID_CATENARY, INVALID_CATENARY, INVALID_CATENARY, INVALID_CATENARY}, |
4344
7e123fec5b0b
(svn r6045) -Cleanup: align all table-like structures using spaces, i.e. whitespace fixes only except for a few comments to make them uniform for the whole enum/struct.
rubidium
parents:
3971
diff
changeset
|
423 |
{INVALID_CATENARY, WIRE_Y_UP_SE, WIRE_Y_UP_NW, WIRE_Y_UP_BOTH}, |
3355
e414a0b104a6
(svn r4150) -Feature: Merged elrails into trunk. Thanks to Tron for lots of code and proofreading, thanks to peter1138 for another lot of code and ideas.
celestar
parents:
diff
changeset
|
424 |
{INVALID_CATENARY, INVALID_CATENARY, INVALID_CATENARY, INVALID_CATENARY}, |
e414a0b104a6
(svn r4150) -Feature: Merged elrails into trunk. Thanks to Tron for lots of code and proofreading, thanks to peter1138 for another lot of code and ideas.
celestar
parents:
diff
changeset
|
425 |
{INVALID_CATENARY, INVALID_CATENARY, INVALID_CATENARY, INVALID_CATENARY}, |
e414a0b104a6
(svn r4150) -Feature: Merged elrails into trunk. Thanks to Tron for lots of code and proofreading, thanks to peter1138 for another lot of code and ideas.
celestar
parents:
diff
changeset
|
426 |
{INVALID_CATENARY, INVALID_CATENARY, INVALID_CATENARY, INVALID_CATENARY}, |
e414a0b104a6
(svn r4150) -Feature: Merged elrails into trunk. Thanks to Tron for lots of code and proofreading, thanks to peter1138 for another lot of code and ideas.
celestar
parents:
diff
changeset
|
427 |
{INVALID_CATENARY, INVALID_CATENARY, INVALID_CATENARY, INVALID_CATENARY}, |
e414a0b104a6
(svn r4150) -Feature: Merged elrails into trunk. Thanks to Tron for lots of code and proofreading, thanks to peter1138 for another lot of code and ideas.
celestar
parents:
diff
changeset
|
428 |
}, { /* Tileh == 9 */ |
e414a0b104a6
(svn r4150) -Feature: Merged elrails into trunk. Thanks to Tron for lots of code and proofreading, thanks to peter1138 for another lot of code and ideas.
celestar
parents:
diff
changeset
|
429 |
{INVALID_CATENARY, INVALID_CATENARY, INVALID_CATENARY, INVALID_CATENARY}, |
4344
7e123fec5b0b
(svn r6045) -Cleanup: align all table-like structures using spaces, i.e. whitespace fixes only except for a few comments to make them uniform for the whole enum/struct.
rubidium
parents:
3971
diff
changeset
|
430 |
{INVALID_CATENARY, WIRE_Y_DOWN_SE, WIRE_Y_DOWN_NW, WIRE_Y_DOWN_BOTH}, |
3355
e414a0b104a6
(svn r4150) -Feature: Merged elrails into trunk. Thanks to Tron for lots of code and proofreading, thanks to peter1138 for another lot of code and ideas.
celestar
parents:
diff
changeset
|
431 |
{INVALID_CATENARY, INVALID_CATENARY, INVALID_CATENARY, INVALID_CATENARY}, |
e414a0b104a6
(svn r4150) -Feature: Merged elrails into trunk. Thanks to Tron for lots of code and proofreading, thanks to peter1138 for another lot of code and ideas.
celestar
parents:
diff
changeset
|
432 |
{INVALID_CATENARY, INVALID_CATENARY, INVALID_CATENARY, INVALID_CATENARY}, |
e414a0b104a6
(svn r4150) -Feature: Merged elrails into trunk. Thanks to Tron for lots of code and proofreading, thanks to peter1138 for another lot of code and ideas.
celestar
parents:
diff
changeset
|
433 |
{INVALID_CATENARY, INVALID_CATENARY, INVALID_CATENARY, INVALID_CATENARY}, |
e414a0b104a6
(svn r4150) -Feature: Merged elrails into trunk. Thanks to Tron for lots of code and proofreading, thanks to peter1138 for another lot of code and ideas.
celestar
parents:
diff
changeset
|
434 |
{INVALID_CATENARY, INVALID_CATENARY, INVALID_CATENARY, INVALID_CATENARY}, |
e414a0b104a6
(svn r4150) -Feature: Merged elrails into trunk. Thanks to Tron for lots of code and proofreading, thanks to peter1138 for another lot of code and ideas.
celestar
parents:
diff
changeset
|
435 |
}, { /* Tileh == 12 */ |
4344
7e123fec5b0b
(svn r6045) -Cleanup: align all table-like structures using spaces, i.e. whitespace fixes only except for a few comments to make them uniform for the whole enum/struct.
rubidium
parents:
3971
diff
changeset
|
436 |
{INVALID_CATENARY, WIRE_X_DOWN_NE, WIRE_X_DOWN_SW, WIRE_X_DOWN_BOTH}, |
3355
e414a0b104a6
(svn r4150) -Feature: Merged elrails into trunk. Thanks to Tron for lots of code and proofreading, thanks to peter1138 for another lot of code and ideas.
celestar
parents:
diff
changeset
|
437 |
{INVALID_CATENARY, INVALID_CATENARY, INVALID_CATENARY, INVALID_CATENARY}, |
e414a0b104a6
(svn r4150) -Feature: Merged elrails into trunk. Thanks to Tron for lots of code and proofreading, thanks to peter1138 for another lot of code and ideas.
celestar
parents:
diff
changeset
|
438 |
{INVALID_CATENARY, INVALID_CATENARY, INVALID_CATENARY, INVALID_CATENARY}, |
e414a0b104a6
(svn r4150) -Feature: Merged elrails into trunk. Thanks to Tron for lots of code and proofreading, thanks to peter1138 for another lot of code and ideas.
celestar
parents:
diff
changeset
|
439 |
{INVALID_CATENARY, INVALID_CATENARY, INVALID_CATENARY, INVALID_CATENARY}, |
e414a0b104a6
(svn r4150) -Feature: Merged elrails into trunk. Thanks to Tron for lots of code and proofreading, thanks to peter1138 for another lot of code and ideas.
celestar
parents:
diff
changeset
|
440 |
{INVALID_CATENARY, INVALID_CATENARY, INVALID_CATENARY, INVALID_CATENARY}, |
e414a0b104a6
(svn r4150) -Feature: Merged elrails into trunk. Thanks to Tron for lots of code and proofreading, thanks to peter1138 for another lot of code and ideas.
celestar
parents:
diff
changeset
|
441 |
{INVALID_CATENARY, INVALID_CATENARY, INVALID_CATENARY, INVALID_CATENARY}, |
e414a0b104a6
(svn r4150) -Feature: Merged elrails into trunk. Thanks to Tron for lots of code and proofreading, thanks to peter1138 for another lot of code and ideas.
celestar
parents:
diff
changeset
|
442 |
} |
e414a0b104a6
(svn r4150) -Feature: Merged elrails into trunk. Thanks to Tron for lots of code and proofreading, thanks to peter1138 for another lot of code and ideas.
celestar
parents:
diff
changeset
|
443 |
}; |
e414a0b104a6
(svn r4150) -Feature: Merged elrails into trunk. Thanks to Tron for lots of code and proofreading, thanks to peter1138 for another lot of code and ideas.
celestar
parents:
diff
changeset
|
444 |
|
e414a0b104a6
(svn r4150) -Feature: Merged elrails into trunk. Thanks to Tron for lots of code and proofreading, thanks to peter1138 for another lot of code and ideas.
celestar
parents:
diff
changeset
|
445 |
#endif /* ELRAIL_DATA_H */ |