author | celestar |
Tue, 12 Jun 2007 11:56:35 +0000 | |
branch | gamebalance |
changeset 9908 | 0fa543611bbe |
parent 9895 | 7bd07f43b0e3 |
child 6308 | 646711c5feaa |
permissions | -rw-r--r-- |
3310
7339b2b1e957
(svn r4073) Add functions to make and test for (most) unmovable tiles
tron
parents:
diff
changeset
|
1 |
/* $Id$ */ |
7339b2b1e957
(svn r4073) Add functions to make and test for (most) unmovable tiles
tron
parents:
diff
changeset
|
2 |
|
9908
0fa543611bbe
(svn r10112) [gamebalance] -Sync: r9520:9620 from trunk
celestar
parents:
9895
diff
changeset
|
3 |
/** @file unmovable_map.h */ |
0fa543611bbe
(svn r10112) [gamebalance] -Sync: r9520:9620 from trunk
celestar
parents:
9895
diff
changeset
|
4 |
|
4666
850b5b6e4bac
(svn r6560) - Codechange: Minor fix; add missing #include guards and comments, and correct svn properties on bmp.[ch]
peter1138
parents:
3971
diff
changeset
|
5 |
#ifndef UNMOVABLE_MAP_H |
850b5b6e4bac
(svn r6560) - Codechange: Minor fix; add missing #include guards and comments, and correct svn properties on bmp.[ch]
peter1138
parents:
3971
diff
changeset
|
6 |
#define UNMOVABLE_MAP_H |
850b5b6e4bac
(svn r6560) - Codechange: Minor fix; add missing #include guards and comments, and correct svn properties on bmp.[ch]
peter1138
parents:
3971
diff
changeset
|
7 |
|
3427
98d955156735
(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 |
enum { |
98d955156735
(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 |
HQ_NUM_TILE = 4, |
98d955156735
(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 |
HQ_NUM_SIZE = 5 |
98d955156735
(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
|
11 |
}; |
98d955156735
(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
|
12 |
|
9895
7bd07f43b0e3
(svn r9321) [gamebalance] -Sync: r9025:9314 from trunk
celestar
parents:
5838
diff
changeset
|
13 |
enum UnmovableType { |
3310
7339b2b1e957
(svn r4073) Add functions to make and test for (most) unmovable tiles
tron
parents:
diff
changeset
|
14 |
UNMOVABLE_TRANSMITTER = 0, |
7339b2b1e957
(svn r4073) Add functions to make and test for (most) unmovable tiles
tron
parents:
diff
changeset
|
15 |
UNMOVABLE_LIGHTHOUSE = 1, |
7339b2b1e957
(svn r4073) Add functions to make and test for (most) unmovable tiles
tron
parents:
diff
changeset
|
16 |
UNMOVABLE_STATUE = 2, |
3385
41ebb01a92f2
(svn r4193) -Codechange: Add and make use of an accessor function to create company HQs
celestar
parents:
3369
diff
changeset
|
17 |
UNMOVABLE_OWNED_LAND = 3, |
41ebb01a92f2
(svn r4193) -Codechange: Add and make use of an accessor function to create company HQs
celestar
parents:
3369
diff
changeset
|
18 |
UNMOVABLE_HQ_NORTH = 0x80, |
41ebb01a92f2
(svn r4193) -Codechange: Add and make use of an accessor function to create company HQs
celestar
parents:
3369
diff
changeset
|
19 |
UNMOVABLE_HQ_WEST = 0x81, |
41ebb01a92f2
(svn r4193) -Codechange: Add and make use of an accessor function to create company HQs
celestar
parents:
3369
diff
changeset
|
20 |
UNMOVABLE_HQ_EAST = 0x82, |
41ebb01a92f2
(svn r4193) -Codechange: Add and make use of an accessor function to create company HQs
celestar
parents:
3369
diff
changeset
|
21 |
UNMOVABLE_HQ_SOUTH = 0x83, |
3427
98d955156735
(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
|
22 |
|
98d955156735
(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
|
23 |
UNMOVABLE_HQ_END = UNMOVABLE_HQ_NORTH + HQ_NUM_SIZE * HQ_NUM_TILE |
9895
7bd07f43b0e3
(svn r9321) [gamebalance] -Sync: r9025:9314 from trunk
celestar
parents:
5838
diff
changeset
|
24 |
}; |
3310
7339b2b1e957
(svn r4073) Add functions to make and test for (most) unmovable tiles
tron
parents:
diff
changeset
|
25 |
|
7339b2b1e957
(svn r4073) Add functions to make and test for (most) unmovable tiles
tron
parents:
diff
changeset
|
26 |
|
3427
98d955156735
(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
|
27 |
|
3310
7339b2b1e957
(svn r4073) Add functions to make and test for (most) unmovable tiles
tron
parents:
diff
changeset
|
28 |
static inline UnmovableType GetUnmovableType(TileIndex t) |
7339b2b1e957
(svn r4073) Add functions to make and test for (most) unmovable tiles
tron
parents:
diff
changeset
|
29 |
{ |
3369
00c2ca209a89
(svn r4166) Sprinkle several map accessors with assert()s
tron
parents:
3310
diff
changeset
|
30 |
assert(IsTileType(t, MP_UNMOVABLE)); |
5838
9c3129cb019b
(svn r8038) -Merge: the cpp branch. Effort of KUDr, Celestar, glx, Smoovius, stillunknown and pv2b.
rubidium
parents:
5726
diff
changeset
|
31 |
return (UnmovableType)_m[t].m5; |
3310
7339b2b1e957
(svn r4073) Add functions to make and test for (most) unmovable tiles
tron
parents:
diff
changeset
|
32 |
} |
7339b2b1e957
(svn r4073) Add functions to make and test for (most) unmovable tiles
tron
parents:
diff
changeset
|
33 |
|
7339b2b1e957
(svn r4073) Add functions to make and test for (most) unmovable tiles
tron
parents:
diff
changeset
|
34 |
|
7339b2b1e957
(svn r4073) Add functions to make and test for (most) unmovable tiles
tron
parents:
diff
changeset
|
35 |
static inline bool IsTransmitterTile(TileIndex t) |
7339b2b1e957
(svn r4073) Add functions to make and test for (most) unmovable tiles
tron
parents:
diff
changeset
|
36 |
{ |
7339b2b1e957
(svn r4073) Add functions to make and test for (most) unmovable tiles
tron
parents:
diff
changeset
|
37 |
return |
7339b2b1e957
(svn r4073) Add functions to make and test for (most) unmovable tiles
tron
parents:
diff
changeset
|
38 |
IsTileType(t, MP_UNMOVABLE) && |
7339b2b1e957
(svn r4073) Add functions to make and test for (most) unmovable tiles
tron
parents:
diff
changeset
|
39 |
GetUnmovableType(t) == UNMOVABLE_TRANSMITTER; |
7339b2b1e957
(svn r4073) Add functions to make and test for (most) unmovable tiles
tron
parents:
diff
changeset
|
40 |
} |
7339b2b1e957
(svn r4073) Add functions to make and test for (most) unmovable tiles
tron
parents:
diff
changeset
|
41 |
|
7339b2b1e957
(svn r4073) Add functions to make and test for (most) unmovable tiles
tron
parents:
diff
changeset
|
42 |
|
7339b2b1e957
(svn r4073) Add functions to make and test for (most) unmovable tiles
tron
parents:
diff
changeset
|
43 |
static inline bool IsOwnedLand(TileIndex t) |
7339b2b1e957
(svn r4073) Add functions to make and test for (most) unmovable tiles
tron
parents:
diff
changeset
|
44 |
{ |
3369
00c2ca209a89
(svn r4166) Sprinkle several map accessors with assert()s
tron
parents:
3310
diff
changeset
|
45 |
assert(IsTileType(t, MP_UNMOVABLE)); |
3310
7339b2b1e957
(svn r4073) Add functions to make and test for (most) unmovable tiles
tron
parents:
diff
changeset
|
46 |
return GetUnmovableType(t) == UNMOVABLE_OWNED_LAND; |
7339b2b1e957
(svn r4073) Add functions to make and test for (most) unmovable tiles
tron
parents:
diff
changeset
|
47 |
} |
7339b2b1e957
(svn r4073) Add functions to make and test for (most) unmovable tiles
tron
parents:
diff
changeset
|
48 |
|
7339b2b1e957
(svn r4073) Add functions to make and test for (most) unmovable tiles
tron
parents:
diff
changeset
|
49 |
static inline bool IsOwnedLandTile(TileIndex t) |
7339b2b1e957
(svn r4073) Add functions to make and test for (most) unmovable tiles
tron
parents:
diff
changeset
|
50 |
{ |
7339b2b1e957
(svn r4073) Add functions to make and test for (most) unmovable tiles
tron
parents:
diff
changeset
|
51 |
return IsTileType(t, MP_UNMOVABLE) && IsOwnedLand(t); |
7339b2b1e957
(svn r4073) Add functions to make and test for (most) unmovable tiles
tron
parents:
diff
changeset
|
52 |
} |
7339b2b1e957
(svn r4073) Add functions to make and test for (most) unmovable tiles
tron
parents:
diff
changeset
|
53 |
|
3427
98d955156735
(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 |
static inline bool IsCompanyHQ(TileIndex t) |
98d955156735
(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 |
{ |
98d955156735
(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 |
return IS_INT_INSIDE(GetUnmovableType(t), UNMOVABLE_HQ_NORTH, UNMOVABLE_HQ_END); |
98d955156735
(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
|
57 |
} |
98d955156735
(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
|
58 |
|
9895
7bd07f43b0e3
(svn r9321) [gamebalance] -Sync: r9025:9314 from trunk
celestar
parents:
5838
diff
changeset
|
59 |
static inline bool IsStatue(TileIndex t) |
7bd07f43b0e3
(svn r9321) [gamebalance] -Sync: r9025:9314 from trunk
celestar
parents:
5838
diff
changeset
|
60 |
{ |
7bd07f43b0e3
(svn r9321) [gamebalance] -Sync: r9025:9314 from trunk
celestar
parents:
5838
diff
changeset
|
61 |
assert(IsTileType(t, MP_UNMOVABLE)); |
7bd07f43b0e3
(svn r9321) [gamebalance] -Sync: r9025:9314 from trunk
celestar
parents:
5838
diff
changeset
|
62 |
return GetUnmovableType(t) == UNMOVABLE_STATUE; |
7bd07f43b0e3
(svn r9321) [gamebalance] -Sync: r9025:9314 from trunk
celestar
parents:
5838
diff
changeset
|
63 |
} |
7bd07f43b0e3
(svn r9321) [gamebalance] -Sync: r9025:9314 from trunk
celestar
parents:
5838
diff
changeset
|
64 |
|
7bd07f43b0e3
(svn r9321) [gamebalance] -Sync: r9025:9314 from trunk
celestar
parents:
5838
diff
changeset
|
65 |
static inline bool IsStatueTile(TileIndex t) |
7bd07f43b0e3
(svn r9321) [gamebalance] -Sync: r9025:9314 from trunk
celestar
parents:
5838
diff
changeset
|
66 |
{ |
7bd07f43b0e3
(svn r9321) [gamebalance] -Sync: r9025:9314 from trunk
celestar
parents:
5838
diff
changeset
|
67 |
return IsTileType(t, MP_UNMOVABLE) && IsStatue(t); |
7bd07f43b0e3
(svn r9321) [gamebalance] -Sync: r9025:9314 from trunk
celestar
parents:
5838
diff
changeset
|
68 |
} |
7bd07f43b0e3
(svn r9321) [gamebalance] -Sync: r9025:9314 from trunk
celestar
parents:
5838
diff
changeset
|
69 |
|
7bd07f43b0e3
(svn r9321) [gamebalance] -Sync: r9025:9314 from trunk
celestar
parents:
5838
diff
changeset
|
70 |
static inline TownID GetStatueTownID(TileIndex t) |
7bd07f43b0e3
(svn r9321) [gamebalance] -Sync: r9025:9314 from trunk
celestar
parents:
5838
diff
changeset
|
71 |
{ |
7bd07f43b0e3
(svn r9321) [gamebalance] -Sync: r9025:9314 from trunk
celestar
parents:
5838
diff
changeset
|
72 |
assert(IsStatue(t)); |
7bd07f43b0e3
(svn r9321) [gamebalance] -Sync: r9025:9314 from trunk
celestar
parents:
5838
diff
changeset
|
73 |
return _m[t].m2; |
7bd07f43b0e3
(svn r9321) [gamebalance] -Sync: r9025:9314 from trunk
celestar
parents:
5838
diff
changeset
|
74 |
} |
7bd07f43b0e3
(svn r9321) [gamebalance] -Sync: r9025:9314 from trunk
celestar
parents:
5838
diff
changeset
|
75 |
|
3427
98d955156735
(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 |
static inline byte GetCompanyHQSize(TileIndex t) |
98d955156735
(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 |
{ |
98d955156735
(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 |
assert(IsTileType(t, MP_UNMOVABLE) && IsCompanyHQ(t)); |
98d955156735
(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 |
return GB(_m[t].m5, 2, 3); |
98d955156735
(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 |
} |
98d955156735
(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 |
|
98d955156735
(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 |
static inline byte GetCompanyHQSection(TileIndex t) |
98d955156735
(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 |
{ |
98d955156735
(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 |
assert(IsTileType(t, MP_UNMOVABLE) && IsCompanyHQ(t)); |
98d955156735
(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 |
return GB(_m[t].m5, 0, 5); |
98d955156735
(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
|
86 |
} |
98d955156735
(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
|
87 |
|
3310
7339b2b1e957
(svn r4073) Add functions to make and test for (most) unmovable tiles
tron
parents:
diff
changeset
|
88 |
|
3388
c802170b5dd4
(svn r4196) -Codechange: Add and make use of an accessor that modifies the size of the Company HQ
celestar
parents:
3385
diff
changeset
|
89 |
static inline void EnlargeCompanyHQ(TileIndex t, byte size) |
c802170b5dd4
(svn r4196) -Codechange: Add and make use of an accessor that modifies the size of the Company HQ
celestar
parents:
3385
diff
changeset
|
90 |
{ |
3705
539e1366ccae
(svn r4648) - Fix (r4196): Company HQ's were not upgraded during the monthly loops.
Darkvater
parents:
3427
diff
changeset
|
91 |
size *= 4; |
3388
c802170b5dd4
(svn r4196) -Codechange: Add and make use of an accessor that modifies the size of the Company HQ
celestar
parents:
3385
diff
changeset
|
92 |
if (size <= _m[t].m5 - UNMOVABLE_HQ_NORTH) return; |
c802170b5dd4
(svn r4196) -Codechange: Add and make use of an accessor that modifies the size of the Company HQ
celestar
parents:
3385
diff
changeset
|
93 |
|
3705
539e1366ccae
(svn r4648) - Fix (r4196): Company HQ's were not upgraded during the monthly loops.
Darkvater
parents:
3427
diff
changeset
|
94 |
_m[t + TileDiffXY(0, 0)].m5 = UNMOVABLE_HQ_NORTH + size; |
539e1366ccae
(svn r4648) - Fix (r4196): Company HQ's were not upgraded during the monthly loops.
Darkvater
parents:
3427
diff
changeset
|
95 |
_m[t + TileDiffXY(0, 1)].m5 = UNMOVABLE_HQ_WEST + size; |
539e1366ccae
(svn r4648) - Fix (r4196): Company HQ's were not upgraded during the monthly loops.
Darkvater
parents:
3427
diff
changeset
|
96 |
_m[t + TileDiffXY(1, 0)].m5 = UNMOVABLE_HQ_EAST + size; |
539e1366ccae
(svn r4648) - Fix (r4196): Company HQ's were not upgraded during the monthly loops.
Darkvater
parents:
3427
diff
changeset
|
97 |
_m[t + TileDiffXY(1, 1)].m5 = UNMOVABLE_HQ_SOUTH + size; |
3388
c802170b5dd4
(svn r4196) -Codechange: Add and make use of an accessor that modifies the size of the Company HQ
celestar
parents:
3385
diff
changeset
|
98 |
} |
c802170b5dd4
(svn r4196) -Codechange: Add and make use of an accessor that modifies the size of the Company HQ
celestar
parents:
3385
diff
changeset
|
99 |
|
c802170b5dd4
(svn r4196) -Codechange: Add and make use of an accessor that modifies the size of the Company HQ
celestar
parents:
3385
diff
changeset
|
100 |
|
3310
7339b2b1e957
(svn r4073) Add functions to make and test for (most) unmovable tiles
tron
parents:
diff
changeset
|
101 |
static inline void MakeUnmovable(TileIndex t, UnmovableType u, Owner o) |
7339b2b1e957
(svn r4073) Add functions to make and test for (most) unmovable tiles
tron
parents:
diff
changeset
|
102 |
{ |
7339b2b1e957
(svn r4073) Add functions to make and test for (most) unmovable tiles
tron
parents:
diff
changeset
|
103 |
SetTileType(t, MP_UNMOVABLE); |
7339b2b1e957
(svn r4073) Add functions to make and test for (most) unmovable tiles
tron
parents:
diff
changeset
|
104 |
SetTileOwner(t, o); |
7339b2b1e957
(svn r4073) Add functions to make and test for (most) unmovable tiles
tron
parents:
diff
changeset
|
105 |
_m[t].m2 = 0; |
7339b2b1e957
(svn r4073) Add functions to make and test for (most) unmovable tiles
tron
parents:
diff
changeset
|
106 |
_m[t].m3 = 0; |
7339b2b1e957
(svn r4073) Add functions to make and test for (most) unmovable tiles
tron
parents:
diff
changeset
|
107 |
_m[t].m4 = 0; |
7339b2b1e957
(svn r4073) Add functions to make and test for (most) unmovable tiles
tron
parents:
diff
changeset
|
108 |
_m[t].m5 = u; |
7339b2b1e957
(svn r4073) Add functions to make and test for (most) unmovable tiles
tron
parents:
diff
changeset
|
109 |
} |
7339b2b1e957
(svn r4073) Add functions to make and test for (most) unmovable tiles
tron
parents:
diff
changeset
|
110 |
|
7339b2b1e957
(svn r4073) Add functions to make and test for (most) unmovable tiles
tron
parents:
diff
changeset
|
111 |
|
7339b2b1e957
(svn r4073) Add functions to make and test for (most) unmovable tiles
tron
parents:
diff
changeset
|
112 |
static inline void MakeTransmitter(TileIndex t) |
7339b2b1e957
(svn r4073) Add functions to make and test for (most) unmovable tiles
tron
parents:
diff
changeset
|
113 |
{ |
7339b2b1e957
(svn r4073) Add functions to make and test for (most) unmovable tiles
tron
parents:
diff
changeset
|
114 |
MakeUnmovable(t, UNMOVABLE_TRANSMITTER, OWNER_NONE); |
7339b2b1e957
(svn r4073) Add functions to make and test for (most) unmovable tiles
tron
parents:
diff
changeset
|
115 |
} |
7339b2b1e957
(svn r4073) Add functions to make and test for (most) unmovable tiles
tron
parents:
diff
changeset
|
116 |
|
7339b2b1e957
(svn r4073) Add functions to make and test for (most) unmovable tiles
tron
parents:
diff
changeset
|
117 |
static inline void MakeLighthouse(TileIndex t) |
7339b2b1e957
(svn r4073) Add functions to make and test for (most) unmovable tiles
tron
parents:
diff
changeset
|
118 |
{ |
7339b2b1e957
(svn r4073) Add functions to make and test for (most) unmovable tiles
tron
parents:
diff
changeset
|
119 |
MakeUnmovable(t, UNMOVABLE_LIGHTHOUSE, OWNER_NONE); |
7339b2b1e957
(svn r4073) Add functions to make and test for (most) unmovable tiles
tron
parents:
diff
changeset
|
120 |
} |
7339b2b1e957
(svn r4073) Add functions to make and test for (most) unmovable tiles
tron
parents:
diff
changeset
|
121 |
|
9895
7bd07f43b0e3
(svn r9321) [gamebalance] -Sync: r9025:9314 from trunk
celestar
parents:
5838
diff
changeset
|
122 |
static inline void MakeStatue(TileIndex t, Owner o, TownID town_id) |
3310
7339b2b1e957
(svn r4073) Add functions to make and test for (most) unmovable tiles
tron
parents:
diff
changeset
|
123 |
{ |
7339b2b1e957
(svn r4073) Add functions to make and test for (most) unmovable tiles
tron
parents:
diff
changeset
|
124 |
MakeUnmovable(t, UNMOVABLE_STATUE, o); |
9895
7bd07f43b0e3
(svn r9321) [gamebalance] -Sync: r9025:9314 from trunk
celestar
parents:
5838
diff
changeset
|
125 |
_m[t].m2 = town_id; |
3310
7339b2b1e957
(svn r4073) Add functions to make and test for (most) unmovable tiles
tron
parents:
diff
changeset
|
126 |
} |
7339b2b1e957
(svn r4073) Add functions to make and test for (most) unmovable tiles
tron
parents:
diff
changeset
|
127 |
|
7339b2b1e957
(svn r4073) Add functions to make and test for (most) unmovable tiles
tron
parents:
diff
changeset
|
128 |
static inline void MakeOwnedLand(TileIndex t, Owner o) |
7339b2b1e957
(svn r4073) Add functions to make and test for (most) unmovable tiles
tron
parents:
diff
changeset
|
129 |
{ |
7339b2b1e957
(svn r4073) Add functions to make and test for (most) unmovable tiles
tron
parents:
diff
changeset
|
130 |
MakeUnmovable(t, UNMOVABLE_OWNED_LAND, o); |
7339b2b1e957
(svn r4073) Add functions to make and test for (most) unmovable tiles
tron
parents:
diff
changeset
|
131 |
} |
3385
41ebb01a92f2
(svn r4193) -Codechange: Add and make use of an accessor function to create company HQs
celestar
parents:
3369
diff
changeset
|
132 |
|
41ebb01a92f2
(svn r4193) -Codechange: Add and make use of an accessor function to create company HQs
celestar
parents:
3369
diff
changeset
|
133 |
static inline void MakeCompanyHQ(TileIndex t, Owner o) |
41ebb01a92f2
(svn r4193) -Codechange: Add and make use of an accessor function to create company HQs
celestar
parents:
3369
diff
changeset
|
134 |
{ |
41ebb01a92f2
(svn r4193) -Codechange: Add and make use of an accessor function to create company HQs
celestar
parents:
3369
diff
changeset
|
135 |
MakeUnmovable(t + TileDiffXY(0, 0), UNMOVABLE_HQ_NORTH, o); |
41ebb01a92f2
(svn r4193) -Codechange: Add and make use of an accessor function to create company HQs
celestar
parents:
3369
diff
changeset
|
136 |
MakeUnmovable(t + TileDiffXY(0, 1), UNMOVABLE_HQ_WEST, o); |
41ebb01a92f2
(svn r4193) -Codechange: Add and make use of an accessor function to create company HQs
celestar
parents:
3369
diff
changeset
|
137 |
MakeUnmovable(t + TileDiffXY(1, 0), UNMOVABLE_HQ_EAST, o); |
41ebb01a92f2
(svn r4193) -Codechange: Add and make use of an accessor function to create company HQs
celestar
parents:
3369
diff
changeset
|
138 |
MakeUnmovable(t + TileDiffXY(1, 1), UNMOVABLE_HQ_SOUTH, o); |
41ebb01a92f2
(svn r4193) -Codechange: Add and make use of an accessor function to create company HQs
celestar
parents:
3369
diff
changeset
|
139 |
} |
4666
850b5b6e4bac
(svn r6560) - Codechange: Minor fix; add missing #include guards and comments, and correct svn properties on bmp.[ch]
peter1138
parents:
3971
diff
changeset
|
140 |
|
850b5b6e4bac
(svn r6560) - Codechange: Minor fix; add missing #include guards and comments, and correct svn properties on bmp.[ch]
peter1138
parents:
3971
diff
changeset
|
141 |
#endif /* UNMOVABLE_MAP_H */ |