src/unmovable_map.h
author belugas
Wed, 04 Apr 2007 01:35:16 +0000
changeset 6420 456c275f3313
parent 6257 5e5a864cacf6
child 6423 8e10e79e0fd1
permissions -rw-r--r--
(svn r9556) -Documentation: doxygen and comment-style changes. 'R', 'S'.. The end of the preliminary work is near
3310
a19f247b75b6 (svn r4073) Add functions to make and test for (most) unmovable tiles
tron
parents:
diff changeset
     1
/* $Id$ */
a19f247b75b6 (svn r4073) Add functions to make and test for (most) unmovable tiles
tron
parents:
diff changeset
     2
4666
172a0cdf28a6 (svn r6560) - Codechange: Minor fix; add missing #include guards and comments, and correct svn properties on bmp.[ch]
peter1138
parents: 3971
diff changeset
     3
#ifndef UNMOVABLE_MAP_H
172a0cdf28a6 (svn r6560) - Codechange: Minor fix; add missing #include guards and comments, and correct svn properties on bmp.[ch]
peter1138
parents: 3971
diff changeset
     4
#define UNMOVABLE_MAP_H
172a0cdf28a6 (svn r6560) - Codechange: Minor fix; add missing #include guards and comments, and correct svn properties on bmp.[ch]
peter1138
parents: 3971
diff changeset
     5
3427
3a512f7b7f6a (svn r4255) -Codechange: Add and make use of more accessor functions concerning unmovables. unmovable_cmd is now map access free
celestar
parents: 3388
diff changeset
     6
enum {
3a512f7b7f6a (svn r4255) -Codechange: Add and make use of more accessor functions concerning unmovables. unmovable_cmd is now map access free
celestar
parents: 3388
diff changeset
     7
	HQ_NUM_TILE = 4,
3a512f7b7f6a (svn r4255) -Codechange: Add and make use of more accessor functions concerning unmovables. unmovable_cmd is now map access free
celestar
parents: 3388
diff changeset
     8
	HQ_NUM_SIZE = 5
3a512f7b7f6a (svn r4255) -Codechange: Add and make use of more accessor functions concerning unmovables. unmovable_cmd is now map access free
celestar
parents: 3388
diff changeset
     9
};
3a512f7b7f6a (svn r4255) -Codechange: Add and make use of more accessor functions concerning unmovables. unmovable_cmd is now map access free
celestar
parents: 3388
diff changeset
    10
6248
e4a2ed7e5613 (svn r9051) -Codechange: typedef [enum|struct] Y {} X; -> [enum|struct] X {};
rubidium
parents: 5587
diff changeset
    11
enum UnmovableType {
3310
a19f247b75b6 (svn r4073) Add functions to make and test for (most) unmovable tiles
tron
parents:
diff changeset
    12
	UNMOVABLE_TRANSMITTER = 0,
a19f247b75b6 (svn r4073) Add functions to make and test for (most) unmovable tiles
tron
parents:
diff changeset
    13
	UNMOVABLE_LIGHTHOUSE  = 1,
a19f247b75b6 (svn r4073) Add functions to make and test for (most) unmovable tiles
tron
parents:
diff changeset
    14
	UNMOVABLE_STATUE      = 2,
3385
18e4ca6d3ef4 (svn r4193) -Codechange: Add and make use of an accessor function to create company HQs
celestar
parents: 3369
diff changeset
    15
	UNMOVABLE_OWNED_LAND  = 3,
18e4ca6d3ef4 (svn r4193) -Codechange: Add and make use of an accessor function to create company HQs
celestar
parents: 3369
diff changeset
    16
	UNMOVABLE_HQ_NORTH    = 0x80,
18e4ca6d3ef4 (svn r4193) -Codechange: Add and make use of an accessor function to create company HQs
celestar
parents: 3369
diff changeset
    17
	UNMOVABLE_HQ_WEST     = 0x81,
18e4ca6d3ef4 (svn r4193) -Codechange: Add and make use of an accessor function to create company HQs
celestar
parents: 3369
diff changeset
    18
	UNMOVABLE_HQ_EAST     = 0x82,
18e4ca6d3ef4 (svn r4193) -Codechange: Add and make use of an accessor function to create company HQs
celestar
parents: 3369
diff changeset
    19
	UNMOVABLE_HQ_SOUTH    = 0x83,
3427
3a512f7b7f6a (svn r4255) -Codechange: Add and make use of more accessor functions concerning unmovables. unmovable_cmd is now map access free
celestar
parents: 3388
diff changeset
    20
3a512f7b7f6a (svn r4255) -Codechange: Add and make use of more accessor functions concerning unmovables. unmovable_cmd is now map access free
celestar
parents: 3388
diff changeset
    21
	UNMOVABLE_HQ_END      = UNMOVABLE_HQ_NORTH + HQ_NUM_SIZE * HQ_NUM_TILE
6248
e4a2ed7e5613 (svn r9051) -Codechange: typedef [enum|struct] Y {} X; -> [enum|struct] X {};
rubidium
parents: 5587
diff changeset
    22
};
3310
a19f247b75b6 (svn r4073) Add functions to make and test for (most) unmovable tiles
tron
parents:
diff changeset
    23
