summaryrefslogtreecommitdiff
path: root/signs.h
diff options
context:
space:
mode:
Diffstat (limited to 'signs.h')
-rw-r--r--signs.h21
1 files changed, 10 insertions, 11 deletions
diff --git a/signs.h b/signs.h
index 726fa2695..78d1e32e4 100644
--- a/signs.h
+++ b/signs.h
@@ -5,26 +5,25 @@
#include "pool.h"
-typedef struct SignStruct {
+typedef struct Sign {
StringID str;
ViewportSign sign;
int32 x;
int32 y;
byte z;
- PlayerID owner; // placed by this player. Anyone can delete them though.
- // OWNER_NONE for gray signs from old games.
+ PlayerID owner; // placed by this player. Anyone can delete them though. OWNER_NONE for gray signs from old games.
- uint16 index;
-} SignStruct;
+ SignID index;
+} Sign;
extern MemoryPool _sign_pool;
/**
* Get the pointer to the sign with index 'index'
*/
-static inline SignStruct *GetSign(uint index)
+static inline Sign *GetSign(SignID index)
{
- return (SignStruct*)GetItemFromPool(&_sign_pool, index);
+ return (Sign *)GetItemFromPool(&_sign_pool, index);
}
/**
@@ -43,21 +42,21 @@ static inline bool IsSignIndex(uint index)
/**
* Check if a Sign really exists.
*/
-static inline bool IsValidSign(const SignStruct* ss)
+static inline bool IsValidSign(const Sign *si)
{
- return ss->str != STR_NULL;
+ return si->str != STR_NULL;
}
#define FOR_ALL_SIGNS_FROM(ss, start) for (ss = GetSign(start); ss != NULL; ss = (ss->index + 1 < GetSignPoolSize()) ? GetSign(ss->index + 1) : NULL) if (IsValidSign(ss))
#define FOR_ALL_SIGNS(ss) FOR_ALL_SIGNS_FROM(ss, 0)
VARDEF bool _sign_sort_dirty;
-VARDEF uint16 *_sign_sort;
+VARDEF SignID *_sign_sort;
void UpdateAllSignVirtCoords(void);
void PlaceProc_Sign(TileIndex tile);
/* misc.c */
-void ShowRenameSignWindow(const SignStruct *ss);
+void ShowRenameSignWindow(const Sign *si);
#endif /* SIGNS_H */