tile.c
author tron
Fri, 04 Feb 2005 17:14:36 +0000
changeset 1287 adb8820d4600
parent 1213 fc87a2ee4161
child 1335 a5f223b9f549
permissions -rw-r--r--
(svn r1791) Remove the remnants of CMD_DESTROY_INDUSTRY, which was removed a long time ago
#include "stdafx.h"
#include "tile.h"

void SetMapExtraBits(TileIndex tile, byte bits)
{
	assert(tile < MapSize());
	_map_extra_bits[tile >> 2] &= ~(3 << ((tile & 3) * 2));
	_map_extra_bits[tile >> 2] |= (bits&3) << ((tile & 3) * 2);
}

uint GetMapExtraBits(TileIndex tile)
{
	assert(tile < MapSize());
	return (_map_extra_bits[tile >> 2] >> (tile & 3) * 2) & 3;
}