Merge branch 'master' into jgrpp
# Conflicts: # src/blitter/32bpp_anim.cpp # src/blitter/32bpp_anim.hpp # src/blitter/32bpp_anim_sse2.cpp # src/blitter/32bpp_base.cpp # src/blitter/32bpp_base.hpp # src/ground_vehicle.cpp # src/linkgraph/linkgraph_gui.h # src/main_gui.cpp # src/newgrf_house.cpp # src/newgrf_house.h # src/town_cmd.cpp # src/vehicle_base.h # src/viewport_gui.cppp
This commit is contained in:
@@ -54,7 +54,7 @@
|
||||
#include "safeguards.h"
|
||||
|
||||
TownID _new_town_id;
|
||||
uint32 _town_cargoes_accepted; ///< Bitmap of all cargoes accepted by houses.
|
||||
CargoTypes _town_cargoes_accepted; ///< Bitmap of all cargoes accepted by houses.
|
||||
|
||||
/* Initialize the town-pool */
|
||||
TownPool _town_pool("Town");
|
||||
@@ -769,14 +769,14 @@ static void AddProducedCargo_Town(TileIndex tile, CargoArray &produced)
|
||||
AddProducedHouseCargo(GetHouseType(tile), tile, produced);
|
||||
}
|
||||
|
||||
static inline void AddAcceptedCargoSetMask(CargoID cargo, uint amount, CargoArray &acceptance, uint32 *always_accepted)
|
||||
static inline void AddAcceptedCargoSetMask(CargoID cargo, uint amount, CargoArray &acceptance, CargoTypes *always_accepted)
|
||||
{
|
||||
if (cargo == CT_INVALID || amount == 0) return;
|
||||
acceptance[cargo] += amount;
|
||||
SetBit(*always_accepted, cargo);
|
||||
}
|
||||
|
||||
void AddAcceptedHouseCargo(HouseID house_id, TileIndex tile, CargoArray &acceptance, uint32 *always_accepted)
|
||||
void AddAcceptedHouseCargo(HouseID house_id, TileIndex tile, CargoArray &acceptance, CargoTypes *always_accepted)
|
||||
{
|
||||
const HouseSpec *hs = HouseSpec::Get(house_id);
|
||||
Town *t = (tile == INVALID_TILE) ? NULL : Town::GetByTile(tile);
|
||||
@@ -820,7 +820,7 @@ void AddAcceptedHouseCargo(HouseID house_id, TileIndex tile, CargoArray &accepta
|
||||
}
|
||||
}
|
||||
|
||||
static void AddAcceptedCargo_Town(TileIndex tile, CargoArray &acceptance, uint32 *always_accepted)
|
||||
static void AddAcceptedCargo_Town(TileIndex tile, CargoArray &acceptance, CargoTypes *always_accepted)
|
||||
{
|
||||
AddAcceptedHouseCargo(GetHouseType(tile), tile, acceptance, always_accepted);
|
||||
}
|
||||
@@ -880,7 +880,7 @@ void UpdateTownCargoTotal(Town *t)
|
||||
static void UpdateTownCargoes(Town *t, TileIndex start, bool update_total = true)
|
||||
{
|
||||
CargoArray accepted, produced;
|
||||
uint32 dummy;
|
||||
CargoTypes dummy;
|
||||
|
||||
/* Gather acceptance for all houses in an area around the start tile.
|
||||
* The area is composed of the square the tile is in, extended one square in all
|
||||
@@ -894,7 +894,7 @@ static void UpdateTownCargoes(Town *t, TileIndex start, bool update_total = true
|
||||
}
|
||||
|
||||
/* Create bitmap of produced and accepted cargoes. */
|
||||
uint32 acc = 0;
|
||||
CargoTypes acc = 0;
|
||||
for (uint cid = 0; cid < NUM_CARGO; cid++) {
|
||||
if (accepted[cid] >= 8) SetBit(acc, cid);
|
||||
if (produced[cid] > 0) SetBit(t->cargo_produced, cid);
|
||||
|
Reference in New Issue
Block a user