Changeset - r7208:beaace1127ef
[Not reviewed]
master
0 2 0
rubidium - 17 years ago 2007-07-09 13:59:07
rubidium@openttd.org
(svn r10486) -Fix: do not draw foundations when the "should I draw foundations" callbacks says to do so.
2 files changed with 2 insertions and 2 deletions:
0 comments (0 inline, 0 general)
src/newgrf_callbacks.h
Show inline comments
 
@@ -115,25 +115,25 @@ enum CallbackID {
 
	/* Called to determine if a specific colour map should be used for a vehicle
 
	 * instead of the default livery */
 
	CBID_VEHICLE_COLOUR_MAPPING     = 0x2D,
 

	
 
	/* Called (if appropriate bit in callback mask is set) to determine how much
 
	 * cargo a town building produces. */
 
	CBID_HOUSE_PRODUCE_CARGO        = 0x2E, // not yet implemented
 

	
 
	/* Called to determine if the given industry tile can be built on specific tile */
 
	CBID_INDTILE_SHAPE_CHECK        = 0x2F, // not yet implemented
 

	
 
	/* Called to determine the type (if any) of foundation to draw for industry tile */
 
	CBID_INDUSTRY_DRAW_FOUNDATIONS  = 0x30, // not yet implemented
 
	CBID_INDUSTRY_DRAW_FOUNDATIONS  = 0x30,
 

	
 
	/* Called when the player (or AI) tries to start or stop a vehicle. Mainly
 
	 * used for preventing a vehicle from leaving the depot. */
 
	CBID_VEHICLE_START_STOP_CHECK   = 0x31,
 

	
 
	/* Called to play a special sound effect */
 
	CBID_VEHICLE_SOUND_EFFECT       = 0x33,
 

	
 
	/* Called monthly on production changes, so it can be adjusted more frequently */
 
	CBID_INDUSTRY_MONTHLYPROD_CHANGE= 0x35, // not yet implemented
 

	
 
	/* Called to modify various vehicle properties. Callback parameter 1
src/newgrf_industrytiles.cpp
Show inline comments
 
@@ -198,25 +198,25 @@ uint16 GetIndustryTileCallback(uint16 ca
 
}
 

	
 
bool DrawNewIndustryTile(TileInfo *ti, Industry *i, IndustryGfx gfx, const IndustryTileSpec *inds)
 
{
 
	const SpriteGroup *group;
 
	ResolverObject object;
 

	
 
	if (ti->tileh != SLOPE_FLAT) {
 
		bool draw_old_one = true;
 
		if (HASBIT(inds->callback_flags, CBM_INDT_DRAW_FOUNDATIONS)) {
 
			/* Called to determine the type (if any) of foundation to draw for industry tile */
 
			uint32 callback_res = GetIndustryTileCallback(CBID_INDUSTRY_DRAW_FOUNDATIONS, 0, 0, gfx, i, ti->tile);
 
			draw_old_one = callback_res == 0 || callback_res == CALLBACK_FAILED;
 
			draw_old_one = callback_res != 0;
 
		}
 

	
 
		if (draw_old_one) DrawFoundation(ti, ti->tileh);
 
	}
 

	
 
	NewIndustryTileResolver(&object, gfx, ti->tile, i);
 

	
 
	group = Resolve(inds->grf_prop.spritegroup, &object);
 
	if (group == NULL || group->type != SGT_TILELAYOUT) {
 
		return false;
 
	} else {
 
		/* Limit the building stage to the number of stages supplied. */
0 comments (0 inline, 0 general)