|
|
|
@ -308,25 +308,15 @@ bool Convert8bitBooleanCallback(const struct GRFFile *grffile, uint16_t cbid, ui
|
|
|
|
|
*/
|
|
|
|
|
template <size_t Tcnt>
|
|
|
|
|
struct GRFFilePropsBase {
|
|
|
|
|
GRFFilePropsBase() : local_id(0), grffile(nullptr)
|
|
|
|
|
{
|
|
|
|
|
/* The lack of some compilers to provide default constructors complying to the specs
|
|
|
|
|
* requires us to zero the stuff ourself. */
|
|
|
|
|
memset(spritegroup, 0, sizeof(spritegroup));
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
uint16_t local_id; ///< id defined by the grf file for this entity
|
|
|
|
|
const struct GRFFile *grffile; ///< grf file that introduced this entity
|
|
|
|
|
const struct SpriteGroup *spritegroup[Tcnt]; ///< pointer to the different sprites of the entity
|
|
|
|
|
uint16_t local_id = 0; ///< id defined by the grf file for this entity
|
|
|
|
|
const struct GRFFile *grffile = nullptr; ///< grf file that introduced this entity
|
|
|
|
|
std::array<const struct SpriteGroup *, Tcnt> spritegroup{}; ///< pointers to the different sprites of the entity
|
|
|
|
|
};
|
|
|
|
|
|
|
|
|
|
/** Data related to the handling of grf files. */
|
|
|
|
|
struct GRFFileProps : GRFFilePropsBase<1> {
|
|
|
|
|
/** Set all default data constructor for the props. */
|
|
|
|
|
GRFFileProps(uint16_t subst_id = 0) :
|
|
|
|
|
GRFFilePropsBase<1>(), subst_id(subst_id), override(subst_id)
|
|
|
|
|
{
|
|
|
|
|
}
|
|
|
|
|
constexpr GRFFileProps(uint16_t subst_id = 0) : subst_id(subst_id), override(subst_id) {}
|
|
|
|
|
|
|
|
|
|
uint16_t subst_id;
|
|
|
|
|
uint16_t override; ///< id of the entity been replaced by
|
|
|
|
|