MCPcopy Create free account
hub / github.com/OpenLoco/OpenLoco / tick

Function tick

src/OpenLoco/src/EditorController.cpp:425–462  ·  view source on GitHub ↗

Part of 0x0043D9D4

Source from the content-addressed store, hash-verified

423
424 // Part of 0x0043D9D4
425 void tick()
426 {
427 switch (getCurrentStep())
428 {
429 case Step::null:
430 break;
431
432 case Step::objectSelection:
433 if (WindowManager::find(WindowType::objectSelection) == nullptr)
434 {
435 Windows::ObjectSelectionWindow::open();
436 }
437 break;
438
439 case Step::landscapeEditor:
440 // Scenario/landscape loaded?
441 if (Game::hasFlags(GameStateFlags::tileManagerLoaded))
442 {
443 return;
444 }
445
446 if (WindowManager::find(WindowType::landscapeGeneration) == nullptr)
447 {
448 Windows::LandscapeGeneration::open();
449 }
450 break;
451
452 case Step::scenarioOptions:
453 if (WindowManager::find(WindowType::scenarioOptions) == nullptr)
454 {
455 Windows::ScenarioOptions::open();
456 }
457 break;
458
459 case Step::saveScenario:
460 break;
461 }
462 }
463}

Callers

nothing calls this directly

Calls 4

getCurrentStepFunction · 0.85
findFunction · 0.85
hasFlagsFunction · 0.70
openFunction · 0.50

Tested by

no test coverage detected