|
OpenTTD Source
1.10.0-RC1
|
Class for temporary storage of data. More...
#include <newgrf_storage.h>
Public Member Functions | |
| TemporaryStorageArray () | |
| Simply construct the array. | |
| void | StoreValue (uint pos, int32 value) |
| Stores some value at a given position. More... | |
| TYPE | GetValue (uint pos) const |
| Gets the value from a given position. More... | |
| void | ClearChanges () |
Data Fields | |
| TYPE | storage [SIZE] |
| Memory to for the storage array. | |
| uint16 | init [SIZE] |
| Storage has been assigned, if this equals 'init_key'. | |
| uint16 | init_key |
| Magic key to 'init'. | |
Class for temporary storage of data.
On #ClearChanges that data is always zero-ed.
| TYPE | the type of variable to store. |
| SIZE | the size of the array. |
Definition at line 150 of file newgrf_storage.h.
|
inline |
Gets the value from a given position.
| pos | the position to get the data from |
Definition at line 182 of file newgrf_storage.h.
References AddChangedPersistentStorage(), and BasePersistentStorageArray::ClearChanges().
|
inline |
Stores some value at a given position.
| pos | the position to write at |
| value | the value to write |
Definition at line 168 of file newgrf_storage.h.