summaryrefslogtreecommitdiff
path: root/signs.h
diff options
context:
space:
mode:
authortruelight <truelight@openttd.org>2006-08-22 16:38:50 +0000
committertruelight <truelight@openttd.org>2006-08-22 16:38:50 +0000
commitb34d77ca3fe5236378e116eba3e4f6402eb89609 (patch)
treedc441269644e5f08879ff06482e03b5deb80d491 /signs.h
parentc0f352670ac91977145a3a9df44e5cabfb9c49b6 (diff)
downloadopenttd-b34d77ca3fe5236378e116eba3e4f6402eb89609.tar.xz
(svn r6050) -Codechange: mass-renamed SignStruct -> Sign and ss -> si. Now functions and variables all match eachother
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 */