OpenTTD Source 20241224-master-gf74b0cf984
|
Functionality related to the temporary and persistent storage arrays for NewGRFs. More...
Go to the source code of this file.
Data Structures | |
struct | BasePersistentStorageArray |
Base class for all persistent NewGRF storage arrays. More... | |
struct | PersistentStorageArray< TYPE, SIZE > |
Class for persistent storage of data. More... | |
struct | TemporaryStorageArray< TYPE, SIZE > |
Class for temporary storage of data. More... | |
struct | PersistentStorage |
Class for pooled persistent storage of data. More... | |
Typedefs | |
typedef PersistentStorageArray< int32_t, 16 > | OldPersistentStorage |
typedef uint32_t | PersistentStorageID |
typedef Pool< PersistentStorage, PersistentStorageID, 1, 0xFF000 > | PersistentStoragePool |
Enumerations | |
enum | PersistentStorageMode { PSM_ENTER_GAMELOOP , PSM_LEAVE_GAMELOOP , PSM_ENTER_COMMAND , PSM_LEAVE_COMMAND , PSM_ENTER_TESTMODE , PSM_LEAVE_TESTMODE } |
Mode switches to the behaviour of persistent storage array. More... | |
Functions | |
void | AddChangedPersistentStorage (BasePersistentStorageArray *storage) |
Add the changed storage array to the list of changed arrays. | |
Variables | |
PersistentStoragePool | _persistent_storage_pool |
Functionality related to the temporary and persistent storage arrays for NewGRFs.
Definition in file newgrf_storage.h.
typedef PersistentStorageArray<int32_t, 16> OldPersistentStorage |
Definition at line 187 of file newgrf_storage.h.
typedef uint32_t PersistentStorageID |
Definition at line 189 of file newgrf_storage.h.
typedef Pool<PersistentStorage, PersistentStorageID, 1, 0xFF000> PersistentStoragePool |
Definition at line 192 of file newgrf_storage.h.
Mode switches to the behaviour of persistent storage array.
Definition at line 20 of file newgrf_storage.h.
void AddChangedPersistentStorage | ( | BasePersistentStorageArray * | storage | ) |
Add the changed storage array to the list of changed arrays.
This is done so we only have to revert/save the changed arrays, which saves quite a few clears, etc. after callbacks.
storage | the array that has changed |
Definition at line 42 of file newgrf_storage.cpp.
References _changed_storage_arrays.
Referenced by PersistentStorageArray< TYPE, SIZE >::StoreValue().