Functions

newgrf_town.h File Reference

Functions to handle the town part of NewGRF towns. More...

#include "town_type.h"

Go to the source code of this file.

Functions

uint32 TownGetVariable (byte variable, uint32 parameter, bool *available, Town *t, const GRFFile *caller_grffile)
 This function implements the town variables that newGRF defines.
void TownStorePSA (Town *t, const GRFFile *caller_grffile, uint pos, int32 value)
 Store a value in town persistent storage.

Detailed Description

Functions to handle the town part of NewGRF towns.

Definition in file newgrf_town.h.


Function Documentation

uint32 TownGetVariable ( byte  variable,
uint32  parameter,
bool *  available,
Town t,
const GRFFile caller_grffile 
)
void TownStorePSA ( Town t,
const GRFFile caller_grffile,
uint  pos,
int32  value 
)

Store a value in town persistent storage.

Parameters:
t Town owning the persistent storage.
caller_grffile GRFFile of the entity that wants to use the storage.
pos Position to write at.
value Value to write.
Returns:
the value stored in the corresponding variable

Definition at line 138 of file newgrf_town.cpp.

References Pool< Titem, Tindex, Tgrowth_step, Tmax_size, Tpool_type, Tcache, Tzero >::PoolItem<&_persistent_storage_pool >::CanAllocateItem(), GetRegister(), and PersistentStorageArray< TYPE, SIZE >::StoreValue().

Referenced by HouseStorePSA(), IndustryStorePSA(), ObjectStorePSA(), and StationStorePSA().