12 #include "../stdafx.h" 13 #include "../cargomonitor.h" 17 #include "../safeguards.h" 40 storage.number = iter->first;
41 storage.amount = iter->second;
44 SlObject(&storage, _cargomonitor_pair_desc);
59 SlObject(&storage, _cargomonitor_pair_desc);
61 std::pair<CargoMonitorID, uint32> p(storage.number, storage.amount);
75 storage.number = iter->first;
76 storage.amount = iter->second;
79 SlObject(&storage, _cargomonitor_pair_desc);
94 SlObject(&storage, _cargomonitor_pair_desc);
96 std::pair<CargoMonitorID, uint32> p(storage.number, storage.amount);
Temporary storage of cargo monitoring data for loading or saving it.
Functions/types related to saving and loading games.
static const SaveLoad _cargomonitor_pair_desc[]
Description of the TempStorage structure for the purpose of load and save.
CargoMonitorMap _cargo_deliveries
Map of monitored deliveries to the amount since last query/activation.
static void SavePickup()
Save the _cargo_pickups monitoring map.
void ClearCargoPickupMonitoring(CompanyID company)
Clear all pick-up cargo monitors.
static void SaveDelivery()
Save the _cargo_deliveries monitoring map.
int SlIterateArray()
Iterate through the elements of an array and read the whole thing.
void ClearCargoDeliveryMonitoring(CompanyID company)
Clear all delivery cargo monitors.
Handlers and description of chunk.
uint32 CargoMonitorID
Unique number for a company / cargo type / (town or industry).
#define SLE_END()
End marker of a struct/class save or load.
CargoMonitorMap _cargo_pickups
Map of monitored pick-ups to the amount since last query/activation.
const ChunkHandler _cargomonitor_chunk_handlers[]
Chunk definition of the cargomonitoring maps.
static void LoadDelivery()
Load the _cargo_deliveries monitoring map.
void SlObject(void *object, const SaveLoad *sld)
Main SaveLoad function.
#define SLE_VAR(base, variable, type)
Storage of a variable in every version of a savegame.
static void LoadPickup()
Load the _cargo_pickups monitoring map.
Last chunk in this array.