|
OpenTTD Source 20251019-master-g9f7f314f81
|
Misc functions that shouldn't be here. More...
#include "stdafx.h"#include "landscape.h"#include "news_func.h"#include "ai/ai.hpp"#include "script/script_gui.h"#include "newgrf.h"#include "newgrf_house.h"#include "economy_func.h"#include "timer/timer_game_calendar.h"#include "timer/timer_game_economy.h"#include "timer/timer_game_tick.h"#include "texteff.hpp"#include "gfx_func.h"#include "gamelog.h"#include "animated_tile_func.h"#include "tilehighlight_func.h"#include "network/network_func.h"#include "window_func.h"#include "core/pool_type.hpp"#include "game/game.hpp"#include "linkgraph/linkgraphschedule.h"#include "station_kdtree.h"#include "town_kdtree.h"#include "viewport_kdtree.h"#include "newgrf_profiling.h"#include "3rdparty/monocypher/monocypher.h"#include "safeguards.h"Go to the source code of this file.
Functions | |
| void | MakeNewgameSettingsLive () |
| void | InitializeSound () |
| void | InitializeMusic () |
| Prepare the music system for use. | |
| void | InitializeVehicles () |
| void | InitializeRailGui () |
| Initialize rail building GUI settings. | |
| void | InitializeRoadGui () |
| void | InitializeAirportGui () |
| void | InitializeDockGui () |
| void | InitializeGraphGui () |
| void | InitializeObjectGui () |
| Reset all data of the object GUI. | |
| void | InitializeTownGui () |
| void | InitializeIndustries () |
| void | InitializeObjects () |
| Initialize/reset the objects. | |
| void | InitializeTrees () |
| void | InitializeCompanies () |
| Initialize the pool of companies. | |
| void | InitializeCheats () |
| Reinitialise all the cheats. | |
| void | InitializeOldNames () |
| Initialize the old names table memory. | |
| std::string | GenerateUid (std::string_view subject) |
| Generate an unique ID. | |
| void | GenerateSavegameId () |
| Generate an unique savegame ID. | |
| void | InitializeGame (uint size_x, uint size_y, bool reset_date, bool reset_settings) |
Variables | |
| TileIndex | _cur_tileloop_tile |
Misc functions that shouldn't be here.
Definition in file misc.cpp.
| void GenerateSavegameId | ( | ) |
Generate an unique savegame ID.
Definition at line 87 of file misc.cpp.
References _game_session_stats, GenerateUid(), and GameSessionStats::savegame_id.
Referenced by AfterLoadGame().
| std::string GenerateUid | ( | std::string_view | subject | ) |
Generate an unique ID.
It isn't as much of an unique ID but more a hashed digest of a random string and a time. It is very likely to be unique, but it does not follow any UUID standard.
Definition at line 66 of file misc.cpp.
References FormatArrayAsHex(), and RandomBytesWithFallback().
Referenced by GenerateSavegameId().
| void InitializeAirportGui | ( | ) |
Definition at line 632 of file airport_gui.cpp.
| void InitializeCheats | ( | ) |
| void InitializeCompanies | ( | ) |
Initialize the pool of companies.
Definition at line 684 of file company_cmd.cpp.
References _cur_company_tick_index.
| void InitializeDockGui | ( | ) |
Definition at line 609 of file dock_gui.cpp.
| void InitializeGame | ( | uint | size_x, |
| uint | size_y, | ||
| bool | reset_date, | ||
| bool | reset_settings | ||
| ) |
| void InitializeGraphGui | ( | ) |
Definition at line 2070 of file graph_gui.cpp.
| void InitializeIndustries | ( | ) |
Definition at line 3106 of file industry_cmd.cpp.
| void InitializeMusic | ( | ) |
Prepare the music system for use.
Called from InitializeGame
Definition at line 472 of file music_gui.cpp.
References MusicSystem::BuildPlaylists().
| void InitializeObjectGui | ( | ) |
Reset all data of the object GUI.
Definition at line 435 of file object_gui.cpp.
References _object_gui, OBJECT_CLASS_BEGIN, and ObjectPickerSelection::sel_class.
| void InitializeObjects | ( | ) |
Initialize/reset the objects.
Definition at line 73 of file object_cmd.cpp.
References Object::ResetTypeCounts().
| void InitializeOldNames | ( | ) |
Initialize the old names table memory.
Definition at line 108 of file strings_sl.cpp.
References _old_name_array, and NUM_OLD_STRINGS.
| void InitializeRailGui | ( | ) |
Initialize rail building GUI settings.
Definition at line 1910 of file rail_gui.cpp.
References _build_depot_direction, _station_gui, _waypoint_gui, DIAGDIR_NW, WaypointPickerSelection::sel_class, StationPickerSelection::sel_class, WaypointPickerSelection::sel_type, StationPickerSelection::sel_type, STAT_CLASS_DFLT, and STAT_CLASS_WAYP.
| void InitializeRoadGui | ( | ) |
Definition at line 1744 of file road_gui.cpp.
| void InitializeTownGui | ( | ) |
Definition at line 1358 of file town_gui.cpp.
| void InitializeTrees | ( | ) |
Definition at line 1008 of file tree_cmd.cpp.
| void InitializeVehicles | ( | ) |
Definition at line 668 of file vehicle.cpp.
|
extern |
Definition at line 352 of file openttd.cpp.
|
extern |
Definition at line 787 of file landscape.cpp.