(svn r16664) -Codechange: move house-related stuff from town.h and town_type.h to separate files

This commit is contained in:
smatz
2009-06-26 13:44:14 +00:00
parent 5ca420492f
commit d39c08fd9d
17 changed files with 184 additions and 138 deletions

View File

@@ -5,8 +5,9 @@
#ifndef TOWN_MAP_H
#define TOWN_MAP_H
#include "town.h"
#include "tile_map.h"
#include "town_type.h"
#include "house.h"
/**
* Get the index of which town this house/street is attached to.
@@ -33,16 +34,6 @@ static inline void SetTownIndex(TileIndex t, TownID index)
_m[t].m2 = index;
}
/**
* Gets the town associated with the house or road tile
* @param t the tile to get the town of
* @return the town
*/
static inline Town *GetTownByTile(TileIndex t)
{
return Town::Get(GetTownIndex(t));
}
/**
* Get the type of this house, which is an index into the house spec array
* Since m4 is only a byte and we want to support 512 houses, we use the bit 6