/** * Make a ship depot section. * @param t Tile to place the ship depot section. * @param owner_depot Owner of the depot. * @param owner_canal Owner of the canal (only set if it's placed on canal). * @param did Depot ID. * @param part Depot part (either #DEPOT_PART_NORTH or #DEPOT_PART_SOUTH). * @param a Axis of the depot. * @param original_water_class Original water class. */ static inline void MakeShipDepot(TileIndex t, Owner owner_depot, Owner owner_canal, DepotID did, DepotPart part, Axis a, WaterClass original_water_class) { SetTileType(t, MP_WATER); SetTileOwner(t, owner_depot); SetWaterClass(t, original_water_class); if (original_water_class == WATER_CLASS_CANAL) SetCanalOwner(t, owner_canal); _m[t].m2 = did; _m[t].m3 = 0; _m[t].m4 = 0; _m[t].m5 = WBL_TYPE_DEPOT << WBL_TYPE_BEGIN | part << WBL_DEPOT_PART | a << WBL_DEPOT_AXIS; SB(_me[t].m6, 2, 4, 0); _me[t].m7 = 0; }