src/signs.h
changeset 8258 9fa31acb07bc
parent 7496 49cec492627b
child 8268 5027ad5e70a0
equal deleted inserted replaced
8257:3151fdbc73f9 8258:9fa31acb07bc
     9 
     9 
    10 struct Sign;
    10 struct Sign;
    11 DECLARE_OLD_POOL(Sign, Sign, 2, 16000)
    11 DECLARE_OLD_POOL(Sign, Sign, 2, 16000)
    12 
    12 
    13 struct Sign : PoolItem<Sign, SignID, &_Sign_pool> {
    13 struct Sign : PoolItem<Sign, SignID, &_Sign_pool> {
    14 	StringID     str;
    14 	char *name;
    15 	ViewportSign sign;
    15 	ViewportSign sign;
    16 	int32        x;
    16 	int32        x;
    17 	int32        y;
    17 	int32        y;
    18 	byte         z;
    18 	byte         z;
    19 	PlayerByte   owner; // placed by this player. Anyone can delete them though. OWNER_NONE for gray signs from old games.
    19 	PlayerByte   owner; // placed by this player. Anyone can delete them though. OWNER_NONE for gray signs from old games.
    20 
    20 
    21 	/**
    21 	/**
    22 	 * Creates a new sign
    22 	 * Creates a new sign
    23 	 */
    23 	 */
    24 	Sign(StringID string = STR_NULL);
    24 	Sign(PlayerID owner = INVALID_PLAYER);
    25 
    25 
    26 	/** Destroy the sign */
    26 	/** Destroy the sign */
    27 	~Sign();
    27 	~Sign();
    28 
    28 
    29 	inline bool IsValid() const { return this->str != STR_NULL; }
    29 	inline bool IsValid() const { return this->owner != INVALID_PLAYER; }
    30 };
    30 };
    31 
    31 
    32 enum {
    32 enum {
    33 	INVALID_SIGN = 0xFFFF,
    33 	INVALID_SIGN = 0xFFFF,
    34 };
    34 };