diff options
author | truelight <truelight@openttd.org> | 2005-01-12 11:21:28 +0000 |
---|---|---|
committer | truelight <truelight@openttd.org> | 2005-01-12 11:21:28 +0000 |
commit | a243285af4aa15923c5f2905a01a101603f72517 (patch) | |
tree | 23a6d3557feb58903656bb5447653052cda86af7 /signs.h | |
parent | ff23795f5be95d273c2168d71cbc25fa7fff1c3e (diff) | |
download | openttd-a243285af4aa15923c5f2905a01a101603f72517.tar.xz |
(svn r1486) -Codechange: moved all 'signs' stuff to signs.c/h and prepared it for
dynamic arrays
Diffstat (limited to 'signs.h')
-rw-r--r-- | signs.h | 33 |
1 files changed, 33 insertions, 0 deletions
diff --git a/signs.h b/signs.h new file mode 100644 index 000000000..4fffbb7b2 --- /dev/null +++ b/signs.h @@ -0,0 +1,33 @@ +#ifndef SIGNS_H +#define SIGNS_H + +typedef struct SignStruct { + StringID str; + ViewportSign sign; + int32 x; + int32 y; + byte z; + + uint16 index; +} SignStruct; + +VARDEF SignStruct _sign_list[40]; +VARDEF uint _sign_size; + +static inline SignStruct *GetSign(uint index) +{ + assert(index < _sign_size); + return &_sign_list[index]; +} + +#define FOR_ALL_SIGNS(s) for(s = _sign_list; s != &_sign_list[_sign_size]; s++) + +VARDEF SignStruct *_new_sign_struct; + +void UpdateAllSignVirtCoords(); +void PlaceProc_Sign(uint tile); + +/* misc.c */ +void ShowRenameSignWindow(SignStruct *ss); + +#endif /* SIGNS_H */ |