diff options
author | truelight <truelight@openttd.org> | 2006-08-26 19:29:35 +0000 |
---|---|---|
committer | truelight <truelight@openttd.org> | 2006-08-26 19:29:35 +0000 |
commit | 42454e722a9a5f66e3405c11bea24ae71bfc49a5 (patch) | |
tree | 677f2bfad054045fd1aaa3d5e751e367223aa80f | |
parent | 3a8c149982463d2f87f497222ecd64a78fac459f (diff) | |
download | openttd-42454e722a9a5f66e3405c11bea24ae71bfc49a5.tar.xz |
(svn r6153) -Codechange: DeleteSign removes a sign from the pool
-Codechange: DestroySign is called by DeleteSign to remove all things where a sign depends on.
Last 2 changes to prepare for new pool system. Not pretty now, will be soon.
-rw-r--r-- | signs.c | 8 | ||||
-rw-r--r-- | signs.h | 4 |
2 files changed, 10 insertions, 2 deletions
@@ -103,7 +103,13 @@ static Sign *AllocateSign(void) return NULL; } -/** Place a sign at the given coordinates. Ownership of sign has +void DestroySign(Sign *si) +{ + DeleteName(si->str); +} + +/** + * Place a sign at the given coordinates. Ownership of sign has * no effect whatsoever except for the colour the sign gets for easy recognition, * but everybody is able to rename/remove it. * @param tile tile to place sign at @@ -57,9 +57,11 @@ static inline bool IsValidSignID(uint index) return index < GetSignPoolSize() && IsValidSign(GetSign(index)); } +void DestroySign(Sign *si); + static inline void DeleteSign(Sign *si) { - DeleteName(si->str); + DestroySign(si); si->str = STR_NULL; } |