OpenTTD Source 20241224-master-gf74b0cf984
|
Functionality related to the temporary and persistent storage arrays for NewGRFs. More...
#include "stdafx.h"
#include "newgrf_storage.h"
#include "core/pool_func.hpp"
#include "core/endian_func.hpp"
#include "debug.h"
#include "safeguards.h"
Go to the source code of this file.
Functions | |
void | AddChangedPersistentStorage (BasePersistentStorageArray *storage) |
Add the changed storage array to the list of changed arrays. | |
Variables | |
PersistentStoragePool | _persistent_storage_pool ("PersistentStorage") |
static std::set< BasePersistentStorageArray * > * | _changed_storage_arrays = new std::set<BasePersistentStorageArray*> |
The changed storage arrays. | |
Functionality related to the temporary and persistent storage arrays for NewGRFs.
Definition in file newgrf_storage.cpp.
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().
|
static |
The changed storage arrays.
Definition at line 22 of file newgrf_storage.cpp.
Referenced by AddChangedPersistentStorage(), BasePersistentStorageArray::SwitchMode(), and BasePersistentStorageArray::~BasePersistentStorageArray().