175 void IndustryDrawTileLayout(const TileInfo *ti, const SpriteGroup *group, byte rnd_color, byte stage, IndustryGfx gfx) |
175 void IndustryDrawTileLayout(const TileInfo *ti, const SpriteGroup *group, byte rnd_color, byte stage, IndustryGfx gfx) |
176 { |
176 { |
177 const DrawTileSprites *dts = group->g.layout.dts; |
177 const DrawTileSprites *dts = group->g.layout.dts; |
178 const DrawTileSeqStruct *dtss; |
178 const DrawTileSeqStruct *dtss; |
179 |
179 |
180 SpriteID image = dts->ground_sprite; |
180 SpriteID image = dts->ground.sprite; |
181 SpriteID pal = dts->ground_pal; |
181 SpriteID pal = dts->ground.pal; |
182 |
182 |
183 if (IS_CUSTOM_SPRITE(image)) image += stage; |
183 if (IS_CUSTOM_SPRITE(image)) image += stage; |
184 |
184 |
185 if (GB(image, 0, SPRITE_WIDTH) != 0) DrawGroundSprite(image, pal); |
185 if (GB(image, 0, SPRITE_WIDTH) != 0) DrawGroundSprite(image, pal); |
186 |
186 |
187 foreach_draw_tile_seq(dtss, dts->seq) { |
187 foreach_draw_tile_seq(dtss, dts->seq) { |
188 if (GB(dtss->image, 0, SPRITE_WIDTH) == 0) continue; |
188 if (GB(dtss->image.sprite, 0, SPRITE_WIDTH) == 0) continue; |
189 |
189 |
190 image = dtss->image; |
190 image = dtss->image.sprite; |
191 pal = dtss->pal; |
191 pal = dtss->image.pal; |
192 |
192 |
193 if (IS_CUSTOM_SPRITE(image)) image += stage; |
193 if (IS_CUSTOM_SPRITE(image)) image += stage; |
194 |
194 |
195 if (HasBit(image, PALETTE_MODIFIER_COLOR)) { |
195 if (HasBit(image, PALETTE_MODIFIER_COLOR)) { |
196 if (pal == 0) { |
196 if (pal == 0) { |