src/industry_cmd.cpp
changeset 9009 6684576ef32b
parent 9008 de19c73e405f
child 9028 f60408bc972b
--- a/src/industry_cmd.cpp	Sun Apr 20 10:13:54 2008 +0000
+++ b/src/industry_cmd.cpp	Sun Apr 20 11:12:07 2008 +0000
@@ -40,6 +40,7 @@
 #include "station_base.h"
 #include "oldpool_func.h"
 #include "animated_tile_func.h"
+#include "effectvehicle_func.h"
 
 #include "table/strings.h"
 #include "table/sprites.h"
@@ -621,7 +622,7 @@
 	}
 }
 
-static void CreateIndustryEffectSmoke(TileIndex tile)
+static void CreateChimneySmoke(TileIndex tile)
 {
 	uint x = TileX(tile) * TILE_SIZE;
 	uint y = TileY(tile) * TILE_SIZE;
@@ -658,7 +659,7 @@
 
 	switch (gfx) {
 	case GFX_POWERPLANT_CHIMNEY:
-		CreateIndustryEffectSmoke(tile);
+		CreateChimneySmoke(tile);
 		break;
 
 	case GFX_OILRIG_1:
@@ -685,10 +686,10 @@
 {
 	int dir;
 	Vehicle *v;
-	static const int8 _tileloop_ind_case_161[12] = {
-		11,   0, -4, -14,
-		-4, -10, -4,   1,
-		49,  59, 60,  65,
+	static const int8 _bubble_spawn_location[3][4] = {
+		{ 11,   0, -4, -14 },
+		{ -4, -10, -4,   1 },
+		{ 49,  59, 60,  65 },
 	};
 
 	SndPlayTileFx(SND_2E_EXTRACT_AND_POP, tile);
@@ -696,9 +697,9 @@
 	dir = Random() & 3;
 
 	v = CreateEffectVehicleAbove(
-		TileX(tile) * TILE_SIZE + _tileloop_ind_case_161[dir + 0],
-		TileY(tile) * TILE_SIZE + _tileloop_ind_case_161[dir + 4],
-		_tileloop_ind_case_161[dir + 8],
+		TileX(tile) * TILE_SIZE + _bubble_spawn_location[0][dir],
+		TileY(tile) * TILE_SIZE + _bubble_spawn_location[1][dir],
+		_bubble_spawn_location[2][dir],
 		EV_BUBBLE
 	);