m_tiletype:
	bits 0..3: tiletype
	bits 4..7: minor tiletype
	
m_heightmap:
	storing height relative to the northern corner
m_terrain_needed:
	bit 0 set: paste height if terraform level is 1

tiletypes:
	CP_TILE_RAIL:
		minor tiletype: RailTileType
		m_railroad bits 6..7: RailType(monorail, maglev, electric, normal)
		RailTileTypes:
			RAIL_TILE_DEPOT:
				m_railroad bits 0..1: depot direction
			RAIL_TILE_WAYPOINT:
				m_signals bits 0..7: waypoint grf id
				m_railroad bits 0..1: waypoint direction
			RAIL_TILE_SIGNALS:
				m_signals bit 0 set: signal 1 present
				m_signals bit 1 set: signal 2 present
				m_signals bit 2 set: first signal is semaphore
				m_signals bit 3 set: second signal is semaphore
				m_signals bits 6..7 : first signal direction
				m_signals bits 8..9 : second signal direction
				m_signals bits 10..12: first signal type
				m_signals bits 13..15: second signal type
			RAIL_TILE_NORMAL and RAIL_TILE_SIGNALS:
				m_railroad bits 0..5: trackbits

	CP_TILE_ROAD:
		minor tiletype: RoadTileType
		RoadTileTypes:
			ROAD_TILE_DEPOT:
				m_railroad bits 0..1: depot direction
				m_railroad bit 2 set: tram depot
			ROAD_TILE_CROSSING, ROAD_TILE_NORMAL:
				m_railroad bits 0..3: RoadBits normal road
				m_railroad bits 4..7: RoadBits tram
			ROAD_TILE_NORMAL:
				m_signals bits 0..1: disallowed road directions
			ROAD_TILE_CROSSING:
				m_railroad bits 6..7: rail type

	CP_TILE_TUNNELBRIDGE:
		minor tiletype bit 0 set: tunnel
		m_railroad bit 0..1: direction
		m_railroad bit 2..3: transporttype
		m_railroad bit 4 set: start
		m_railroad bit 6..7: rail/roadtypes

	CP_TILE_STATION:
		minor tiletype: TileType (minor bits indicate station type)
		TileType:
			CP_TILE_ROAD:
				m_railroad bits 0..1: direction
				m_railroad bit 2 set: truck stop
				m_railroad bit 3 set: drive through
				(3..5 currently unused)
				m_railroad bits 6..7: road type
			CP_TILE_RAIL:
