summaryrefslogtreecommitdiff
path: root/unmovable_map.h
diff options
context:
space:
mode:
authorcelestar <celestar@openttd.org>2006-03-31 08:44:53 +0000
committercelestar <celestar@openttd.org>2006-03-31 08:44:53 +0000
commitc4a4bb2ffbb71a044f9200e47c242b2efc5bbca2 (patch)
treec4b5c390e53dd7749ad6f84bbbf606230f15303d /unmovable_map.h
parent9d3852bb574111508e068ea1f6a44a257ecb0529 (diff)
downloadopenttd-c4a4bb2ffbb71a044f9200e47c242b2efc5bbca2.tar.xz
(svn r4193) -Codechange: Add and make use of an accessor function to create company HQs
Diffstat (limited to 'unmovable_map.h')
-rw-r--r--unmovable_map.h15
1 files changed, 14 insertions, 1 deletions
diff --git a/unmovable_map.h b/unmovable_map.h
index 5f4b2b329..6eb164956 100644
--- a/unmovable_map.h
+++ b/unmovable_map.h
@@ -4,7 +4,11 @@ typedef enum UnmovableType {
UNMOVABLE_TRANSMITTER = 0,
UNMOVABLE_LIGHTHOUSE = 1,
UNMOVABLE_STATUE = 2,
- UNMOVABLE_OWNED_LAND = 3
+ UNMOVABLE_OWNED_LAND = 3,
+ UNMOVABLE_HQ_NORTH = 0x80,
+ UNMOVABLE_HQ_WEST = 0x81,
+ UNMOVABLE_HQ_EAST = 0x82,
+ UNMOVABLE_HQ_SOUTH = 0x83,
} UnmovableType;
@@ -65,3 +69,12 @@ static inline void MakeOwnedLand(TileIndex t, Owner o)
{
MakeUnmovable(t, UNMOVABLE_OWNED_LAND, o);
}
+
+static inline void MakeCompanyHQ(TileIndex t, Owner o)
+{
+ MakeUnmovable(t + TileDiffXY(0, 0), UNMOVABLE_HQ_NORTH, o);
+ MakeUnmovable(t + TileDiffXY(0, 1), UNMOVABLE_HQ_WEST, o);
+ MakeUnmovable(t + TileDiffXY(1, 0), UNMOVABLE_HQ_EAST, o);
+ MakeUnmovable(t + TileDiffXY(1, 1), UNMOVABLE_HQ_SOUTH, o);
+}
+