map.h
author tron
Fri, 22 Apr 2005 05:41:09 +0000
changeset 1718 96d76767ea93
parent 1679 9a654f6b85b9
child 1942 c5d5cf5b0263
permissions -rw-r--r--
(svn r2222) Check the parameters of Cmd{Insert,Delete,Modify,Skip}Order() and CmdRestoreOrderIndex():
- Check if the vehicle exists
- Check if the vehicle belongs to the correct player
- Check if the new order is valid (type, destination, flags) (CmdInsertOrder)
679
04ca2cd69420 (svn r1117) Move map arrays and some related macros into their own files map.c and map.h
tron
parents:
diff changeset
     1
#ifndef MAP_H
04ca2cd69420 (svn r1117) Move map arrays and some related macros into their own files map.c and map.h
tron
parents:
diff changeset
     2
#define MAP_H
04ca2cd69420 (svn r1117) Move map arrays and some related macros into their own files map.c and map.h
tron
parents:
diff changeset
     3
1210
981b36779dd7 (svn r1714) Add missing include
tron
parents: 1209
diff changeset
     4
#include "stdafx.h"
981b36779dd7 (svn r1714) Add missing include
tron
parents: 1209
diff changeset
     5
1433
5a7fb6b3fb61 (svn r1937) TILE_FROM_XY() returns a TileIndex, not an int
tron
parents: 1394
diff changeset
     6
#define TILE_FROM_XY(x,y) (TileIndex)((((y) >> 4) << MapLogX()) + ((x) >> 4))
1174
6a5e747f3ba6 (svn r1676) Increase the size of TileIndex and TileIndexDiff to 32bits and adapt the save/load data and some other parts of the code to that change
tron
parents: 1059
diff changeset
     7
#define TILE_XY(x,y) (((y) << MapLogX()) + (x))
679
04ca2cd69420 (svn r1117) Move map arrays and some related macros into their own files map.c and map.h
tron
parents:
diff changeset
     8
979
11ea18598e16 (svn r1475) Fix some more signed/unsigned comparison warnings
tron
parents: 955
diff changeset
     9
#define TILE_MASK(x) ((x) & ((1 << (MapLogX() + MapLogY())) - 1))
1394
79cb56d80a3a (svn r1898) Remove some unused macros from macros.h and move some others to more appropriate headers
tron
parents: 1330
diff changeset
    10
#define TILE_ASSERT(x) assert(TILE_MASK(x) == (x));
926
a6d140a6a4de (svn r1414) Move TileIndex, TILE_MASK and GET_TILE_[XY] to map.h and turn the latter into inline functions names Tile[XY]
tron
parents: 909
diff changeset
    11
1218
c6a624956ac6 (svn r1722) -Feature: Bigger maps - anyone?
tron
parents: 1210
diff changeset
    12
extern byte   *_map_type_and_height;
c6a624956ac6 (svn r1722) -Feature: Bigger maps - anyone?
tron
parents: 1210
diff changeset
    13
extern byte   *_map_owner;
c6a624956ac6 (svn r1722) -Feature: Bigger maps - anyone?
tron
parents: 1210
diff changeset
    14
extern uint16 *_map2;
c6a624956ac6 (svn r1722) -Feature: Bigger maps - anyone?
tron
parents: 1210
diff changeset
    15
extern byte   *_map3_lo;
c6a624956ac6 (svn r1722) -Feature: Bigger maps - anyone?
tron
parents: 1210
diff changeset
    16
extern byte   *_map3_hi;
c6a624956ac6 (svn r1722) -Feature: Bigger maps - anyone?
tron
parents: 1210
diff changeset
    17
extern byte   *_map5;
c6a624956ac6 (svn r1722) -Feature: Bigger maps - anyone?
tron
parents: 1210
diff changeset
    18
extern byte   *_map_extra_bits;
c6a624956ac6 (svn r1722) -Feature: Bigger maps - anyone?
tron
parents: 1210
diff changeset
    19
c6a624956ac6 (svn r1722) -Feature: Bigger maps - anyone?
tron
parents: 1210
diff changeset
    20
void InitMap(uint log_x, uint log_y);
679
04ca2cd69420 (svn r1117) Move map arrays and some related macros into their own files map.c and map.h
tron
parents:
diff changeset
    21
689
5a4b1536db82 (svn r1130) Add helper functions to query map size
tron
parents: 679
diff changeset
    22
