equal
deleted
inserted
replaced
16 SignID index; |
16 SignID index; |
17 } Sign; |
17 } Sign; |
18 |
18 |
19 DECLARE_OLD_POOL(Sign, Sign, 2, 16000) |
19 DECLARE_OLD_POOL(Sign, Sign, 2, 16000) |
20 |
20 |
21 static inline SignID GetMaxSignIndex(void) |
21 static inline SignID GetMaxSignIndex() |
22 { |
22 { |
23 /* TODO - This isn't the real content of the function, but |
23 /* TODO - This isn't the real content of the function, but |
24 * with the new pool-system this will be replaced with one that |
24 * with the new pool-system this will be replaced with one that |
25 * _really_ returns the highest index. Now it just returns |
25 * _really_ returns the highest index. Now it just returns |
26 * the next safe value we are sure about everything is below. |
26 * the next safe value we are sure about everything is below. |
27 */ |
27 */ |
28 return GetSignPoolSize() - 1; |
28 return GetSignPoolSize() - 1; |
29 } |
29 } |
30 |
30 |
31 static inline uint GetNumSigns(void) |
31 static inline uint GetNumSigns() |
32 { |
32 { |
33 return GetSignPoolSize(); |
33 return GetSignPoolSize(); |
34 } |
34 } |
35 |
35 |
36 /** |
36 /** |
57 #define FOR_ALL_SIGNS_FROM(ss, start) for (ss = GetSign(start); ss != NULL; ss = (ss->index + 1U < GetSignPoolSize()) ? GetSign(ss->index + 1U) : NULL) if (IsValidSign(ss)) |
57 #define FOR_ALL_SIGNS_FROM(ss, start) for (ss = GetSign(start); ss != NULL; ss = (ss->index + 1U < GetSignPoolSize()) ? GetSign(ss->index + 1U) : NULL) if (IsValidSign(ss)) |
58 #define FOR_ALL_SIGNS(ss) FOR_ALL_SIGNS_FROM(ss, 0) |
58 #define FOR_ALL_SIGNS(ss) FOR_ALL_SIGNS_FROM(ss, 0) |
59 |
59 |
60 VARDEF bool _sign_sort_dirty; |
60 VARDEF bool _sign_sort_dirty; |
61 |
61 |
62 void UpdateAllSignVirtCoords(void); |
62 void UpdateAllSignVirtCoords(); |
63 void PlaceProc_Sign(TileIndex tile); |
63 void PlaceProc_Sign(TileIndex tile); |
64 |
64 |
65 /* misc.c */ |
65 /* misc.c */ |
66 void ShowRenameSignWindow(const Sign *si); |
66 void ShowRenameSignWindow(const Sign *si); |
67 |
67 |
68 void ShowSignList(void); |
68 void ShowSignList(); |
69 |
69 |
70 #endif /* SIGNS_H */ |
70 #endif /* SIGNS_H */ |