1
0
mirror of https://github.com/OpenTTD/OpenTTD.git synced 2025-08-15 02:29:10 +00:00

(svn r9988) -Codechange: remove the last direct map accesses, except the ones needed for the savegame saving/loading mechanisms.

This commit is contained in:
rubidium
2007-05-30 13:33:19 +00:00
parent bc41dc4966
commit 70e6102c86
3 changed files with 86 additions and 39 deletions

View File

@@ -13,21 +13,21 @@
/* Maps a trackdir to the bit that stores its status in the map arrays, in the
* direction along with the trackdir */
extern const byte _signal_along_trackdir[] = {
0x80, 0x80, 0x80, 0x20, 0x40, 0x10, 0, 0,
0x40, 0x40, 0x40, 0x10, 0x80, 0x20
0x8, 0x8, 0x8, 0x2, 0x4, 0x1, 0, 0,
0x4, 0x4, 0x4, 0x1, 0x8, 0x2
};
/* Maps a trackdir to the bit that stores its status in the map arrays, in the
* direction against the trackdir */
extern const byte _signal_against_trackdir[] = {
0x40, 0x40, 0x40, 0x10, 0x80, 0x20, 0, 0,
0x80, 0x80, 0x80, 0x20, 0x40, 0x10
0x4, 0x4, 0x4, 0x1, 0x8, 0x2, 0, 0,
0x8, 0x8, 0x8, 0x2, 0x4, 0x1
};
/* Maps a Track to the bits that store the status of the two signals that can
* be present on the given track */
extern const byte _signal_on_track[] = {
0xC0, 0xC0, 0xC0, 0x30, 0xC0, 0x30
0xC, 0xC, 0xC, 0x3, 0xC, 0x3
};
/* Maps a diagonal direction to the all trackdirs that are connected to any