(svn r6050) -Codechange: mass-renamed SignStruct -> Sign and ss -> si. Now functions and variables all match eachother

This commit is contained in:
truelight
2006-08-22 16:38:50 +00:00
parent c0f352670a
commit b34d77ca3f
8 changed files with 144 additions and 143 deletions

21
signs.h
View File

@@ -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 */