src/town_cmd.cpp
changeset 7831 5dded9b03500
parent 7829 88883899c9e6
child 7866 e19fda04e8d3
equal deleted inserted replaced
7830:210381b46ae6 7831:5dded9b03500
   152 	}
   152 	}
   153 
   153 
   154 	/* Retrieve pointer to the draw town tile struct */
   154 	/* Retrieve pointer to the draw town tile struct */
   155 	dcts = &_town_draw_tile_data[house_id << 4 | OriginalTileRandomiser(ti->x, ti->y) << 2 | GetHouseBuildingStage(ti->tile)];
   155 	dcts = &_town_draw_tile_data[house_id << 4 | OriginalTileRandomiser(ti->x, ti->y) << 2 | GetHouseBuildingStage(ti->tile)];
   156 
   156 
   157 	if (ti->tileh != SLOPE_FLAT) DrawFoundation(ti, ti->tileh);
   157 	if (ti->tileh != SLOPE_FLAT) DrawFoundation(ti, FOUNDATION_LEVELED);
   158 
   158 
   159 	image = dcts->ground.sprite;
   159 	image = dcts->ground.sprite;
   160 	pal   = dcts->ground.pal;
   160 	pal   = dcts->ground.pal;
   161 	DrawGroundSprite(image, pal);
   161 	DrawGroundSprite(image, pal);
   162 
   162 
   186 static uint GetSlopeZ_Town(TileIndex tile, uint x, uint y)
   186 static uint GetSlopeZ_Town(TileIndex tile, uint x, uint y)
   187 {
   187 {
   188 	return GetTileMaxZ(tile);
   188 	return GetTileMaxZ(tile);
   189 }
   189 }
   190 
   190 
   191 static Slope GetSlopeTileh_Town(TileIndex tile, Slope tileh)
   191 static Foundation GetFoundation_Town(TileIndex tile, Slope tileh)
   192 {
   192 {
   193 	return SLOPE_FLAT;
   193 	return FlatteningFoundation(tileh);
   194 }
   194 }
   195 
   195 
   196 /**
   196 /**
   197  * Animate a tile for a town
   197  * Animate a tile for a town
   198  * Only certain houses can be animated
   198  * Only certain houses can be animated
  2348 	AnimateTile_Town,        /* animate_tile_proc */
  2348 	AnimateTile_Town,        /* animate_tile_proc */
  2349 	TileLoop_Town,           /* tile_loop_clear */
  2349 	TileLoop_Town,           /* tile_loop_clear */
  2350 	ChangeTileOwner_Town,    /* change_tile_owner_clear */
  2350 	ChangeTileOwner_Town,    /* change_tile_owner_clear */
  2351 	NULL,                    /* get_produced_cargo_proc */
  2351 	NULL,                    /* get_produced_cargo_proc */
  2352 	NULL,                    /* vehicle_enter_tile_proc */
  2352 	NULL,                    /* vehicle_enter_tile_proc */
  2353 	GetSlopeTileh_Town,      /* get_slope_tileh_proc */
  2353 	GetFoundation_Town,      /* get_foundation_proc */
  2354 };
  2354 };
  2355 
  2355 
  2356 
  2356 
  2357 /** Save and load of towns. */
  2357 /** Save and load of towns. */
  2358 static const SaveLoad _town_desc[] = {
  2358 static const SaveLoad _town_desc[] = {