18
0
mirror of https://github.com/MaSzyna-EU07/maszyna.git synced 2026-12-02 06:12:41 +01:00

Merge MaSzyna-EU07/maszyna master into feat/vat-people

master as of 9fecba82: the test mode (--test, null renderer), the AI braking
and passenger stops, the ESt3 brake, the SOD lamp, the 401Da oil pump lamp,
smoke of vehicles taken off the tracks, text displays with national
characters, the scenario picker drag and drop, the log written to the end of
the closing, unit and scenario tests, and the small fixes.

How the conflicts went:
- the OpenGL 3.3 and legacy renderers stay removed; what master changed in
  them is carried over where this branch has a counterpart: the opaque
  characters of text displays in scene_walk::Render_text(). The instancing
  range of master is covered by the instance records of this branch, the
  sizes of the sun and the moon are its own.
- test mode: the null backend picked in select_gfx_backend(), the window
  hidden, no crash gui; settings of the removed renderers left out.
- materials: the matte and tinted copies of this branch (the tint in the
  slot of the weathering), made again on a change of the season or the
  weather (update_variants), before the track blends.
- tracks: this branch's Segment, Track and TrackUneven, with master's
  replaced_shake(), uneven_underway(), rail_joints_moved(),
  switch_followers() and the editor's add_followers(); tributary and unknown
  track types stay as this branch loads them.
- the log service stops by StopLogService(), the exit paths of EU07.cpp too.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01GXgG7F4L42c2F9sDSAJbT2
This commit is contained in:
lcddisplay
2026-11-08 21:17:00 +01:00
230 changed files with 15522 additions and 821 deletions
+20 -7
View File
@@ -74,15 +74,28 @@ std::deque<std::string> ErrorStack;
// lock for log stacks
std::mutex logMutex;
namespace
{
// the log is written through the closing of the simulator, to the end: set once the closing has nothing more to tell
std::atomic<bool> &log_stopped()
{
static std::atomic<bool> stopped{false};
return stopped;
}
} // namespace
void StopLogService()
{
log_stopped() = true;
}
void LogService()
{
bool quitting{false};
while (!quitting)
// one more pass after the stop, so what came just before it gets written too
for (bool last{false}; false == last;)
{
// read before the stacks are drained, so everything logged before the quit order still gets written
quitting = Global.applicationQuitOrder;
last = log_stopped();
{
// --- Obsługa InfoStack ---
while (!InfoStack.empty())
@@ -114,8 +127,8 @@ void LogService()
if (log_scrollback.size() > 200)
log_scrollback.pop_front();
// log to console
if (Global.iWriteLogEnabled & 2)
// log to console; not in test mode, where the standard output carries the result of the test only
if ((Global.iWriteLogEnabled & 2) && false == Global.test.enabled)
{
if (isError)
printf("\033[1;37;41m%s\033[0m\n", msg.c_str());
@@ -150,7 +163,7 @@ void LogService()
}
}
if (!quitting)
if (false == last)
std::this_thread::sleep_for(std::chrono::milliseconds(50));
}
}