author | truelight |
Sat, 19 May 2007 23:52:04 +0000 | |
changeset 6654 | 31d17823506f |
parent 6268 | 437cf82d933b |
child 7534 | 2e4dcc2c3bc9 |
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$ */ |
3449
d45c8d0bf848
(svn r4281) -Cleanup: Begun cleaning up elrail code a bit, mostly comments and enum/array alignment
celestar
parents:
3446
diff
changeset
|
2 |
/** @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
|
3 |
* @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
|
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
|
5 |
#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
|
6 |
#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
|
7 |
|
3449
d45c8d0bf848
(svn r4281) -Cleanup: Begun cleaning up elrail code a bit, mostly comments and enum/array alignment
celestar
parents:
3446
diff
changeset
|
8 |
/** Tile Location group. |
4549
106ed18a7675
(svn r6381) -Cleanup: make the '/* */' comments that span multiple lines more uniform.
rubidium
parents:
4470
diff
changeset
|
9 |
* 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
|
10 |
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
|
11 |
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
|
12 |
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
|
13 |
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
|
14 |
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
|
15 |
TLG_END |
6248
e4a2ed7e5613
(svn r9051) -Codechange: typedef [enum|struct] Y {} X; -> [enum|struct] X {};
rubidium
parents:
5475
diff
changeset
|
16 |
}; |
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
|
17 |
|
3449
d45c8d0bf848
(svn r4281) -Cleanup: Begun cleaning up elrail code a bit, mostly comments and enum/array alignment
celestar
parents:
3446
diff
changeset
|
18 |
/** 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
|
19 |
* 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
|
20 |
* ti->tile), and the neighbouring tile */ |
6248
e4a2ed7e5613
(svn r9051) -Codechange: typedef [enum|struct] Y {} X; -> [enum|struct] X {};
rubidium
parents:
5475
diff
changeset
|
21 |
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
|
22 |
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
|
23 |
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
|
24 |
|
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 |
TS_END |
6248
e4a2ed7e5613
(svn r9051) -Codechange: typedef [enum|struct] Y {} X; -> [enum|struct] X {};
rubidium
parents:
5475
diff
changeset
|
26 |
}; |
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
|
27 |
|
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 |
enum { |
3451
0e8ccac68fdf
(svn r4283) -Cleanup: More elrail housekeeping, remove code dublication, more meaningful variable names, simplify control flow..
celestar
parents:
3450
diff
changeset
|
29 |
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
|
30 |
}; |
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 |
/** 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
|
33 |
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
|
34 |
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
|
35 |
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
|
36 |
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
|
37 |
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
|
38 |
}; |
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 |
|
3449
d45c8d0bf848
(svn r4281) -Cleanup: Begun cleaning up elrail code a bit, mostly comments and enum/array alignment
celestar
parents:
3446
diff
changeset
|
40 |
/** 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
|
41 |
* 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
|
42 |
* 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
|
43 |
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
|
44 |
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
|
45 |
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
|
46 |
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
|
47 |
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
|
48 |
}; |
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 |
/** 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
|
51 |
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
|
52 |
{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
|
53 |
{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
|
54 |
{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
|
55 |
{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
|
56 |
{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
|
57 |
{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
|
58 |
}; |
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 |
#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
|
61 |
/** 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
|
62 |
* 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
|
63 |
* 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
|
64 |
* @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
|
65 |
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
|
66 |
{ /* X */ |
d45c8d0bf848
(svn r4281) -Cleanup: Begun cleaning up elrail code a bit, mostly comments and enum/array alignment
celestar
parents:
3446
diff
changeset
|
67 |
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
|
68 |
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
|
69 |
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
|
70 |
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
|
71 |
}, { /* Y */ |
d45c8d0bf848
(svn r4281) -Cleanup: Begun cleaning up elrail code a bit, mostly comments and enum/array alignment
celestar
parents:
3446
diff
changeset
|
72 |
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
|
73 |
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
|
74 |
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
|
75 |
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
|
76 |
}, { /* UPPER */ |
d45c8d0bf848
(svn r4281) -Cleanup: Begun cleaning up elrail code a bit, mostly comments and enum/array alignment
celestar
parents:
3446
diff
changeset
|
77 |
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
|
78 |
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
|
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 |
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
|
81 |
}, { /* LOWER */ |
d45c8d0bf848
(svn r4281) -Cleanup: Begun cleaning up elrail code a bit, mostly comments and enum/array alignment
celestar
parents:
3446
diff
changeset
|
82 |
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
|
83 |
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
|
84 |
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
|
85 |
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
|
86 |
}, { /* LEFT */ |
d45c8d0bf848
(svn r4281) -Cleanup: Begun cleaning up elrail code a bit, mostly comments and enum/array alignment
celestar
parents:
3446
diff
changeset
|
87 |
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
|
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 |
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
|
90 |
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
|
91 |
}, { /* RIGHT */ |
d45c8d0bf848
(svn r4281) -Cleanup: Begun cleaning up elrail code a bit, mostly comments and enum/array alignment
celestar
parents:
3446
diff
changeset
|
92 |
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
|
93 |
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
|
94 |
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
|
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 |
} |
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
|
97 |
}; |
3449
d45c8d0bf848
(svn r4281) -Cleanup: Begun cleaning up elrail code a bit, mostly comments and enum/array alignment
celestar
parents:
3446
diff
changeset
|
98 |
#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
|
99 |
|
3450
b6c0635558dd
(svn r4282) -Cleanup: Re-arranged the ignore groups into a more readable arrangement
celestar
parents:
3449
diff
changeset
|
100 |
|
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
|
101 |
#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
|
102 |
#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
|
103 |
/** 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
|
104 |
* 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
|
105 |
* 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
|
106 |
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
|
107 |
{ /* 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
|
108 |
{ /* X even, Y even */ |
3450
b6c0635558dd
(svn r4282) -Cleanup: Re-arranged the ignore groups into a more readable arrangement
celestar
parents:
3449
diff
changeset
|
109 |
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
|
110 |
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
|
111 |
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
|
112 |
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
|
113 |
}, { /* X even, Y odd */ |
3450
b6c0635558dd
(svn r4282) -Cleanup: Re-arranged the ignore groups into a more readable arrangement
celestar
parents:
3449
diff
changeset
|
114 |
IGNORE_NONE, |
b6c0635558dd
(svn r4282) -Cleanup: Re-arranged the ignore groups into a more readable arrangement
celestar
parents:
3449
diff
changeset
|
115 |
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
|
116 |
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
|
117 |
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
|
118 |
}, { /* 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
|
119 |
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
|
120 |
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
|
121 |
IGNORE_NONE, |
b6c0635558dd
(svn r4282) -Cleanup: Re-arranged the ignore groups into a more readable arrangement
celestar
parents:
3449
diff
changeset
|
122 |
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
|
123 |
}, { /* 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
|
124 |
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
|
125 |
IGNORE_NONE, |
b6c0635558dd
(svn r4282) -Cleanup: Re-arranged the ignore groups into a more readable arrangement
celestar
parents:
3449
diff
changeset
|
126 |
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
|
127 |
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
|
128 |
} |
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
|
129 |
}, |
3450
b6c0635558dd
(svn r4282) -Cleanup: Re-arranged the ignore groups into a more readable arrangement
celestar
parents:
3449
diff
changeset
|
130 |
{ /* 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
|
131 |
{ |
d45c8d0bf848
(svn r4281) -Cleanup: Begun cleaning up elrail code a bit, mostly comments and enum/array alignment
celestar
parents:
3446
diff
changeset
|
132 |
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
|
133 |
IGNORE_NONE, |
b6c0635558dd
(svn r4282) -Cleanup: Re-arranged the ignore groups into a more readable arrangement
celestar
parents:
3449
diff
changeset
|
134 |
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
|
135 |
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
|
136 |
}, { |
3450
b6c0635558dd
(svn r4282) -Cleanup: Re-arranged the ignore groups into a more readable arrangement
celestar
parents:
3449
diff
changeset
|
137 |
IGNORE_NONE, |
b6c0635558dd
(svn r4282) -Cleanup: Re-arranged the ignore groups into a more readable arrangement
celestar
parents:
3449
diff
changeset
|
138 |
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
|
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 |
IGNORE_NONE |
b6c0635558dd
(svn r4282) -Cleanup: Re-arranged the ignore groups into a more readable arrangement
celestar
parents:
3449
diff
changeset
|
141 |
}, { |
b6c0635558dd
(svn r4282) -Cleanup: Re-arranged the ignore groups into a more readable arrangement
celestar
parents:
3449
diff
changeset
|
142 |
IGNORE_NONE, |
b6c0635558dd
(svn r4282) -Cleanup: Re-arranged the ignore groups into a more readable arrangement
celestar
parents:
3449
diff
changeset
|
143 |
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
|
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 |
IGNORE_NONE |
b6c0635558dd
(svn r4282) -Cleanup: Re-arranged the ignore groups into a more readable arrangement
celestar
parents:
3449
diff
changeset
|
146 |
}, { |
b6c0635558dd
(svn r4282) -Cleanup: Re-arranged the ignore groups into a more readable arrangement
celestar
parents:
3449
diff
changeset
|
147 |
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
|
148 |
IGNORE_NONE, |
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 |
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
|
151 |
} |
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 |
{ /* 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
|
154 |
{ |
b6c0635558dd
(svn r4282) -Cleanup: Re-arranged the ignore groups into a more readable arrangement
celestar
parents:
3449
diff
changeset
|
155 |
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
|
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 |
IGNORE_NONE, |
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 |
}, { |
b6c0635558dd
(svn r4282) -Cleanup: Re-arranged the ignore groups into a more readable arrangement
celestar
parents:
3449
diff
changeset
|
160 |
IGNORE_NONE, |
b6c0635558dd
(svn r4282) -Cleanup: Re-arranged the ignore groups into a more readable arrangement
celestar
parents:
3449
diff
changeset
|
161 |
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
|
162 |
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
|
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 |
}, { |
3450
b6c0635558dd
(svn r4282) -Cleanup: Re-arranged the ignore groups into a more readable arrangement
celestar
parents:
3449
diff
changeset
|
165 |
IGNORE_NONE, |
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 |
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
|
168 |
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
|
169 |
}, { |
d45c8d0bf848
(svn r4281) -Cleanup: Begun cleaning up elrail code a bit, mostly comments and enum/array alignment
celestar
parents:
3446
diff
changeset
|
170 |
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
|
171 |
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
|
172 |
IGNORE_NONE, |
b6c0635558dd
(svn r4282) -Cleanup: Re-arranged the ignore groups into a more readable arrangement
celestar
parents:
3449
diff
changeset
|
173 |
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
|
174 |
} |
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
|
175 |
} |
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 |
|
3449
d45c8d0bf848
(svn r4281) -Cleanup: Begun cleaning up elrail code a bit, mostly comments and enum/array alignment
celestar
parents:
3446
diff
changeset
|
178 |
#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
|
179 |
|
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
|
180 |
/** 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
|
181 |
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
|
182 |
{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
|
183 |
{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
|
184 |
{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
|
185 |
{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
|
186 |
{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
|
187 |
{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
|
188 |
}; |
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 |
|
3449
d45c8d0bf848
(svn r4281) -Cleanup: Begun cleaning up elrail code a bit, mostly comments and enum/array alignment
celestar
parents:
3446
diff
changeset
|
190 |
/* 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
|
191 |
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
|
192 |
{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
|
193 |
{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
|
194 |
{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
|
195 |
{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
|
196 |
}; |
d45c8d0bf848
(svn r4281) -Cleanup: Begun cleaning up elrail code a bit, mostly comments and enum/array alignment
celestar
parents:
3446
diff
changeset
|
197 |
|
3451
0e8ccac68fdf
(svn r4283) -Cleanup: More elrail housekeeping, remove code dublication, more meaningful variable names, simplify control flow..
celestar
parents:
3450
diff
changeset
|
198 |
/* 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
|
199 |
* 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
|
200 |
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
|
201 |
{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
|
202 |
{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
|
203 |
{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
|
204 |
{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
|
205 |
}; |
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 |
/* 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
|
208 |
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
|
209 |
{ /* PCP 0 */ |
d45c8d0bf848
(svn r4281) -Cleanup: Begun cleaning up elrail code a bit, mostly comments and enum/array alignment
celestar
parents:
3446
diff
changeset
|
210 |
{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
|
211 |
{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
|
212 |
{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
|
213 |
{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
|
214 |
}, {/* PCP 1 */ |
d45c8d0bf848
(svn r4281) -Cleanup: Begun cleaning up elrail code a bit, mostly comments and enum/array alignment
celestar
parents:
3446
diff
changeset
|
215 |
{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
|
216 |
{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
|
217 |
{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
|
218 |
{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
|
219 |
}, {/* PCP 2 */ |
d45c8d0bf848
(svn r4281) -Cleanup: Begun cleaning up elrail code a bit, mostly comments and enum/array alignment
celestar
parents:
3446
diff
changeset
|
220 |
{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
|
221 |
{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
|
222 |
{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
|
223 |
{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
|
224 |
}, {/* PCP 3 */ |
d45c8d0bf848
(svn r4281) -Cleanup: Begun cleaning up elrail code a bit, mostly comments and enum/array alignment
celestar
parents:
3446
diff
changeset
|
225 |
{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
|
226 |
{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
|
227 |
{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
|
228 |
{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
|
229 |
} |
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 |
/* Geometric placement of the PCP relative to the tile origin */ |
d45c8d0bf848
(svn r4281) -Cleanup: Begun cleaning up elrail code a bit, mostly comments and enum/array alignment
celestar
parents:
3446
diff
changeset
|
232 |
static const int8 x_pcp_offsets[DIAGDIR_END] = {0, 8, 15, 8}; |
d45c8d0bf848
(svn r4281) -Cleanup: Begun cleaning up elrail code a bit, mostly comments and enum/array alignment
celestar
parents:
3446
diff
changeset
|
233 |
static const int8 y_pcp_offsets[DIAGDIR_END] = {8, 15, 8, 0}; |
d45c8d0bf848
(svn r4281) -Cleanup: Begun cleaning up elrail code a bit, mostly comments and enum/array alignment
celestar
parents:
3446
diff
changeset
|
234 |
/* Geometric placement of the PPP relative to the PCP*/ |
4549
106ed18a7675
(svn r6381) -Cleanup: make the '/* */' comments that span multiple lines more uniform.
rubidium
parents:
4470
diff
changeset
|
235 |
static const int8 x_ppp_offsets[DIR_END] = {-3, -4, -3, 0, 3, 4, 3, 0}; |
106ed18a7675
(svn r6381) -Cleanup: make the '/* */' comments that span multiple lines more uniform.
rubidium
parents:
4470
diff
changeset
|
236 |
static const int8 y_ppp_offsets[DIR_END] = {-3, 0, 3, 4, 3, 0, -3, -4}; |
3449
d45c8d0bf848
(svn r4281) -Cleanup: Begun cleaning up elrail code a bit, mostly comments and enum/array alignment
celestar
parents:
3446
diff
changeset
|
237 |
/* The type of pylon to draw at each PPP */ |
d45c8d0bf848
(svn r4281) -Cleanup: Begun cleaning up elrail code a bit, mostly comments and enum/array alignment
celestar
parents:
3446
diff
changeset
|
238 |
static const SpriteID pylons_normal[] = { |
d45c8d0bf848
(svn r4281) -Cleanup: Begun cleaning up elrail code a bit, mostly comments and enum/array alignment
celestar
parents:
3446
diff
changeset
|
239 |
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
|
240 |
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
|
241 |
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
|
242 |
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
|
243 |
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
|
244 |
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
|
245 |
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
|
246 |
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
|
247 |
}; |
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 |
static const SpriteID pylons_bridge[] = { |
d45c8d0bf848
(svn r4281) -Cleanup: Begun cleaning up elrail code a bit, mostly comments and enum/array alignment
celestar
parents:
3446
diff
changeset
|
250 |
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
|
251 |
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
|
252 |
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
|
253 |
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
|
254 |
}; |
d45c8d0bf848
(svn r4281) -Cleanup: Begun cleaning up elrail code a bit, mostly comments and enum/array alignment
celestar
parents:
3446
diff
changeset
|
255 |
|
6248
e4a2ed7e5613
(svn r9051) -Codechange: typedef [enum|struct] Y {} X; -> [enum|struct] X {};
rubidium
parents:
5475
diff
changeset
|
256 |
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
|
257 |
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
|
258 |
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
|
259 |
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
|
260 |
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
|
261 |
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
|
262 |
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
|
263 |
int8 z_offset; |
6248
e4a2ed7e5613
(svn r9051) -Codechange: typedef [enum|struct] Y {} X; -> [enum|struct] X {};
rubidium
parents:
5475
diff
changeset
|
264 |
}; |
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
|
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 |
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
|
267 |
/** Distance between wire and rail */ |
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 |
ELRAIL_ELEVATION = 8, |
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 |
/** Corrects an off-by-one error in some places (tileh 12 and 9) (TODO -- find source of error) */ |
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 |
ELRAIL_ELEV_CORR = ELRAIL_ELEVATION + 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
|
271 |
/** 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
|
272 |
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
|
273 |
}; |
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 |
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
|
276 |
/* 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
|
277 |
/* 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
|
278 |
/* Wires */ |
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
|
279 |
{ SPR_WIRE_X_SW, 0, 8, 16, 1, 1, ELRAIL_ELEVATION }, //! 0: Wire in X direction, pylon on the SW end only |
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 |
{ SPR_WIRE_X_NE, 0, 8, 16, 1, 1, ELRAIL_ELEVATION }, //! 1: Wire in X direction, pylon on the NE 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
|
281 |
{ SPR_WIRE_X_SHORT, 0, 8, 16, 1, 1, ELRAIL_ELEVATION }, //! 2: Wire in X direction, 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
|
282 |
|
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
|
283 |
/* "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
|
284 |
/* Wires */ |
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
|
285 |
{ SPR_WIRE_X_SW_UP, 0, 8, 16, 8, 1, ELRAIL_ELEVRAISE }, //! 3: Wire in X pitch up, pylon on the SW end only |
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 |
{ SPR_WIRE_X_NE_UP, 0, 8, 16, 8, 1, ELRAIL_ELEVRAISE }, //! 4: Wire in X pitch up, pylon on the NE 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
|
287 |
{ SPR_WIRE_X_SHORT_UP, 0, 8, 16, 8, 1, ELRAIL_ELEVRAISE }, //! 5: Wire in X pitch up, 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
|
288 |
|
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 |
/* "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
|
290 |
/* Wires */ |
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
|
291 |
{ SPR_WIRE_X_SW_DOWN, 0, 8, 16, 8, 1, ELRAIL_ELEV_CORR }, //! 6: Wire in X pitch down, pylon on the SW 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
|
292 |
{ SPR_WIRE_X_NE_DOWN, 0, 8, 16, 8, 1, ELRAIL_ELEV_CORR }, //! 7: Wire in X pitch down, pylon on the NE 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
|
293 |
{ SPR_WIRE_X_SHORT_DOWN, 0, 8, 16, 8, 1, ELRAIL_ELEV_CORR }, //! 8: Wire in X pitch down, 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
|
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 |
|
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 |
/* 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
|
297 |
/* 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
|
298 |
/* Wires */ |
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
|
299 |
{ SPR_WIRE_Y_SE, 8, 0, 1, 16, 1, ELRAIL_ELEVATION }, //! 9: Wire in Y direction, pylon on the SE end only |
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 |
{ SPR_WIRE_Y_NW, 8, 0, 1, 16, 1, ELRAIL_ELEVATION }, //!10: Wire in Y direction, pylon on the NW 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
|
301 |
{ SPR_WIRE_Y_SHORT, 8, 0, 1, 16, 1, ELRAIL_ELEVATION }, //!11: Wire in Y direction, 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
|
302 |
|
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
|
303 |
/* "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
|
304 |
/* Wires */ |
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
|
305 |
{ SPR_WIRE_Y_SE_UP, 8, 0, 8, 16, 1, ELRAIL_ELEVRAISE }, //!12: Wire in Y pitch up, pylon on the SE end only |
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 |
{ SPR_WIRE_Y_NW_UP, 8, 0, 8, 16, 1, ELRAIL_ELEVRAISE }, //!13: Wire in Y pitch up, pylon on the NW 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
|
307 |
{ SPR_WIRE_Y_SHORT_UP, 8, 0, 8, 16, 1, ELRAIL_ELEVRAISE }, //!14: Wire in Y pitch up, 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
|
308 |
|
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 |
/* "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
|
310 |
/* Wires */ |
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_Y_SE_DOWN, 8, 0, 8, 16, 1, ELRAIL_ELEV_CORR }, //!15: Wire in Y pitch down, pylon on the SE 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_Y_NW_DOWN, 8, 0, 8, 16, 1, ELRAIL_ELEV_CORR }, //!16: Wire in Y pitch down, pylon on the NW 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 |
{ SPR_WIRE_Y_SHORT_DOWN, 8, 0, 8, 16, 1, ELRAIL_ELEV_CORR }, //!17: Wire in Y pitch down, 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
|
314 |
|
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 |
/* 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
|
316 |
{ 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
|
317 |
{ 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
|
318 |
|
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
|
319 |
{ 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
|
320 |
{ 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
|
321 |
|
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
|
322 |
{ 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
|
323 |
{ 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
|
324 |
|
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
|
325 |
/* EW 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
|
326 |
{ SPR_WIRE_EW_SHORT, 8, 0, 8, 8, 1, ELRAIL_ELEVATION }, //!24: UPPER 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
|
327 |
{ SPR_WIRE_EW_SHORT, 16, 8, 8, 8, 1, ELRAIL_ELEVATION }, //!25: LOWER 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
|
328 |
|
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
|
329 |
{ SPR_WIRE_EW_W, 8, 0, 8, 8, 1, ELRAIL_ELEVATION }, //!28: UPPER 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
|
330 |
{ SPR_WIRE_EW_W, 16, 8, 8, 8, 1, ELRAIL_ELEVATION }, //!29: LOWER 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
|
331 |
|
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
|
332 |
{ SPR_WIRE_EW_E, 8, 0, 8, 8, 1, ELRAIL_ELEVATION }, //!32: UPPER trackbit wire, pylon on both ends |
4470 | 333 |
{ SPR_WIRE_EW_E, 16, 8, 8, 8, 1, ELRAIL_ELEVATION } //!33: LOWER trackbit wire, pylon on both ends |
334 |
}; |
|
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
|
335 |
|
4470 | 336 |
static const SortableSpriteStruct CatenarySpriteData_Depot[] = { |
337 |
{ SPR_WIRE_DEPOT_NE, 0, 8, 8, 1, 1, ELRAIL_ELEVATION }, //! Wire for NE depot exit |
|
338 |
{ SPR_WIRE_DEPOT_SE, 8, 0, 1, 8, 1, ELRAIL_ELEVATION }, //! Wire for SE depot exit |
|
339 |
{ SPR_WIRE_DEPOT_SW, 0, 8, 8, 1, 1, ELRAIL_ELEVATION }, //! Wire for SW depot exit |
|
340 |
{ SPR_WIRE_DEPOT_NW, 8, 0, 1, 8, 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
|
341 |
}; |
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
|
342 |
|
6268
437cf82d933b
(svn r9077) -Fix [FS#612]: the wrong catenary wires were drawn for tunnel entrances.
rubidium
parents:
6248
diff
changeset
|
343 |
static const SortableSpriteStruct CatenarySpriteData_Tunnel[] = { |
437cf82d933b
(svn r9077) -Fix [FS#612]: the wrong catenary wires were drawn for tunnel entrances.
rubidium
parents:
6248
diff
changeset
|
344 |
{ SPR_WIRE_TUNNEL_NE, 0, 8, 8, 1, 1, ELRAIL_ELEVATION }, //! Wire for NE tunnel exit |
437cf82d933b
(svn r9077) -Fix [FS#612]: the wrong catenary wires were drawn for tunnel entrances.
rubidium
parents:
6248
diff
changeset
|
345 |
{ SPR_WIRE_TUNNEL_SE, 8, 0, 1, 8, 1, ELRAIL_ELEVATION }, //! Wire for SE tunnel exit |
437cf82d933b
(svn r9077) -Fix [FS#612]: the wrong catenary wires were drawn for tunnel entrances.
rubidium
parents:
6248
diff
changeset
|
346 |
{ SPR_WIRE_TUNNEL_SW, 0, 8, 8, 1, 1, ELRAIL_ELEVATION }, //! Wire for SW tunnel exit |
437cf82d933b
(svn r9077) -Fix [FS#612]: the wrong catenary wires were drawn for tunnel entrances.
rubidium
parents:
6248
diff
changeset
|
347 |
{ SPR_WIRE_TUNNEL_NW, 8, 0, 1, 8, 1, ELRAIL_ELEVATION } //! Wire for NW tunnel exit |
437cf82d933b
(svn r9077) -Fix [FS#612]: the wrong catenary wires were drawn for tunnel entrances.
rubidium
parents:
6248
diff
changeset
|
348 |
}; |
437cf82d933b
(svn r9077) -Fix [FS#612]: the wrong catenary wires were drawn for tunnel entrances.
rubidium
parents:
6248
diff
changeset
|
349 |
|
437cf82d933b
(svn r9077) -Fix [FS#612]: the wrong catenary wires were drawn for tunnel entrances.
rubidium
parents:
6248
diff
changeset
|
350 |
|
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
|
351 |
/** 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
|
352 |
* Identifiers for Wires: |
106ed18a7675
(svn r6381) -Cleanup: make the '/* */' comments that span multiple lines more uniform.
rubidium
parents:
4470
diff
changeset
|
353 |
* <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
|
354 |
* <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
|
355 |
* <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
|
356 |
* Identifiers for Pylons: |
106ed18a7675
(svn r6381) -Cleanup: make the '/* */' comments that span multiple lines more uniform.
rubidium
parents:
4470
diff
changeset
|
357 |
* <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
|
358 |
* <li>Slope of the tile</li> |
106ed18a7675
(svn r6381) -Cleanup: make the '/* */' comments that span multiple lines more uniform.
rubidium
parents:
4470
diff
changeset
|
359 |
* <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
|
360 |
* <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
|
361 |
*/ |
6248
e4a2ed7e5613
(svn r9051) -Codechange: typedef [enum|struct] Y {} X; -> [enum|struct] X {};
rubidium
parents:
5475
diff
changeset
|
362 |
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
|
363 |
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
|
364 |
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
|
365 |
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
|
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_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
|
368 |
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
|
369 |
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
|
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_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
|
372 |
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
|
373 |
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
|
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_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
|
376 |
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
|
377 |
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
|
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_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
|
380 |
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
|
381 |
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
|
382 |
|
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_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
|
384 |
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
|
385 |
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
|
386 |
|
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 |
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
|
388 |
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
|
389 |
|
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 |
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
|
391 |
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
|
392 |
|
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 |
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
|
394 |
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
|
395 |
|
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 |
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
|
397 |
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
|
398 |
|
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 |
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
|
400 |
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
|
401 |
|
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
|
402 |
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
|
403 |
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
|
404 |
|
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
|
405 |
INVALID_CATENARY = 0xFF |
6248
e4a2ed7e5613
(svn r9051) -Codechange: typedef [enum|struct] Y {} X; -> [enum|struct] X {};
rubidium
parents:
5475
diff
changeset
|
406 |
}; |
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
|
407 |
|
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
|
408 |
/* 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
|
409 |
* a) none (should never happen) |
106ed18a7675
(svn r6381) -Cleanup: make the '/* */' comments that span multiple lines more uniform.
rubidium
parents:
4470
diff
changeset
|
410 |
* b) the first |
106ed18a7675
(svn r6381) -Cleanup: make the '/* */' comments that span multiple lines more uniform.
rubidium
parents:
4470
diff
changeset
|
411 |
* c) the second |
106ed18a7675
(svn r6381) -Cleanup: make the '/* */' comments that span multiple lines more uniform.
rubidium
parents:
4470
diff
changeset
|
412 |
* d) both |
106ed18a7675
(svn r6381) -Cleanup: make the '/* */' comments that span multiple lines more uniform.
rubidium
parents:
4470
diff
changeset
|
413 |
* 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
|
414 |
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
|
415 |
{ /* 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
|
416 |
{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
|
417 |
{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
|
418 |
{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
|
419 |
{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
|
420 |
{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
|
421 |
{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
|
422 |
}, { /* 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
|
423 |
{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
|
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 |
{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
|
429 |
}, { /* 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
|
430 |
{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
|
431 |
{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
|
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 |
{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
|
436 |
}, { /* 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
|
437 |
{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
|
438 |
{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
|
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 |
{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
|
443 |
}, { /* 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
|
444 |
{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
|
445 |
{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
|
446 |
{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
|
447 |
{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
|
448 |
{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
|
449 |
{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
|
450 |
} |
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
|
451 |
}; |
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
|
452 |
|
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
|
453 |
#endif /* ELRAIL_DATA_H */ |