diff options
author | Niels Martin Hansen <nielsm@indvikleren.dk> | 2020-01-26 13:45:51 +0100 |
---|---|---|
committer | GitHub <noreply@github.com> | 2020-01-26 13:45:51 +0100 |
commit | c8779fb311c2665d3fc45c18b2f3460cd998d179 (patch) | |
tree | 15321da1e265a40fce50700182b218a87494d24a /src/misc.cpp | |
parent | f88ac83408bff58022699b4d9488818d509ef974 (diff) | |
download | openttd-c8779fb311c2665d3fc45c18b2f3460cd998d179.tar.xz |
Feature: NewGRF callback profiling (#7868)
Adds a console command newgrf_profile to collect some profiling data about NewGRF action 2 callbacks and produce a CSV file.
Diffstat (limited to 'src/misc.cpp')
-rw-r--r-- | src/misc.cpp | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/src/misc.cpp b/src/misc.cpp index c56eb6a38..dcb04fa02 100644 --- a/src/misc.cpp +++ b/src/misc.cpp @@ -29,6 +29,7 @@ #include "station_kdtree.h" #include "town_kdtree.h" #include "viewport_kdtree.h" +#include "newgrf_profiling.h" #include "safeguards.h" @@ -69,6 +70,8 @@ void InitializeGame(uint size_x, uint size_y, bool reset_date, bool reset_settin _thd.redsq = INVALID_TILE; if (reset_settings) MakeNewgameSettingsLive(); + _newgrf_profilers.clear(); + if (reset_date) { SetDate(ConvertYMDToDate(_settings_game.game_creation.starting_year, 0, 1), 0); InitializeOldNames(); |