table/genland.h
author matthijs
Thu, 16 Jun 2005 18:04:02 +0000
changeset 1942 c5d5cf5b0263
parent 909 65cdb609b7a6
child 2186 db48cf29b983
permissions -rw-r--r--
(svn r2448) General cleanup of rail related code, more to follow.
* Add: rail.[ch] for rail-related enums and wrapper functions.
* Codechange: Removed dozens of magic numbers with below enums.
* Codechange: Rewrote CheckTrackCombination().
* Add: TILE_SIZE, TILE_PIXELS and TILE_HEIGHT constants.
* Add: enums RailTileType, RailTileSubtype, SignalType to mask against the map arrays.
* Add: enums Track, TrackBits, Trackdir, TrackdirBits for railway track data. (Note that the old RAIL_BIT constants are replaced by TRACK_BIT ones).
* Add: enums Direction and DiagDirection
* Codechange: Moved a bunch of track(dir) related lookup arrays from npf.[ch] to rail.[ch].
* Codechange: move RailType enum from tile.h to rail.h.
* Add: Wrapper functions for masking signal status in the map arrays: SignalAlongTrackdir, SignalAgainstTrackdir and SignalOnTrack.
* Add: Wrapper functions to access rail tiles, using above enums
* Add: Wrapper functions to modify tracks, trackdirs, directions, etc.
* Add: Wrapper functions for all lookup arrays in rail.[ch] (Arrays are still used in parts of the code)
* Codechange: Renamed some variables and arguments to better represent what they contain (railbit -> track, bits -> trackdirbits, etc.).
* Codechange: Don't use FindLandscapeHeight() in CmdRemoveSingleRail(), since it returns way too much info. Use GetTileSlope() instead.
* Codechange: [NPF] Removed some unused globals and code from npf.c.
#define M(x,y) {x, y}

static const TileIndexDiffC _make_desert_or_rainforest_data[] = {
	M(-5,-6),
	M(-4,-6),
	M(-3,-6),
	M(-2,-6),
	M(-1,-6),
	M(0,-5),
	M(1,-5),
	M(2,-5),
	M(3,-5),
	M(4,-5),
	M(5,-5),
	M(-5,-5),
	M(-4,-5),
	M(-3,-5),
	M(-2,-5),
	M(-1,-5),
	M(0,-4),
	M(1,-4),
	M(2,-4),
	M(3,-4),
	M(4,-4),
	M(5,-4),
	M(-5,-4),
	M(-4,-4),
	M(-3,-4),
	M(-2,-4),
	M(-1,-4),
	M(0,-3),
	M(1,-3),
	M(2,-3),
	M(3,-3),
	M(4,-3),
	M(5,-3),
	M(-5,-3),
	M(-4,-3),
	M(-3,-3),
	M(-2,-3),
	M(-1,-3),
	M(0,-2),
	M(1,-2),
	M(2,-2),
	M(3,-2),
	M(4,-2),
	M(5,-2),
	M(-5,-2),
	M(-4,-2),
	M(-3,-2),
	M(-2,-2),
	M(-1,-2),
	M(0,-1),
	M(1,-1),
	M(2,-1),
	M(3,-1),
	M(4,-1),
	M(5,-1),
	M(-5,-1),
	M(-4,-1),
	M(-3,-1),
	M(-2,-1),
	M(-1,-1),
	M(0,0),
	M(1,0),
	M(2,0),
	M(3,0),
	M(4,0),
	M(5,0),
	M(-5,0),
	M(-4,0),
	M(-3,0),
	M(-2,0),
	M(-1,0),
	M(0,1),
	M(1,1),
	M(2,1),
	M(3,1),
	M(4,1),
	M(5,1),
	M(-5,1),
	M(-4,1),
	M(-3,1),
	M(-2,1),
	M(-1,1),
	M(0,2),
	M(1,2),
	M(2,2),
	M(3,2),
	M(4,2),
	M(5,2),
	M(-5,2),
	M(-4,2),
	M(-3,2),
	M(-2,2),
	M(-1,2),
	M(0,3),
	M(1,3),
	M(2,3),
	M(3,3),
	M(4,3),
	M(5,3),
	M(-5,3),
	M(-4,3),
	M(-3,3),
	M(-2,3),
	M(-1,3),
	M(0,4),
	M(1,4),
	M(2,4),
	M(3,4),
	M(4,4),
	M(5,4),
	M(-5,4),
	M(-4,4),
	M(-3,4),
	M(-2,4),
	M(-1,4),
	M(0,5),
	M(1,5),
	M(2,5),
	M(3,5),
	M(4,5),
	M(5,5),
	M(6,-3),
	M(-6,-4),
	M(-3,5),
	M(-3,-7),
	M(6,-2),
	M(-6,-3),
	M(-2,5),
	M(-2,-7),
	M(6,-1),
	M(-6,-2),
	M(-1,5),
	M(-1,-7),
	M(6,0),
	M(-6,-1),
	M(0,6),
	M(0,-6),
	M(6,1),
	M(-6,0),
	M(1,6),
	M(1,-6),
	M(6,2),
	M(-6,1),
	M(2,6),
	M(2,-6),
	M(6,3),
	M(-6,2),
	M(3,6),
	M(3,-6)
};



#undef M