(svn r4004) -CodeChange : Renaming sprites and functions
This commit is contained in:
		| @@ -257,7 +257,7 @@ static const StringID _industry_close_strings[] = { | ||||
| }; | ||||
|  | ||||
|  | ||||
| static void IndustryDrawTileProc1(const TileInfo *ti) | ||||
| static void IndustryDrawSugarMine(const TileInfo *ti) | ||||
| { | ||||
| 	const DrawIndustrySpec1Struct *d; | ||||
| 	uint32 image; | ||||
| @@ -266,19 +266,19 @@ static void IndustryDrawTileProc1(const TileInfo *ti) | ||||
|  | ||||
| 	d = &_draw_industry_spec1[_m[ti->tile].m3]; | ||||
|  | ||||
| 	AddChildSpriteScreen(0x12A7 + d->image_1, d->x, 0); | ||||
| 	AddChildSpriteScreen(SPR_IT_SUGAR_MINE_SIEVE + d->image_1, d->x, 0); | ||||
|  | ||||
| 	image = d->image_2; | ||||
| 	if (image != 0) AddChildSpriteScreen(0x12B0 + image - 1, 8, 41); | ||||
| 	if (image != 0) AddChildSpriteScreen(SPR_IT_SUGAR_MINE_CLOUDS + image - 1, 8, 41); | ||||
|  | ||||
| 	image = d->image_3; | ||||
| 	if (image != 0) { | ||||
| 		AddChildSpriteScreen(0x12AC + image - 1, | ||||
| 		AddChildSpriteScreen(SPR_IT_SUGAR_MINE_PILE + image - 1, | ||||
| 			_drawtile_proc1_x[image - 1], _drawtile_proc1_y[image - 1]); | ||||
| 	} | ||||
| } | ||||
|  | ||||
| static void IndustryDrawTileProc2(const TileInfo *ti) | ||||
| static void IndustryDrawToffeeQuarry(const TileInfo *ti) | ||||
| { | ||||
| 	int x = 0; | ||||
|  | ||||
| @@ -288,46 +288,46 @@ static void IndustryDrawTileProc2(const TileInfo *ti) | ||||
| 			x = 0; | ||||
| 	} | ||||
|  | ||||
| 	AddChildSpriteScreen(0x129F, 22 - x, 24 + x); | ||||
| 	AddChildSpriteScreen(0x129E, 6, 0xE); | ||||
| 	AddChildSpriteScreen(SPR_IT_TOFFEE_QUARRY_SHOVEL, 22 - x, 24 + x); | ||||
| 	AddChildSpriteScreen(SPR_IT_TOFFEE_QUARRY_TOFFEE, 6, 14); | ||||
| } | ||||
|  | ||||
| static void IndustryDrawTileProc3(const TileInfo *ti) | ||||
| static void IndustryDrawBubbleGenerator( const TileInfo *ti) | ||||
| { | ||||
| 	if (_m[ti->tile].m1 & 0x80) { | ||||
| 		AddChildSpriteScreen(0x128B, 5, _industry_anim_offs_2[_m[ti->tile].m3]); | ||||
| 		AddChildSpriteScreen(SPR_IT_BUBBLE_GENERATOR_BUBBLE, 5, _industry_anim_offs_2[_m[ti->tile].m3]); | ||||
| 	} else { | ||||
| 		AddChildSpriteScreen(4746, 3, 67); | ||||
| 		AddChildSpriteScreen(SPR_IT_BUBBLE_GENERATOR_SPRING, 3, 67); | ||||
| 	} | ||||
| } | ||||
|  | ||||
| static void IndustryDrawTileProc4(const TileInfo *ti) | ||||
| static void IndustryDrawToyFactory(const TileInfo *ti) | ||||
| { | ||||
| 	const DrawIndustrySpec4Struct *d; | ||||
|  | ||||
| 	d = &_industry_anim_offs_3[_m[ti->tile].m3]; | ||||
|  | ||||
| 	if (d->image_1 != 0xFF) { | ||||
| 		AddChildSpriteScreen(0x126F, 0x32 - d->image_1 * 2, 0x60 + d->image_1); | ||||
| 		AddChildSpriteScreen(SPR_IT_TOY_FACTORY_CLAY, 50 - d->image_1 * 2, 96 + d->image_1); | ||||
| 	} | ||||
|  | ||||
| 	if (d->image_2 != 0xFF) { | ||||
| 		AddChildSpriteScreen(0x1270, 0x10 - d->image_2 * 2, 100 + d->image_2); | ||||
| 		AddChildSpriteScreen(SPR_IT_TOY_FACTORY_ROBOT, 16 - d->image_2 * 2, 100 + d->image_2); | ||||
| 	} | ||||
|  | ||||
| 	AddChildSpriteScreen(0x126E, 7, d->image_3); | ||||
| 	AddChildSpriteScreen(0x126D, 0, 42); | ||||
| 	AddChildSpriteScreen(SPR_IT_TOY_FACTORY_STAMP, 7, d->image_3); | ||||
| 	AddChildSpriteScreen(SPR_IT_TOY_FACTORY_STAMP_HOLDER, 0, 42); | ||||
| } | ||||
|  | ||||
| static void DrawCoalPlantSparkles(const TileInfo *ti) | ||||
| static void IndustryDrawCoalPlantSparks(const TileInfo *ti) | ||||
| { | ||||
| 	int image = _m[ti->tile].m1; | ||||
| 	if (image & 0x80) { | ||||
| 		image = GB(image, 2, 5); | ||||
| 		if (image != 0 && image < 7) { | ||||
| 			AddChildSpriteScreen(image + 0x806, | ||||
| 				_coal_plant_sparkles_x[image - 1], | ||||
| 				_coal_plant_sparkles_y[image - 1] | ||||
| 			AddChildSpriteScreen(image + SPR_IT_POWER_PLANT_TRANSFORMERS, | ||||
| 				_coal_plant_sparks_x[image - 1], | ||||
| 				_coal_plant_sparks_y[image - 1] | ||||
| 			); | ||||
| 		} | ||||
| 	} | ||||
| @@ -335,11 +335,11 @@ static void DrawCoalPlantSparkles(const TileInfo *ti) | ||||
|  | ||||
| typedef void IndustryDrawTileProc(const TileInfo *ti); | ||||
| static IndustryDrawTileProc * const _industry_draw_tile_procs[5] = { | ||||
| 	IndustryDrawTileProc1, | ||||
| 	IndustryDrawTileProc2, | ||||
| 	IndustryDrawTileProc3, | ||||
| 	IndustryDrawTileProc4, | ||||
| 	DrawCoalPlantSparkles, | ||||
| 	IndustryDrawSugarMine, | ||||
| 	IndustryDrawToffeeQuarry, | ||||
| 	IndustryDrawBubbleGenerator, | ||||
| 	IndustryDrawToyFactory, | ||||
| 	IndustryDrawCoalPlantSparks, | ||||
| }; | ||||
|  | ||||
| static void DrawTile_Industry(TileInfo *ti) | ||||
| @@ -364,7 +364,7 @@ static void DrawTile_Industry(TileInfo *ti) | ||||
| 	/* Add bricks below the industry? */ | ||||
| 	if (ti->tileh & 0xF) { | ||||
| 		AddSortableSpriteToDraw(SPR_FOUNDATION_BASE + (ti->tileh & 0xF), ti->x, ti->y, 16, 16, 7, z); | ||||
| 		AddChildSpriteScreen(image, 0x1F, 1); | ||||
| 		AddChildSpriteScreen(image, 31, 1); | ||||
| 		z += 8; | ||||
| 	} else { | ||||
| 		/* Else draw regular ground */ | ||||
| @@ -661,7 +661,7 @@ static void AnimateTile_Industry(TileIndex tile) | ||||
| 	} | ||||
| } | ||||
|  | ||||
| static void MakeIndustryTileBiggerCase8(TileIndex tile) | ||||
| static void CreateIndustryEffectSmoke(TileIndex tile) | ||||
| { | ||||
| 	uint tileh; | ||||
| 	uint x; | ||||
| @@ -694,7 +694,7 @@ static void MakeIndustryTileBigger(TileIndex tile, byte size) | ||||
|  | ||||
| 	switch (_m[tile].m5) { | ||||
| 	case 8: | ||||
| 		MakeIndustryTileBiggerCase8(tile); | ||||
| 		CreateIndustryEffectSmoke(tile); | ||||
| 		break; | ||||
|  | ||||
| 	case 24: | ||||
| @@ -716,7 +716,7 @@ static void MakeIndustryTileBigger(TileIndex tile, byte size) | ||||
| } | ||||
|  | ||||
|  | ||||
| static void TileLoopIndustryCase161(TileIndex tile) | ||||
| static void TileLoopIndustry_BubbleGenerator(TileIndex tile) | ||||
| { | ||||
| 	int dir; | ||||
| 	Vehicle *v; | ||||
| @@ -831,7 +831,7 @@ static void TileLoop_Industry(TileIndex tile) | ||||
| 		break; | ||||
|  | ||||
| 	case 161: | ||||
| 		TileLoopIndustryCase161(tile); | ||||
| 		TileLoopIndustry_BubbleGenerator(tile); | ||||
| 		break; | ||||
|  | ||||
| 	case 165: | ||||
|   | ||||
| @@ -882,8 +882,8 @@ static const byte _industry_anim_offs_2[] = { | ||||
| 	77, 76, 75, 74, 73, 72, 71, 70, 69, 68, | ||||
| }; | ||||
|  | ||||
| static const byte _coal_plant_sparkles_x[] = {11, 11, 14, 13, 18, 15}; | ||||
| static const byte _coal_plant_sparkles_y[] = {23, 11, 6, 3, 1, 0}; | ||||
| static const byte _coal_plant_sparks_x[] = {11, 11, 14, 13, 18, 15}; | ||||
| static const byte _coal_plant_sparks_y[] = {23, 11, 6, 3, 1, 0}; | ||||
|  | ||||
| /* next frame in an animation */ | ||||
| #define N 255 | ||||
|   | ||||
| @@ -846,7 +846,21 @@ enum Sprites { | ||||
| 	SPR_TYCOON_IMG1_BEGIN     = 4814, | ||||
| 	SPR_TYCOON_IMG2_BEGIN     = 4824, | ||||
|  | ||||
| 	/* Effect vehciles */ | ||||
| 	/* Industry sprites */ | ||||
| 	SPR_IT_SUGAR_MINE_SIEVE         = 4775, | ||||
| 	SPR_IT_SUGAR_MINE_CLOUDS        = 4784, | ||||
| 	SPR_IT_SUGAR_MINE_PILE          = 4780, | ||||
| 	SPR_IT_TOFFEE_QUARRY_TOFFEE     = 4766, | ||||
| 	SPR_IT_TOFFEE_QUARRY_SHOVEL     = 4767, | ||||
| 	SPR_IT_BUBBLE_GENERATOR_SPRING  = 4746, | ||||
| 	SPR_IT_BUBBLE_GENERATOR_BUBBLE  = 4747, | ||||
| 	SPR_IT_TOY_FACTORY_STAMP_HOLDER = 4717, | ||||
| 	SPR_IT_TOY_FACTORY_STAMP        = 4718, | ||||
| 	SPR_IT_TOY_FACTORY_CLAY         = 4719, | ||||
| 	SPR_IT_TOY_FACTORY_ROBOT        = 4720, | ||||
| 	SPR_IT_POWER_PLANT_TRANSFORMERS = 2054, | ||||
|  | ||||
| 	/* Effect vehicles */ | ||||
| 	SPR_BULLDOZER_NE = 1416, | ||||
| 	SPR_BULLDOZER_SE = 1417, | ||||
| 	SPR_BULLDOZER_SW = 1418, | ||||
|   | ||||
		Reference in New Issue
	
	Block a user
	 belugas
					belugas