16
0
mirror of https://github.com/MaSzyna-EU07/maszyna.git synced 2026-07-21 17:09:19 +02:00

reformat: remove redundant qualifiers

This commit is contained in:
jerrrrycho
2026-07-04 05:34:23 +02:00
parent 20e7a99516
commit cf9fb07800
98 changed files with 2290 additions and 2290 deletions

View File

@@ -81,24 +81,24 @@ state_manager::init_scripting_interface() {
0, -1,
"__simulation.weather",
"memcell" } );
simulation::Memory.insert( memorycell );
simulation::Region->insert( memorycell );
Memory.insert( memorycell );
Region->insert( memorycell );
}
{
auto *memorycell = new TMemCell( {
0, -1,
"__simulation.time",
"memcell" } );
simulation::Memory.insert( memorycell );
simulation::Region->insert( memorycell );
Memory.insert( memorycell );
Region->insert( memorycell );
}
{
auto *memorycell = new TMemCell( {
0, -1,
"__simulation.date",
"memcell" } );
simulation::Memory.insert( memorycell );
simulation::Region->insert( memorycell );
Memory.insert( memorycell );
Region->insert( memorycell );
}
}
@@ -112,15 +112,15 @@ state_manager::update( double const Deltatime, int Iterationcount ) {
// NOTE: we perform animations first, as they can determine factors like contact with powergrid
TAnimModel::AnimUpdate( totaltime ); // wykonanie zakolejkowanych animacji
simulation::Powergrid.update( totaltime );
simulation::Vehicles.update( Deltatime, Iterationcount );
Powergrid.update( totaltime );
Vehicles.update( Deltatime, Iterationcount );
}
void
state_manager::update_clocks() {
// Ra 2014-07: przeliczenie kąta czasu (do animacji zależnych od czasu)
auto const &time = simulation::Time.data();
auto const &time = Time.data();
Global.fTimeAngleDeg = time.wHour * 15.0 + time.wMinute * 0.25 + (time.wSecond + 0.001 * time.wMilliseconds) / 240.0;
Global.fClockAngleDeg[ 0 ] = 36.0 * ( time.wSecond % 10 ); // jednostki sekund
Global.fClockAngleDeg[ 1 ] = 36.0 * ( time.wSecond / 10 ); // dziesiątki sekund
@@ -137,11 +137,11 @@ state_manager::update_scripting_interface() {
auto *time{ Memory.find( "__simulation.time" ) };
auto *date{ Memory.find( "__simulation.date" ) };
if( simulation::is_ready ) {
if( is_ready ) {
// potentially adjust weather
if( weather->Value1() != m_scriptinginterface.weather->Value1() ) {
Global.Overcast = std::clamp( (float)weather->Value1(), 0.f, 2.f );
simulation::Environment.compute_weather();
Environment.compute_weather();
}
if( weather->Value2() != m_scriptinginterface.weather->Value2() ) {
Global.fFogEnd = std::clamp( (float)weather->Value2(), 10.f, 25000.f );
@@ -182,7 +182,7 @@ void state_manager::process_commands() {
command_data commanddata;
while( Commands.pop( commanddata, (uint32_t)command_target::simulation )) {
if (commanddata.command == user_command::consistreleaser) {
TDynamicObject *found_vehicle = simulation::Vehicles.find(commanddata.payload);
TDynamicObject *found_vehicle = Vehicles.find(commanddata.payload);
TDynamicObject *vehicle = found_vehicle;
while (vehicle) {
@@ -232,15 +232,15 @@ void state_manager::process_commands() {
continue;
// NOTE: because malformed scenario can have vehicle name duplicates we first try to locate vehicle in world, with name search as fallback
auto targetvehicle = std::get<TDynamicObject *>( simulation::Region->find_vehicle( commanddata.location, 50, false, false ) );
auto targetvehicle = std::get<TDynamicObject *>( Region->find_vehicle( commanddata.location, 50, false, false ) );
if( targetvehicle == nullptr || targetvehicle->name() != commanddata.payload ) {
targetvehicle = simulation::Vehicles.find( commanddata.payload );
targetvehicle = Vehicles.find( commanddata.payload );
}
if (!targetvehicle)
continue;
auto *senderlocaltrain { simulation::Trains.find_id( static_cast<std::uint16_t>( commanddata.param2 ) ) };
auto *senderlocaltrain { Trains.find_id( static_cast<std::uint16_t>( commanddata.param2 ) ) };
if( senderlocaltrain ) {
auto *currentvehicle { senderlocaltrain->Dynamic() };
auto const samevehicle { currentvehicle == targetvehicle };
@@ -270,14 +270,14 @@ void state_manager::process_commands() {
}
}
auto *train { simulation::Trains.find( targetvehicle->name() ) };
auto *train { Trains.find( targetvehicle->name() ) };
if (train)
continue;
train = new TTrain();
if (train->Init(targetvehicle)) {
simulation::Trains.insert(train);
Trains.insert(train);
}
else {
delete train;
@@ -301,7 +301,7 @@ void state_manager::process_commands() {
basic_event *ev = Events.FindEvent(event_name);
TDynamicObject *vehicle = nullptr;
if (!vehicle_name.empty())
vehicle = simulation::Vehicles.find(vehicle_name);
vehicle = Vehicles.find(vehicle_name);
if (ev)
Events.AddToQuery(ev, vehicle);
@@ -310,7 +310,7 @@ void state_manager::process_commands() {
if (commanddata.command == user_command::setlight) {
int light = std::round(commanddata.param1);
float state = commanddata.param2;
TAnimModel *model = simulation::Instances.find(commanddata.payload);
TAnimModel *model = Instances.find(commanddata.payload);
if (model)
model->LightSet(light, state);
}
@@ -318,29 +318,29 @@ void state_manager::process_commands() {
if (commanddata.command == user_command::setdatetime) {
int yearday = std::round(commanddata.param1);
int minute = std::round(commanddata.param2);
simulation::Time.set_time(yearday, minute);
Time.set_time(yearday, minute);
auto const weather { Global.Weather };
simulation::Environment.compute_season(yearday);
Environment.compute_season(yearday);
if( weather != Global.Weather ) {
// HACK: force re-calculation of precipitation
Global.Overcast = std::clamp( Global.Overcast - 0.0001f, 0.0f, 2.0f );
}
simulation::Environment.update_moon();
Environment.update_moon();
}
if (commanddata.command == user_command::setweather) {
Global.fFogEnd = commanddata.param1;
Global.Overcast = commanddata.param2;
simulation::Environment.compute_weather();
Environment.compute_weather();
}
if (commanddata.command == user_command::settemperature) {
Global.AirTemperature = commanddata.param1;
Global.Overcast = commanddata.param2;
simulation::Environment.compute_weather();
Environment.compute_weather();
}
if (commanddata.command == user_command::insertmodel) {
@@ -351,21 +351,21 @@ void state_manager::process_commands() {
std::getline(ss, name, ':');
std::getline(ss, data, ':');
TAnimModel *model = simulation::State.create_model(data, name, commanddata.location);
simulation::State.create_eventlauncher("node -1 0 launcher eventlauncher 0 0 0 0.8 none -10000.0 obstacle_collision traintriggered end", name + "_snd", commanddata.location);
TAnimModel *model = State.create_model(data, name, commanddata.location);
State.create_eventlauncher("node -1 0 launcher eventlauncher 0 0 0 0.8 none -10000.0 obstacle_collision traintriggered end", name + "_snd", commanddata.location);
}
if (commanddata.command == user_command::deletemodel) {
simulation::State.delete_model(simulation::Instances.find(commanddata.payload));
simulation::State.delete_eventlauncher(simulation::Events.FindEventlauncher(commanddata.payload + "_snd"));
State.delete_model(Instances.find(commanddata.payload));
State.delete_eventlauncher(Events.FindEventlauncher(commanddata.payload + "_snd"));
}
if (commanddata.command == user_command::globalradiostop) {
simulation::Region->RadioStop( commanddata.location );
Region->RadioStop( commanddata.location );
}
if (commanddata.command == user_command::resetconsist) {
TDynamicObject *found_vehicle = simulation::Vehicles.find(commanddata.payload);
TDynamicObject *found_vehicle = Vehicles.find(commanddata.payload);
TDynamicObject *vehicle = found_vehicle;
while (vehicle) {
@@ -404,12 +404,12 @@ void state_manager::process_commands() {
}
if (commanddata.command == user_command::fillcompressor) {
TDynamicObject *vehicle = simulation::Vehicles.find(commanddata.payload);
TDynamicObject *vehicle = Vehicles.find(commanddata.payload);
vehicle->MoverParameters->CompressedVolume = 8.0f * vehicle->MoverParameters->VeselVolume;
}
if (commanddata.command == user_command::dynamicmove) {
TDynamicObject *vehicle = simulation::Vehicles.find(commanddata.payload);
TDynamicObject *vehicle = Vehicles.find(commanddata.payload);
if (vehicle)
vehicle->move_set(commanddata.param1);
}
@@ -422,8 +422,8 @@ void state_manager::process_commands() {
std::getline(ss, vehicle_name, '%');
std::getline(ss, track_name, '%');
TTrack *track = simulation::Paths.find(track_name);
TDynamicObject *vehicle = simulation::Vehicles.find(vehicle_name);
TTrack *track = Paths.find(track_name);
TDynamicObject *vehicle = Vehicles.find(vehicle_name);
while (vehicle) {
if (vehicle->Next())
@@ -446,7 +446,7 @@ void state_manager::process_commands() {
}
if (commanddata.command == user_command::pullalarmchain) {
TDynamicObject *vehicle = simulation::Vehicles.find(commanddata.payload);
TDynamicObject *vehicle = Vehicles.find(commanddata.payload);
if (vehicle)
vehicle->MoverParameters->AlarmChainSwitch(true);
}
@@ -459,7 +459,7 @@ void state_manager::process_commands() {
std::getline(ss, vehicle_name, '%');
std::getline(ss, command, '%');
TDynamicObject *vehicle = simulation::Vehicles.find(vehicle_name);
TDynamicObject *vehicle = Vehicles.find(vehicle_name);
glm::dvec3 location = commanddata.location;
if (vehicle && vehicle->Mechanik)
vehicle->Mechanik->PutCommand(command, commanddata.param1, commanddata.param2, &location);

View File

@@ -201,7 +201,7 @@ world_environment::update() {
}
m_rainsound
.gain( m_rainsound.m_amplitudeoffset + m_rainsound.m_amplitudefactor * 1.f )
.play( sound_flags::exclusive | sound_flags::looping );
.play( exclusive | looping );
}
else {
m_rainsound.stop();

View File

@@ -44,7 +44,7 @@ state_serializer::deserialize_begin( std::string const &Scenariofile ) {
SafeDelete( Region );
Region = new scene::basic_region();
simulation::State.init_scripting_interface();
State.init_scripting_interface();
// NOTE: for the time being import from text format is a given, since we don't have full binary serialization
auto state =
@@ -177,7 +177,7 @@ state_serializer::deserialize_isolated( cParser &Input, scene::scratch_data &Scr
// ...followed by list of its tracks
while( false == (token = Input.getToken<std::string>()).empty()
&& token != "endisolated" ) {
auto *track { simulation::Paths.find( token ) };
auto *track { Paths.find( token ) };
if( track != nullptr )
track->AddIsolated( groupowner );
else
@@ -252,7 +252,7 @@ state_serializer::deserialize_atmo( cParser &Input, scene::scratch_data &Scratch
}
// overcast drives weather so do a calculation here
// NOTE: ugly, clean it up when we're done with world refactoring
simulation::Environment.compute_weather();
Environment.compute_weather();
}
while( false == token.empty()
&& token != "endatmo" ) {
@@ -342,7 +342,7 @@ state_serializer::deserialize_event( cParser &Input, scene::scratch_data &Scratc
event->deserialize( Input, Scratchpad );
if( true == simulation::Events.insert( event ) ) {
if( true == Events.insert( event ) ) {
scene::Groups.insert( scene::Groups.handle(), event );
}
else {
@@ -356,7 +356,7 @@ void state_serializer::deserialize_lua( cParser &Input, scene::scratch_data &Scr
std::string file;
Input >> file;
#ifdef WITH_LUA
simulation::Lua.interpret(Global.asCurrentSceneryPath + file);
Lua.interpret(Global.asCurrentSceneryPath + file);
#else
ErrorLog(file + ": lua scripts not supported in this build.");
#endif
@@ -377,11 +377,11 @@ state_serializer::deserialize_firstinit( cParser &Input, scene::scratch_data &Sc
}
simulation::Paths.InitTracks();
simulation::Traction.InitTraction();
simulation::Events.InitEvents();
simulation::Events.InitLaunchers();
simulation::Memory.InitCells();
Paths.InitTracks();
Traction.InitTraction();
Events.InitEvents();
Events.InitLaunchers();
Memory.InitCells();
if (!Scratchpad.time_initialized)
init_time();
@@ -390,7 +390,7 @@ state_serializer::deserialize_firstinit( cParser &Input, scene::scratch_data &Sc
}
void state_serializer::init_time() {
const auto &time = simulation::Time.data();
const auto &time = Time.data();
if( true == Global.ScenarioTimeCurrent ) {
// calculate time shift required to match scenario time with local clock
auto const *localtime = std::gmtime( &Global.starting_timestamp );
@@ -452,22 +452,22 @@ state_serializer::deserialize_node( cParser &Input, scene::scratch_data &Scratch
}
}
if( false == simulation::Vehicles.insert( vehicle ) ) {
if( false == Vehicles.insert( vehicle ) ) {
ErrorLog( "Bad scenario: duplicate vehicle name \"" + vehicle->name() + "\" defined in file \"" + Input.Name() + "\" (line " + std::to_string( inputline ) + ")" );
}
if( vehicle->MoverParameters->CategoryFlag == 1 // trains only
&& ( (vehicle->LightList(end::front) & (light::headlight_left | light::headlight_right | light::headlight_upper)) != 0
|| (vehicle->LightList(end::rear) & (light::headlight_left | light::headlight_right | light::headlight_upper)) != 0 ) ) {
simulation::Lights.insert( vehicle );
&& ( (vehicle->LightList(front) & (headlight_left | headlight_right | headlight_upper)) != 0
|| (vehicle->LightList(rear) & (headlight_left | headlight_right | headlight_upper)) != 0 ) ) {
Lights.insert( vehicle );
}
}
else if( nodedata.type == "track" ) {
auto *path { deserialize_path( Input, Scratchpad, nodedata ) };
// duplicates of named tracks are currently experimentally allowed
if( false == simulation::Paths.insert( path ) ) {
if( false == Paths.insert( path ) ) {
ErrorLog( "Bad scenario: duplicate track name \"" + path->name() + "\" defined in file \"" + Input.Name() + "\" (line " + std::to_string( inputline ) + ")" );
/*
delete path;
@@ -475,7 +475,7 @@ state_serializer::deserialize_node( cParser &Input, scene::scratch_data &Scratch
*/
}
scene::Groups.insert( scene::Groups.handle(), path );
simulation::Region->insert_and_register( path );
Region->insert_and_register( path );
}
else if( nodedata.type == "traction" ) {
@@ -483,11 +483,11 @@ state_serializer::deserialize_node( cParser &Input, scene::scratch_data &Scratch
// traction loading is optional
if( traction == nullptr ) { return; }
if( false == simulation::Traction.insert( traction ) ) {
if( false == Traction.insert( traction ) ) {
ErrorLog( "Bad scenario: duplicate traction piece name \"" + traction->name() + "\" defined in file \"" + Input.Name() + "\" (line " + std::to_string( inputline ) + ")" );
}
scene::Groups.insert( scene::Groups.handle(), traction );
simulation::Region->insert_and_register( traction );
Region->insert_and_register( traction );
}
else if( nodedata.type == "tractionpowersource" ) {
@@ -495,7 +495,7 @@ state_serializer::deserialize_node( cParser &Input, scene::scratch_data &Scratch
// traction loading is optional
if( powersource == nullptr ) { return; }
if( false == simulation::Powergrid.insert( powersource ) ) {
if( false == Powergrid.insert( powersource ) ) {
ErrorLog( "Bad scenario: duplicate power grid source name \"" + powersource->name() + "\" defined in file \"" + Input.Name() + "\" (line " + std::to_string( inputline ) + ")" );
}
/*
@@ -516,14 +516,14 @@ state_serializer::deserialize_node( cParser &Input, scene::scratch_data &Scratch
auto const cellcount = instance->TerrainCount() + 1; // zliczenie submodeli
for( auto i = 1; i < cellcount; ++i ) {
auto *submodel = instance->TerrainSquare( i - 1 );
simulation::Region->insert(
Region->insert(
scene::shape_node().convert( submodel ),
Scratchpad,
false );
// if there's more than one group of triangles in the cell they're held as children of the primary submodel
submodel = submodel->ChildGet();
while( submodel != nullptr ) {
simulation::Region->insert(
Region->insert(
scene::shape_node().convert( submodel ),
Scratchpad,
false );
@@ -553,11 +553,11 @@ state_serializer::deserialize_node( cParser &Input, scene::scratch_data &Scratch
}
}
if( false == simulation::Instances.insert( instance ) ) {
if( false == Instances.insert( instance ) ) {
ErrorLog( "Bad scenario: duplicate 3d model instance name \"" + instance->name() + "\" defined in file \"" + Input.Name() + "\" (line " + std::to_string( inputline ) + ")" );
}
scene::Groups.insert( scene::Groups.handle(), instance );
simulation::Region->insert( instance );
Region->insert( instance );
scene::basic_node *hierarchy_node = instance;
if (hierarchy_node)
{ scene::Hierarchy[hierarchy_node->uuid.to_string()] = hierarchy_node;
@@ -579,7 +579,7 @@ state_serializer::deserialize_node( cParser &Input, scene::scratch_data &Scratch
if( false == skip ) {
simulation::Region->insert(
Region->insert(
scene::shape_node().import(
Input, nodedata ),
Scratchpad,
@@ -595,7 +595,7 @@ state_serializer::deserialize_node( cParser &Input, scene::scratch_data &Scratch
if( false == Scratchpad.binary.terrain ) {
simulation::Region->insert(
Region->insert(
scene::lines_node().import(
Input, nodedata ),
Scratchpad );
@@ -608,38 +608,38 @@ state_serializer::deserialize_node( cParser &Input, scene::scratch_data &Scratch
else if( nodedata.type == "memcell" ) {
auto *memorycell { deserialize_memorycell( Input, Scratchpad, nodedata ) };
if( false == simulation::Memory.insert( memorycell ) ) {
if( false == Memory.insert( memorycell ) ) {
ErrorLog( "Bad scenario: duplicate memory cell name \"" + memorycell->name() + "\" defined in file \"" + Input.Name() + "\" (line " + std::to_string( inputline ) + ")" );
}
scene::Groups.insert( scene::Groups.handle(), memorycell );
simulation::Region->insert( memorycell );
Region->insert( memorycell );
}
else if( nodedata.type == "eventlauncher" ) {
auto *eventlauncher { deserialize_eventlauncher( Input, Scratchpad, nodedata ) };
if( false == simulation::Events.insert( eventlauncher ) ) {
if( false == Events.insert( eventlauncher ) ) {
ErrorLog( "Bad scenario: duplicate event launcher name \"" + eventlauncher->name() + "\" defined in file \"" + Input.Name() + "\" (line " + std::to_string( inputline ) + ")" );
}
// event launchers can be either global, or local with limited range of activation
// each gets assigned different caretaker
if( true == eventlauncher->IsGlobal() ) {
simulation::Events.queue( eventlauncher );
Events.queue( eventlauncher );
}
else {
scene::Groups.insert( scene::Groups.handle(), eventlauncher );
if( false == eventlauncher->IsRadioActivated() ) {
// NOTE: radio-activated launchers due to potentially large activation radius are resolved on global level rather than put in a region cell
simulation::Region->insert( eventlauncher );
Region->insert( eventlauncher );
}
}
}
else if( nodedata.type == "sound" ) {
auto *sound { deserialize_sound( Input, Scratchpad, nodedata ) };
if( false == simulation::Sounds.insert( sound ) ) {
if( false == Sounds.insert( sound ) ) {
ErrorLog( "Bad scenario: duplicate sound node name \"" + sound->name() + "\" defined in file \"" + Input.Name() + "\" (line " + std::to_string( inputline ) + ")" );
}
simulation::Region->insert( sound );
Region->insert( sound );
}
}
@@ -740,7 +740,7 @@ state_serializer::deserialize_time( cParser &Input, scene::scratch_data &Scratch
// current scenario time
cParser timeparser( Input.getToken<std::string>() );
timeparser.getTokens( 2, false, ":" );
auto &time = simulation::Time.data();
auto &time = Time.data();
timeparser
>> time.wHour
>> time.wMinute;
@@ -875,12 +875,12 @@ state_serializer::deserialize_endtrainset( cParser &Input, scene::scratch_data &
0,
nullptr );
}
if( Scratchpad.trainset.couplings.back() == coupling::faux ) {
if( Scratchpad.trainset.couplings.back() == faux ) {
// jeśli ostatni pojazd ma sprzęg 0 to założymy mu końcówki blaszane (jak AI się odpali, to sobie poprawi)
// place end signals only on trains without a driver, activate markers otherwise
Scratchpad.trainset.vehicles.back()->RaLightsSet(
-1,
Scratchpad.trainset.driver != nullptr ? light::redmarker_left | light::redmarker_right | light::rearendsignals : light::rearendsignals );
Scratchpad.trainset.driver != nullptr ? redmarker_left | redmarker_right | rearendsignals : rearendsignals );
}
// all done
Scratchpad.trainset.is_open = false;
@@ -1022,12 +1022,12 @@ state_serializer::deserialize_dynamic( cParser &Input, scene::scratch_data &Scra
auto coupling = couplingdatawithparams != std::string::npos ? std::atoi(couplingdata.substr(0, couplingdatawithparams).c_str()) : std::atoi(couplingdata.c_str());
if( coupling < 0 ) {
// sprzęg zablokowany (pojazdy nierozłączalne przy manewrach)
coupling = -coupling | coupling::permanent;
coupling = -coupling | permanent;
}
if( offset != -1.0
&& std::abs(offset) > 0.5 ) { // maksymalna odległość między sprzęgami - do przemyślenia
// likwidacja sprzęgu, jeśli odległość zbyt duża - to powinno być uwzględniane w fizyce sprzęgów...
coupling = coupling::faux;
coupling = faux;
}
auto const params = couplingdatawithparams != std::string::npos ? couplingdata.substr(couplingdatawithparams + 1) : "";
// load amount and type
@@ -1039,7 +1039,7 @@ state_serializer::deserialize_dynamic( cParser &Input, scene::scratch_data &Scra
loadtype = "";
}
auto *path = simulation::Paths.find( pathname );
auto *path = Paths.find( pathname );
if( path == nullptr ) {
ErrorLog( "Bad scenario: vehicle \"" + Nodedata.name + "\" placed on nonexistent path \"" + pathname + "\" in file \"" + Input.Name() + "\" (line " + std::to_string( inputline ) + ")" );
@@ -1076,8 +1076,8 @@ state_serializer::deserialize_dynamic( cParser &Input, scene::scratch_data &Scra
Scratchpad.trainset.offset -= length;
// automatically establish permanent connections for couplers which specify them in their definitions
if( coupling != 0
&& vehicle->MoverParameters->Couplers[(offset == -1.0 ? end::front : end::rear)].AllowedFlag & coupling::permanent ) {
coupling |= coupling::permanent;
&& vehicle->MoverParameters->Couplers[(offset == -1.0 ? front : rear)].AllowedFlag & permanent ) {
coupling |= permanent;
}
if( true == Scratchpad.trainset.is_open ) {
Scratchpad.trainset.vehicles.emplace_back( vehicle );
@@ -1337,8 +1337,8 @@ TAnimModel *state_serializer::create_model(const std::string &src, const std::st
cloned->mark_dirty();
cloned->location(position);
simulation::Instances.insert(cloned);
simulation::Region->insert(cloned);
Instances.insert(cloned);
Region->insert(cloned);
return cloned;
}
@@ -1362,10 +1362,10 @@ TEventLauncher *state_serializer::create_eventlauncher(const std::string &src, c
if (!launcher)
return nullptr;
launcher->Event1 = simulation::Events.FindEvent( launcher->asEvent1Name );
launcher->Event1 = Events.FindEvent( launcher->asEvent1Name );
launcher->location(position);
simulation::Events.insert(launcher);
simulation::Region->insert(launcher);
Events.insert(launcher);
Region->insert(launcher);
return launcher;
}

View File

@@ -24,7 +24,7 @@ scenario_time::init(std::time_t timestamp) {
const char monthdaycounts[ 2 ][ 13 ] = {
{ 0, 31, 28, 31, 30, 31, 30, 31, 31, 30, 31, 30, 31 },
{ 0, 31, 29, 31, 30, 31, 30, 31, 31, 30, 31, 30, 31 } };
::memcpy( m_monthdaycounts, monthdaycounts, sizeof( monthdaycounts ) );
memcpy( m_monthdaycounts, monthdaycounts, sizeof( monthdaycounts ) );
// potentially adjust scenario clock
auto const requestedtime { clamp_circular<int>( m_time.wHour * 60 + m_time.wMinute + Global.ScenarioTimeOffset * 60, 24 * 60 ) };