map.c
author tron
Fri, 07 Jan 2005 17:40:23 +0000
changeset 927 28f45a22a564
parent 909 81bc9ef93f50
child 955 25bc5b97e3e2
permissions -rw-r--r--
(svn r1415) Move TILE_FROM_XY and TILE_XY to map.h and push TILE_[XY] bits from map.h into map.c.
Now the whole source except map.c is independent of TILE_[XY]_BITS!
#include "stdafx.h"
#include "ttd.h"
#include "map.h"

#define TILE_X_BITS 8
#define TILE_Y_BITS 8

uint _map_log_x = TILE_X_BITS;
uint _map_log_y = TILE_Y_BITS;

#define MAP_SIZE ((1 << TILE_X_BITS) * (1 << TILE_Y_BITS))

byte   _map_type_and_height [MAP_SIZE];
byte   _map5                [MAP_SIZE];
byte   _map3_lo             [MAP_SIZE];
byte   _map3_hi             [MAP_SIZE];
byte   _map_owner           [MAP_SIZE];
uint16 _map2                [MAP_SIZE];
byte   _map_extra_bits      [MAP_SIZE / 4];

const TileIndexDiffC _tileoffs_by_dir[] = {
	{-1,  0},
	{ 0,  1},
	{ 1,  0},
	{ 0, -1}
};