// binary logarithm of the map size, try to avoid using this one
5a4b1536db82 (svn r1130) Add helper functions to query map size
tron
parents: 679
diff changeset
    23
static inline uint MapLogX(void)  { extern uint _map_log_x; return _map_log_x; }
5a4b1536db82 (svn r1130) Add helper functions to query map size
tron
parents: 679
diff changeset
    24
static inline uint MapLogY(void)  { extern uint _map_log_y; return _map_log_y; }
5a4b1536db82 (svn r1130) Add helper functions to query map size
tron
parents: 679
diff changeset
    25
/* The size of the map */
5a4b1536db82 (svn r1130) Add helper functions to query map size
tron
parents: 679
diff changeset
    26
static inline uint MapSizeX(void) { return 1 << MapLogX(); }
5a4b1536db82 (svn r1130) Add helper functions to query map size
tron
parents: 679
diff changeset
    27
static inline uint MapSizeY(void) { return 1 << MapLogY(); }
5a4b1536db82 (svn r1130) Add helper functions to query map size
tron
parents: 679
diff changeset
    28
/* The maximum coordinates */
5a4b1536db82 (svn r1130) Add helper functions to query map size
tron
parents: 679
diff changeset
    29
static inline uint MapMaxX(void) { return MapSizeX() - 1; }
5a4b1536db82 (svn r1130) Add helper functions to query map size
tron
parents: 679
diff changeset
    30
static inline uint MapMaxY(void) { return MapSizeY() - 1; }
5a4b1536db82 (svn r1130) Add helper functions to query map size
tron
parents: 679
diff changeset
    31
/* The number of tiles in the map */
5a4b1536db82 (svn r1130) Add helper functions to query map size
tron
parents: 679
diff changeset
    32
static inline uint MapSize(void) { return MapSizeX() * MapSizeY(); }
5a4b1536db82 (svn r1130) Add helper functions to query map size
tron
parents: 679
diff changeset
    33
1202
4d2a20c50760 (svn r1706) Implement ScaleByMapSize() and ScaleByMapSize1D()
tron
parents: 1174
diff changeset
    34
// Scale a number relative to the map size
4d2a20c50760 (svn r1706) Implement ScaleByMapSize() and ScaleByMapSize1D()
tron
parents: 1174
diff changeset
    35
uint ScaleByMapSize(uint); // Scale relative to the number of tiles
4d2a20c50760 (svn r1706) Implement ScaleByMapSize() and ScaleByMapSize1D()
tron
parents: 1174
diff changeset
    36
uint ScaleByMapSize1D(uint); // Scale relative to the circumference of the map
4d2a20c50760 (svn r1706) Implement ScaleByMapSize() and ScaleByMapSize1D()
tron
parents: 1174
diff changeset
    37
1174
6a5e747f3ba6 (svn r1676) Increase the size of TileIndex and TileIndexDiff to 32bits and adapt the save/load data and some other parts of the code to that change
tron
parents: 1059
diff changeset
    38
typedef uint32 TileIndex;
1330
5d76a0522a11 (svn r1834) - Fix: NPF does not check the owner of its target, busses try to enter other players' depots. TODO
matthijs
parents: 1247
diff changeset
    39
5d76a0522a11 (svn r1834) - Fix: NPF does not check the owner of its target, busses try to enter other players' depots. TODO
matthijs
parents: 1247
diff changeset
    40
typedef enum {
5d76a0522a11 (svn r1834) - Fix: NPF does not check the owner of its target, busses try to enter other players' depots. TODO
matthijs
parents: 1247
diff changeset
    41
	OWNER_TOWN			= 0xf,	// a town owns the tile
5d76a0522a11 (svn r1834) - Fix: NPF does not check the owner of its target, busses try to enter other players' depots. TODO
matthijs
parents: 1247
diff changeset
    42
	OWNER_NONE			= 0x10,	// nobody owns the tile
5d76a0522a11 (svn r1834) - Fix: NPF does not check the owner of its target, busses try to enter other players' depots. TODO
matthijs
parents: 1247
diff changeset
    43
	OWNER_WATER			= 0x11,	// "water" owns the tile
5d76a0522a11 (svn r1834) - Fix: NPF does not check the owner of its target, busses try to enter other players' depots. TODO
matthijs
parents: 1247
diff changeset
    44
	OWNER_SPECTATOR	= 0xff,	// spectator in MP or in scenario editor
5d76a0522a11 (svn r1834) - Fix: NPF does not check the owner of its target, busses try to enter other players' depots. TODO
matthijs
parents: 1247
diff changeset
    45
} Owner;
5d76a0522a11 (svn r1834) - Fix: NPF does not check the owner of its target, busses try to enter other players' depots. TODO
matthijs
parents: 1247
diff changeset
    46
