mirror of
https://github.com/MaSzyna-EU07/maszyna.git
synced 2026-11-15 05:59:06 +01:00
refactor(simulation): tidy the test mode code
The test manager is reached through simulation::test() instead of a global, the result cell is owned by a unique_ptr until the memory table takes it, the cell value is compared with a margin, strings are built with std::format and the --test settings moved to apply_test_mode_settings(). The driver's signal check is folded into UpdateSpeedPosition(), which updates a speed table entry and reports a signal at stop the head of the train just passed. The test.* keys are listed with the other settings at the start of the log.
This commit is contained in:
@@ -7,8 +7,9 @@ void null_imgui_renderer::BeginFrame()
|
||||
{
|
||||
auto &io { ImGui::GetIO() };
|
||||
if( false == io.Fonts->IsBuilt() ) {
|
||||
unsigned char *pixels;
|
||||
int width, height;
|
||||
unsigned char *pixels { nullptr };
|
||||
int width { 0 };
|
||||
int height { 0 };
|
||||
io.Fonts->GetTexDataAsAlpha8( &pixels, &width, &height );
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user