a19f247b75b6 (svn r4073) Add functions to make and test for (most) unmovable tiles
tron
parents:
diff changeset
    24
3427
3a512f7b7f6a (svn r4255) -Codechange: Add and make use of more accessor functions concerning unmovables. unmovable_cmd is now map access free
celestar
parents: 3388
diff changeset
    25
3310
a19f247b75b6 (svn r4073) Add functions to make and test for (most) unmovable tiles
tron
parents:
diff changeset
    26
static inline UnmovableType GetUnmovableType(TileIndex t)
a19f247b75b6 (svn r4073) Add functions to make and test for (most) unmovable tiles
tron
parents:
diff changeset
    27
{
3369
cab209754317 (svn r4166) Sprinkle several map accessors with assert()s
tron
parents: 3310
diff changeset
    28
	assert(IsTileType(t, MP_UNMOVABLE));
5587
167d9a91ef02 (svn r8038) -Merge: the cpp branch. Effort of KUDr, Celestar, glx, Smoovius, stillunknown and pv2b.
rubidium
parents: 5475
diff changeset
    29
	return (UnmovableType)_m[t].m5;
3310
a19f247b75b6 (svn r4073) Add functions to make and test for (most) unmovable tiles
tron
parents:
diff changeset
    30
}
a19f247b75b6 (svn r4073) Add functions to make and test for (most) unmovable tiles
tron
parents:
diff changeset
    31
a19f247b75b6 (svn r4073) Add functions to make and test for (most) unmovable tiles
tron
parents:
diff changeset
    32
a19f247b75b6 (svn r4073) Add functions to make and test for (most) unmovable tiles
tron
parents:
diff changeset
    33
static inline bool IsTransmitterTile(TileIndex t)
a19f247b75b6 (svn r4073) Add functions to make and test for (most) unmovable tiles
tron
parents:
diff changeset
    34
{
a19f247b75b6 (svn r4073) Add functions to make and test for (most) unmovable tiles
tron
parents:
diff changeset
    35
	return
a19f247b75b6 (svn r4073) Add functions to make and test for (most) unmovable tiles
tron
parents:
diff changeset
    36
		IsTileType(t, MP_UNMOVABLE) &&
a19f247b75b6 (svn r4073) Add functions to make and test for (most) unmovable tiles
tron
parents:
diff changeset
    37
		GetUnmovableType(t) == UNMOVABLE_TRANSMITTER;
a19f247b75b6 (svn r4073) Add functions to make and test for (most) unmovable tiles
tron
parents:
diff changeset
    38
}
a19f247b75b6 (svn r4073) Add functions to make and test for (most) unmovable tiles
tron
parents:
diff changeset
    39