1247
3851739bfd09 (svn r1751) - Feature: New PathFinder (NPF).
matthijs
parents: 1245
diff changeset
    47
enum {
3851739bfd09 (svn r1751) - Feature: New PathFinder (NPF).
matthijs
parents: 1245
diff changeset
    48
	INVALID_TILE = (uint32) -1
3851739bfd09 (svn r1751) - Feature: New PathFinder (NPF).
matthijs
parents: 1245
diff changeset
    49
};
926
a6d140a6a4de (svn r1414) Move TileIndex, TILE_MASK and GET_TILE_[XY] to map.h and turn the latter into inline functions names Tile[XY]
tron
parents: 909
diff changeset
    50
a6d140a6a4de (svn r1414) Move TileIndex, TILE_MASK and GET_TILE_[XY] to map.h and turn the latter into inline functions names Tile[XY]
tron
parents: 909
diff changeset
    51
static inline uint TileX(TileIndex tile)
a6d140a6a4de (svn r1414) Move TileIndex, TILE_MASK and GET_TILE_[XY] to map.h and turn the latter into inline functions names Tile[XY]
tron
parents: 909
diff changeset
    52
{
a6d140a6a4de (svn r1414) Move TileIndex, TILE_MASK and GET_TILE_[XY] to map.h and turn the latter into inline functions names Tile[XY]
tron
parents: 909
diff changeset
    53
	return tile & MapMaxX();
a6d140a6a4de (svn r1414) Move TileIndex, TILE_MASK and GET_TILE_[XY] to map.h and turn the latter into inline functions names Tile[XY]
tron
parents: 909
diff changeset
    54
}
a6d140a6a4de (svn r1414) Move TileIndex, TILE_MASK and GET_TILE_[XY] to map.h and turn the latter into inline functions names Tile[XY]
tron
parents: 909
diff changeset
    55
a6d140a6a4de (svn r1414) Move TileIndex, TILE_MASK and GET_TILE_[XY] to map.h and turn the latter into inline functions names Tile[XY]
tron
parents: 909
diff changeset
    56
static inline uint TileY(TileIndex tile)
a6d140a6a4de (svn r1414) Move TileIndex, TILE_MASK and GET_TILE_[XY] to map.h and turn the latter into inline functions names Tile[XY]
tron
parents: 909
diff changeset
    57
{
a6d140a6a4de (svn r1414) Move TileIndex, TILE_MASK and GET_TILE_[XY] to map.h and turn the latter into inline functions names Tile[XY]
tron
parents: 909
diff changeset
    58
	return tile >> MapLogX();
a6d140a6a4de (svn r1414) Move TileIndex, TILE_MASK and GET_TILE_[XY] to map.h and turn the latter into inline functions names Tile[XY]
tron
parents: 909
diff changeset
    59
}
a6d140a6a4de (svn r1414) Move TileIndex, TILE_MASK and GET_TILE_[XY] to map.h and turn the latter into inline functions names Tile[XY]
tron
parents: 909
diff changeset
    60
a6d140a6a4de (svn r1414) Move TileIndex, TILE_MASK and GET_TILE_[XY] to map.h and turn the latter into inline functions names Tile[XY]
tron
parents: 909
diff changeset
    61
1174
6a5e747f3ba6 (svn r1676) Increase the size of TileIndex and TileIndexDiff to 32bits and adapt the save/load data and some other parts of the code to that change
tron
parents: 1059
diff changeset
    62
typedef int32 TileIndexDiff;
900
27eb21ced433 (svn r1386) Move TileIndexDiff to map.h
tron
parents: 863
diff changeset
    63
909
65cdb609b7a6 (svn r1396) Introduce TileIndexDiffC - the compile time version of TileIndexDiff
tron
parents: 900
diff changeset
    64
