author | truebrain |
Mon, 16 Jun 2008 14:43:19 +0000 | |
branch | noai |
changeset 10978 | 13fd0364b2c6 |
parent 10776 | 07203fc29812 |
permissions | -rw-r--r-- |
9624 | 1 |
/* $Id$ */ |
2 |
||
3 |
/** @file newgrf_commons.cpp Implementation of the class OverrideManagerBase |
|
4 |
* and its descendance, present and futur |
|
5 |
*/ |
|
6 |
||
7 |
#include "stdafx.h" |
|
8 |
#include "openttd.h" |
|
9626 | 9 |
#include "variables.h" |
10 |
#include "landscape.h" |
|
9624 | 11 |
#include "town.h" |
12 |
#include "industry.h" |
|
13 |
#include "newgrf.h" |
|
14 |
#include "newgrf_commons.h" |
|
9723
eee46cb39750
(svn r11796) [NoAI] -Sync: with trunk r11502:11795.
rubidium
parents:
9722
diff
changeset
|
15 |
#include "tile_map.h" |
eee46cb39750
(svn r11796) [NoAI] -Sync: with trunk r11502:11795.
rubidium
parents:
9722
diff
changeset
|
16 |
#include "station_map.h" |
9724
b39bc69bb2f2
(svn r12051) [NoAI] -Sync: with trunk (r11795:12050).
rubidium
parents:
9723
diff
changeset
|
17 |
#include "settings_type.h" |
b39bc69bb2f2
(svn r12051) [NoAI] -Sync: with trunk (r11795:12050).
rubidium
parents:
9723
diff
changeset
|
18 |
#include "tree_map.h" |
9624 | 19 |
|
20 |
/** Constructor of generic class |
|
21 |
* @param offset end of original data for this entity. i.e: houses = 110 |
|
22 |
* @param maximum of entities this manager can deal with. i.e: houses = 512 |
|
23 |
* @param invalid is the ID used to identify an invalid entity id |
|
24 |
*/ |
|
25 |
OverrideManagerBase::OverrideManagerBase(uint16 offset, uint16 maximum, uint16 invalid) |
|
26 |
{ |
|
27 |
max_offset = offset; |
|
28 |
max_new_entities = maximum; |
|
29 |
invalid_ID = invalid; |
|
30 |
||
31 |
mapping_ID = CallocT<EntityIDMapping>(max_new_entities); |
|
32 |
entity_overrides = MallocT<uint16>(max_offset); |
|
33 |
memset(entity_overrides, invalid, sizeof(entity_overrides)); |
|
9722
ebf0ece7d8f6
(svn r11503) [NoAI] -Sync: with trunk r11308:11502.
rubidium
parents:
9718
diff
changeset
|
34 |
grfid_overrides = CallocT<uint32>(max_offset); |
9624 | 35 |
} |
36 |
||
37 |
/** Destructor of the generic class. |
|
38 |
* Frees allocated memory of constructor |
|
39 |
*/ |
|
40 |
OverrideManagerBase::~OverrideManagerBase() |
|
41 |
{ |
|
42 |
free(mapping_ID); |
|
43 |
free(entity_overrides); |
|
9722
ebf0ece7d8f6
(svn r11503) [NoAI] -Sync: with trunk r11308:11502.
rubidium
parents:
9718
diff
changeset
|
44 |
free(grfid_overrides); |
9624 | 45 |
} |
46 |
||
47 |
/** Since the entity IDs defined by the GRF file does not necessarily correlate |
|
48 |
* to those used by the game, the IDs used for overriding old entities must be |
|
49 |
* translated when the entity spec is set. |
|
9722
ebf0ece7d8f6
(svn r11503) [NoAI] -Sync: with trunk r11308:11502.
rubidium
parents:
9718
diff
changeset
|
50 |
* @param local_id ID in grf file |
ebf0ece7d8f6
(svn r11503) [NoAI] -Sync: with trunk r11308:11502.
rubidium
parents:
9718
diff
changeset
|
51 |
* @param grfid ID of the grf file |
9624 | 52 |
* @param entity_type original entity type |
53 |
*/ |
|
9722
ebf0ece7d8f6
(svn r11503) [NoAI] -Sync: with trunk r11308:11502.
rubidium
parents:
9718
diff
changeset
|
54 |
void OverrideManagerBase::Add(uint8 local_id, uint32 grfid, uint entity_type) |
9624 | 55 |
{ |
56 |
assert(entity_type < max_offset); |
|
9722
ebf0ece7d8f6
(svn r11503) [NoAI] -Sync: with trunk r11308:11502.
rubidium
parents:
9718
diff
changeset
|
57 |
/* An override can be set only once */ |
ebf0ece7d8f6
(svn r11503) [NoAI] -Sync: with trunk r11308:11502.
rubidium
parents:
9718
diff
changeset
|
58 |
if (entity_overrides[entity_type] != invalid_ID) return; |
9624 | 59 |
entity_overrides[entity_type] = local_id; |
9722
ebf0ece7d8f6
(svn r11503) [NoAI] -Sync: with trunk r11308:11502.
rubidium
parents:
9718
diff
changeset
|
60 |
grfid_overrides[entity_type] = grfid; |
9624 | 61 |
} |
62 |
||
63 |
/** Resets the mapping, which is used while initializing game */ |
|
64 |
void OverrideManagerBase::ResetMapping() |
|
65 |
{ |
|
66 |
memset(mapping_ID, 0, (max_new_entities - 1) * sizeof(EntityIDMapping)); |
|
67 |
} |
|
68 |
||
69 |
/** Resets the override, which is used while initializing game */ |
|
70 |
void OverrideManagerBase::ResetOverride() |
|
71 |
{ |
|
72 |
for (uint16 i = 0; i < max_offset; i++) { |
|
73 |
entity_overrides[i] = invalid_ID; |
|
9722
ebf0ece7d8f6
(svn r11503) [NoAI] -Sync: with trunk r11308:11502.
rubidium
parents:
9718
diff
changeset
|
74 |
grfid_overrides[i] = 0; |
9624 | 75 |
} |
76 |
} |
|
77 |
||
78 |
/** Return the ID (if ever available) of a previously inserted entity. |
|
79 |
* @param grf_local_id ID of this enity withing the grfID |
|
80 |
* @param grfid ID of the grf file |
|
81 |
* @return the ID of the candidate, of the Invalid flag item ID |
|
82 |
*/ |
|
83 |
uint16 OverrideManagerBase::GetID(uint8 grf_local_id, uint32 grfid) |
|
84 |
{ |
|
85 |
const EntityIDMapping *map; |
|
86 |
||
9641
855e32c08c9b
(svn r10533) [NoAI] -Sync with trunk r10460:r10532.
truelight
parents:
9629
diff
changeset
|
87 |
for (uint16 id = 0; id < max_new_entities; id++) { |
9624 | 88 |
map = &mapping_ID[id]; |
89 |
if (map->entity_id == grf_local_id && map->grfid == grfid) { |
|
90 |
return id; |
|
91 |
} |
|
92 |
} |
|
9722
ebf0ece7d8f6
(svn r11503) [NoAI] -Sync: with trunk r11308:11502.
rubidium
parents:
9718
diff
changeset
|
93 |
|
9624 | 94 |
return invalid_ID; |
95 |
} |
|
96 |
||
97 |
/** Reserves a place in the mapping array for an entity to be installed |
|
98 |
* @param grf_local_id is an arbitrary id given by the grf's author. Also known as setid |
|
99 |
* @param grfid is the id of the grf file itself |
|
100 |
* @param substitute_id is the original entity from which data is copied for the new one |
|
101 |
* @return the proper usable slot id, or invalid marker if none is found |
|
102 |
*/ |
|
103 |
uint16 OverrideManagerBase::AddEntityID(byte grf_local_id, uint32 grfid, byte substitute_id) |
|
104 |
{ |
|
105 |
uint16 id = this->GetID(grf_local_id, grfid); |
|
106 |
EntityIDMapping *map; |
|
107 |
||
108 |
/* Look to see if this entity has already been added. This is done |
|
109 |
* separately from the loop below in case a GRF has been deleted, and there |
|
110 |
* are any gaps in the array. |
|
111 |
*/ |
|
112 |
if (id != invalid_ID) { |
|
113 |
return id; |
|
114 |
} |
|
115 |
||
116 |
/* This entity hasn't been defined before, so give it an ID now. */ |
|
117 |
for (id = max_offset; id < max_new_entities; id++) { |
|
118 |
map = &mapping_ID[id]; |
|
119 |
||
9704 | 120 |
if (CheckValidNewID(id) && map->entity_id == 0 && map->grfid == 0) { |
9624 | 121 |
map->entity_id = grf_local_id; |
122 |
map->grfid = grfid; |
|
123 |
map->substitute_id = substitute_id; |
|
124 |
return id; |
|
125 |
} |
|
126 |
} |
|
127 |
||
128 |
return invalid_ID; |
|
129 |
} |
|
130 |
||
131 |
/** Gives the substitute of the entity, as specified by the grf file |
|
132 |
* @param entity_id of the entity being queried |
|
133 |
* @return mapped id |
|
134 |
*/ |
|
135 |
uint16 OverrideManagerBase::GetSubstituteID(byte entity_id) |
|
136 |
{ |
|
137 |
return mapping_ID[entity_id].substitute_id; |
|
138 |
} |
|
139 |
||
140 |
/** Install the specs into the HouseSpecs array |
|
141 |
* It will find itself the proper slot onwhich it will go |
|
142 |
* @param hs HouseSpec read from the grf file, ready for inclusion |
|
143 |
*/ |
|
144 |
void HouseOverrideManager::SetEntitySpec(const HouseSpec *hs) |
|
145 |
{ |
|
146 |
HouseID house_id = this->AddEntityID(hs->local_id, hs->grffile->grfid, hs->substitute_id); |
|
147 |
||
148 |
if (house_id == invalid_ID) { |
|
149 |
grfmsg(1, "House.SetEntitySpec: Too many houses allocated. Ignoring."); |
|
150 |
return; |
|
151 |
} |
|
152 |
||
153 |
memcpy(&_house_specs[house_id], hs, sizeof(*hs)); |
|
154 |
||
155 |
/* Now add the overrides. */ |
|
156 |
for (int i = 0; i != max_offset; i++) { |
|
157 |
HouseSpec *overridden_hs = GetHouseSpecs(i); |
|
158 |
||
9722
ebf0ece7d8f6
(svn r11503) [NoAI] -Sync: with trunk r11308:11502.
rubidium
parents:
9718
diff
changeset
|
159 |
if (entity_overrides[i] != hs->local_id || grfid_overrides[i] != hs->grffile->grfid) continue; |
9624 | 160 |
|
161 |
overridden_hs->override = house_id; |
|
162 |
entity_overrides[i] = invalid_ID; |
|
9722
ebf0ece7d8f6
(svn r11503) [NoAI] -Sync: with trunk r11308:11502.
rubidium
parents:
9718
diff
changeset
|
163 |
grfid_overrides[i] = 0; |
9624 | 164 |
} |
165 |
} |
|
9626 | 166 |
|
9732 | 167 |
/** Return the ID (if ever available) of a previously inserted entity. |
168 |
* @param grf_local_id ID of this enity withing the grfID |
|
169 |
* @param grfid ID of the grf file |
|
170 |
* @return the ID of the candidate, of the Invalid flag item ID |
|
171 |
*/ |
|
172 |
uint16 IndustryOverrideManager::GetID(uint8 grf_local_id, uint32 grfid) |
|
173 |
{ |
|
174 |
uint16 id = OverrideManagerBase::GetID(grf_local_id, grfid); |
|
175 |
if (id != invalid_ID) return id; |
|
176 |
||
177 |
/* No mapping found, try the overrides */ |
|
178 |
for (id = 0; id < max_offset; id++) { |
|
179 |
if (entity_overrides[id] == grf_local_id && grfid_overrides[id] == grfid) return id; |
|
180 |
} |
|
181 |
||
182 |
return invalid_ID; |
|
183 |
} |
|
184 |
||
9626 | 185 |
/** Method to find an entity ID and to mark it as reserved for the Industry to be included. |
186 |
* @param grf_local_id ID used by the grf file for pre-installation work (equivalent of TTDPatch's setid |
|
187 |
* @param grfid ID of the current grf file |
|
188 |
* @param substitute_id industry from which data has been copied |
|
189 |
* @return a free entity id (slotid) if ever one has been found, or Invalid_ID marker otherwise |
|
190 |
*/ |
|
191 |
uint16 IndustryOverrideManager::AddEntityID(byte grf_local_id, uint32 grfid, byte substitute_id) |
|
192 |
{ |
|
193 |
/* This entity hasn't been defined before, so give it an ID now. */ |
|
194 |
for (uint16 id = 0; id < max_new_entities; id++) { |
|
9722
ebf0ece7d8f6
(svn r11503) [NoAI] -Sync: with trunk r11308:11502.
rubidium
parents:
9718
diff
changeset
|
195 |
/* Skip overriden industries */ |
ebf0ece7d8f6
(svn r11503) [NoAI] -Sync: with trunk r11308:11502.
rubidium
parents:
9718
diff
changeset
|
196 |
if (id < max_offset && entity_overrides[id] != invalid_ID) continue; |
ebf0ece7d8f6
(svn r11503) [NoAI] -Sync: with trunk r11308:11502.
rubidium
parents:
9718
diff
changeset
|
197 |
|
9626 | 198 |
/* Get the real live industry */ |
199 |
const IndustrySpec *inds = GetIndustrySpec(id); |
|
200 |
||
201 |
/* This industry must be one that is not available(enabled), mostly because of climate. |
|
202 |
* And it must not already be used by a grf (grffile == NULL). |
|
203 |
* So reseve this slot here, as it is the chosen one */ |
|
204 |
if (!inds->enabled && inds->grf_prop.grffile == NULL) { |
|
205 |
EntityIDMapping *map = &mapping_ID[id]; |
|
206 |
||
207 |
if (map->entity_id == 0 && map->grfid == 0) { |
|
208 |
/* winning slot, mark it as been used */ |
|
209 |
map->entity_id = grf_local_id; |
|
210 |
map->grfid = grfid; |
|
211 |
map->substitute_id = substitute_id; |
|
212 |
return id; |
|
213 |
} |
|
214 |
} |
|
215 |
} |
|
216 |
||
217 |
return invalid_ID; |
|
218 |
} |
|
219 |
||
220 |
/** Method to install the new indistry data in its proper slot |
|
221 |
* The slot assigment is internal of this method, since it requires |
|
222 |
* checking what is available |
|
223 |
* @param inds Industryspec that comes from the grf decoding process |
|
224 |
*/ |
|
9704 | 225 |
void IndustryOverrideManager::SetEntitySpec(IndustrySpec *inds) |
9626 | 226 |
{ |
227 |
/* First step : We need to find if this industry is already specified in the savegame data */ |
|
228 |
IndustryType ind_id = this->GetID(inds->grf_prop.local_id, inds->grf_prop.grffile->grfid); |
|
229 |
||
9722
ebf0ece7d8f6
(svn r11503) [NoAI] -Sync: with trunk r11308:11502.
rubidium
parents:
9718
diff
changeset
|
230 |
if (ind_id == invalid_ID) { |
ebf0ece7d8f6
(svn r11503) [NoAI] -Sync: with trunk r11308:11502.
rubidium
parents:
9718
diff
changeset
|
231 |
/* Not found. |
ebf0ece7d8f6
(svn r11503) [NoAI] -Sync: with trunk r11308:11502.
rubidium
parents:
9718
diff
changeset
|
232 |
* Or it has already been overriden, so you've lost your place old boy. |
ebf0ece7d8f6
(svn r11503) [NoAI] -Sync: with trunk r11308:11502.
rubidium
parents:
9718
diff
changeset
|
233 |
* Or it is a simple substitute. |
ebf0ece7d8f6
(svn r11503) [NoAI] -Sync: with trunk r11308:11502.
rubidium
parents:
9718
diff
changeset
|
234 |
* We need to find a free available slot */ |
ebf0ece7d8f6
(svn r11503) [NoAI] -Sync: with trunk r11308:11502.
rubidium
parents:
9718
diff
changeset
|
235 |
ind_id = this->AddEntityID(inds->grf_prop.local_id, inds->grf_prop.grffile->grfid, inds->grf_prop.subst_id); |
ebf0ece7d8f6
(svn r11503) [NoAI] -Sync: with trunk r11308:11502.
rubidium
parents:
9718
diff
changeset
|
236 |
inds->grf_prop.override = invalid_ID; // make sure it will not be detected as overriden |
9626 | 237 |
} |
238 |
||
239 |
if (ind_id == invalid_ID) { |
|
240 |
grfmsg(1, "Industry.SetEntitySpec: Too many industries allocated. Ignoring."); |
|
241 |
return; |
|
242 |
} |
|
243 |
||
244 |
/* Now that we know we can use the given id, copy the spech to its final destination*/ |
|
245 |
memcpy(&_industry_specs[ind_id], inds, sizeof(*inds)); |
|
246 |
/* and mark it as usable*/ |
|
247 |
_industry_specs[ind_id].enabled = true; |
|
248 |
} |
|
249 |
||
9629 | 250 |
void IndustryTileOverrideManager::SetEntitySpec(const IndustryTileSpec *its) |
251 |
{ |
|
252 |
IndustryGfx indt_id = this->AddEntityID(its->grf_prop.local_id, its->grf_prop.grffile->grfid, its->grf_prop.subst_id); |
|
253 |
||
254 |
if (indt_id == invalid_ID) { |
|
255 |
grfmsg(1, "IndustryTile.SetEntitySpec: Too many industry tiles allocated. Ignoring."); |
|
256 |
return; |
|
257 |
} |
|
258 |
||
259 |
memcpy(&_industry_tile_specs[indt_id], its, sizeof(*its)); |
|
260 |
||
261 |
/* Now add the overrides. */ |
|
262 |
for (int i = 0; i < max_offset; i++) { |
|
263 |
IndustryTileSpec *overridden_its = &_industry_tile_specs[i]; |
|
264 |
||
9722
ebf0ece7d8f6
(svn r11503) [NoAI] -Sync: with trunk r11308:11502.
rubidium
parents:
9718
diff
changeset
|
265 |
if (entity_overrides[i] != its->grf_prop.local_id || grfid_overrides[i] != its->grf_prop.grffile->grfid) continue; |
9629 | 266 |
|
267 |
overridden_its->grf_prop.override = indt_id; |
|
268 |
overridden_its->enabled = false; |
|
269 |
entity_overrides[i] = invalid_ID; |
|
9722
ebf0ece7d8f6
(svn r11503) [NoAI] -Sync: with trunk r11308:11502.
rubidium
parents:
9718
diff
changeset
|
270 |
grfid_overrides[i] = 0; |
9629 | 271 |
} |
272 |
} |
|
273 |
||
9626 | 274 |
/** Function used by houses (and soon industries) to get information |
275 |
* on type of "terrain" the tile it is queries sits on. |
|
276 |
* @param tile TileIndex of the tile been queried |
|
277 |
* @return value corresponding to the grf expected format: |
|
278 |
* Terrain type: 0 normal, 1 desert, 2 rainforest, 4 on or above snowline */ |
|
279 |
uint32 GetTerrainType(TileIndex tile) |
|
280 |
{ |
|
10776 | 281 |
switch (_settings_game.game_creation.landscape) { |
9724
b39bc69bb2f2
(svn r12051) [NoAI] -Sync: with trunk (r11795:12050).
rubidium
parents:
9723
diff
changeset
|
282 |
case LT_TROPIC: return GetTropicZone(tile); |
9703
d2a6acdbd665
(svn r11146) [NoAI] -Sync: with trunk r11035:11045.
rubidium
parents:
9641
diff
changeset
|
283 |
case LT_ARCTIC: return GetTileZ(tile) > GetSnowLine() ? 4 : 0; |
9626 | 284 |
default: return 0; |
285 |
} |
|
286 |
} |
|
287 |
||
288 |
TileIndex GetNearbyTile(byte parameter, TileIndex tile) |
|
289 |
{ |
|
290 |
int8 x = GB(parameter, 0, 4); |
|
291 |
int8 y = GB(parameter, 4, 4); |
|
292 |
||
293 |
if (x >= 8) x -= 16; |
|
294 |
if (y >= 8) y -= 16; |
|
295 |
||
9723
eee46cb39750
(svn r11796) [NoAI] -Sync: with trunk r11502:11795.
rubidium
parents:
9722
diff
changeset
|
296 |
/* Swap width and height depending on axis for railway stations */ |
9732 | 297 |
if (IsRailwayStationTile(tile) && GetRailStationAxis(tile) == AXIS_Y) Swap(x, y); |
9723
eee46cb39750
(svn r11796) [NoAI] -Sync: with trunk r11502:11795.
rubidium
parents:
9722
diff
changeset
|
298 |
|
9641
855e32c08c9b
(svn r10533) [NoAI] -Sync with trunk r10460:r10532.
truelight
parents:
9629
diff
changeset
|
299 |
/* Make sure we never roam outside of the map */ |
855e32c08c9b
(svn r10533) [NoAI] -Sync with trunk r10460:r10532.
truelight
parents:
9629
diff
changeset
|
300 |
return TILE_MASK(tile + TileDiffXY(x, y)); |
9626 | 301 |
} |
9724
b39bc69bb2f2
(svn r12051) [NoAI] -Sync: with trunk (r11795:12050).
rubidium
parents:
9723
diff
changeset
|
302 |
|
b39bc69bb2f2
(svn r12051) [NoAI] -Sync: with trunk (r11795:12050).
rubidium
parents:
9723
diff
changeset
|
303 |
/** |
b39bc69bb2f2
(svn r12051) [NoAI] -Sync: with trunk (r11795:12050).
rubidium
parents:
9723
diff
changeset
|
304 |
* Common part of station var 0x67 , house var 0x62, indtile var 0x60, industry var 0x62. |
b39bc69bb2f2
(svn r12051) [NoAI] -Sync: with trunk (r11795:12050).
rubidium
parents:
9723
diff
changeset
|
305 |
* |
b39bc69bb2f2
(svn r12051) [NoAI] -Sync: with trunk (r11795:12050).
rubidium
parents:
9723
diff
changeset
|
306 |
* @param tile the tile of interest. |
b39bc69bb2f2
(svn r12051) [NoAI] -Sync: with trunk (r11795:12050).
rubidium
parents:
9723
diff
changeset
|
307 |
* @return 0czzbbss: c = TileType; zz = TileZ; bb: 7-3 zero, 4-2 TerrainType, 1 water/shore, 0 zero; ss = TileSlope |
b39bc69bb2f2
(svn r12051) [NoAI] -Sync: with trunk (r11795:12050).
rubidium
parents:
9723
diff
changeset
|
308 |
*/ |
b39bc69bb2f2
(svn r12051) [NoAI] -Sync: with trunk (r11795:12050).
rubidium
parents:
9723
diff
changeset
|
309 |
uint32 GetNearbyTileInformation(TileIndex tile) |
b39bc69bb2f2
(svn r12051) [NoAI] -Sync: with trunk (r11795:12050).
rubidium
parents:
9723
diff
changeset
|
310 |
{ |
b39bc69bb2f2
(svn r12051) [NoAI] -Sync: with trunk (r11795:12050).
rubidium
parents:
9723
diff
changeset
|
311 |
TileType tile_type = GetTileType(tile); |
b39bc69bb2f2
(svn r12051) [NoAI] -Sync: with trunk (r11795:12050).
rubidium
parents:
9723
diff
changeset
|
312 |
|
b39bc69bb2f2
(svn r12051) [NoAI] -Sync: with trunk (r11795:12050).
rubidium
parents:
9723
diff
changeset
|
313 |
/* Fake tile type for trees on shore */ |
b39bc69bb2f2
(svn r12051) [NoAI] -Sync: with trunk (r11795:12050).
rubidium
parents:
9723
diff
changeset
|
314 |
if (IsTileType(tile, MP_TREES) && GetTreeGround(tile) == TREE_GROUND_SHORE) tile_type = MP_WATER; |
b39bc69bb2f2
(svn r12051) [NoAI] -Sync: with trunk (r11795:12050).
rubidium
parents:
9723
diff
changeset
|
315 |
|
b39bc69bb2f2
(svn r12051) [NoAI] -Sync: with trunk (r11795:12050).
rubidium
parents:
9723
diff
changeset
|
316 |
uint z; |
b39bc69bb2f2
(svn r12051) [NoAI] -Sync: with trunk (r11795:12050).
rubidium
parents:
9723
diff
changeset
|
317 |
Slope tileh = GetTileSlope(tile, &z); |
b39bc69bb2f2
(svn r12051) [NoAI] -Sync: with trunk (r11795:12050).
rubidium
parents:
9723
diff
changeset
|
318 |
byte terrain_type = GetTerrainType(tile) << 2 | (tile_type == MP_WATER ? 1 : 0) << 1; |
b39bc69bb2f2
(svn r12051) [NoAI] -Sync: with trunk (r11795:12050).
rubidium
parents:
9723
diff
changeset
|
319 |
return tile_type << 24 | z << 16 | terrain_type << 8 | tileh; |
b39bc69bb2f2
(svn r12051) [NoAI] -Sync: with trunk (r11795:12050).
rubidium
parents:
9723
diff
changeset
|
320 |
} |