|
|
@ -91,11 +91,6 @@ uint16 OverrideManagerBase::GetID(uint8 grf_local_id, uint32 grfid)
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
/* No mapping found, try the overrides */
|
|
|
|
|
|
|
|
for (uint16 id = 0; id < max_offset; id++) {
|
|
|
|
|
|
|
|
if (entity_overrides[id] == grf_local_id && grfid_overrides[id] == grfid) return id;
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
return invalid_ID;
|
|
|
|
return invalid_ID;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
@ -169,6 +164,24 @@ void HouseOverrideManager::SetEntitySpec(const HouseSpec *hs)
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
/** Return the ID (if ever available) of a previously inserted entity.
|
|
|
|
|
|
|
|
* @param grf_local_id ID of this enity withing the grfID
|
|
|
|
|
|
|
|
* @param grfid ID of the grf file
|
|
|
|
|
|
|
|
* @return the ID of the candidate, of the Invalid flag item ID
|
|
|
|
|
|
|
|
*/
|
|
|
|
|
|
|
|
uint16 IndustryOverrideManager::GetID(uint8 grf_local_id, uint32 grfid)
|
|
|
|
|
|
|
|
{
|
|
|
|
|
|
|
|
uint16 id = OverrideManagerBase::GetID(grf_local_id, grfid);
|
|
|
|
|
|
|
|
if (id != invalid_ID) return id;
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
/* No mapping found, try the overrides */
|
|
|
|
|
|
|
|
for (id = 0; id < max_offset; id++) {
|
|
|
|
|
|
|
|
if (entity_overrides[id] == grf_local_id && grfid_overrides[id] == grfid) return id;
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
return invalid_ID;
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
/** Method to find an entity ID and to mark it as reserved for the Industry to be included.
|
|
|
|
/** Method to find an entity ID and to mark it as reserved for the Industry to be included.
|
|
|
|
* @param grf_local_id ID used by the grf file for pre-installation work (equivalent of TTDPatch's setid
|
|
|
|
* @param grf_local_id ID used by the grf file for pre-installation work (equivalent of TTDPatch's setid
|
|
|
|
* @param grfid ID of the current grf file
|
|
|
|
* @param grfid ID of the current grf file
|
|
|
|