typedef struct TileIndexDiffC {
65cdb609b7a6 (svn r1396) Introduce TileIndexDiffC - the compile time version of TileIndexDiff
tron
parents: 900
diff changeset
    65
	int16 x;
65cdb609b7a6 (svn r1396) Introduce TileIndexDiffC - the compile time version of TileIndexDiff
tron
parents: 900
diff changeset
    66
	int16 y;
65cdb609b7a6 (svn r1396) Introduce TileIndexDiffC - the compile time version of TileIndexDiff
tron
parents: 900
diff changeset
    67
} TileIndexDiffC;
65cdb609b7a6 (svn r1396) Introduce TileIndexDiffC - the compile time version of TileIndexDiff
tron
parents: 900
diff changeset
    68
65cdb609b7a6 (svn r1396) Introduce TileIndexDiffC - the compile time version of TileIndexDiff
tron
parents: 900
diff changeset
    69
static inline TileIndexDiff ToTileIndexDiff(TileIndexDiffC tidc)
65cdb609b7a6 (svn r1396) Introduce TileIndexDiffC - the compile time version of TileIndexDiff
tron
parents: 900
diff changeset
    70
{
65cdb609b7a6 (svn r1396) Introduce TileIndexDiffC - the compile time version of TileIndexDiff
tron
parents: 900
diff changeset
    71
	return (tidc.y << MapLogX()) + tidc.x;
65cdb609b7a6 (svn r1396) Introduce TileIndexDiffC - the compile time version of TileIndexDiff
tron
parents: 900
diff changeset
    72
}
900
27eb21ced433 (svn r1386) Move TileIndexDiff to map.h
tron
parents: 863
diff changeset
    73
955
62b8588f50c8 (svn r1447) Move TILE_ADD(), TILE_ADDXY() and SafeTileAdd() to map.[ch] and make the latter map size agnostic
tron
parents: 927
diff changeset
    74
62b8588f50c8 (svn r1447) Move TILE_ADD(), TILE_ADDXY() and SafeTileAdd() to map.[ch] and make the latter map size agnostic
tron
parents: 927
diff changeset
    75
#ifndef _DEBUG
62b8588f50c8 (svn r1447) Move TILE_ADD(), TILE_ADDXY() and SafeTileAdd() to map.[ch] and make the latter map size agnostic
tron
parents: 927
diff changeset
    76
	#define TILE_ADD(x,y) ((x) + (y))
62b8588f50c8 (svn r1447) Move TILE_ADD(), TILE_ADDXY() and SafeTileAdd() to map.[ch] and make the latter map size agnostic
tron
parents: 927
diff changeset
    77
#else
62b8588f50c8 (svn r1447) Move TILE_ADD(), TILE_ADDXY() and SafeTileAdd() to map.[ch] and make the latter map size agnostic
tron
parents: 927
diff changeset
    78
	extern TileIndex TileAdd(TileIndex tile, TileIndexDiff add,
62b8588f50c8 (svn r1447) Move TILE_ADD(), TILE_ADDXY() and SafeTileAdd() to map.[ch] and make the latter map size agnostic
tron
parents: 927
diff changeset
    79
		const char *exp, const char *file, int line);
62b8588f50c8 (svn r1447) Move TILE_ADD(), TILE_ADDXY() and SafeTileAdd() to map.[ch] and make the latter map size agnostic
tron
parents: 927
diff changeset
    80
	#define TILE_ADD(x, y) (TileAdd((x), (y), #x " + " #y, __FILE__, __LINE__))
62b8588f50c8 (svn r1447) Move TILE_ADD(), TILE_ADDXY() and SafeTileAdd() to map.[ch] and make the latter map size agnostic
tron
parents: 927
diff changeset
    81
#endif
62b8588f50c8 (svn r1447) Move TILE_ADD(), TILE_ADDXY() and SafeTileAdd() to map.[ch] and make the latter map size agnostic
tron
parents: 927
diff changeset
    82
62b8588f50c8 (svn r1447) Move TILE_ADD(), TILE_ADDXY() and SafeTileAdd() to map.[ch] and make the latter map size agnostic
tron
parents: 927
diff changeset
    83
#define TILE_ADDXY(tile, x, y) TILE_ADD(tile, TILE_XY(x, y))
62b8588f50c8 (svn r1447) Move TILE_ADD(), TILE_ADDXY() and SafeTileAdd() to map.[ch] and make the latter map size agnostic
tron
parents: 927
diff changeset
    84
1247
3851739bfd09 (svn r1751) - Feature: New PathFinder (NPF).
matthijs
parents: 1245
diff changeset
    85
