Allow station cargo histories to record larger values than 64k

See: #414
This commit is contained in:
Jonathan G Rennison
2022-09-06 23:03:46 +01:00
parent 1d93cd59e7
commit 5a39734a1c
5 changed files with 14 additions and 4 deletions

View File

@@ -23,6 +23,7 @@
#include "currency.h"
#include "zoom_func.h"
#include "unit_conversion.h"
#include "core/math_func.hpp"
#include "widgets/graph_widget.h"
@@ -1847,7 +1848,7 @@ struct StationCargoGraphWindow final : BaseGraphWindow {
uint offset = station->station_cargo_history_offset;
for (uint j = 0; j < MAX_STATION_CARGO_HISTORY_DAYS; j++) {
this->cost[i][j] = history[offset];
this->cost[i][j] = RXDecompressUint(history[offset]);
offset++;
if (offset == MAX_STATION_CARGO_HISTORY_DAYS) offset = 0;
}