Changeset - r15071:e236d80508bb
[Not reviewed]
master
0 7 0
rubidium - 15 years ago 2010-04-24 13:35:18
rubidium@openttd.org
(svn r19707) -Add: helper functions to instantiate/fill ResolverObjects
7 files changed with 71 insertions and 0 deletions:
0 comments (0 inline, 0 general)
src/newgrf_airporttiles.cpp
Show inline comments
 
@@ -406,3 +406,12 @@ void AirportAnimationTrigger(Station *st
 
	}
 
}
 

	
 
/**
 
 * Resolve an airport tile's spec and such so we can get a variable.
 
 * @param ro    The resolver object to fill.
 
 * @param index The airport tile to get the data from.
 
 */
 
void GetAirportTileTypeResolver(ResolverObject *ro, uint index)
 
{
 
	AirportTileResolver(ro, GetAirportGfx(index), index, Station::GetByTile(index));
 
}
src/newgrf_engine.cpp
Show inline comments
 
@@ -1188,3 +1188,14 @@ void CommitVehicleListOrderChanges()
 
	/* Clear out the queue */
 
	_list_order_changes.Reset();
 
}
 

	
 
/**
 
 * Resolve an engine's spec and such so we can get a variable.
 
 * @param ro    The resolver object to fill.
 
 * @param index The vehicle to get the data from.
 
 */
 
void GetVehicleResolver(ResolverObject *ro, uint index)
 
{
 
	Vehicle *v = Vehicle::Get(index);
 
	NewVehicleResolver(ro, v->engine_type, v);
 
}
src/newgrf_house.cpp
Show inline comments
 
@@ -656,3 +656,13 @@ void TriggerHouse(TileIndex t, HouseTrig
 
{
 
	DoTriggerHouse(t, trigger, 0, true);
 
}
 

	
 
/**
 
 * Resolve a house's spec and such so we can get a variable.
 
 * @param ro    The resolver object to fill.
 
 * @param index The house tile to get the data from.
 
 */
 
void GetHouseResolver(ResolverObject *ro, uint index)
 
{
 
	NewHouseResolver(ro, GetHouseType(index), index, Town::GetByTile(index));
 
}
src/newgrf_industries.cpp
Show inline comments
 
@@ -563,3 +563,14 @@ void IndustryProductionCallback(Industry
 

	
 
	SetWindowDirty(WC_INDUSTRY_VIEW, ind->index);
 
}
 

	
 
/**
 
 * Resolve a industry's spec and such so we can get a variable.
 
 * @param ro    The resolver object to fill.
 
 * @param index The industry ID to get the data from.
 
 */
 
void GetIndustryResolver(ResolverObject *ro, uint index)
 
{
 
	Industry *i = Industry::Get(index);
 
	NewIndustryResolver(ro, i->location.tile, i, i->type);
 
}
src/newgrf_industrytiles.cpp
Show inline comments
 
@@ -430,3 +430,13 @@ void TriggerIndustry(Industry *ind, Indu
 
		}
 
	}
 
}
 

	
 
/**
 
 * Resolve a industry tile's spec and such so we can get a variable.
 
 * @param ro    The resolver object to fill.
 
 * @param index The industry tile to get the data from.
 
 */
 
void GetIndustryTileResolver(ResolverObject *ro, uint index)
 
{
 
	NewIndustryTileResolver(ro, GetIndustryGfx(index), index, Industry::GetByTile(index));
 
}
src/newgrf_railtype.cpp
Show inline comments
 
@@ -113,3 +113,13 @@ uint8 GetReverseRailTypeTranslation(Rail
 
	/* If not found, return as invalid */
 
	return 0xFF;
 
}
 

	
 
/**
 
 * Resolve a railtypes's spec and such so we can get a variable.
 
 * @param ro    The resolver object to fill.
 
 * @param index The rail tile to get the data from.
 
 */
 
void GetRailTypeResolver(ResolverObject *ro, uint index)
 
{
 
	NewRailTypeResolver(ro, index);
 
}
src/newgrf_station.cpp
Show inline comments
 
@@ -1081,3 +1081,13 @@ void StationUpdateAnimTriggers(BaseStati
 
		if (ss != NULL) st->cached_anim_triggers |= ss->anim_triggers;
 
	}
 
}
 

	
 
/**
 
 * Resolve a station's spec and such so we can get a variable.
 
 * @param ro    The resolver object to fill.
 
 * @param index The station to get the data from.
 
 */
 
void GetStationResolver(ResolverObject *ro, uint index)
 
{
 
	NewStationResolver(ro, GetStationSpec(index), Station::GetByTile(index), index);
 
}
0 comments (0 inline, 0 general)