--- a/industry_cmd.c Sat Dec 30 11:28:26 2006 +0000
+++ b/industry_cmd.c Sat Dec 30 11:41:54 2006 +0000
@@ -451,8 +451,10 @@
}
break;
- case 148: case 149: case 150: case 151:
- case 152: case 153: case 154: case 155:
+ case GFX_PLASTIC_FOUNTAIN_ANIMATED_1: case GFX_PLASTIC_FOUNTAIN_ANIMATED_2:
+ case GFX_PLASTIC_FOUNTAIN_ANIMATED_3: case GFX_PLASTIC_FOUNTAIN_ANIMATED_4:
+ case GFX_PLASTIC_FOUNTAIN_ANIMATED_5: case GFX_PLASTIC_FOUNTAIN_ANIMATED_6:
+ case GFX_PLASTIC_FOUNTAIN_ANIMATED_7: case GFX_PLASTIC_FOUNTAIN_ANIMATED_8:
if ((_tick_counter & 3) == 0) {
IndustryGfx gfx = GetIndustryGfx(tile);
@@ -567,14 +569,10 @@
SetIndustryAnimationLoop(tile, 0);
break;
- case GFX_PLASTIC_FOUNTAIN_ANIMATED_1:
- case GFX_PLASTIC_FOUNTAIN_ANIMATED_2:
- case GFX_PLASTIC_FOUNTAIN_ANIMATED_3:
- case GFX_PLASTIC_FOUNTAIN_ANIMATED_4:
- case GFX_PLASTIC_FOUNTAIN_ANIMATED_5:
- case GFX_PLASTIC_FOUNTAIN_ANIMATED_6:
- case GFX_PLASTIC_FOUNTAIN_ANIMATED_7:
- case GFX_PLASTIC_FOUNTAIN_ANIMATED_8:
+ case GFX_PLASTIC_FOUNTAIN_ANIMATED_1: case GFX_PLASTIC_FOUNTAIN_ANIMATED_2:
+ case GFX_PLASTIC_FOUNTAIN_ANIMATED_3: case GFX_PLASTIC_FOUNTAIN_ANIMATED_4:
+ case GFX_PLASTIC_FOUNTAIN_ANIMATED_5: case GFX_PLASTIC_FOUNTAIN_ANIMATED_6:
+ case GFX_PLASTIC_FOUNTAIN_ANIMATED_7: case GFX_PLASTIC_FOUNTAIN_ANIMATED_8:
AddAnimatedTile(tile);
break;
}
@@ -1107,31 +1105,6 @@
return t;
}
-static const byte _industry_section_bits[] = {
- 16, 16, 16, 16, 16, 16, 16, 16,
- 16, 16, 16, 16, 16, 16, 16, 16,
- 16, 16, 16, 16, 16, 16, 16, 16,
- 16, 16, 16, 16, 16, 16, 16, 16,
- 16, 16, 16, 16, 16, 16, 16, 16,
- 16, 16, 16, 16, 16, 16, 16, 16,
- 16, 16, 16, 16, 16, 16, 16, 16,
- 16, 16, 4, 2, 16, 16, 16, 16,
- 16, 16, 16, 16, 16, 16, 16, 16,
- 16, 16, 16, 16, 16, 16, 16, 16,
- 16, 16, 16, 16, 16, 16, 16, 16,
- 16, 4, 2, 16, 16, 16, 16, 16,
- 16, 16, 16, 16, 16, 16, 16, 16,
- 16, 16, 16, 16, 16, 16, 16, 16,
- 16, 16, 16, 16, 16, 16, 16, 16,
- 16, 16, 16, 16, 16, 16, 16, 16,
- 16, 16, 16, 16, 16, 16, 16, 16,
- 16, 16, 16, 16, 16, 16, 16, 16,
- 16, 16, 16, 16, 16, 16, 16, 16,
- 16, 16, 16, 16, 16, 16, 16, 16,
- 16, 16, 16, 16, 16, 16, 16, 16,
- 16, 16, 16, 16, 16, 16, 16,
-};
-
static bool CheckIfIndustryTilesAreFree(TileIndex tile, const IndustryTileTable *it, int type)
{
_error_message = STR_0239_SITE_UNSUITABLE;
--- a/table/industry_land.h Sat Dec 30 11:28:26 2006 +0000
+++ b/table/industry_land.h Sat Dec 30 11:41:54 2006 +0000
@@ -15,7 +15,7 @@
#define M(s1, s2, sx, sy, w, h, dz, p) { s1, s2, sx, sy, w - 1, h - 1, dz, p }
-static const DrawBuildingsTileStruct _industry_draw_tile_data[700] = {
+static const DrawBuildingsTileStruct _industry_draw_tile_data[NUM_INDUSTRY_GFXES * 4] = {
M( 0xf54, 0x7db, 7, 0, 9, 9, 10, 0),
M( 0xf54, 0x7dc, 7, 0, 9, 9, 30, 0),
M( 0xf54, 0x7dd, 7, 0, 9, 9, 30, 0),
@@ -898,12 +898,16 @@
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
-static const byte _industry_section_animation_next[] = {
+/**
+ * Next frame in an animation
+ * The indices into this table are the ones as described by
+ * the enum with GFX_*s in industry_map.h.
+ */
+static const byte _industry_section_animation_next[NUM_INDUSTRY_GFXES] = {
N, N, N, N, N, N, N, N,
N, N, N, N, N, N, N, N,
-N, 16, N, N, N, N, N, N,
+N, 16, N, N, N, N, N, N, // <- growing forest
N, N, N, N, N, N, N, N,
N, N, N, N, N, N, N, N,
N, N, N, N, N, N, N, N,
@@ -917,19 +921,23 @@
N, N, N, N, N, N, N, N,
N, N, N, N, N, N, N, N,
N, N, N, N, N, N, N, N,
-N, N, 129, N, N, N, N, N,
-135, N, N, N, N, N, N, N,
+N, N, 129, N, N, N, N, N, // <- growing candyfloss
+135, N, N, N, N, N, N, N, // <- 'growing' batteries
N, N, N, N, N, N, N, N,
N, N, N, N, N, N, N, N,
N, N, N, N, N, N, N, N,
N, N, N, N, N, N, N,
};
-/* animation to start when goods is produced */
-static const byte _industry_produce_section[] = {
+/**
+ * Animation to start when goods is produced
+ * The indices into this table are the ones as described by
+ * the enum with GFX_*s in industry_map.h.
+ */
+static const byte _industry_produce_section[NUM_INDUSTRY_GFXES] = {
N, N, N, N, N, N, N, N,
N, N, N, N, N, N, N, N,
-17, N, N, N, N, N, N, N,
+17, N, N, N, N, N, N, N, // <- chopping forest
N, N, N, N, N, N, N, N,
N, N, N, N, N, N, N, N,
N, N, N, N, N, N, N, N,
@@ -943,7 +951,7 @@
N, N, N, N, N, N, N, N,
N, N, N, N, N, N, N, N,
N, N, N, N, N, N, N, N,
-N, 130, N, N, N, N, N, 136,
+N, 130, N, N, N, N, N, 136, // <- chopping candyfloss and reaping batteries
N, N, N, N, N, N, N, N,
N, N, N, N, N, N, N, N,
N, N, N, N, N, N, N, N,
@@ -952,3 +960,32 @@
};
#undef N
+
+/**
+ * The indices into this table are the ones as described by
+ * the enum with GFX_*s in industry_map.h.
+ */
+static const byte _industry_section_bits[NUM_INDUSTRY_GFXES] = {
+ 16, 16, 16, 16, 16, 16, 16, 16,
+ 16, 16, 16, 16, 16, 16, 16, 16,
+ 16, 16, 16, 16, 16, 16, 16, 16,
+ 16, 16, 16, 16, 16, 16, 16, 16,
+ 16, 16, 16, 16, 16, 16, 16, 16,
+ 16, 16, 16, 16, 16, 16, 16, 16,
+ 16, 16, 16, 16, 16, 16, 16, 16,
+ 16, 16, 4, 2, 16, 16, 16, 16, // <- temperate bank
+ 16, 16, 16, 16, 16, 16, 16, 16,
+ 16, 16, 16, 16, 16, 16, 16, 16,
+ 16, 16, 16, 16, 16, 16, 16, 16,
+ 16, 4, 2, 16, 16, 16, 16, 16, // <- sub-arctic/sub-tropical bank
+ 16, 16, 16, 16, 16, 16, 16, 16,
+ 16, 16, 16, 16, 16, 16, 16, 16,
+ 16, 16, 16, 16, 16, 16, 16, 16,
+ 16, 16, 16, 16, 16, 16, 16, 16,
+ 16, 16, 16, 16, 16, 16, 16, 16,
+ 16, 16, 16, 16, 16, 16, 16, 16,
+ 16, 16, 16, 16, 16, 16, 16, 16,
+ 16, 16, 16, 16, 16, 16, 16, 16,
+ 16, 16, 16, 16, 16, 16, 16, 16,
+ 16, 16, 16, 16, 16, 16, 16,
+};