map.c
author tron
Wed, 05 Jan 2005 13:32:03 +0000
changeset 900 feed1801fd35
parent 863 8d09f9331a80
child 909 81bc9ef93f50
permissions -rw-r--r--
(svn r1386) Move TileIndexDiff to map.h
Move _tileoffs_by_dir to map.[ch] and encapsulate it in TileOffsByDir()
#include "stdafx.h"
#include "ttd.h"
#include "map.h"

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 TileIndexDiff _tileoffs_by_dir[4] = {
	TILE_XY(-1, 0),
	TILE_XY(0, 1),
	TILE_XY(1, 0),
	TILE_XY(0, -1),
};