OpenTTD Source
20240917-master-g9ab0a47812
|
Go to the documentation of this file.
17 #include "viewport_kdtree.h"
19 #include "table/strings.h"
53 this->sign.
UpdatePosition(pt.x, pt.y - 6 * ZOOM_BASE, STR_WHITE_SIGN);
55 _viewport_sign_kdtree.
Insert(ViewportSignKdtreeItem::MakeSign(this->
index));
62 si->UpdateVirtCoord();
@ OWNER_DEITY
The object is owned by a superuser / goal script.
Owner
Enum for all companies/owners.
Tindex index
Index of this pool item.
SignPool _sign_pool("Sign")
Initialize the sign-pool.
void Remove(const T &element)
Remove a single element from the tree, if it exists.
void Insert(const T &element)
Insert a single element in the tree.
void UpdateVirtCoord()
Update the coordinate of one sign.
void UpdateAllSignVirtCoords()
Update the coordinates of all signs.
Coordinates of a point in 2D.
bool CompanyCanRenameSign(const Sign *si)
Check if the current company can rename a given sign.
CompanyID _current_company
Company currently doing an action.
static Pool::IterateWrapper< Titem > Iterate(size_t from=0)
Returns an iterable ensemble of all valid Titem.
Base class for all pools.
void UpdatePosition(int center, int top, StringID str, StringID str_small=STR_NULL)
Update the position of the viewport sign.
void SetDParam(size_t n, uint64_t v)
Set a string parameter v at index n in the global string parameter array.
static bool CleaningPool()
Returns current state of pool cleaning - yes or no.
bool kdtree_valid
Are the sign data valid for use with the _viewport_sign_kdtree?
#define INSTANTIATE_POOL_METHODS(name)
Force instantiation of pool methods so we don't get linker errors.
void DeleteRenameSignWindow(SignID sign)
Close the sign window associated with the given sign.
Point RemapCoords(int x, int y, int z)
Map 3D world or tile coordinate to equivalent 2D coordinate as used in the viewports and smallmap.