|
@@ -217,48 +217,50 @@ struct IndustrySpec {
|
|
|
struct IndustryTileSpec {
|
|
|
CargoID accepts_cargo[3]; ///< Cargo accepted by this tile
|
|
|
uint8 acceptance[3]; ///< Level of aceptance per cargo type
|
|
|
Slope slopes_refused; ///< slope pattern on which this tile cannot be built
|
|
|
byte anim_production; ///< Animation frame to start when goods are produced
|
|
|
byte anim_next; ///< Next frame in an animation
|
|
|
bool anim_state; ///< When true, the tile has to be drawn using the animation
|
|
|
///< state instead of the construction state
|
|
|
/* Newgrf data */
|
|
|
uint8 callback_flags; ///< Flags telling which grf callback is set
|
|
|
uint16 animation_info; ///< Information about the animation (is it looping, how many loops etc)
|
|
|
uint8 animation_speed; ///< The speed of the animation
|
|
|
uint8 animation_triggers; ///< When to start the animation
|
|
|
uint8 animation_special_flags; ///< Extra flags to influence the animation
|
|
|
bool enabled; ///< entity still avaible (by default true).newgrf can disable it, though
|
|
|
struct GRFFileProps grf_prop;
|
|
|
};
|
|
|
|
|
|
/* industry_cmd.cpp*/
|
|
|
const IndustrySpec *GetIndustrySpec(IndustryType thistype); ///< Array of industries data
|
|
|
const IndustryTileSpec *GetIndustryTileSpec(IndustryGfx gfx); ///< Array of industry tiles data
|
|
|
void ResetIndustries();
|
|
|
void PlantRandomFarmField(const Industry *i);
|
|
|
|
|
|
void ReleaseDisastersTargetingIndustry(IndustryID);
|
|
|
|
|
|
/* writable arrays of specs */
|
|
|
extern IndustrySpec _industry_specs[NUM_INDUSTRYTYPES];
|
|
|
extern IndustryTileSpec _industry_tile_specs[NUM_INDUSTRYTILES];
|
|
|
|
|
|
static inline IndustryGfx GetTranslatedIndustryTileID(IndustryGfx gfx)
|
|
|
{
|
|
|
/* the 0xFF should be GFX_WATERTILE_SPECIALCHECK but for reasons of include mess,
|
|
|
* we'll simplify the writing.
|
|
|
* Basically, the first test is required since the GFX_WATERTILE_SPECIALCHECK value
|
|
|
* will never be assigned as a tile index and is only required in order to do some
|
|
|
* tests while building the industry (as in WATER REQUIRED */
|
|
|
if (gfx != 0xFF) {
|
|
|
assert(gfx < INVALID_INDUSTRYTILE);
|
|
|
const IndustryTileSpec *it = &_industry_tile_specs[gfx];
|
|
|
return it->grf_prop.override == INVALID_INDUSTRYTILE ? gfx : it->grf_prop.override;
|
|
|
} else {
|
|
|
return gfx;
|
|
|
}
|
|
|
}
|
|
|
|
|
|
/* smallmap_gui.cpp */
|
|
|
void BuildIndustriesLegend();
|
|
|
/* industry_cmd.cpp */
|
|
|
void SetIndustryDailyChanges();
|