uint TileAddWrap(TileIndex tile, int addx, int addy);
3851739bfd09 (svn r1751) - Feature: New PathFinder (NPF).
matthijs
parents: 1245
diff changeset
    86
3851739bfd09 (svn r1751) - Feature: New PathFinder (NPF).
matthijs
parents: 1245
diff changeset
    87
static inline TileIndexDiffC TileIndexDiffCByDir(uint dir) {
3851739bfd09 (svn r1751) - Feature: New PathFinder (NPF).
matthijs
parents: 1245
diff changeset
    88
	extern const TileIndexDiffC _tileoffs_by_dir[4];
3851739bfd09 (svn r1751) - Feature: New PathFinder (NPF).
matthijs
parents: 1245
diff changeset
    89
	return _tileoffs_by_dir[dir];
3851739bfd09 (svn r1751) - Feature: New PathFinder (NPF).
matthijs
parents: 1245
diff changeset
    90
}
3851739bfd09 (svn r1751) - Feature: New PathFinder (NPF).
matthijs
parents: 1245
diff changeset
    91
3851739bfd09 (svn r1751) - Feature: New PathFinder (NPF).
matthijs
parents: 1245
diff changeset
    92
/* Returns tile + the diff given in diff. If the result tile would end up
3851739bfd09 (svn r1751) - Feature: New PathFinder (NPF).
matthijs
parents: 1245
diff changeset
    93
 * outside of the map, INVALID_TILE is returned instead.
3851739bfd09 (svn r1751) - Feature: New PathFinder (NPF).
matthijs
parents: 1245
diff changeset
    94
 */
3851739bfd09 (svn r1751) - Feature: New PathFinder (NPF).
matthijs
parents: 1245
diff changeset
    95
static inline TileIndex AddTileIndexDiffCWrap(TileIndex tile, TileIndexDiffC diff) {
3851739bfd09 (svn r1751) - Feature: New PathFinder (NPF).
matthijs
parents: 1245
diff changeset
    96
	int x = TileX(tile) + diff.x;
3851739bfd09 (svn r1751) - Feature: New PathFinder (NPF).
matthijs
parents: 1245
diff changeset
    97
	int y = TileY(tile) + diff.y;
3851739bfd09 (svn r1751) - Feature: New PathFinder (NPF).
matthijs
parents: 1245
diff changeset
    98
	if (x < 0 || y < 0 || x > (int)MapMaxX() || y > (int)MapMaxY())
3851739bfd09 (svn r1751) - Feature: New PathFinder (NPF).
matthijs
parents: 1245
diff changeset
    99
		return INVALID_TILE;
3851739bfd09 (svn r1751) - Feature: New PathFinder (NPF).
matthijs
parents: 1245
diff changeset
   100
	else
3851739bfd09 (svn r1751) - Feature: New PathFinder (NPF).
matthijs
parents: 1245
diff changeset
   101
		return TILE_XY(x, y);
3851739bfd09 (svn r1751) - Feature: New PathFinder (NPF).
matthijs
parents: 1245
diff changeset
   102
}
955
62b8588f50c8 (svn r1447) Move TILE_ADD(), TILE_ADDXY() and SafeTileAdd() to map.[ch] and make the latter map size agnostic
tron
parents: 927
diff changeset
   103
1245
3822f77cbc53 (svn r1749) Move the functions which calculate distances to map.[ch] and give the more meaningful names
tron
parents: 1218
diff changeset
   104
// Functions to calculate distances
1677
d534f0c8c845 (svn r2181) - Add: DistanceTrack() to calculate the distance over optimally laid out tracks.
matthijs
parents: 1433
diff changeset
   105
uint DistanceManhattan(TileIndex, TileIndex); // also known as L1-Norm. Is the shortest distance one could go over diagonal tracks (or roads)
1245
3822f77cbc53 (svn r1749) Move the functions which calculate distances to map.[ch] and give the more meaningful names
tron
parents: 1218
diff changeset
   106
uint DistanceSquare(TileIndex, TileIndex); // euclidian- or L2-Norm squared
3822f77cbc53 (svn r1749) Move the functions which calculate distances to map.[ch] and give the more meaningful names
tron
parents: 1218
diff changeset
   107
uint DistanceMax(TileIndex, TileIndex); // also known as L-Infinity-Norm
3822f77cbc53 (svn r1749) Move the functions which calculate distances to map.[ch] and give the more meaningful names
tron
parents: 1218
diff changeset
   108
