|
OpenTTD Source 20251104-master-g3befbdd52f
|
Implementation of functions for storing historical data. More...
#include "../stdafx.h"#include "../core/bitmath_func.hpp"#include "history_type.hpp"#include "history_func.hpp"#include "../safeguards.h"Go to the source code of this file.
Functions | |
| void | UpdateValidHistory (ValidHistoryMask &valid_history, const HistoryRange &hr, uint cur_month) |
| Update mask of valid records for a historical data. | |
| bool | IsValidHistory (ValidHistoryMask valid_history, const HistoryRange &hr, uint age) |
| Test if history data is valid, without extracting data. | |
Implementation of functions for storing historical data.
Definition in file history.cpp.
| bool IsValidHistory | ( | ValidHistoryMask | valid_history, |
| const HistoryRange & | hr, | ||
| uint | age | ||
| ) |
Test if history data is valid, without extracting data.
| valid_history | Mask of valid history records. |
| hr | History range to test. |
| age | Age of data to test. |
Definition at line 47 of file history.cpp.
References HistoryRange::division, HistoryRange::first, HasBit(), IsValidHistory(), TimerGameEconomy::month, and HistoryRange::periods.
Referenced by FillFromHistory(), and IsValidHistory().
| void UpdateValidHistory | ( | ValidHistoryMask & | valid_history, |
| const HistoryRange & | hr, | ||
| uint | cur_month | ||
| ) |
Update mask of valid records for a historical data.
| [in,out] | valid_history | Valid history records. |
| hr | History range to update mask for. | |
| cur_month | Current economy month. |
Definition at line 25 of file history.cpp.
References HistoryRange::division, HistoryRange::first, GB(), HasBit(), HistoryRange::last, HistoryRange::records, SB(), HistoryRange::total_division, and UpdateValidHistory().
Referenced by DoCreateNewIndustry(), UpdateIndustryStatistics(), and UpdateValidHistory().