tile.c
author darkvater
Sat, 29 Jan 2005 14:56:25 +0000
changeset 1213 bb9906f67932
parent 1211 6f2f723e5c36
child 1335 a635854c23b6
permissions -rw-r--r--
(svn r1717) -Fix: some compilation problems for braindead VS6 and added missing files to project (thx bociusz)
#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;
}