a19f247b75b6 (svn r4073) Add functions to make and test for (most) unmovable tiles
tron
parents:
diff changeset
    40
a19f247b75b6 (svn r4073) Add functions to make and test for (most) unmovable tiles
tron
parents:
diff changeset
    41
static inline bool IsOwnedLand(TileIndex t)
a19f247b75b6 (svn r4073) Add functions to make and test for (most) unmovable tiles
tron
parents:
diff changeset
    42
{
3369
cab209754317 (svn r4166) Sprinkle several map accessors with assert()s
tron
parents: 3310
diff changeset
    43
	assert(IsTileType(t, MP_UNMOVABLE));
3310
a19f247b75b6 (svn r4073) Add functions to make and test for (most) unmovable tiles
tron
parents:
diff changeset
    44
	return GetUnmovableType(t) == UNMOVABLE_OWNED_LAND;
a19f247b75b6 (svn r4073) Add functions to make and test for (most) unmovable tiles
tron
parents:
diff changeset
    45
}
a19f247b75b6 (svn r4073) Add functions to make and test for (most) unmovable tiles
tron
parents:
diff changeset
    46
a19f247b75b6 (svn r4073) Add functions to make and test for (most) unmovable tiles
tron
parents:
diff changeset
    47
static inline bool IsOwnedLandTile(TileIndex t)
a19f247b75b6 (svn r4073) Add functions to make and test for (most) unmovable tiles
tron
parents:
diff changeset
    48
{
a19f247b75b6 (svn r4073) Add functions to make and test for (most) unmovable tiles
tron
parents:
diff changeset
    49
	return IsTileType(t, MP_UNMOVABLE) && IsOwnedLand(t);
a19f247b75b6 (svn r4073) Add functions to make and test for (most) unmovable tiles
tron
parents:
diff changeset
    50
}
a19f247b75b6 (svn r4073) Add functions to make and test for (most) unmovable tiles
tron
parents:
diff changeset
    51
3427
3a512f7b7f6a (svn r4255) -Codechange: Add and make use of more accessor functions concerning unmovables. unmovable_cmd is now map access free
celestar
parents: 3388
diff changeset
    52
static inline bool IsCompanyHQ(TileIndex t)
3a512f7b7f6a (svn r4255) -Codechange: Add and make use of more accessor functions concerning unmovables. unmovable_cmd is now map access free
celestar
parents: 3388
diff changeset
    53
{
3a512f7b7f6a (svn r4255) -Codechange: Add and make use of more accessor functions concerning unmovables. unmovable_cmd is now map access free
celestar
parents: 3388
diff changeset
    54
	return IS_INT_INSIDE(GetUnmovableType(t), UNMOVABLE_HQ_NORTH, UNMOVABLE_HQ_END);
3a512f7b7f6a (svn r4255) -Codechange: Add and make use of more accessor functions concerning unmovables. unmovable_cmd is now map access free
celestar
parents: 3388
diff changeset
    55
}
3a512f7b7f6a (svn r4255) -Codechange: Add and make use of more accessor functions concerning unmovables. unmovable_cmd is now map access free
celestar
parents: 3388
diff changeset
    56