uint DistanceMaxPlusManhattan(TileIndex, TileIndex); // Max + Manhattan
1677
d534f0c8c845 (svn r2181) - Add: DistanceTrack() to calculate the distance over optimally laid out tracks.
matthijs
parents: 1433
diff changeset
   109
uint DistanceTrack(TileIndex, TileIndex); // Returns the shortest distance one could go over tracks
1245
3822f77cbc53 (svn r1749) Move the functions which calculate distances to map.[ch] and give the more meaningful names
tron
parents: 1218
diff changeset
   110
uint DistanceFromEdge(TileIndex); // shortest distance from any edge of the map
3822f77cbc53 (svn r1749) Move the functions which calculate distances to map.[ch] and give the more meaningful names
tron
parents: 1218
diff changeset
   111
3822f77cbc53 (svn r1749) Move the functions which calculate distances to map.[ch] and give the more meaningful names
tron
parents: 1218
diff changeset
   112
900
27eb21ced433 (svn r1386) Move TileIndexDiff to map.h
tron
parents: 863
diff changeset
   113
static inline TileIndexDiff TileOffsByDir(uint dir)
27eb21ced433 (svn r1386) Move TileIndexDiff to map.h
tron
parents: 863
diff changeset
   114
{
909
65cdb609b7a6 (svn r1396) Introduce TileIndexDiffC - the compile time version of TileIndexDiff
tron
parents: 900
diff changeset
   115
	extern const TileIndexDiffC _tileoffs_by_dir[4];
900
27eb21ced433 (svn r1386) Move TileIndexDiff to map.h
tron
parents: 863
diff changeset
   116
27eb21ced433 (svn r1386) Move TileIndexDiff to map.h
tron
parents: 863
diff changeset
   117
	assert(dir < lengthof(_tileoffs_by_dir));
909
65cdb609b7a6 (svn r1396) Introduce TileIndexDiffC - the compile time version of TileIndexDiff
tron
parents: 900
diff changeset
   118
	return ToTileIndexDiff(_tileoffs_by_dir[dir]);
900
27eb21ced433 (svn r1386) Move TileIndexDiff to map.h
tron
parents: 863
diff changeset
   119
}
27eb21ced433 (svn r1386) Move TileIndexDiff to map.h
tron
parents: 863
diff changeset
   120
1677
d534f0c8c845 (svn r2181) - Add: DistanceTrack() to calculate the distance over optimally laid out tracks.
matthijs
parents: 1433
diff changeset
   121
/* Approximation of the length of a straight track, relative to a diagonal
d534f0c8c845 (svn r2181) - Add: DistanceTrack() to calculate the distance over optimally laid out tracks.
matthijs
parents: 1433
diff changeset
   122
 * track (ie the size of a tile side). #defined instead of const so it can
d534f0c8c845 (svn r2181) - Add: DistanceTrack() to calculate the distance over optimally laid out tracks.
matthijs
parents: 1433
diff changeset
   123
 * stay integer. (no runtime float operations) Is this needed?
1679
9a654f6b85b9 (svn r2183) - Fix: Removed brackets from around STRAIGHT_TRACK_LENGTH, they caused preliminary rounding...
matthijs
parents: 1677
diff changeset
   124
 * Watch out! There are _no_ brackets around here, to prevent intermediate
9a654f6b85b9 (svn r2183) - Fix: Removed brackets from around STRAIGHT_TRACK_LENGTH, they caused preliminary rounding...
matthijs
parents: 1677
diff changeset
   125
 * rounding! Be careful when using this!
1677
d534f0c8c845 (svn r2181) - Add: DistanceTrack() to calculate the distance over optimally laid out tracks.
matthijs
parents: 1433
diff changeset
   126
 * This value should be sqrt(2)/2 ~ 0.7071 */
1679
9a654f6b85b9 (svn r2183) - Fix: Removed brackets from around STRAIGHT_TRACK_LENGTH, they caused preliminary rounding...
matthijs
parents: 1677
diff changeset
   127
#define STRAIGHT_TRACK_LENGTH 7071/10000
1677
d534f0c8c845 (svn r2181) - Add: DistanceTrack() to calculate the distance over optimally laid out tracks.
matthijs
parents: 1433
diff changeset
   128
679
04ca2cd69420 (svn r1117) Move map arrays and some related macros into their own files map.c and map.h
tron
parents:
diff changeset
   129
#endif