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:
@@ -59,7 +59,7 @@ static const GRFFile *GetHouseSpecGrf(HouseID house_id)
|
||||
*/
|
||||
HouseResolverObject::HouseResolverObject(HouseID house_id, TileIndex tile, Town *town,
|
||||
CallbackID callback, uint32 param1, uint32 param2,
|
||||
bool not_yet_constructed, uint8 initial_random_bits, uint32 watched_cargo_triggers)
|
||||
bool not_yet_constructed, uint8 initial_random_bits, CargoTypes watched_cargo_triggers)
|
||||
: ResolverObject(GetHouseSpecGrf(house_id), callback, param1, param2)
|
||||
{
|
||||
assert((tile != INVALID_TILE) == (town != NULL));
|
||||
@@ -489,7 +489,7 @@ static uint32 GetDistanceFromNearbyHouse(uint8 parameter, TileIndex tile, HouseI
|
||||
}
|
||||
|
||||
uint16 GetHouseCallback(CallbackID callback, uint32 param1, uint32 param2, HouseID house_id, Town *town, TileIndex tile,
|
||||
bool not_yet_constructed, uint8 initial_random_bits, uint32 watched_cargo_triggers)
|
||||
bool not_yet_constructed, uint8 initial_random_bits, CargoTypes watched_cargo_triggers)
|
||||
{
|
||||
HouseResolverObject object(house_id, tile, town, callback, param1, param2,
|
||||
not_yet_constructed, initial_random_bits, watched_cargo_triggers);
|
||||
@@ -610,13 +610,13 @@ void DrawNewHouseTileInGUI(int x, int y, HouseID house_id, bool ground)
|
||||
}
|
||||
|
||||
/* Simple wrapper for GetHouseCallback to keep the animation unified. */
|
||||
uint16 GetSimpleHouseCallback(CallbackID callback, uint32 param1, uint32 param2, const HouseSpec *spec, Town *town, TileIndex tile, uint32 extra_data)
|
||||
uint16 GetSimpleHouseCallback(CallbackID callback, uint32 param1, uint32 param2, const HouseSpec *spec, Town *town, TileIndex tile, CargoTypes extra_data)
|
||||
{
|
||||
return GetHouseCallback(callback, param1, param2, spec - HouseSpec::Get(0), town, tile, false, 0, extra_data);
|
||||
}
|
||||
|
||||
/** Helper class for animation control. */
|
||||
struct HouseAnimationBase : public AnimationBase<HouseAnimationBase, HouseSpec, Town, uint32, GetSimpleHouseCallback> {
|
||||
struct HouseAnimationBase : public AnimationBase<HouseAnimationBase, HouseSpec, Town, CargoTypes, GetSimpleHouseCallback> {
|
||||
static const CallbackID cb_animation_speed = CBID_HOUSE_ANIMATION_SPEED;
|
||||
static const CallbackID cb_animation_next_frame = CBID_HOUSE_ANIMATION_NEXT_FRAME;
|
||||
|
||||
@@ -791,7 +791,7 @@ void TriggerHouse(TileIndex t, HouseTrigger trigger)
|
||||
* @param trigger_cargoes Cargo types that triggered the callback.
|
||||
* @param random Random bits.
|
||||
*/
|
||||
void DoWatchedCargoCallback(TileIndex tile, TileIndex origin, uint32 trigger_cargoes, uint16 random)
|
||||
void DoWatchedCargoCallback(TileIndex tile, TileIndex origin, CargoTypes trigger_cargoes, uint16 random)
|
||||
{
|
||||
TileIndexDiffC diff = TileIndexToTileIndexDiffC(origin, tile);
|
||||
uint32 cb_info = random << 16 | (uint8)diff.y << 8 | (uint8)diff.x;
|
||||
@@ -804,7 +804,7 @@ void DoWatchedCargoCallback(TileIndex tile, TileIndex origin, uint32 trigger_car
|
||||
* @param trigger_cargoes Triggering cargo types.
|
||||
* @pre IsTileType(t, MP_HOUSE)
|
||||
*/
|
||||
void WatchedCargoCallback(TileIndex tile, uint32 trigger_cargoes)
|
||||
void WatchedCargoCallback(TileIndex tile, CargoTypes trigger_cargoes)
|
||||
{
|
||||
assert(IsTileType(tile, MP_HOUSE));
|
||||
HouseID id = GetHouseType(tile);
|
||||
|
Reference in New Issue
Block a user