signs_base.h
Go to the documentation of this file.00001
00002
00003
00004
00005
00006
00007
00008
00009
00012 #ifndef SIGNS_BASE_H
00013 #define SIGNS_BASE_H
00014
00015 #include "signs_type.h"
00016 #include "viewport_type.h"
00017 #include "core/pool_type.hpp"
00018 #include "company_type.h"
00019
00020 typedef Pool<Sign, SignID, 16, 64000> SignPool;
00021 extern SignPool _sign_pool;
00022
00023 struct Sign : SignPool::PoolItem<&_sign_pool> {
00024 char *name;
00025 ViewportSign sign;
00026 int32 x;
00027 int32 y;
00028 byte z;
00029 OwnerByte owner;
00030
00034 Sign(Owner owner = INVALID_OWNER);
00035
00037 ~Sign();
00038
00039 void UpdateVirtCoord();
00040 };
00041
00042 #define FOR_ALL_SIGNS_FROM(var, start) FOR_ALL_ITEMS_FROM(Sign, sign_index, var, start)
00043 #define FOR_ALL_SIGNS(var) FOR_ALL_SIGNS_FROM(var, 0)
00044
00045 #endif