6257
5e5a864cacf6 (svn r9066) -Fix [FS#638]: store the owner of a statue, so when it gets removed, the town is notified of it
truelight
parents: 6248
diff changeset
    57
static inline bool IsStatue(TileIndex t)
5e5a864cacf6 (svn r9066) -Fix [FS#638]: store the owner of a statue, so when it gets removed, the town is notified of it
truelight
parents: 6248
diff changeset
    58
{
5e5a864cacf6 (svn r9066) -Fix [FS#638]: store the owner of a statue, so when it gets removed, the town is notified of it
truelight
parents: 6248
diff changeset
    59
	assert(IsTileType(t, MP_UNMOVABLE));
5e5a864cacf6 (svn r9066) -Fix [FS#638]: store the owner of a statue, so when it gets removed, the town is notified of it
truelight
parents: 6248
diff changeset
    60
	return GetUnmovableType(t) == UNMOVABLE_STATUE;
5e5a864cacf6 (svn r9066) -Fix [FS#638]: store the owner of a statue, so when it gets removed, the town is notified of it
truelight
parents: 6248
diff changeset
    61
}
5e5a864cacf6 (svn r9066) -Fix [FS#638]: store the owner of a statue, so when it gets removed, the town is notified of it
truelight
parents: 6248
diff changeset
    62
5e5a864cacf6 (svn r9066) -Fix [FS#638]: store the owner of a statue, so when it gets removed, the town is notified of it
truelight
parents: 6248
diff changeset
    63
static inline bool IsStatueTile(TileIndex t)
5e5a864cacf6 (svn r9066) -Fix [FS#638]: store the owner of a statue, so when it gets removed, the town is notified of it
truelight
parents: 6248
diff changeset
    64
{
5e5a864cacf6 (svn r9066) -Fix [FS#638]: store the owner of a statue, so when it gets removed, the town is notified of it
truelight
parents: 6248
diff changeset
    65
	return IsTileType(t, MP_UNMOVABLE) && IsStatue(t);
5e5a864cacf6 (svn r9066) -Fix [FS#638]: store the owner of a statue, so when it gets removed, the town is notified of it
truelight
parents: 6248
diff changeset
    66
}
5e5a864cacf6 (svn r9066) -Fix [FS#638]: store the owner of a statue, so when it gets removed, the town is notified of it
truelight
parents: 6248
diff changeset
    67
5e5a864cacf6 (svn r9066) -Fix [FS#638]: store the owner of a statue, so when it gets removed, the town is notified of it
truelight
parents: 6248
diff changeset
    68
static inline TownID GetStatueTownID(TileIndex t)
5e5a864cacf6 (svn r9066) -Fix [FS#638]: store the owner of a statue, so when it gets removed, the town is notified of it
truelight
parents: 6248
diff changeset
    69
{
5e5a864cacf6 (svn r9066) -Fix [FS#638]: store the owner of a statue, so when it gets removed, the town is notified of it
truelight
parents: 6248
diff changeset
    70
	assert(IsStatue(t));
5e5a864cacf6 (svn r9066) -Fix [FS#638]: store the owner of a statue, so when it gets removed, the town is notified of it
truelight
parents: 6248
diff changeset
    71
	return _m[t].m2;
5e5a864cacf6 (svn r9066) -Fix [FS#638]: store the owner of a statue, so when it gets removed, the town is notified of it
truelight
parents: 6248
diff changeset
    72
}
5e5a864cacf6 (svn r9066) -Fix [FS#638]: store the owner of a statue, so when it gets removed, the town is notified of it
truelight
parents: 6248
diff changeset
    73
3427
3a512f7b7f6a (svn r4255) -Codechange: Add and make use of more accessor functions concerning unmovables. unmovable_cmd is now map access free
celestar
parents: 3388
diff changeset
    74
static inline byte GetCompanyHQSize(TileIndex t)
3a512f7b7f6a (svn r4255) -Codechange: Add and make use of more accessor functions concerning unmovables. unmovable_cmd is now map access free
celestar
parents: 3388
diff changeset
    75
{
3a512f7b7f6a (svn r4255) -Codechange: Add and make use of more accessor functions concerning unmovables. unmovable_cmd is now map access free
celestar
parents: 3388
diff changeset
    76
	assert(IsTileType(t, MP_UNMOVABLE) && IsCompanyHQ(t));
3a512f7b7f6a (svn r4255) -Codechange: Add and make use of more accessor functions concerning unmovables. unmovable_cmd is now map access free
celestar
parents: 3388
diff changeset
    77
	return GB(_m[t].m5, 2, 3);
3a512f7b7f6a (svn r4255) -Codechange: Add and make use of more accessor functions concerning unmovables. unmovable_cmd is now map access free
celestar
parents: 3388
diff changeset
    78
}
3a512f7b7f6a (svn r4255) -Codechange: Add and make use of more accessor functions concerning unmovables. unmovable_cmd is now map access free
celestar
parents: 3388
diff changeset
    79
3a512f7b7f6a (svn r4255) -Codechange: Add and make use of more accessor functions concerning unmovables. unmovable_cmd is now map access free
celestar
parents: 3388
diff changeset
    80
static inline byte GetCompanyHQSection(TileIndex t)
3a512f7b7f6a (svn r4255) -Codechange: Add and make use of more accessor functions concerning unmovables. unmovable_cmd is now map access free
celestar
parents: 3388
diff changeset
    81
{
3a512f7b7f6a (svn r4255) -Codechange: Add and make use of more accessor functions concerning unmovables. unmovable_cmd is now map access free
celestar
parents: 3388
diff changeset
    82
	assert(IsTileType(t, MP_UNMOVABLE) && IsCompanyHQ(t));
3a512f7b7f6a (svn r4255) -Codechange: Add and make use of more accessor functions concerning unmovables. unmovable_cmd is now map access free
celestar
parents: 3388
diff changeset
    83
	return GB(_m[t].m5, 0, 5);
3a512f7b7f6a (svn r4255) -Codechange: Add and make use of more accessor functions concerning unmovables. unmovable_cmd is now map access free
celestar
parents: 3388
diff changeset
    84
}
3a512f7b7f6a (svn r4255) -Codechange: Add and make use of more accessor functions concerning unmovables. unmovable_cmd is now map access free
celestar
parents: 3388
diff changeset
    85
3310
a19f247b75b6 (svn r4073) Add functions to make and test for (most) unmovable tiles
tron
parents:
diff changeset
    86
3388
e94795a55f13 (svn r4196) -Codechange: Add and make use of an accessor that modifies the size of the Company HQ
celestar
parents: 3385
diff changeset
    87
static inline void EnlargeCompanyHQ(TileIndex t, byte size)
e94795a55f13 (svn r4196) -Codechange: Add and make use of an accessor that modifies the size of the Company HQ
celestar
parents: 3385
diff changeset
    88
{
3705
3232570a91b7 (svn r4648) - Fix (r4196): Company HQ's were not upgraded during the monthly loops.
Darkvater
parents: 3427
diff changeset
    89
	size *= 4;
3388
e94795a55f13 (svn r4196) -Codechange: Add and make use of an accessor that modifies the size of the Company HQ
celestar
parents: 3385
diff changeset
    90
	if (size <= _m[t].m5 - UNMOVABLE_HQ_NORTH) return;
e94795a55f13 (svn r4196) -Codechange: Add and make use of an accessor that modifies the size of the Company HQ
celestar
parents: 3385
diff changeset
    91
3705
3232570a91b7 (svn r4648) - Fix (r4196): Company HQ's were not upgraded during the monthly loops.
Darkvater
parents: 3427
diff changeset
    92
	_m[t + TileDiffXY(0, 0)].m5 = UNMOVABLE_HQ_NORTH + size;
3232570a91b7 (svn r4648) - Fix (r4196): Company HQ's were not upgraded during the monthly loops.
Darkvater
parents: 3427
diff changeset
    93
	_m[t + TileDiffXY(0, 1)].m5 = UNMOVABLE_HQ_WEST  + size;
3232570a91b7 (svn r4648) - Fix (r4196): Company HQ's were not upgraded during the monthly loops.
Darkvater
parents: 3427
diff changeset
    94
	_m[t + TileDiffXY(1, 0)].m5 = UNMOVABLE_HQ_EAST  + size;
3232570a91b7 (svn r4648) - Fix (r4196): Company HQ's were not upgraded during the monthly loops.
Darkvater
parents: 3427
diff changeset
    95
	_m[t + TileDiffXY(1, 1)].m5 = UNMOVABLE_HQ_SOUTH + size;
3388
e94795a55f13 (svn r4196) -Codechange: Add and make use of an accessor that modifies the size of the Company HQ
celestar
parents: 3385
diff changeset
    96
}
e94795a55f13 (svn r4196) -Codechange: Add and make use of an accessor that modifies the size of the Company HQ
celestar
parents: 3385
diff changeset
    97
e94795a55f13 (svn r4196) -Codechange: Add and make use of an accessor that modifies the size of the Company HQ
celestar
parents: 3385
diff changeset
    98
3310
a19f247b75b6 (svn r4073) Add functions to make and test for (most) unmovable tiles
tron
parents:
diff changeset
    99
static inline void MakeUnmovable(TileIndex t, UnmovableType u, Owner o)
a19f247b75b6 (svn r4073) Add functions to make and test for (most) unmovable tiles
tron
parents:
diff changeset
   100
{
a19f247b75b6 (svn r4073) Add functions to make and test for (most) unmovable tiles
tron
parents:
diff changeset
   101
	SetTileType(t, MP_UNMOVABLE);
a19f247b75b6 (svn r4073) Add functions to make and test for (most) unmovable tiles
tron
parents:
diff changeset
   102
	SetTileOwner(t, o);
a19f247b75b6 (svn r4073) Add functions to make and test for (most) unmovable tiles
tron
parents:
diff changeset
   103
	_m[t].m2 = 0;
a19f247b75b6 (svn r4073) Add functions to make and test for (most) unmovable tiles
tron
parents:
diff changeset
   104
	_m[t].m3 = 0;
a19f247b75b6 (svn r4073) Add functions to make and test for (most) unmovable tiles
tron
parents:
diff changeset
   105
	_m[t].m4 = 0;
a19f247b75b6 (svn r4073) Add functions to make and test for (most) unmovable tiles
tron
parents:
diff changeset
   106
	_m[t].m5 = u;
a19f247b75b6 (svn r4073) Add functions to make and test for (most) unmovable tiles
tron
parents:
diff changeset
   107
}
a19f247b75b6 (svn r4073) Add functions to make and test for (most) unmovable tiles
tron
parents:
diff changeset
   108
a19f247b75b6 (svn r4073) Add functions to make and test for (most) unmovable tiles
tron
parents:
diff changeset
   109
a19f247b75b6 (svn r4073) Add functions to make and test for (most) unmovable tiles
tron
parents:
diff changeset
   110
static inline void MakeTransmitter(TileIndex t)
a19f247b75b6 (svn r4073) Add functions to make and test for (most) unmovable tiles
tron
parents:
diff changeset
   111
{
a19f247b75b6 (svn r4073) Add functions to make and test for (most) unmovable tiles
tron
parents:
diff changeset
   112
	MakeUnmovable(t, UNMOVABLE_TRANSMITTER, OWNER_NONE);
a19f247b75b6 (svn r4073) Add functions to make and test for (most) unmovable tiles
tron
parents:
diff changeset
   113
}
a19f247b75b6 (svn r4073) Add functions to make and test for (most) unmovable tiles
tron
parents:
diff changeset
   114
a19f247b75b6 (svn r4073) Add functions to make and test for (most) unmovable tiles
tron
parents:
diff changeset
   115
static inline void MakeLighthouse(TileIndex t)
a19f247b75b6 (svn r4073) Add functions to make and test for (most) unmovable tiles
tron
parents:
diff changeset
   116
{
a19f247b75b6 (svn r4073) Add functions to make and test for (most) unmovable tiles
tron
parents:
diff changeset
   117
	MakeUnmovable(t, UNMOVABLE_LIGHTHOUSE, OWNER_NONE);
a19f247b75b6 (svn r4073) Add functions to make and test for (most) unmovable tiles
tron
parents:
diff changeset
   118
}
a19f247b75b6 (svn r4073) Add functions to make and test for (most) unmovable tiles
tron
parents:
diff changeset
   119
6257
5e5a864cacf6 (svn r9066) -Fix [FS#638]: store the owner of a statue, so when it gets removed, the town is notified of it
truelight
parents: 6248
diff changeset
   120
static inline void MakeStatue(TileIndex t, Owner o, TownID town_id)
3310
a19f247b75b6 (svn r4073) Add functions to make and test for (most) unmovable tiles
tron
parents:
diff changeset
   121
{
a19f247b75b6 (svn r4073) Add functions to make and test for (most) unmovable tiles
tron
parents:
diff changeset
   122
	MakeUnmovable(t, UNMOVABLE_STATUE, o);
6257
5e5a864cacf6 (svn r9066) -Fix [FS#638]: store the owner of a statue, so when it gets removed, the town is notified of it
truelight
parents: 6248
diff changeset
   123
	_m[t].m2 = town_id;
3310
a19f247b75b6 (svn r4073) Add functions to make and test for (most) unmovable tiles
tron
parents:
diff changeset
   124
}
a19f247b75b6 (svn r4073) Add functions to make and test for (most) unmovable tiles
tron
parents:
diff changeset
   125
a19f247b75b6 (svn r4073) Add functions to make and test for (most) unmovable tiles
tron
parents:
diff changeset
   126
static inline void MakeOwnedLand(TileIndex t, Owner o)
a19f247b75b6 (svn r4073) Add functions to make and test for (most) unmovable tiles
tron
parents:
diff changeset
   127
{
a19f247b75b6 (svn r4073) Add functions to make and test for (most) unmovable tiles
tron
parents:
diff changeset
   128
	MakeUnmovable(t, UNMOVABLE_OWNED_LAND, o);
a19f247b75b6 (svn r4073) Add functions to make and test for (most) unmovable tiles
tron
parents:
diff changeset
   129
}
3385
18e4ca6d3ef4 (svn r4193) -Codechange: Add and make use of an accessor function to create company HQs
celestar
parents: 3369
diff changeset
   130
18e4ca6d3ef4 (svn r4193) -Codechange: Add and make use of an accessor function to create company HQs
celestar
parents: 3369
diff changeset
   131
static inline void MakeCompanyHQ(TileIndex t, Owner o)
18e4ca6d3ef4 (svn r4193) -Codechange: Add and make use of an accessor function to create company HQs
celestar
parents: 3369
diff changeset
   132
{
18e4ca6d3ef4 (svn r4193) -Codechange: Add and make use of an accessor function to create company HQs
celestar
parents: 3369
diff changeset
   133
	MakeUnmovable(t + TileDiffXY(0, 0), UNMOVABLE_HQ_NORTH, o);
18e4ca6d3ef4 (svn r4193) -Codechange: Add and make use of an accessor function to create company HQs
celestar
parents: 3369
diff changeset
   134
	MakeUnmovable(t + TileDiffXY(0, 1), UNMOVABLE_HQ_WEST, o);
18e4ca6d3ef4 (svn r4193) -Codechange: Add and make use of an accessor function to create company HQs
celestar
parents: 3369
diff changeset
   135
	MakeUnmovable(t + TileDiffXY(1, 0), UNMOVABLE_HQ_EAST, o);
18e4ca6d3ef4 (svn r4193) -Codechange: Add and make use of an accessor function to create company HQs
celestar
parents: 3369
diff changeset
   136
	MakeUnmovable(t + TileDiffXY(1, 1), UNMOVABLE_HQ_SOUTH, o);
18e4ca6d3ef4 (svn r4193) -Codechange: Add and make use of an accessor function to create company HQs
celestar
parents: 3369
diff changeset
   137
}
4666
172a0cdf28a6 (svn r6560) - Codechange: Minor fix; add missing #include guards and comments, and correct svn properties on bmp.[ch]
peter1138
parents: 3971
diff changeset
   138
172a0cdf28a6 (svn r6560) - Codechange: Minor fix; add missing #include guards and comments, and correct svn properties on bmp.[ch]
peter1138
parents: 3971
diff changeset
   139
#endif /* UNMOVABLE_MAP_H */